From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Wed, 29 May 2013 16:06:34 +0800 References: <1369814304-2852-1-git-send-email-ordex@autistici.org> In-Reply-To: <1369814304-2852-1-git-send-email-ordex@autistici.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201305291606.34646.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] [PATCHv2] batctl: create common header for ICMP packets 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: , To: b.a.t.m.a.n@lists.open-mesh.org Cc: Antonio Quartulli , Antonio Quartulli On Wednesday, May 29, 2013 15:58:24 Antonio Quartulli wrote: > From: Antonio Quartulli > > the icmp and the icmp_rr packets share the same initial > fields since they use the same code to be processed and > forwarded. > > Extract the common fields and put them into a separate > struct so that future ICMP packets can be easily added > without bloating the packet definition. > > However, keep the seqno field outside of the newly created > common header because future ICMP types may require a > bigger sequence number space. > > This change breaks compatibility due to fields reordering > in the ICMP headers. > > Signed-off-by: Antonio Quartulli > --- > > v2: > - added changes to packet.h > > packet.h | 38 ++++++++++++++++++++++++++++---------- > ping.c | 24 ++++++++++++++---------- > tcpdump.c | 27 +++++++++++++++++---------- > traceroute.c | 31 +++++++++++++++++++------------ > 4 files changed, 78 insertions(+), 42 deletions(-) Applied in revision 9ffe18f. Thanks, Marek