From 612d2b4fe0a1ff2f8389462a6f8be34e54124c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= Date: Fri, 25 Jan 2013 11:12:42 +0100 Subject: batman-adv: network coding - save overheard and tx packets for decoding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To be able to decode a network coded packet, a node must already know one of the two coded packets. This is done by buffering skbs before transmission and buffering packets sniffed with promiscuous mode from other hosts. Packets are kept in a buffer similar to the one with forward-skbs: A hash table, where each entry, which corresponds to a src-dst pair, has a linked list packets. Signed-off-by: Martin Hundebøll Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/network-coding.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'net/batman-adv/network-coding.h') diff --git a/net/batman-adv/network-coding.h b/net/batman-adv/network-coding.h index c32602a3939a..4fa6d0caddbd 100644 --- a/net/batman-adv/network-coding.h +++ b/net/batman-adv/network-coding.h @@ -38,6 +38,10 @@ void batadv_nc_init_orig(struct batadv_orig_node *orig_node); bool batadv_nc_skb_forward(struct sk_buff *skb, struct batadv_neigh_node *neigh_node, struct ethhdr *ethhdr); +void batadv_nc_skb_store_for_decoding(struct batadv_priv *bat_priv, + struct sk_buff *skb); +void batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv, + struct sk_buff *skb); int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset); int batadv_nc_init_debugfs(struct batadv_priv *bat_priv); @@ -89,6 +93,20 @@ static inline bool batadv_nc_skb_forward(struct sk_buff *skb, return false; } +static inline void +batadv_nc_skb_store_for_decoding(struct batadv_priv *bat_priv, + struct sk_buff *skb) +{ + return; +} + +static inline void +batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv, + struct sk_buff *skb) +{ + return; +} + static inline int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset) { -- cgit v1.2.1