From bb351ba0bba23f01af00e36bfe20897201f404fa Mon Sep 17 00:00:00 2001 From: Martin Hundebøll Date: Tue, 16 Oct 2012 16:13:48 +0200 Subject: batman-adv: Add wrapper to look up neighbor and send skb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/send.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/batman-adv/send.h') 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 @@ int batadv_send_skb_packet(struct sk_buff *skb, struct batadv_hard_iface *hard_iface, const uint8_t *dst_addr); +bool batadv_send_skb_to_orig(struct sk_buff *skb, + struct batadv_orig_node *orig_node, + struct batadv_hard_iface *recv_if); void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface); int batadv_add_bcast_packet_to_list(struct batadv_priv *bat_priv, const struct sk_buff *skb, -- cgit v1.2.3