Re: Creating VLAN links with libnl-route

Gavrilenko Eugene zhenya48.80 at
Thu Apr 5 03:41:19 EDT 2012

As I realized 'vconfig' utitlity uses ioctl(...) interface rather than Netlink messages.
To create  VLAN link with name "" we just need to call function rtnl_link_set_name() before calling rtnl_link_add().
For examle:   rtnl_link_set_name(link, "eth1.1");
After that we can obtain interafce index by calling  rtnl_link_get_kernel(sock, 0, "eth1.1", &link) and rtnl_link_get_ifindex(link).
The problem is solved.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the libnl mailing list