summaryrefslogtreecommitdiff
path: root/net/batman-adv/originator.h
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2013-07-31 00:16:25 +0400
committerAntonio Quartulli <antonio@meshcoding.com>2013-10-20 01:25:12 +0400
commit7ea7b4a142758deaf46c1af0ca9ceca6dd55138b (patch)
tree02803d96cc171936e7c973f389ec19f7e0295a97 /net/batman-adv/originator.h
parenta70a9aa990bdf24039cb4167993bcc5a0f9cbb18 (diff)
downloadlinux-7ea7b4a142758deaf46c1af0ca9ceca6dd55138b.tar.xz
batman-adv: make the TT CRC logic VLAN specific
This change allows nodes to handle the TT table on a per-VLAN basis. This is needed because nodes may have to store only some of the global entries advertised by another node. In this scenario such nodes would re-create only a partial global table and would not be able to compute a correct CRC anymore. This patch splits the logic and introduces one CRC per VLAN. In this way a node fetching only some entries belonging to some VLANs is still able to compute the needed CRCs and still check the table correctness. With this patch the shape of the TVLV-TT is changed too because now a node needs to advertise all the CRCs of all the VLANs that it is wired to. The debug output of the local Translation Table now shows the CRC along with each entry since there is not a common value for the entire table anymore. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/originator.h')
-rw-r--r--net/batman-adv/originator.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/batman-adv/originator.h b/net/batman-adv/originator.h
index 7887b84a9af4..cc6d686cfe6d 100644
--- a/net/batman-adv/originator.h
+++ b/net/batman-adv/originator.h
@@ -40,6 +40,13 @@ int batadv_orig_hash_add_if(struct batadv_hard_iface *hard_iface,
int max_if_num);
int batadv_orig_hash_del_if(struct batadv_hard_iface *hard_iface,
int max_if_num);
+struct batadv_orig_node_vlan *
+batadv_orig_node_vlan_new(struct batadv_orig_node *orig_node,
+ unsigned short vid);
+struct batadv_orig_node_vlan *
+batadv_orig_node_vlan_get(struct batadv_orig_node *orig_node,
+ unsigned short vid);
+void batadv_orig_node_vlan_free_ref(struct batadv_orig_node_vlan *orig_vlan);
/* hashfunction to choose an entry in a hash table of given size