From: Marcel Holtmann <marcel@holtmann.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, Marcel Holtmann <marcel@holtmann.org>
Subject: [PATCH 5/6] add basic support for parsing WMM information element
Date: Mon, 4 May 2009 01:48:46 -0700 [thread overview]
Message-ID: <1241426927-14902-5-git-send-email-marcel@holtmann.org> (raw)
In-Reply-To: <1241426927-14902-4-git-send-email-marcel@holtmann.org>
---
scan.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/scan.c b/scan.c
index 8cd1f90..6ff4386 100644
--- a/scan.c
+++ b/scan.c
@@ -157,6 +157,28 @@ static void tab_on_first(bool *first)
*first = false;
}
+static void print_wifi_wmm(unsigned char type, unsigned char len, unsigned char *data)
+{
+ int i;
+
+ printf("\tWMM ");
+ switch (data[0]) {
+ case 0x00:
+ printf("information:");
+ break;
+ case 0x01:
+ printf("parameter:");
+ break;
+ default:
+ printf("type %d:", data[0]);
+ break;
+ }
+
+ for(i=0; i<len-1; i++)
+ printf(" %.02x", data[i + 1]);
+ printf("\n");
+}
+
static void print_wifi_wps(unsigned char type, unsigned char len, unsigned char *data)
{
bool first = true;
@@ -238,6 +260,7 @@ static void print_wifi_wps(unsigned char type, unsigned char len, unsigned char
}
static const printfn wifiprinters[] = {
+ [2] = print_wifi_wmm,
[4] = print_wifi_wps,
};
--
1.6.0.6
next prev parent reply other threads:[~2009-05-04 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-04 8:48 [PATCH 1/6] add support for parsing ERP information element Marcel Holtmann
2009-05-04 8:48 ` [PATCH 2/6] add basic support for parsing country " Marcel Holtmann
2009-05-04 8:48 ` [PATCH 3/6] add support for showing extended capabilities IE Marcel Holtmann
2009-05-04 8:48 ` [PATCH 4/6] add human readable decoding for capability information field Marcel Holtmann
2009-05-04 8:48 ` Marcel Holtmann [this message]
2009-05-04 8:48 ` [PATCH 6/6] add support for parsing WPA and RSN/WPA2 information elements Marcel Holtmann
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=1241426927-14902-5-git-send-email-marcel@holtmann.org \
--to=marcel@holtmann.org \
--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).