[Top] [All Lists]

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

To: Andi Kleen <ak@xxxxxx>
Subject: Re: [PATCH] ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19
From: Sven Koch <haegar@xxxxxxxxx>
Date: Tue, 11 Sep 2001 00:22:47 +0200 (CEST)
Cc: Michael Richardson <mcr@xxxxxxxxxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxx>
In-reply-to: <20010911001022.12845@xxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Tue, 11 Sep 2001, Andi Kleen wrote:

> On Mon, Sep 10, 2001 at 11:41:28PM +0200, Michael Richardson wrote:
> >   Put a proper userspace API around netlink that abstracts the operations,
> > write man pages so that we (application developers) know how to use it, and
> > then *BSD can implement it to the ioctl interface and everyone will be 
> > happy.
> There is libnetlink which helps a lot. It is part of iproute2.
> I actually wrote man pages for it some time ago and submitted them,
> but they never appeared for some reason with
> iproute2. You can get them from the SuSE libnetlink.rpm though.
> There are also man pages for netlink/rtnetlink in the standard linux
> manpages (which are admittedly not very good, but they at least exist and
> they are not that bad)

One thing raises a question in this thread:

There is the (somewhat broken) SIOCGIFNETMASK, and then there is the
netlink interface. Netlink is only available if I compile advanced-router
into my kernel (/sbin/ip does only work when I do that). SIOCGIFNETMASK
works for the normal (ifconfig) alias interfaces, but not for the one's
added via ip.

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?)



The Internet treats censorship as a routing problem, and routes around it.
(John Gilmore on

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