OSDN Git Service

batman-adv: tvlv - basic infrastructure
authorMarek Lindner <lindner_marek@yahoo.de>
Tue, 23 Apr 2013 13:39:57 +0000 (21:39 +0800)
committerAntonio Quartulli <antonio@meshcoding.com>
Wed, 9 Oct 2013 19:22:26 +0000 (21:22 +0200)
commitef26157747d42254453f6b3ac2bd8bd3c53339c3
treeac9f366de417ca89b225143eb176b9618376f5eb
parent60cf7981b770e329a05734d1e6eb055f13219202
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 <lindner_marek@yahoo.de>
Signed-off-by: Spyros Gasteratos <morfeas3000@gmail.com>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
net/batman-adv/bat_iv_ogm.c
net/batman-adv/main.c
net/batman-adv/main.h
net/batman-adv/packet.h
net/batman-adv/routing.c
net/batman-adv/routing.h
net/batman-adv/types.h