linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] add basic support for parsing country information element
@ 2009-05-04  5:09 Marcel Holtmann
  2009-05-04  7:56 ` Johannes Berg
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel Holtmann @ 2009-05-04  5:09 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Marcel Holtmann

---
 scan.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/scan.c b/scan.c
index 2976115..c503487 100644
--- a/scan.c
+++ b/scan.c
@@ -91,6 +91,16 @@ static void print_ign(unsigned char type, unsigned char len, unsigned char *data
 	/* ignore for now, not too useful */
 }
 
+static void print_country(unsigned char type, unsigned char len, unsigned char *data)
+{
+	int i;
+
+	printf("\tCountry: %.*s data:", 3, data);
+	for(i=0; i<len-3; i++)
+		printf(" %.02x", data[i + 3]);
+	printf("\n");
+}
+
 static void print_erp(unsigned char type, unsigned char len, unsigned char *data)
 {
 	if (data[0] == 0x00)
@@ -245,6 +255,7 @@ static const printfn ieprinters[] = {
 	[1] = print_supprates,
 	[3] = print_ds,
 	[5] = print_ign,
+	[7] = print_country,
 	[42] = print_erp,
 	[48] = print_rsn,
 	[50] = print_supprates,
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-05-04 16:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-04  5:09 [PATCH] add basic support for parsing country information element Marcel Holtmann
2009-05-04  7:56 ` Johannes Berg
2009-05-04  7:58   ` Johannes Berg
2009-05-04  8:51     ` Marcel Holtmann
2009-05-04 11:12       ` Johannes Berg
2009-05-04 11:37         ` Johannes Berg
2009-05-04 15:52           ` Marcel Holtmann
2009-05-04 15:57             ` Johannes Berg
2009-05-04 16:09               ` Marcel Holtmann
2009-05-04 16:17                 ` Johannes Berg
2009-05-04 16:28                   ` Marcel Holtmann
2009-05-04  7:58   ` Marcel Holtmann
2009-05-04  8:00     ` Johannes Berg
2009-05-04  8:53       ` Marcel Holtmann

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).