From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Guy Harris <guy-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: radiotap-S783fYmB3Ccdnm+yROfE0A@public.gmane.org
Subject: Re: [RFA] 0-length PSDU reporting
Date: Tue, 14 Aug 2018 10:30:04 +0200 [thread overview]
Message-ID: <1534235404.3547.10.camel@sipsolutions.net> (raw)
In-Reply-To: <1534156537.3093.7.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
On Mon, 2018-08-13 at 12:35 +0200, Johannes Berg wrote:
> Yes, one case for example is when you know the packet metadata because
> you received it, but were unable to capture the data because it was a
> multi-user transmission to a different user, or because it was a multi-
> user transmission with more streams than you have RX chains, e.g. In
> this case I'm not even sure you know the real length of the packet, to
> be able to indicate it in the "Original Packet Length" field.
>
> Additionally, I'm not sure it's possible to indicate an "Original Length
> Field" all the way through from the kernel while capturing, I believe
> only tcpdump/etc. will set this to long than the data frame from the
> kernel when they explicitly truncate data.
To clarify - I think this field will also be used (and I think that
should be valid) when you have a PPDU that did carry a PSDU, but you
don't know its length, and thus report
frame length == captured length == radiotap header length.
Like I said, I don't currently see a way to - at least on Linux - report
frame length > captured length. Looking at libpcap's pcap-linux.c, we
see
caplen = packet_len;
if (caplen > handle->snapshot)
caplen = handle->snapshot;
We do get packet_len as recvmsg(..., MSG_TRUNC), but inside the kernel
we cannot represent a message as simply not having the data and getting
truncated even without MSG_TRUNC, so that we can't actually get out of
recvmsg() with a packet_len bigger than the in-kernel buffer.
Guy, does that address your question sufficiently?
johannes
next prev parent reply other threads:[~2018-08-14 8:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 14:37 [RFC] 0-length PPDU reporting Johannes Berg
[not found] ` <1529332670.3490.50.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2018-06-18 16:05 ` Simon Barber
[not found] ` <00986C20-9443-40FC-9A7E-DE636A743951-vp0mx6+5gkqFX2APIN6yfw@public.gmane.org>
2018-06-18 19:20 ` Johannes Berg
[not found] ` <1529349637.3092.8.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2018-06-19 21:20 ` Guy Harris
[not found] ` <3028EC8F-6CFD-4F52-8349-D49B1F37AC22-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2018-06-19 22:50 ` Guy Harris
[not found] ` <BC6DCA08-4049-4B7A-A7C0-9FC545173FE5-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2018-06-29 10:49 ` Johannes Berg
2018-07-02 14:33 ` Johannes Berg
[not found] ` <1530542000.3117.4.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2018-07-03 12:13 ` Johannes Berg
2018-07-09 8:30 ` [RFA] 0-length PSDU reporting Johannes Berg
[not found] ` <1531125042.3298.5.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2018-08-09 1:53 ` Guy Harris
[not found] ` <AEBBAD8F-A779-4E0A-B40D-659D55DFE847-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2018-08-13 10:35 ` Johannes Berg
[not found] ` <1534156537.3093.7.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2018-08-14 8:30 ` Johannes Berg [this message]
2018-09-04 12:10 ` [ADOPTION] " 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=1534235404.3547.10.camel@sipsolutions.net \
--to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
--cc=guy-FrUbXkNCsVf2fBVCVOL8/A@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