Re: device pointer usage



On Wednesday 30 of November 2011 10:18:56 Arend van Spriel wrote:
> Hi,
> 
> We are working on a wireless device driver and we create a netdev for
> that. Currently, we get a NetworkManager message that there is no
> applicable device found for the wireless connection. Can someone explain
> how NetworkManager knows that a device is capable for use with a
> wireless connection? Does udev provide the info? It would help us
> resolve the issue.
> 

NetworkManager uses udev to get available devices. The driver should expose
its properies in sysfs tree.

Please see the following threads (from this mailing list) and provide output
from lsudev.c test program and also other commands like ls -la /sys/class/net

* http://markmail.org/message/2jmsthtvpod3dkfw
* http://markmail.org/message/a6ffu3ff4kvhwsxs
* http://markmail.org/message/zcva7xbflpv76yhq

The code querying devices is here:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/src/nm-udev-
manager.c?h=NM_0_8#n472

is_wireless() is used to find out wireless extension using SIOCGIWNAME ioctl or 
phy80211 presence:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/src/nm-udev-
manager.c?h=NM_0_8#n304

> Not sure where to find the NetworkManager version, but assuming nmcli
> has the same version: nmcli tool, version 0.8.1
> 

Yes, nmcli (if the version from NM package is used) has the same version:
nmcli -v

You can use 'nmcli -f version nm' to query NM version over D-Bus.

Also, you can find the version in your package description. Depending on your 
distro:
rpm -qi NetworkManager
pacman -Q networkmanager
...
https://wiki.archlinux.org/index.php/Pacman_Rosetta, see at the bottom

> Gr. AvS
> 

Jirka


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