summaryrefslogtreecommitdiff
path: root/net/batman-adv/network-coding.h
diff options
context:
space:
mode:
authorMartin Hundebøll <martin@hundeboll.net>2013-01-25 10:12:42 (GMT)
committerAntonio Quartulli <ordex@autistici.org>2013-03-13 21:53:50 (GMT)
commit612d2b4fe0a1ff2f8389462a6f8be34e54124c05 (patch)
tree033dc44cbb8a68965e2eb0b7e5039a46ed845a52 /net/batman-adv/network-coding.h
parent3c12de9a5c756b23fe7c9ab332474ece1568914c (diff)
downloadlinux-612d2b4fe0a1ff2f8389462a6f8be34e54124c05.tar.xz
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 c32602a..4fa6d0c 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)
{