From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Radiotap <radiotap-sUITvd46vNxg9hUCZPvPmw@public.gmane.org>
Subject: [RFC] a-MPDU extension
Date: Sun, 19 Dec 2010 11:34:25 +0100 [thread overview]
Message-ID: <1292754865.3535.4.camel@jlt3.sipsolutions.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 852 bytes --]
This isn't really an RFA yet since I haven't really talked to anyone
about it ...
Since I removed the aMPDU information from the MCS proposal, we should
add it back. I think it makes more sense to keep it separate anyway.
What I'm proposing is a new a-MPDU status field that is a simple
one-byte field, containing:
| mask | meaning
----------------------
| 0x80 | index valid
| 0x40 | reserved
| 0x3f | index in a-MPDU
The presence of the field indicates that the frame was part of an
aggregate, and if known, the index in the aggregate may be given by
setting the 0x80 bit and the lower bits appropriately.
Thoughts? Is there anything this doesn't cover? I have a wireshark
implementation (attached) but no capture implementation yet since I'm
still looking at some bigger changes to push this information through
the Linux wifi stack.
johannes
[-- Attachment #2: 002-radiotap-ampdu.patch --]
[-- Type: text/x-patch, Size: 5398 bytes --]
---
epan/dissectors/packet-radiotap-defs.h | 9 ++++++
epan/dissectors/packet-radiotap-iter.c | 3 +-
epan/dissectors/packet-radiotap.c | 43 +++++++++++++++++++++++++++++++++
3 files changed, 54 insertions(+), 1 deletion(-)
--- trunk.orig/epan/dissectors/packet-radiotap-defs.h 2010-12-19 10:58:19.000000000 +0100
+++ trunk/epan/dissectors/packet-radiotap-defs.h 2010-12-19 10:58:22.000000000 +0100
@@ -182,6 +182,11 @@ struct ieee80211_radiotap_header {
* Contains a bitmap of known fields/flags, the flags, and
* the MCS index.
*
+ * IEEE80211_RADIOTAP_AMPDU u8 unitless
+ *
+ * If present, frame was part of an aMPDU, if the highest
+ * bit of the u8 is set the lowest 6 bits of it contain
+ * the index of this frame in the aMPDU.
*/
enum ieee80211_radiotap_type {
IEEE80211_RADIOTAP_TSFT = 0,
@@ -204,6 +209,7 @@ enum ieee80211_radiotap_type {
IEEE80211_RADIOTAP_DATA_RETRIES = 17,
IEEE80211_RADIOTAP_MCS = 19,
+ IEEE80211_RADIOTAP_AMPDU = 20,
/* valid in every it_present bitmap, even vendor namespaces */
IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29,
@@ -268,4 +274,7 @@ enum ieee80211_radiotap_type {
#define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08
#define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10
+#define IEEE80211_RADIOTAP_AMPDU_IDX_VALID 0x80
+#define IEEE80211_RADIOTAP_AMPDU_IDX_MASK 0x3f
+
#endif /* IEEE80211_RADIOTAP_H */
--- trunk.orig/epan/dissectors/packet-radiotap-iter.c 2010-12-19 10:58:19.000000000 +0100
+++ trunk/epan/dissectors/packet-radiotap-iter.c 2010-12-19 10:58:22.000000000 +0100
@@ -50,7 +50,8 @@ static const struct radiotap_align_size
/* [IEEE80211_RADIOTAP_RTS_RETRIES] = 16 */ { 1, 1 },
/* [IEEE80211_RADIOTAP_DATA_RETRIES] = 17 */ { 1, 1 },
/* currently undefined = 18 */ { 0, 0 },
- /* [IEEE80211_RADIOTAP_MCS] = 19 */ { 1, 3 }
+ /* [IEEE80211_RADIOTAP_MCS] = 19 */ { 1, 3 },
+ /* [IEEE80211_RADIOTAP_AMPDU] = 20 */ { 1, 1 }
/*
* add more here as they are defined in
* include/net/ieee80211_radiotap.h
--- trunk.orig/epan/dissectors/packet-radiotap.c 2010-12-19 10:58:48.000000000 +0100
+++ trunk/epan/dissectors/packet-radiotap.c 2010-12-19 11:20:54.000000000 +0100
@@ -167,6 +167,9 @@ static int hf_radiotap_mcs_index = -1;
static int hf_radiotap_mcs_gi = -1;
static int hf_radiotap_mcs_format = -1;
static int hf_radiotap_mcs_fec = -1;
+static int hf_radiotap_ampdu = -1;
+static int hf_radiotap_ampdu_agg = -1;
+static int hf_radiotap_ampdu_idx = -1;
/* "Present" flags */
static int hf_radiotap_present_tsft = -1;
@@ -187,6 +190,7 @@ static int hf_radiotap_present_hdrfcs =
static int hf_radiotap_present_rxflags = -1;
static int hf_radiotap_present_xchannel = -1;
static int hf_radiotap_present_mcs = -1;
+static int hf_radiotap_present_ampdu = -1;
static int hf_radiotap_present_rtap_ns = -1;
static int hf_radiotap_present_vendor_ns = -1;
static int hf_radiotap_present_ext = -1;
@@ -214,6 +218,7 @@ static gint ett_radiotap_channel_flags =
static gint ett_radiotap_xchannel_flags = -1;
static gint ett_radiotap_vendor = -1;
static gint ett_radiotap_mcs = -1;
+static gint ett_radiotap_ampdu = -1;
static dissector_handle_t ieee80211_handle;
static dissector_handle_t ieee80211_datapad_handle;
@@ -514,6 +519,11 @@ void proto_register_radiotap(void)
FT_BOOLEAN, 32, NULL, RADIOTAP_MASK(MCS),
"Specifies if the HT field is present", HFILL}},
+ {&hf_radiotap_present_ampdu,
+ {"a-MPDU information", "radiotap.present.ampdu",
+ FT_BOOLEAN, 32, NULL, RADIOTAP_MASK(AMPDU),
+ "Specifies if the a-MPDU field is present", HFILL}},
+
{&hf_radiotap_present_rtap_ns,
{"Radiotap NS next", "radiotap.present.rtap_ns",
FT_BOOLEAN, 32, NULL, RADIOTAP_MASK(RADIOTAP_NAMESPACE),
@@ -837,6 +847,17 @@ void proto_register_radiotap(void)
{"MCS index", "radiotap.mcs.index",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ {&hf_radiotap_ampdu,
+ {"a-MPDU information", "radiotap.ampdu",
+ FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ {&hf_radiotap_ampdu_agg,
+ {"frame was aggregated", "radiotap.ampdu.aggregated",
+ FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ {&hf_radiotap_ampdu_idx,
+ {"index in aggregate", "radiotap.ampdu.index",
+ FT_UINT8, BASE_DEC, NULL,
+ IEEE80211_RADIOTAP_AMPDU_IDX_MASK, NULL, HFILL}},
+
{&hf_radiotap_vendor_ns,
{"Vendor namespace", "radiotap.vendor_namespace",
FT_BYTES, BASE_NONE, NULL, 0x0,
@@ -879,6 +900,7 @@ void proto_register_radiotap(void)
&ett_radiotap_xchannel_flags,
&ett_radiotap_vendor,
&ett_radiotap_mcs,
+ &ett_radiotap_ampdu,
};
module_t *radiotap_module;
@@ -1512,6 +1534,27 @@ dissect_radiotap(tvbuff_t * tvb, packet_
tvb, offset + 2, 1, mcs);
break;
}
+ case IEEE80211_RADIOTAP_AMPDU: {
+ proto_item *it;
+ proto_tree *ampdu_tree;
+ guint8 value;
+
+ if (!tree)
+ break;
+
+ value = tvb_get_guint8(tvb, offset);
+
+ it = proto_tree_add_item(radiotap_tree, hf_radiotap_ampdu,
+ tvb, offset, 1, FALSE);
+ ampdu_tree = proto_item_add_subtree(it, ett_radiotap_ampdu);
+ proto_tree_add_none_format(ampdu_tree, hf_radiotap_ampdu_agg,
+ tvb, offset, 1,
+ "frame was part of an a-MPDU");
+ if (value & IEEE80211_RADIOTAP_AMPDU_IDX_VALID)
+ proto_tree_add_uint(ampdu_tree, hf_radiotap_ampdu_idx,
+ tvb, offset, 1, value);
+ break;
+ }
}
}
reply other threads:[~2010-12-19 10:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1292754865.3535.4.camel@jlt3.sipsolutions.net \
--to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
--cc=radiotap-sUITvd46vNxg9hUCZPvPmw@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 read-only IMAP folder(s) and NNTP newsgroup(s).