AW: Using libnl to create a (802.1Q) VLAN interface

Joerg Pommnitz pommnitz at yahoo.com
Tue Oct 19 10:57:25 EDT 2010


Thomas,
thanks for clarifying this issue. May I suggest to add a small TODO 
comment somewhere so that this is clearly documented? If I don't find
a feature it might might either be that I'm to stupid to find it or 
that it isn't there.
Regarding a patch: Creating a new link is a common operation that can 
be applied not just to 802.1Q, but also to macvlan, gre, gretap, veth, 
dummy and ifb.
On the other hand, the detailed attributes are clearly link type specific.
How would an acceptable patch look like?

 -- 
Regards 
Joerg 



----- Ursprüngliche Mail ----
> Von: Thomas Graf <tgraf at infradead.org>
> An: Joerg Pommnitz <pommnitz at yahoo.com>
> CC: libnl at lists.infradead.org
> Gesendet: Dienstag, den 19. Oktober 2010, 16:27:04 Uhr
> Betreff: Re: Using libnl to create a (802.1Q) VLAN interface
> 
> On Mon, Oct 18, 2010 at 07:08:56AM -0700, Joerg Pommnitz wrote:
> > looking  at the libnl-2.0 documentation left me wondering whether it is
> > currently  possible to create new links with libnl. I could only find
> >  rtnl_link_build_change_request/rtnl_link_change. These two functions
> >  seem to be limited to changing attributes of existing links.
> > So: Does  libnl support the "ip link add link ..." functionality? And
> > btw. what  about GRE tunnels?
> 
> libnl has basic support for additional link  information such as vlan
> attributes. See lib/route/link/vlan.c but it does  not provide an
> interface to create new links yet.
> 
> It shouldn't be  difficult to add this though. Feel free to send a patch
> if you feel like  implementing it yourself.
> 





More information about the libnl mailing list