aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/lib/packet_history.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ccids/lib/packet_history.c')
-rw-r--r--net/dccp/ccids/lib/packet_history.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c
index ad98d6a322eb..420c60f8604d 100644
--- a/net/dccp/ccids/lib/packet_history.c
+++ b/net/dccp/ccids/lib/packet_history.c
@@ -1,13 +1,13 @@
1/* 1/*
2 * net/dccp/packet_history.h 2 * net/dccp/packet_history.c
3 * 3 *
4 * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. 4 * Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand.
5 * 5 *
6 * An implementation of the DCCP protocol 6 * An implementation of the DCCP protocol
7 * 7 *
8 * This code has been developed by the University of Waikato WAND 8 * This code has been developed by the University of Waikato WAND
9 * research group. For further information please see http://www.wand.net.nz/ 9 * research group. For further information please see http://www.wand.net.nz/
10 * or e-mail Ian McDonald - iam4@cs.waikato.ac.nz 10 * or e-mail Ian McDonald - ian.mcdonald@jandi.co.nz
11 * 11 *
12 * This code also uses code from Lulea University, rereleased as GPL by its 12 * This code also uses code from Lulea University, rereleased as GPL by its
13 * authors: 13 * authors:
@@ -365,6 +365,25 @@ struct dccp_tx_hist_entry *
365 365
366EXPORT_SYMBOL_GPL(dccp_tx_hist_find_entry); 366EXPORT_SYMBOL_GPL(dccp_tx_hist_find_entry);
367 367
368int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq,
369 u8 *ccval)
370{
371 struct dccp_rx_hist_entry *packet = NULL, *entry;
372
373 list_for_each_entry(entry, list, dccphrx_node)
374 if (entry->dccphrx_seqno == seq) {
375 packet = entry;
376 break;
377 }
378
379 if (packet)
380 *ccval = packet->dccphrx_ccval;
381
382 return packet != NULL;
383}
384
385EXPORT_SYMBOL_GPL(dccp_rx_hist_find_entry);
386
368void dccp_tx_hist_purge_older(struct dccp_tx_hist *hist, 387void dccp_tx_hist_purge_older(struct dccp_tx_hist *hist,
369 struct list_head *list, 388 struct list_head *list,
370 struct dccp_tx_hist_entry *packet) 389 struct dccp_tx_hist_entry *packet)
@@ -391,7 +410,7 @@ void dccp_tx_hist_purge(struct dccp_tx_hist *hist, struct list_head *list)
391 410
392EXPORT_SYMBOL_GPL(dccp_tx_hist_purge); 411EXPORT_SYMBOL_GPL(dccp_tx_hist_purge);
393 412
394MODULE_AUTHOR("Ian McDonald <iam4@cs.waikato.ac.nz>, " 413MODULE_AUTHOR("Ian McDonald <ian.mcdonald@jandi.co.nz>, "
395 "Arnaldo Carvalho de Melo <acme@ghostprotocols.net>"); 414 "Arnaldo Carvalho de Melo <acme@ghostprotocols.net>");
396MODULE_DESCRIPTION("DCCP TFRC library"); 415MODULE_DESCRIPTION("DCCP TFRC library");
397MODULE_LICENSE("GPL"); 416MODULE_LICENSE("GPL");