Sven Koch wrote:
> So do I get it right that application-developer, who want to know the
> netmask for the interfaces (for whatever reason), need to implement two
> different interfaces in their programs to work with every current kernel?
> (Use netlink if its available, SIOCGIFNETMASK otherwise?)
If the addresses are configured using ifconfig, then the ioctl stuff will work.
If the addresses are configured using ip (ie netlink) then the ioctl stuff is
not sufficient and the netlink stuff must be used.
Basically netlink offers a superset of the functionality of the ioctl interface,
so if you set it up with netlink and then read it with ioctl it may not work
(but the other way around will).
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@xxxxxxxxxxxxxxxxxx