From: Andy Green <andy@warmcat.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Michael Wu <flamingice@sourmilk.net>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH Try#11 3/4] cfg80211: Radiotap parser
Date: Wed, 13 Jun 2007 17:07:31 +0100 [thread overview]
Message-ID: <46701643.3040908@warmcat.com> (raw)
In-Reply-To: <1181749596.29767.82.camel@johannes.berg>
Johannes Berg wrote:
> On Tue, 2007-06-12 at 22:42 -0700, Michael Wu wrote:
>> On Tuesday 12 June 2007 06:04, andy@warmcat.com wrote:
>>> +typedef enum {
>>> + RADIOTAP_PARSER_OK = 0,
>>> + RADIOTAP_PARSER_DONE,
>>> + RADIOTAP_PARSER_INVALID
>>> +} ieee80211_radiotap_parser_retcode_t;
>
>> Yuck. I much prefer the standard error codes used in the previous version..
>
> I would as well, but as I outlined before we basically have four things
> that can happen
> * we found a next item we understood
> * we have a parser error
> * we reached the end
> * we found an item we can't support (and thus we don't support any
> further ones either assuming we add support sequentially)
>
> I would like to be able to distinguish all these cases, the previous
> version couldn't distinguish between the last two. However, I'm not
> convinced that error codes are reasonable for something that isn't an
> error (i.e. reaching the end)
Is it useful to report that there were items in the radiotap section
that were not illegal but were not comprehensible either? Any app that
is written against the parser will be using the contempary list of
constants from ieee80211_radiotap.h, and anything added in there should
be added to radiotap.c. Put another way you won't be in any better
position to understand or handle radiotap args that cfg80211 doesn't
understand than cfg80211 is itself. Is there a case where you don't
want to ignore these unknown later entries that could appear?
This parser is used in userspace apps too, packetspammer, penumbrad,
aircrack and mdk, and hopefully others when injection becomes something
that happens out of the box. The E* error constants are available in
userspace too. Although you can make a case for either way probably
radiotap isn't so wonderfully grand that it deserves its own enum for
its results IMO.
-Andy
next prev parent reply other threads:[~2007-06-13 16:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-12 13:04 [PATCH Try#11 0/4] Radiotap injection for Monitor Mode andy
2007-06-12 13:04 ` [PATCH Try#11 1/4] mac80211: Monitor mode radiotap injection docs andy
2007-06-12 13:04 ` [PATCH Try#11 2/4] mac80211: Define present bitmap extend bit mask andy
2007-06-13 5:15 ` Michael Wu
2007-06-12 13:04 ` [PATCH Try#11 3/4] cfg80211: Radiotap parser andy
2007-06-13 5:42 ` Michael Wu
2007-06-13 15:46 ` Johannes Berg
2007-06-13 16:07 ` Andy Green [this message]
2007-06-13 16:13 ` Johannes Berg
2007-06-12 13:04 ` [PATCH Try#11 4/4] mac80211: Monitor mode radiotap-based packet injection andy
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=46701643.3040908@warmcat.com \
--to=andy@warmcat.com \
--cc=flamingice@sourmilk.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.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).