Re: ioctl() to get information of wlan mode (a/b/g/n) ?

Glynn Clements <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
leo mueller wrote:

> is there a possibility to determine in which wlan mode my card/driver
> currently works?
> like an ioctl()-call or sth... ?

You might be able to get it using ioctl(SIOCGIWNAME); this returns a
string describing the interface, but some drivers just return the
driver name. The parameter is a pointer to a "union iwreq_data"
(defined in linux/wireless.h); the name field will be filled by the
ioctl.

> is it also possible to fetch wlan
> statistics (rx/tx) via ioctl()?
> if yes, which params are neccessary?

You can get packet/byte counts for any interface from /proc/net/dev.

-- 
Glynn Clements <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.