aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/network-coding.h
diff options
context:
space:
mode:
authorMartin Hundebøll <martin@hundeboll.net>2013-01-25 05:12:42 -0500
committerAntonio Quartulli <ordex@autistici.org>2013-03-13 17:53:50 -0400
commit612d2b4fe0a1ff2f8389462a6f8be34e54124c05 (patch)
tree033dc44cbb8a68965e2eb0b7e5039a46ed845a52 /net/batman-adv/network-coding.h
parent3c12de9a5c756b23fe7c9ab332474ece1568914c (diff)
batman-adv: network coding - save overheard and tx packets for decoding
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 <martin@hundeboll.net> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/network-coding.h')
-rw-r--r--net/batman-adv/network-coding.h18
1 files changed, 18 insertions, 0 deletions
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);
38bool batadv_nc_skb_forward(struct sk_buff *skb, 38bool batadv_nc_skb_forward(struct sk_buff *skb,
39 struct batadv_neigh_node *neigh_node, 39 struct batadv_neigh_node *neigh_node,
40 struct ethhdr *ethhdr); 40 struct ethhdr *ethhdr);
41void batadv_nc_skb_store_for_decoding(struct batadv_priv *bat_priv,
42 struct sk_buff *skb);
43void batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv,
44 struct sk_buff *skb);
41int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset); 45int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset);
42int batadv_nc_init_debugfs(struct batadv_priv *bat_priv); 46int batadv_nc_init_debugfs(struct batadv_priv *bat_priv);
43 47
@@ -89,6 +93,20 @@ static inline bool batadv_nc_skb_forward(struct sk_buff *skb,
89 return false; 93 return false;
90} 94}
91 95
96static inline void
97batadv_nc_skb_store_for_decoding(struct batadv_priv *bat_priv,
98 struct sk_buff *skb)
99{
100 return;
101}
102
103static inline void
104batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv,
105 struct sk_buff *skb)
106{
107 return;
108}
109
92static inline int batadv_nc_nodes_seq_print_text(struct seq_file *seq, 110static inline int batadv_nc_nodes_seq_print_text(struct seq_file *seq,
93 void *offset) 111 void *offset)
94{ 112{