Date: Sun, 08 Jul 2007 15:22:43 +0200 From: Simias <simias.n@gmail.com> To: freebsd-hackers@freebsd.org Subject: playing with tun Message-ID: <868x9rav30.fsf@simias.hd.free.fr>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?868x9rav30.fsf>