[PATCH] NDISulator fixed to work with wicontrol -L and dstumbler
Rogier R. Mulhuijzen
lists at bsdchicks.com
Wed Oct 27 12:42:34 PDT 2004
Subject says it all.
I did some poking around in net80211 and dev/if_ndis (shouldn't that be just dev/ndis, like all other if_ modules?) and extended if_ndis.c some so that it answers the ioctl that's used by wicontrol and other userland programs (like dstumbler, part of the net-mgmt/bsd-airtools package/port) to list found 802.11 APs.
I do have a few things that made me scratch my head.
1) Currently if there's more APs then can fit in the wreq struct, they're just ignored. There's no way to get a continued list, nor is there any flag to show the requestor that there's more. The wreq struct is a fixed size, and can't be extended without recompiling both kernel and userland.
2) The wi_rates array can only fit 10 rates, but 802.11g has more than 10 rates. Again, this can't be extended without recompiling kernel & userland. Also the 10 is hardcoded in net80211/ieee80211_ioctl.c. (I went ahead and copied it, in a "if it's OK there, it's OK here" kinda mood. But I'll be happy to supply patches for both)
3) When trying to stumble without bringing up the interface at least once, I get a big fat panic. But it seems to not be related to my changes. Still investigating that bit.
Patch is attached but can be found at http://www.bsdchicks.com/patches/if_ndis.c.patch too.
I'm still a kernel-hacking newb, so please review thouroughly (I managed to trample over random kernel space with early versions... fun fun fun), and fire off any comments you might have. Also my whitespace use might not be standard, since I don't know what the standard is.
Greetings,
DocWilco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: if_ndis.c.patch
Type: application/octet-stream
Size: 2699 bytes
Desc: if_ndis.c.patch
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20041027/98629d0c/if_ndis.c.obj
More information about the freebsd-current
mailing list