All of lore.kernel.org
 help / color / mirror / Atom feed
* nl80211 userspace
@ 2007-02-14 19:04 Johannes Berg
  2007-02-15  8:17 ` Nick Kossifidis
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2007-02-14 19:04 UTC (permalink / raw)
  To: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]

Hi,

I've been playing a bit with parsing a modified nl80211 header file to
get a tool and

 http://git.sipsolutions.net/pynl80211.git/

is what I currently have. It doesn't
actually send netlink messages yet but that ought to be trivial to add,
I'm too lazy right now to look up all the exact binary stuff. Python
does have a "struct" module that can be used to pack things into binary
so it's really easy :)

Anyway. The repository contains a modified nl80211.h and the tool relies on
a lot of things to be correct in it, see parse.py.

Examples:
$ ./wificonf.py help configure 
./wificonf.py configure ifindex [ssid=...] [transmit_power=...] [frag_threshold=...] [channel=...] [rx_sensitivity=...]
        ifindex: interface name or index
        ssid: string (1-32 bytes)
        transmit_power: u32
        frag_threshold: u32
        channel: u32
        rx_sensitivity: u32
$ ./wificonf.py help set_roaming_control
./wificonf.py set_roaming_control ifindex roaming_control
        ifindex: interface name or index
        roaming_control: kernel, userspace 
$ ./wificonf.py configure eth1 ssid="my ssid" channel=7 frag_threshold=580
TODO: construct a netlink message with command number 9
and the following attributes
        1: 4
        18: 'my ssid'
        20: 580
        12: 7
$ ./wificonf.py set_fixed_bssid eth1 0:1:2:3:4:ff
TODO: construct a netlink message with command number 17
and the following attributes
        1: 4
        15: '\x00\x01\x02\x03\x04\xff'

(ifindex is looked up via sysfs: /sys/class/net/<name>/ifindex)

Obviously parsing the response netlink message is missing too :)

Included also is a check shell script that will use wificonf's parser to
make sure the header file was parsed correctly wrt the numbers of the
constants (since I don't have a C parser built into it.)

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

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

end of thread, other threads:[~2007-02-15 19:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-14 19:04 nl80211 userspace Johannes Berg
2007-02-15  8:17 ` Nick Kossifidis
2007-02-15  9:54   ` Michael Buesch
2007-02-15 14:19   ` John W. Linville
2007-02-15 15:05     ` Johannes Berg
2007-02-15 19:46       ` Luis R. Rodriguez
2007-02-15 19:48         ` Luis R. Rodriguez
2007-02-15 15:04   ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.