From b46e12366cd96a00a6cc50b1e32f9db647841d42 Mon Sep 17 00:00:00 2001 From: Ian McDonald Date: Sat, 26 Aug 2006 19:07:36 -0700 Subject: [PATCH] --- yaml --- r: 33615 b: refs/heads/master c: 80193aee18bc862e284ba18504f3a3e14706a997 h: refs/heads/master i: 33613: 336fd9468a1efefbf687956c9d20a6556c399852 33611: ca212826999452286ab7c6179a293e816c65d225 33607: 672c01588a55d5574242673940e06df1cb79ac90 33599: e352d70c2ed55e5ef1b6da7de0f5435b72bc4810 v: v3 --- [refs] | 2 +- trunk/net/dccp/ccids/lib/packet_history.c | 19 +++++++++++++++++++ trunk/net/dccp/ccids/lib/packet_history.h | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 57eb77639f48..a88f0b76c28a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 837d107cd101fbf734e9ea2bbb5c7336a329e432 +refs/heads/master: 80193aee18bc862e284ba18504f3a3e14706a997 diff --git a/trunk/net/dccp/ccids/lib/packet_history.c b/trunk/net/dccp/ccids/lib/packet_history.c index 7b6b03e9271a..420c60f8604d 100644 --- a/trunk/net/dccp/ccids/lib/packet_history.c +++ b/trunk/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) diff --git a/trunk/net/dccp/ccids/lib/packet_history.h b/trunk/net/dccp/ccids/lib/packet_history.h index 27c43092636c..aea9c5d70910 100644 --- a/trunk/net/dccp/ccids/lib/packet_history.h +++ b/trunk/net/dccp/ccids/lib/packet_history.h @@ -106,6 +106,8 @@ static inline void dccp_tx_hist_entry_delete(struct dccp_tx_hist *hist, extern struct dccp_tx_hist_entry * dccp_tx_hist_find_entry(const struct list_head *list, const u64 seq); +extern int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq, + u8 *ccval); static inline void dccp_tx_hist_add_entry(struct list_head *list, struct dccp_tx_hist_entry *entry)