linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ioctl() to get information of wlan mode (a/b/g/n) ?
@ 2009-09-18 12:11 leo mueller
  2009-09-18 15:18 ` Glynn Clements
  0 siblings, 1 reply; 2+ messages in thread
From: leo mueller @ 2009-09-18 12:11 UTC (permalink / raw)
  To: linux-c-programming

hi all,

is there a possibility to determine in which wlan mode my card/driver
currently works?
like an ioctl()-call or sth... ? is it also possible to fetch wlan
statistics (rx/tx) via ioctl()?
if yes, which params are neccessary?

big thx & nice weekend

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

* Re: ioctl() to get information of wlan mode (a/b/g/n) ?
  2009-09-18 12:11 ioctl() to get information of wlan mode (a/b/g/n) ? leo mueller
@ 2009-09-18 15:18 ` Glynn Clements
  0 siblings, 0 replies; 2+ messages in thread
From: Glynn Clements @ 2009-09-18 15:18 UTC (permalink / raw)
  To: leo mueller; +Cc: linux-c-programming


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 <glynn@gclements.plus.com>

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

end of thread, other threads:[~2009-09-18 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-18 12:11 ioctl() to get information of wlan mode (a/b/g/n) ? leo mueller
2009-09-18 15:18 ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).