Skip to contentSkip to conversation

add support for showing power constraint IE

PATCH Applied Marcel Holtmann 2 participants 14 messages May 4, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add support for showing power constraint IE

---
 scan.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
scan.c +6 -0
index 9b58c29..206b6e8 100644
@@ -176,6 +176,11 @@ static void print_country(const uint8_t type, uint8_t len, const uint8_t *data)
 	printf("\n");
 }
 
+static void print_powerconstraint(const uint8_t type, uint8_t len, const uint8_t *data)
+{
+	printf(" %d db\n", data[0]);
+}
+
 static void print_erp(const uint8_t type, uint8_t len, const uint8_t *data)
 {
 	if (data[0] == 0x00)
@@ -407,6 +412,7 @@ static const struct ie_print ieprinters[] = {
 	[3] = { "DS Paramater set", print_ds, 1, 1, },
 	[5] = PRINT_IGN,
 	[7] = { "Country", print_country, 3, 255, },
+	[32] = { "Power constraint", print_powerconstraint, 1, 1, },
 	[42] = { "ERP", print_erp, 1, 255, },
 	[48] = { "RSN", print_rsn, 2, 255, },
 	[50] = { "Extended supported rates", print_supprates, 0, 255, },
Signature · 1 line
1.6.0.6
#1 lore raw

scan.c static void print_country(const uint8_t type, uint8_t len, const uint8_t *data) · line 181

Quoted 4 lines · Marcel Holtmann
scan.c +3 -0
+static void print_powerconstraint(const uint8_t type, uint8_t len, const uint8_t *data)
+{
+	printf(" %d db\n", data[0]);

s/db/dB/ -- fixed, applied and pushed, thanks.

johannes

#2 lore raw

Hi Johannes,

Quoted 5 lines

scan.c static void print_country(const uint8_t type, uint8_t len, const uint8_t *data) · line 181

Quoted 3 lines
scan.c +3 -0
+static void print_powerconstraint(const uint8_t type, uint8_t len, const uint8_t *data)
+{
+	printf(" %d db\n", data[0]);

s/db/dB/ -- fixed, applied and pushed, thanks.

so how sure are you that you pushed it? I don't see it.

Regards

Marcel

#3 lore raw
Quoted 9 lines · Marcel Holtmann

Hi Johannes,

Quoted 5 lines

scan.c static void print_country(const uint8_t type, uint8_t len, const uint8_t *data) · line 181

Quoted 3 lines
scan.c +3 -0
+static void print_powerconstraint(const uint8_t type, uint8_t len, const uint8_t *data)
+{
+	printf(" %d db\n", data[0]);

s/db/dB/ -- fixed, applied and pushed, thanks.

so how sure are you that you pushed it? I don't see it.

Sorry, seems I didn't hit enter. Definitely pushed now.

johannes

#4 lore raw

Hi Johannes,

Quoted 9 lines
Quoted 7 lines
Quoted 5 lines

scan.c static void print_country(const uint8_t type, uint8_t len, const uint8_t *data) · line 181

Quoted 3 lines
scan.c +3 -0
+static void print_powerconstraint(const uint8_t type, uint8_t len, const uint8_t *data)
+{
+	printf(" %d db\n", data[0]);

s/db/dB/ -- fixed, applied and pushed, thanks.

so how sure are you that you pushed it? I don't see it.

Sorry, seems I didn't hit enter. Definitely pushed now.

just re-based and added the patch for the WPA/RSN length checks. So we should be good now in this area.

Regards

Marcel

#5 lore raw
Quoted 2 lines · Marcel Holtmann

just re-based and added the patch for the WPA/RSN length checks. So we should be good now in this area.

Thanks, applied, and really pushed out now.

Do you think I should cut a new release with all the shiny new parsing code, or will you work on more :)

johannes

#6 lore raw

Hi Johannes,

Quoted 7 lines
Quoted 2 lines

just re-based and added the patch for the WPA/RSN length checks. So we should be good now in this area.

Thanks, applied, and really pushed out now.

Do you think I should cut a new release with all the shiny new parsing code, or will you work on more :)

the only thing that bugs me is this:

BSS 00:1c:f0:xx:xx:xx (on wlan0)

	TSF: 3332683470455 usec (38d, 13:44:43)
	freq: 2422
	beacon interval: 100
	capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431)
	signal: -36.00 dBm
	SSID: Big in Japan
	Supported rates: 1.0* 2.0* 5.5* 11.0* 
	DS Paramater set: channel 3
	Country: CA (in/outdoor), data: 01 0b 1b
	ERP: <no flags>
	Extended supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0 
	RSN:	 * Version: 1
		 * Group cipher: CCMP
		 * Pairwise ciphers: CCMP
		 * Authentication suites: PSK
		 * Capabilities: 0x0000
	WMM: parameter: 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
	Vendor specific: OUI 00:90:4c, data: 33 0c 10 1f ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	Vendor specific: OUI 00:90:4c, data: 34 03 00 05 00 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	Unknown IE (45): 0c 10 1f ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00
	Unknown IE (61): 03 00 01 00 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	WPS:	 * Version: 1.0
		 * Manufacturer: D-Link Systems
		 * Model: DIR-615
		 * Device name: Wireless N Router
		 * Config methods: Label

I didn't find any specs to decode IE 45 and 61 since all of them mark these as reserved. Not sure if these are defined in future specs or if they are deprecated IE. And it seems its data is similar to what is in the vendor specific elements.

The other one that keeps showing up in my area is:

	Unknown IE (47): 06

And I do have some other vendor specific ones, that I don't really care about and we might even never know what they are:

	Vendor specific: OUI 00:03:7f, data: 01 01 00 17 00 00
	Vendor specific: OUI 00:03:7f, data: 02 01 01 4d 00 03 a4 00 00
	Vendor specific: OUI 00:03:2f, data: 01 00 01

However, as I said before, I am quite happy now since the provided information by iw are now the same as I get with iwlist. Actually iw has now superior decoding capabilities and is more useful. There is still room for improvement, but I think cutting a new release is not a bad idea.

Regards

Marcel

#7 lore raw

Hi,

Quoted 10 lines
	Vendor specific: OUI 00:90:4c, data: 33 0c 10 1f ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	Vendor specific: OUI 00:90:4c, data: 34 03 00 05 00 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	Unknown IE (45): 0c 10 1f ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00
	Unknown IE (61): 03 00 01 00 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	WPS:	 * Version: 1.0
		 * Manufacturer: D-Link Systems
		 * Model: DIR-615
		 * Device name: Wireless N Router
		 * Config methods: Label
Quoted 4 lines

I didn't find any specs to decode IE 45 and 61 since all of them mark these as reserved. Not sure if these are defined in future specs or if they are deprecated IE. And it seems its data is similar to what is in the vendor specific elements.

Both are HT.

Quoted 3 lines

The other one that keeps showing up in my area is:

	Unknown IE (47): 06

"Broadcom proprietary" -- seems it would make sense to ignore that.

Quoted 6 lines

And I do have some other vendor specific ones, that I don't really care about and we might even never know what they are:

	Vendor specific: OUI 00:03:7f, data: 01 01 00 17 00 00
	Vendor specific: OUI 00:03:7f, data: 02 01 01 4d 00 03 a4 00 00
	Vendor specific: OUI 00:03:2f, data: 01 00 01

You can check wireshark, sometimes it has something useful. I think there are pre-wifi HT IEs too in some vendor IE, might be one of these.

https://mentor.ieee.org/802.11/documents?x_dcn=31&x_year=2009 is useful too (at least for 2009, for next year somebody will have to find the DCN again)

Quoted 3 lines

However, as I said before, I am quite happy now since the provided information by iw are now the same as I get with iwlist. Actually iw has now superior decoding capabilities and is more useful.

:)

Quoted 3 lines

There is still
room for improvement, but I think cutting a new release is not a bad idea.

I'll wait a bit, maybe somebody feels inspired by this to provide HT parsing.

johannes

#8 lore raw

Hi Johannes,

Quoted 10 lines
Quoted 10 lines
	Vendor specific: OUI 00:90:4c, data: 33 0c 10 1f ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	Vendor specific: OUI 00:90:4c, data: 34 03 00 05 00 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	Unknown IE (45): 0c 10 1f ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00
	Unknown IE (61): 03 00 01 00 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	WPS:	 * Version: 1.0
		 * Manufacturer: D-Link Systems
		 * Model: DIR-615
		 * Device name: Wireless N Router
		 * Config methods: Label
Quoted 6 lines
Quoted 4 lines

I didn't find any specs to decode IE 45 and 61 since all of them mark these as reserved. Not sure if these are defined in future specs or if they are deprecated IE. And it seems its data is similar to what is in the vendor specific elements.

Both are HT.

do we have the specs somewhere then I might can give it a try. Also WMM needs some improvements.

Quoted 5 lines
Quoted 3 lines

The other one that keeps showing up in my area is:

	Unknown IE (47): 06

"Broadcom proprietary" -- seems it would make sense to ignore that.

Since it not showing up until you give -u there is no need to ignore it, but where do you find that this is Broadcom proprietary and why the f* they get to use an official IE number?

Quoted 7 lines
Quoted 6 lines

And I do have some other vendor specific ones, that I don't really care about and we might even never know what they are:

	Vendor specific: OUI 00:03:7f, data: 01 01 00 17 00 00
	Vendor specific: OUI 00:03:7f, data: 02 01 01 4d 00 03 a4 00 00
	Vendor specific: OUI 00:03:2f, data: 01 00 01
Quoted 6 lines

You can check wireshark, sometimes it has something useful. I think there are pre-wifi HT IEs too in some vendor IE, might be one of these.

https://mentor.ieee.org/802.11/documents?x_dcn=31&x_year=2009 is useful too (at least for 2009, for next year somebody will have to find the DCN again)

I found an indication of what bit 1 of extended capabilities means. I do have seen an AP with that somewhere around :)

Regards

Marcel

#9 lore raw
Quoted 4 lines · Marcel Holtmann
Quoted 1 line

Both are HT.

do we have the specs somewhere then I might can give it a try. Also WMM needs some improvements.

The IEs are defined in structs in include/linux/ieee80211.h.

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

The other one that keeps showing up in my area is:

	Unknown IE (47): 06

"Broadcom proprietary" -- seems it would make sense to ignore that.

Since it not showing up until you give -u there is no need to ignore it, but where do you find that this is Broadcom proprietary and why the f* they get to use an official IE number?

Check the link I gave you - lots of companies have IEs rather than vendor IEs, predates the vendor IE I guess.

Quoted 10 lines
Quoted 10 lines
Quoted 6 lines

And I do have some other vendor specific ones, that I don't really care about and we might even never know what they are:

	Vendor specific: OUI 00:03:7f, data: 01 01 00 17 00 00
	Vendor specific: OUI 00:03:7f, data: 02 01 01 4d 00 03 a4 00 00
	Vendor specific: OUI 00:03:2f, data: 01 00 01

You can check wireshark, sometimes it has something useful. I think there are pre-wifi HT IEs too in some vendor IE, might be one of these.

Quoted 6 lines
Quoted 3 lines

https://mentor.ieee.org/802.11/documents?x_dcn=31&x_year=2009 is useful too (at least for 2009, for next year somebody will have to find the DCN again)

I found an indication of what bit 1 of extended capabilities means. I do have seen an AP with that somewhere around :)

Actually extended capabilities aren't bits but values, I think? But that's something about HT too, iirc.

johannes

#10 lore raw
Quoted 8 lines · Johannes Berg
Quoted 4 lines · Marcel Holtmann
Quoted 1 line

Both are HT.

do we have the specs somewhere then I might can give it a try. Also WMM needs some improvements.

The IEs are defined in structs in include/linux/ieee80211.h.

Oh and iw already has some code (in info.c or phy.c?) since the data we transfer for HT capabilities is the HT caps IE.

johannes

#11 lore raw
In reply to Johannes Berg

Hi Johannes,

Quoted 4 lines
Quoted 3 lines

However, as I said before, I am quite happy now since the provided information by iw are now the same as I get with iwlist. Actually iw has now superior decoding capabilities and is more useful.

Quoted 8 lines

:)

Quoted 3 lines

There is still
room for improvement, but I think cutting a new release is not a bad idea.

I'll wait a bit, maybe somebody feels inspired by this to provide HT parsing.

I am running out of time that I can spent on this. So don't expect me to do it any time soon.

Regards

Marcel

#12 lore raw
In reply to Johannes Berg

Hi Johannes,

Quoted 7 lines
Quoted 2 lines

just re-based and added the patch for the WPA/RSN length checks. So we should be good now in this area.

Thanks, applied, and really pushed out now.

Do you think I should cut a new release with all the shiny new parsing code, or will you work on more :)

one other thing that comes to my mind is to have a convenient "iw scan" alias to just trigger scanning all all interfaces. The "dev wlan0" thing is driving my crazy. And most people just have one card only anyway.

Do we really need the "dev" versus "phy" details here. I guess they are needed in case someone renames "wlan0" to "phy0" by accident, but personally I prefer that the "dev" one is optional and it falls back to just use the interface name.

Regards

Marcel

#13 lore raw
Quoted 3 lines · Marcel Holtmann

one other thing that comes to my mind is to have a convenient "iw scan" alias to just trigger scanning all all interfaces. The "dev wlan0" thing is driving my crazy. And most people just have one card only anyway.

That would be hell to coordinate with all the waiting and stuff...

Quoted 4 lines

Do we really need the "dev" versus "phy" details here. I guess they are needed in case someone renames "wlan0" to "phy0" by accident, but personally I prefer that the "dev" one is optional and it falls back to just use the interface name.

Personally, I'd rather have bash completion ;) And it's not so simple I think.

johannes