[B.A.T.M.A.N.] [PATCH] batman-adv: move the ttl field to the third position of unicast_* packets

Antonio Quartulli
2011-05-27T22:10:22Z

Move the ttl field to the third position of unicast_packet and
unicast_frag_packet. In this way it possible to give them a better shape for
later usage

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
packet.h | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/packet.h b/packet.h
index eda9965..e464ceb 100644
--- a/packet.h
+++ b/packet.h
@@ -32,7 +32,7 @@
#define BAT_UNICAST_FRAG 0x06

/* this file is included by batctl which needs these defines */
-#define COMPAT_VERSION 12
+#define COMPAT_VERSION 14
#define DIRECTLINK 0x40
#define VIS_SERVER 0x20
#define PRIMARIES_FIRST_HOP 0x10
@@ -99,16 +99,19 @@ struct icmp_packet_rr {
struct unicast_packet {
uint8_t packet_type;
uint8_t version; /* batman version field */
- uint8_t dest[6];
uint8_t ttl;
+ uint8_t align;
+ uint8_t dest[6];
} __packed;

struct unicast_frag_packet {
uint8_t packet_type;
uint8_t version; /* batman version field */
- uint8_t dest[6];
uint8_t ttl;
+ uint8_t align;
+ uint8_t dest[6];
uint8_t flags;
+ uint8_t align;
uint8_t orig[6];
uint16_t seqno;
} __packed;
--
1.7.3.4