diff options
author | Ian McDonald <ian.mcdonald@jandi.co.nz> | 2006-08-27 06:07:36 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-08-27 06:07:36 +0400 |
commit | 80193aee18bc862e284ba18504f3a3e14706a997 (patch) | |
tree | 84b814bc136727976c9e9503093519a93b646529 /net/dccp/ccids/lib/packet_history.c | |
parent | 837d107cd101fbf734e9ea2bbb5c7336a329e432 (diff) | |
download | linux-80193aee18bc862e284ba18504f3a3e14706a997.tar.xz |
[DCCP]: Introduce dccp_rx_hist_find_entry
This adds a new function dccp_rx_hist_find_entry.
Signed off by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids/lib/packet_history.c')
-rw-r--r-- | net/dccp/ccids/lib/packet_history.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c index 7b6b03e9271a..420c60f8604d 100644 --- a/net/dccp/ccids/lib/packet_history.c +++ b/net/dccp/ccids/lib/packet_history.c @@ -365,6 +365,25 @@ struct dccp_tx_hist_entry * EXPORT_SYMBOL_GPL(dccp_tx_hist_find_entry); +int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq, + u8 *ccval) +{ + struct dccp_rx_hist_entry *packet = NULL, *entry; + + list_for_each_entry(entry, list, dccphrx_node) + if (entry->dccphrx_seqno == seq) { + packet = entry; + break; + } + + if (packet) + *ccval = packet->dccphrx_ccval; + + return packet != NULL; +} + +EXPORT_SYMBOL_GPL(dccp_rx_hist_find_entry); + void dccp_tx_hist_purge_older(struct dccp_tx_hist *hist, struct list_head *list, struct dccp_tx_hist_entry *packet) |