diff options
author | Martin Hundebøll <martin@hundeboll.net> | 2012-10-16 10:13:48 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-11-21 06:34:50 -0500 |
commit | bb351ba0bba23f01af00e36bfe20897201f404fa (patch) | |
tree | 7ac84275cfb3f32d0cae0ba854a90298f56e9561 /net/batman-adv/send.h | |
parent | 637fbd12947b5645d8c16c982aa15c17ab695b0a (diff) |
batman-adv: Add wrapper to look up neighbor and send skb
By adding batadv_send_skb_to_orig() in send.c, we can remove duplicate
code that looks up the next hop and then calls batadv_send_skb_packet().
Furthermore, this prepares the upcoming new implementation of
fragmentation, which requires the next hop to route packets.
Please note that this doesn't entirely remove the next-hop lookup in
routing.c and unicast.c, since it is used by the current fragmentation
code.
Also note that the next-hop info is removed from debug messages in
translation-table.c, since it is looked up elsewhere.
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/send.h')
-rw-r--r-- | net/batman-adv/send.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/batman-adv/send.h b/net/batman-adv/send.h index 643329b787ed..0078dece1abc 100644 --- a/net/batman-adv/send.h +++ b/net/batman-adv/send.h | |||
@@ -23,6 +23,9 @@ | |||
23 | int batadv_send_skb_packet(struct sk_buff *skb, | 23 | int batadv_send_skb_packet(struct sk_buff *skb, |
24 | struct batadv_hard_iface *hard_iface, | 24 | struct batadv_hard_iface *hard_iface, |
25 | const uint8_t *dst_addr); | 25 | const uint8_t *dst_addr); |
26 | bool batadv_send_skb_to_orig(struct sk_buff *skb, | ||
27 | struct batadv_orig_node *orig_node, | ||
28 | struct batadv_hard_iface *recv_if); | ||
26 | void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface); | 29 | void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface); |
27 | int batadv_add_bcast_packet_to_list(struct batadv_priv *bat_priv, | 30 | int batadv_add_bcast_packet_to_list(struct batadv_priv *bat_priv, |
28 | const struct sk_buff *skb, | 31 | const struct sk_buff *skb, |