Skip to content

Commit

Permalink
batman-adv: network coding - code and transmit packets if possible
Browse files Browse the repository at this point in the history
Before adding forward-skbs to the coding buffer, the buffer is searched
for a potential coding opportunity. If one is found, the two packets are
network coded and transmitted right away. If not, the forward-skb is
added to the buffer.

Network coded packets are transmitted with information about the two
receivers and the two coded packets. The first receiver is given by the
MAC header, while the second is given in the payload/bat-header. The
second receiver uses promiscuous mode to receive the packet and check
the second destination.

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>
  • Loading branch information
Martin Hundebøll authored and Antonio Quartulli committed Mar 13, 2013
1 parent 9533247 commit 3c12de9
Show file tree
Hide file tree
Showing 5 changed files with 466 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/batman-adv/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,10 @@ static inline uint64_t batadv_sum_counter(struct batadv_priv *bat_priv,
return sum;
}

/* Define a macro to reach the control buffer of the skb. The members of the
* control buffer are defined in struct batadv_skb_cb in types.h.
* The macro is inspired by the similar macro TCP_SKB_CB() in tcp.h.
*/
#define BATADV_SKB_CB(__skb) ((struct batadv_skb_cb *)&((__skb)->cb[0]))

#endif /* _NET_BATMAN_ADV_MAIN_H_ */
Loading

0 comments on commit 3c12de9

Please sign in to comment.