diff options
| author | Ian McDonald <ian.mcdonald@jandi.co.nz> | 2006-08-26 22:07:36 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2006-08-26 22:07:36 -0400 |
| commit | 80193aee18bc862e284ba18504f3a3e14706a997 (patch) | |
| tree | 84b814bc136727976c9e9503093519a93b646529 /net/dccp/ccids/lib | |
| parent | 837d107cd101fbf734e9ea2bbb5c7336a329e432 (diff) | |
[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')
| -rw-r--r-- | net/dccp/ccids/lib/packet_history.c | 19 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/packet_history.h | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c index 7b6b03e927..420c60f860 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 * | |||
| 365 | 365 | ||
| 366 | EXPORT_SYMBOL_GPL(dccp_tx_hist_find_entry); | 366 | EXPORT_SYMBOL_GPL(dccp_tx_hist_find_entry); |
| 367 | 367 | ||
| 368 | int 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 | |||
| 385 | EXPORT_SYMBOL_GPL(dccp_rx_hist_find_entry); | ||
| 386 | |||
| 368 | void dccp_tx_hist_purge_older(struct dccp_tx_hist *hist, | 387 | void 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) |
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h index 27c4309263..aea9c5d709 100644 --- a/net/dccp/ccids/lib/packet_history.h +++ b/net/dccp/ccids/lib/packet_history.h | |||
| @@ -106,6 +106,8 @@ static inline void dccp_tx_hist_entry_delete(struct dccp_tx_hist *hist, | |||
| 106 | extern struct dccp_tx_hist_entry * | 106 | extern struct dccp_tx_hist_entry * |
| 107 | dccp_tx_hist_find_entry(const struct list_head *list, | 107 | dccp_tx_hist_find_entry(const struct list_head *list, |
| 108 | const u64 seq); | 108 | const u64 seq); |
| 109 | extern int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq, | ||
| 110 | u8 *ccval); | ||
| 109 | 111 | ||
| 110 | static inline void dccp_tx_hist_add_entry(struct list_head *list, | 112 | static inline void dccp_tx_hist_add_entry(struct list_head *list, |
| 111 | struct dccp_tx_hist_entry *entry) | 113 | struct dccp_tx_hist_entry *entry) |
