aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/packet.h
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2013-04-25 04:37:23 -0400
committerAntonio Quartulli <antonio@meshcoding.com>2013-10-09 15:22:34 -0400
commita1f1ac5c4d045a1adc6662346733a6db3aee5a9d (patch)
treeba32dde81ad0d35055bf8102a609e6b07c8cda9d /net/batman-adv/packet.h
parent80067c8320aebab6d740e07be6ecf3dd04787f60 (diff)
batman-adv: reorder packet types
Reordering the packet type numbers allows us to handle unicast packets in a general way - even if we don't know the specific packet type, we can still forward it. There was already code handling this for a couple of unicast packets, and this is the more generalized version to do that. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net/batman-adv/packet.h')
-rw-r--r--net/batman-adv/packet.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index 87fcf2e7883c..f02dbb1892dd 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -22,17 +22,32 @@
22 22
23/** 23/**
24 * enum batadv_packettype - types for batman-adv encapsulated packets 24 * enum batadv_packettype - types for batman-adv encapsulated packets
25 * @BATADV_IV_OGM: originator messages for B.A.T.M.A.N. IV
26 * @BATADV_BCAST: broadcast packets carrying broadcast payload
27 * @BATADV_CODED: network coded packets
28 *
29 * @BATADV_UNICAST: unicast packets carrying unicast payload traffic
30 * @BATADV_UNICAST_FRAG: unicast packets carrying a fragment of the original
31 * payload packet
32 * @BATADV_UNICAST_4ADDR: unicast packet including the originator address of
33 * the sender
34 * @BATADV_ICMP: unicast packet like IP ICMP used for ping or traceroute
25 * @BATADV_UNICAST_TVLV: unicast packet carrying TVLV containers 35 * @BATADV_UNICAST_TVLV: unicast packet carrying TVLV containers
26 */ 36 */
27enum batadv_packettype { 37enum batadv_packettype {
28 BATADV_IV_OGM = 0x01, 38 /* 0x00 - 0x3f: local packets or special rules for handling */
29 BATADV_ICMP = 0x02, 39 BATADV_IV_OGM = 0x00,
30 BATADV_UNICAST = 0x03, 40 BATADV_BCAST = 0x01,
31 BATADV_BCAST = 0x04, 41 BATADV_CODED = 0x02,
32 BATADV_UNICAST_FRAG = 0x06, 42 /* 0x40 - 0x7f: unicast */
33 BATADV_UNICAST_4ADDR = 0x09, 43#define BATADV_UNICAST_MIN 0x40
34 BATADV_CODED = 0x0a, 44 BATADV_UNICAST = 0x40,
35 BATADV_UNICAST_TVLV = 0x0b, 45 BATADV_UNICAST_FRAG = 0x41,
46 BATADV_UNICAST_4ADDR = 0x42,
47 BATADV_ICMP = 0x43,
48 BATADV_UNICAST_TVLV = 0x44,
49#define BATADV_UNICAST_MAX 0x7f
50 /* 0x80 - 0xff: reserved */
36}; 51};
37 52
38/** 53/**