playing with tun
Simias
simias.n at gmail.com
Sun Jul 8 13:38:11 UTC 2007
Hello hackers,
I'm trying to make an ip tunnel using the tun(4) interface. I
successfully open the tunnel, and after configuration it with ifconfig,
I receive and send the ip packets without problem. However, I'd like to
do this without ifconfig, so i can set the ip/netmask/broadcast/... by
myself in the program.
I've found the proper ioctls in the ifconfig source code, but i don't
know how to use them, since it seems I have to know the name of the tunX
interface (or at least, that's what i think).
So my question is: once I've opened /dev/tun, how can i know the name of
the network interface it created, so i can configure it?
Thank you,
--
Simias
More information about the freebsd-hackers
mailing list