Search Linux Wireless

Re: Patch to allow specification of interface name prefix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2007-02-27 at 10:21 -0800, Ben Greear wrote:

> Regardless of the name, it would be nice to have some quick way to
> determine
> if a network device is wireless or not.  This could be an IOCTL, something
> in /proc/ or similar.  Even if you name them to be wlanX by default, folks
> can rename them, so applications that care about the type of the network
> device can't key off of names reliably...

iwconfig can do it using ioctl.  Shell scripts can do it using
"wireless" directory in sysfs:

for i in /sys/class/net/*; do
  if test -d $i/wireless; then
    echo `basename $i`
  fi
done

-- 
Regards,
Pavel Roskin

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux