summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/packet.h
diff options
context:
space:
mode:
authorLinus Luessing <linus.luessing@web.de>2016-01-16 03:40:09 -0500
committerAntonio Quartulli <a@unstable.cc>2016-02-29 03:05:29 -0500
commitd6f94d91f766b4205e5b0aa4b11f96271c793f6d (patch)
tree8055ce7a0337ab262af4522f9a20ab11b4769239 /net/batman-adv/packet.h
parent0744ff8fa8fad7aae669b73fd78f3efe1d8e31ca (diff)
batman-adv: ELP - adding basic infrastructure
The B.A.T.M.A.N. protocol originally only used a single message type (called OGM) to determine the link qualities to the direct neighbors and spreading these link quality information through the whole mesh. This procedure is summarized on the BATMAN concept page and explained in details in the RFC draft published in 2008. This approach was chosen for its simplicity during the protocol design phase and the implementation. However, it also bears some drawbacks: * Wireless interfaces usually come with some packet loss, therefore a higher broadcast rate is desirable to allow a fast reaction on flaky connections. Other interfaces of the same host might be connected to Ethernet LANs / VPNs / etc which rarely exhibit packet loss would benefit from a lower broadcast rate to reduce overhead. * It generally is more desirable to detect local link quality changes at a faster rate than propagating all these changes through the entire mesh (the far end of the mesh does not need to care about local link quality changes that much). Other optimizations strategies, like reducing overhead, might be possible if OGMs weren't used for all tasks in the mesh at the same time. As a result detecting local link qualities shall be handled by an independent message type, ELP, whereas the OGM message type remains responsible for flooding the mesh with these link quality information and determining the overall path transmit qualities. Developed by Linus during a 6 months trainee study period in Ascom (Switzerland) AG. Signed-off-by: Linus Luessing <linus.luessing@web.de> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Diffstat (limited to 'net/batman-adv/packet.h')
-rw-r--r--net/batman-adv/packet.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index e7f915181aba..c698b6452953 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -26,6 +26,7 @@
26 * @BATADV_IV_OGM: originator messages for B.A.T.M.A.N. IV 26 * @BATADV_IV_OGM: originator messages for B.A.T.M.A.N. IV
27 * @BATADV_BCAST: broadcast packets carrying broadcast payload 27 * @BATADV_BCAST: broadcast packets carrying broadcast payload
28 * @BATADV_CODED: network coded packets 28 * @BATADV_CODED: network coded packets
29 * @BATADV_ELP: echo location packets for B.A.T.M.A.N. V
29 * 30 *
30 * @BATADV_UNICAST: unicast packets carrying unicast payload traffic 31 * @BATADV_UNICAST: unicast packets carrying unicast payload traffic
31 * @BATADV_UNICAST_FRAG: unicast packets carrying a fragment of the original 32 * @BATADV_UNICAST_FRAG: unicast packets carrying a fragment of the original
@@ -40,6 +41,7 @@ enum batadv_packettype {
40 BATADV_IV_OGM = 0x00, 41 BATADV_IV_OGM = 0x00,
41 BATADV_BCAST = 0x01, 42 BATADV_BCAST = 0x01,
42 BATADV_CODED = 0x02, 43 BATADV_CODED = 0x02,
44 BATADV_ELP = 0x03,
43 /* 0x40 - 0x7f: unicast */ 45 /* 0x40 - 0x7f: unicast */
44#define BATADV_UNICAST_MIN 0x40 46#define BATADV_UNICAST_MIN 0x40
45 BATADV_UNICAST = 0x40, 47 BATADV_UNICAST = 0x40,
@@ -235,6 +237,24 @@ struct batadv_ogm_packet {
235#define BATADV_OGM_HLEN sizeof(struct batadv_ogm_packet) 237#define BATADV_OGM_HLEN sizeof(struct batadv_ogm_packet)
236 238
237/** 239/**
240 * struct batadv_elp_packet - elp (neighbor discovery) packet
241 * @packet_type: batman-adv packet type, part of the general header
242 * @version: batman-adv protocol version, part of the genereal header
243 * @orig: originator mac address
244 * @seqno: sequence number
245 * @elp_interval: currently used ELP sending interval in ms
246 */
247struct batadv_elp_packet {
248 u8 packet_type;
249 u8 version;
250 u8 orig[ETH_ALEN];
251 __be32 seqno;
252 __be32 elp_interval;
253};
254
255#define BATADV_ELP_HLEN sizeof(struct batadv_elp_packet)
256
257/**
238 * struct batadv_icmp_header - common members among all the ICMP packets 258 * struct batadv_icmp_header - common members among all the ICMP packets
239 * @packet_type: batman-adv packet type, part of the general header 259 * @packet_type: batman-adv packet type, part of the general header
240 * @version: batman-adv protocol version, part of the genereal header 260 * @version: batman-adv protocol version, part of the genereal header