Re: Creating VLAN links with libnl-route

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


Hello!
As I realized 'vconfig' utitlity uses ioctl(...) interface rather than Netlink messages.
To create  VLAN link with name "eth1.xxx" 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.
Thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20120405/abe0cb1b/attachment.html>


More information about the libnl mailing list