From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: pass a unique flag arg instead of a sequence of bool ones
Date: Mon, 27 Jun 2011 13:32:15 +0200 [thread overview]
Message-ID: <20110627113215.GC30872@ritirata.org> (raw)
In-Reply-To: <20110627053319.GH12315@lunn.ch>
Hi Andrew,
On Mon, Jun 27, 2011 at 07:33:19AM +0200, Andrew Lunn wrote:
> Hi Antonio
>
> > + /* NOPURGE flag has not to go on the wire */
> > + flags &= ~TT_CLIENT_NOPURGE;
> >
> > + tt_change_node->change.flags = flags;
>
> I don't remember the packet format. But i assume flags on the wire is
> a u8? How about making TT_CLIENT_NOPURGE 1<<8 or bigger, so it is
> automatically not sent on the wire? It will also make it easier
> sometime in the future when you want to use the bit on the wire that
> TT_CLIENT_NOPURGE is currently taking.
>
Even if we want to add other flags that don't need to be sent on the
wire. I like this idea.
We can have a uint16_t flags field in the
tt_local/global_entry structure, where the 8 tailing bits only are sent
within the messages. Instead, the 8 leading bits are reserved for local purposes.
> You might also want to change the function parameters flags from int
> to uint, so avoiding sign extension problems.
Yes, thanks!
>
> Andrew
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
next prev parent reply other threads:[~2011-06-27 11:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-26 12:26 [B.A.T.M.A.N.] [PATCH] batman-adv: pass a unique flag arg instead of a sequence of bool ones Antonio Quartulli
2011-06-26 22:25 ` [B.A.T.M.A.N.] [PATCHv2] " Antonio Quartulli
2011-06-27 5:33 ` Andrew Lunn
2011-06-27 11:32 ` Antonio Quartulli [this message]
2011-06-29 23:13 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: split tt_local/global_entry flags field for local and remote computations Antonio Quartulli
2011-07-04 12:29 ` Marek Lindner
2011-06-29 23:14 ` [B.A.T.M.A.N.] [PATCHv3 2/2] batman-adv: pass a unique flag arg instead of a sequence of bool ones Antonio Quartulli
2011-07-04 12:29 ` 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=20110627113215.GC30872@ritirata.org \
--to=ordex@autistici.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/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;
as well as URLs for NNTP newsgroup(s).