From patchwork Fri May 27 22:10:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1067 Return-Path: Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by open-mesh.org (Postfix) with ESMTPS id 1DA031542FD for ; Sat, 28 May 2011 00:10:32 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@autistici.org; dkim-adsp=pass Received: from [217.150.252.179] (confino [217.150.252.179]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 863B184457; Fri, 27 May 2011 22:10:26 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org 863B184457 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1306534231; bh=ejvtGj+jVAcsQ12lIE3LKnvKVuQHHbh7+LSnnjvd3vQ=; h=From:To:Cc:Subject:Date:Message-Id; b=ADhvu2jwgDxnwnsfA40GLaCd6c++LEN+Sg3Kz8bNl3ysSbAlW/866X0vSQkunJ4eB S3awpUpyIPNu75Yo1YPM5FKUKkGGUuZIP/0sxLFI52UTHLhoeZSoZUMZe4qxmEae/I nQpQwOEAEnli+bEqDkdS0VlbS0nzmAZVxBUtpQs0= From: Antonio Quartulli To: "B.A.T.M.A.N" Date: Sat, 28 May 2011 00:10:22 +0200 Message-Id: <1306534222-11710-1-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: move the ttl field to the third position of unicast_* packets X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 22:10:32 -0000 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 --- 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;