netdev
[Top] [All Lists]

Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19

To: Sven Koch <haegar@xxxxxxxxx>
Subject: Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
From: "Christopher Friesen" <cfriesen@xxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Sep 2001 11:27:47 -0400
Cc: Michael Richardson <mcr@xxxxxxxxxxxxxxxxxxxxxx>, netdev <netdev@xxxxxxxxxxx>
References: <Pine.LNX.4.33.0109110015191.17333-100000@xxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
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?)

Essentially, yes.

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

<Prev in Thread] Current Thread [Next in Thread>