From ef26157747d42254453f6b3ac2bd8bd3c53339c3 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Tue, 23 Apr 2013 21:39:57 +0800 Subject: batman-adv: tvlv - basic infrastructure The goal is to provide the infrastructure for sending, receiving and parsing information 'containers' while preserving backward compatibility. TVLV (based on the commonly known Type Length Value technique) was chosen as the format for those containers. Even if a node does not know the tvlv type of a certain container it can simply skip the current container and proceed with the next. Past experience has shown features evolve over time, so a 'version' field was added right from the start to allow differentiating between feature variants - hence the name: T(ype) V(ersion) L(ength) V(alue). This patch introduces the basic TVLV infrastructure: * register / unregister tvlv containers to be sent with each OGM (on primary interfaces only) * register / unregister callback handlers to be called upon finding the corresponding tvlv type in a tvlv buffer * unicast tvlv send / receive API calls Signed-off-by: Marek Lindner Signed-off-by: Spyros Gasteratos Signed-off-by: Antonio Quartulli --- net/batman-adv/routing.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net/batman-adv/routing.h') diff --git a/net/batman-adv/routing.h b/net/batman-adv/routing.h index 72a29bd..0a7983b 100644 --- a/net/batman-adv/routing.h +++ b/net/batman-adv/routing.h @@ -40,6 +40,8 @@ int batadv_recv_tt_query(struct sk_buff *skb, struct batadv_hard_iface *recv_if); int batadv_recv_roam_adv(struct sk_buff *skb, struct batadv_hard_iface *recv_if); +int batadv_recv_unicast_tvlv(struct sk_buff *skb, + struct batadv_hard_iface *recv_if); struct batadv_neigh_node * batadv_find_router(struct batadv_priv *bat_priv, struct batadv_orig_node *orig_node, -- cgit v1.1