From c018ad3de61a1dc4194879a53e5559e094aa7b1a Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Tue, 4 Jun 2013 12:11:39 +0200 Subject: batman-adv: add the VLAN ID attribute to the TT entry To make the translation table code VLAN-aware, each entry must carry the VLAN ID which it belongs to. This patch adds such attribute to the related TT structures. Signed-off-by: Antonio Quartulli Signed-off-by: Marek Lindner --- net/batman-adv/send.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'net/batman-adv/send.h') diff --git a/net/batman-adv/send.h b/net/batman-adv/send.h index ad63184a4dd9..c030cb72ff45 100644 --- a/net/batman-adv/send.h +++ b/net/batman-adv/send.h @@ -40,21 +40,23 @@ bool batadv_send_skb_prepare_unicast_4addr(struct batadv_priv *bat_priv, int packet_subtype); int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv, struct sk_buff *skb, int packet_type, - int packet_subtype); - + int packet_subtype, + unsigned short vid); /** * batadv_send_unicast_skb - send the skb encapsulated in a unicast packet * @bat_priv: the bat priv with all the soft interface information * @skb: the payload to send + * @vid: the vid to be used to search the translation table * * Returns 1 in case of error or 0 otherwise. */ static inline int batadv_send_skb_unicast(struct batadv_priv *bat_priv, - struct sk_buff *skb) + struct sk_buff *skb, + unsigned short vid) { return batadv_send_skb_generic_unicast(bat_priv, skb, BATADV_UNICAST, - 0); + 0, vid); } /** @@ -63,16 +65,18 @@ static inline int batadv_send_skb_unicast(struct batadv_priv *bat_priv, * @bat_priv: the bat priv with all the soft interface information * @skb: the payload to send * @packet_subtype: the unicast 4addr packet subtype to use + * @vid: the vid to be used to search the translation table * * Returns 1 in case of error or 0 otherwise. */ static inline int batadv_send_skb_unicast_4addr(struct batadv_priv *bat_priv, struct sk_buff *skb, - int packet_subtype) + int packet_subtype, + unsigned short vid) { return batadv_send_skb_generic_unicast(bat_priv, skb, BATADV_UNICAST_4ADDR, - packet_subtype); + packet_subtype, vid); } #endif /* _NET_BATMAN_ADV_SEND_H_ */ -- cgit v1.2.3