Create a tuntap interface with libnl

Teto mattator at gmail.com
Sat Oct 26 12:20:32 EDT 2013


Thanks for the advice.
You will find enclosed a patch built upon the other patches sent in
the topic http://lists.infradead.org/pipermail/libnl/2013-October/001113.html
that adds basic tuntap support (can create it, set user, set it
permanent) both in C and python.

Matt

2013/10/25 Thomas Graf <tgraf at suug.ch>:
> On 10/24/13 at 02:07am, Teto wrote:
>> Hi,
>>
>> I wish I could create/delete tuntap interfaces from libnl. I was
>> wondering how to achieve that. It doesn't seem possible at the moment
>> so I started an implementation inspired by iproute source code using
>> ioctl.
>>
>> I started adding a few missing structures to libnl's
>> include/linux/if.h  such as ifreq but is that a good idea ?
>
> It should be very straight forward to add a lib/route/link/tun.c
> The code will look very much like a vlan device.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-basic-tuntap-support-both-on-C-and-python-side.patch
Type: text/x-patch
Size: 40062 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20131026/f883e7b2/attachment-0001.bin>


More information about the libnl mailing list