Posts

Showing posts with the label iwconfig

configure network device with wireless extensions

configure network device with wireless extensions I need to configure a network device in C on a linux host for an application. I read up on netlink, libnl and nl80211 which goes through cfg80211 and mac80211. I found out later that the driver for the device I am using does not support the mac80211 interface so I am unable to use netlink library to configure the device. My only option left is through wireless extensions using ioctl. So I have been reading the source code for iwconfig (iw uses netlink while iwconfig uses wext). So for example, say I am trying to set the channel on a 80211 adapter. The wireless extension ioctl command is SIOCSIWFREQ (as per iwconfig and my device's driver). By what I have read, you open up a socket and use ioctl with a 'ifreq' structure to configure the network adapter (see 'man netdevice'). The thing is, iwconfigure defines its own 'ifreq' structure called 'iwreq' which looks totally different (see iwconfig source, th...