From: Andrew Lunn <andrew@lunn.ch>
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.] [PATCH 1/3] batman-adv: detect clients connected through a 802.11 device
Date: Sun, 5 Jun 2011 23:42:36 +0200 [thread overview]
Message-ID: <20110605214236.GV4071@lunn.ch> (raw)
In-Reply-To: <1307307664-19910-2-git-send-email-ordex@autistici.org>
Hi Antonio
>
> - tt_local_add(soft_iface, soft_iface->dev_addr);
> + tt_local_add(soft_iface, soft_iface->dev_addr, 0);
Reading the code, it is not obvious what this 0 mean here. Did you see
Sven's recent patches which introduced enums in various places? Maybe
instead of a bool you could have an enum with two values: wired, wifi?
I've not looked at the other patches yet, but it might even make sense
to have enums for wired, AP, client, adhoc?
> +/* This function check whether the interface represented by ifindex is a
> + * 802.11 wireless device or not. If so the tt_local_entry is marked with the
> + * TT_CLIENT_WIFI flag */
> +static void tt_check_iface(struct tt_local_entry *tt_local_entry, int ifindex)
It would be nice to have a more descriptive name, one which tells you
what it is checking. Here it is clear, because of the comment, but
where it is actually used, it is not possible to know what the
function is checking.
Maybe what is actually needed is a function:
bool is_iface_wifi(int ifindex)
and maybe that should be in hard-interface.c? It could be that knowing
if an interface is wired or wifi could be useful in other places. This
was one of the discussions at WBMv4, giving preference to wired
interfaces over wireless.
Andrew
next prev parent reply other threads:[~2011-06-05 21:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-05 21:01 [B.A.T.M.A.N.] [PATCH 0/3] Implement the AP-Isolation mechanism Antonio Quartulli
2011-06-05 21:01 ` [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: detect clients connected through a 802.11 device Antonio Quartulli
2011-06-05 21:42 ` Andrew Lunn [this message]
2011-06-05 22:01 ` Antonio Quartulli
2011-06-05 23:22 ` Antonio Quartulli
2011-06-15 21:28 ` Marek Lindner
2011-06-15 22:43 ` Antonio Quartulli
2011-06-16 10:12 ` Marek Lindner
2011-06-05 21:01 ` [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: implement AP-isolation on the sender side Antonio Quartulli
2011-06-05 21:50 ` Andrew Lunn
2011-06-15 21:38 ` Marek Lindner
2011-06-05 21:01 ` [B.A.T.M.A.N.] [PATCH 3/3] batman-adv: implement AP-isolation on the receiver side Antonio Quartulli
2011-06-05 21:55 ` Andrew Lunn
2011-06-05 22:16 ` Antonio Quartulli
2011-06-15 21:42 ` Marek Lindner
2011-06-15 22:45 ` Antonio Quartulli
2011-06-26 21:00 ` [B.A.T.M.A.N.] [PATCHv2 1/4] batman-adv: detect clients connected through a 802.11 device Antonio Quartulli
2011-06-26 21:00 ` [B.A.T.M.A.N.] [PATCHv2 2/4] batman-adv: implement AP-isolation on the receiver side Antonio Quartulli
2011-06-26 21:00 ` [B.A.T.M.A.N.] [PATCHv2 3/4] batman-adv: implement AP-isolation on the sender side Antonio Quartulli
2011-06-26 21:00 ` [B.A.T.M.A.N.] [PATCHv2 4/4] batman-adv: print client flags in the local/global transtables output Antonio Quartulli
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=20110605214236.GV4071@lunn.ch \
--to=andrew@lunn.ch \
--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