Using libnl to create a (802.1Q) VLAN interface

Thomas Graf tgraf at infradead.org
Wed Oct 20 06:59:25 EDT 2010


On Tue, Oct 19, 2010 at 07:57:25AM -0700, Joerg Pommnitz wrote:
> 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.

That's certainly not a bad idea.

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

There is already an API to provide modules for link information, see
lib/route/link/api.c so all that would be needed is a new function
rtnl_link_new() which builds a RTM_NEWLINK message similar to
rtnl_link_change() and a new rtnl_link_info_ops function which can be
implemented by the info modules to append link specific information
to the message.

I'll get around to it myself at some point but I want to finish the
traffic control bits first.



More information about the libnl mailing list