Skip to contentSkip to conversation

add basic support for parsing WMM information element

PATCH New Marcel Holtmann 1 participant 1 message May 4, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add basic support for parsing WMM information element

---
 scan.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
scan.c +23 -0
index 1f7ed07..5caa504 100644
@@ -277,6 +277,28 @@ static void print_wifi_wpa(unsigned char type, unsigned char len, unsigned char
 	print_wpa("WPA", vendor_oui, len, data);
 }
 
+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;
@@ -359,6 +381,7 @@ static void print_wifi_wps(unsigned char type, unsigned char len, unsigned char
 
 static const printfn wifiprinters[] = {
 	[1] = print_wifi_wpa,
+	[2] = print_wifi_wmm,
 	[4] = print_wifi_wps,
 };
 
Signature · 1 line
1.6.0.6