essid_len in SIOCSIWESSID
Mon Aug 30 19:49:16 PDT 2004
On Mon, Aug 30, 2004 at 09:37:17AM -0700, Jean Tourrilhes wrote:
> For some reasons, Wireless Extensions standardised on :
> SSID length + 1
OK, I'll try to remember this. However, this brings in couple of extra
> Moreover, most of the tools and the driver also assume it's a
> C string and will stop at the first ASCII-0. It might be possible to
> fix this without having to rework the API, but nobody was bothered
> enough to send me patches.
So, is ioctl() caller supposed to always give a buffer of SSID len + 1
to the driver? Even when iwr.u.essid.length would end up being 33 (i.e.,
larger than IW_ESSID_MAX_SIZE)?
What about SIOCGIWESSID? Is ioctl() caller supposed to always give a
buffer of 33 bytes and set iwr.u.essid.length to 33 in order to be able
to receive SSID of maximum length (32 characters, plus than one extra
character for nul termination)? What is the driver supposed to do if
iwr.u.essid.length == 32 and SSID len is 32? Should it return -E2BIG?
Should it leave out nul termination and leave .length == 32? Is .length
set to SSID len + 1 on SIOCGIWESSID in general?
Somehow, I think I may have asked these questions before, but at least I
don't remember the answer anymore.. ;-)
Jouni Malinen PGP id EFC895FA
More information about the Hostap