public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <lindner_marek@yahoo.de>
Subject: Re: [B.A.T.M.A.N.] [PATCH-marek] batman-adv: Unify the first 3 bytes in each packet
Date: Sat, 28 May 2011 14:07:10 +0200	[thread overview]
Message-ID: <201105281407.15153.sven@narfation.org> (raw)
In-Reply-To: <1306583129-4854-1-git-send-email-lindner_marek@yahoo.de>

[-- Attachment #1: Type: Text/Plain, Size: 1193 bytes --]

On Saturday 28 May 2011 13:45:29 Marek Lindner wrote:
> @@ -99,16 +100,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  reserved;
> +	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  reserved;
> +	uint8_t  dest[6];
>  	uint8_t  flags;
> +	uint8_t  align;
>  	uint8_t  orig[6];
>  	uint16_t seqno;
>  } __packed;

Why dont you use the reserverd part for the flags which are currently not in 
unicast? Then you could also remove that other align byte. It would still be 
possible to add flags to unicast packets when necessary.

> @@ -116,18 +120,20 @@ struct unicast_frag_packet {
>  struct bcast_packet {
>  	uint8_t  packet_type;
>  	uint8_t  version;  /* batman version field */
> -	uint8_t  orig[6];
>  	uint8_t  ttl;
> +	uint8_t  reserved;
> +	uint8_t  orig[6];
>  	uint32_t seqno;
>  } __packed;

Wouldn't that lead to an unaligned seqno?

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2011-05-28 12:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 22:10 [B.A.T.M.A.N.] [PATCH] batman-adv: move the ttl field to the third position of unicast_* packets Antonio Quartulli
2011-05-27 22:20 ` Sven Eckelmann
2011-05-27 22:35   ` Marek Lindner
2011-05-28  7:26     ` Sven Eckelmann
2011-05-28  8:43       ` [B.A.T.M.A.N.] [PATCH-sven] batman-adv: Unify the first 4 bytes in each packet Sven Eckelmann
2011-05-28 11:45         ` [B.A.T.M.A.N.] [PATCH-marek] batman-adv: Unify the first 3 " Marek Lindner
2011-05-28 12:07           ` Sven Eckelmann [this message]
2011-05-28 12:17             ` Marek Lindner
2011-05-28 12:43               ` Sven Eckelmann
2011-05-28 12:51                 ` [B.A.T.M.A.N.] [PATCHv3-sven] " Sven Eckelmann
2011-05-28 15:08                   ` Marek Lindner
2011-05-28 11:46         ` [B.A.T.M.A.N.] [PATCH-sven] batman-adv: Unify the first 4 " Sven Eckelmann
2011-05-28 11:46         ` [B.A.T.M.A.N.] [PATCHv2-sven] batman-adv: Unify the first 3 " Sven Eckelmann
2011-05-28 11:20       ` [B.A.T.M.A.N.] [PATCH] batman-adv: move the ttl field to the third position of unicast_* packets Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201105281407.15153.sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=lindner_marek@yahoo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox