radiotap.netbsd.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Lee Hambley <lee.hambley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: radiotap-S783fYmB3Ccdnm+yROfE0A@public.gmane.org
Subject: Re: Fwd: ieee80211_radiotap_iterator_next return values
Date: Fri, 10 May 2013 15:32:09 +0200	[thread overview]
Message-ID: <1368192729.8390.17.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CAN_+VLVY9OY5OdAHs6mdzKLXcubAbHPXprsQis58+_ze939hQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Fri, 2013-05-10 at 14:55 +0200, Lee Hambley wrote:

> int ret = ieee80211_radiotap_iterator_init(&rti, rth, rth->it_len);
> while(!ret) {
>   printf("Itteration: %d\n", count++);
>   ret = ieee80211_radiotap_iterator_next(&rti);

> 
> There's limited scope for having screwed something up in that code, I
> think, I'm confused by the `1' being returned from
> `ieee80211_radiotap_iterator_init' which according to the
> implenentation doesn't seem like an error condition in the
> implementation http://lxr.free-electrons.com/source/net/wireless/radiotap.c#L95

I think you're confusing the userspace and Linux kernel implementation,
though they're very similar. In any case,
ieee80211_radiotap_iterator_next() cannot return 1, unless one of the
error values is defined to -1 (it returns -EINVAL and a few others)

johannes

  parent reply	other threads:[~2013-05-10 13:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAN_+VLVe6D=HLeKynF1OLnv=X4Pn34xfDUsR1rvVCCR5BB5xdg@mail.gmail.com>
     [not found] ` <CAN_+VLVe6D=HLeKynF1OLnv=X4Pn34xfDUsR1rvVCCR5BB5xdg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-05-10 12:55   ` Fwd: ieee80211_radiotap_iterator_next return values Lee Hambley
     [not found]     ` <CAN_+VLVY9OY5OdAHs6mdzKLXcubAbHPXprsQis58+_ze939hQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-05-10 13:16       ` Lee Hambley
2013-05-10 13:32       ` Johannes Berg [this message]
     [not found]         ` <1368192729.8390.17.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2013-05-10 14:40           ` Lee Hambley
     [not found]             ` <CAN_+VLX8_suEo_=C2sXoz00aRNtbAtpmKjfVUZVHc1RQbe29ew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-05-10 15:22               ` Lee Hambley
     [not found]                 ` <CAN_+VLXwax5Ok_BJ-d2ss8M90yyMjQ8smZo4uSpwGdnSQWSH-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-05-10 16:44                   ` Johannes Berg

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=1368192729.8390.17.camel@jlt4.sipsolutions.net \
    --to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
    --cc=lee.hambley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=radiotap-S783fYmB3Ccdnm+yROfE0A@public.gmane.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).