Using libnl to create a (802.1Q) VLAN interface

Thomas Graf tgraf at infradead.org
Tue Oct 19 10:27:04 EDT 2010


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