From owner-freebsd-net@FreeBSD.ORG Mon Jul 10 07:45:52 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86AA916A500 for ; Mon, 10 Jul 2006 07:45:52 +0000 (UTC) (envelope-from rdenis@simphalempin.com) Received: from 25.mail-out.ovh.net (25.mail-out.ovh.net [213.186.37.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E30043D81 for ; Mon, 10 Jul 2006 07:45:15 +0000 (GMT) (envelope-from rdenis@simphalempin.com) Received: (qmail 4538 invoked by uid 503); 10 Jul 2006 06:53:14 -0000 Received: (QMFILT: 1.0); 10 Jul 2006 06:53:14 -0000 Received: from b6.ovh.net (HELO mail87.ha.ovh.net) (213.186.33.56) by 25.mail-out.ovh.net with SMTP; 10 Jul 2006 06:53:14 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 10 Jul 2006 07:45:13 -0000 Received: from esprx01x.nokia.com (esprx01x.nokia.com [192.100.124.218]) by ssl0.ovh.net (IMP) with HTTP for ; Mon, 10 Jul 2006 10:45:13 +0300 Message-ID: <1152517513.44b20589e1bbc@ssl0.ovh.net> Date: Mon, 10 Jul 2006 10:45:13 +0300 From: Remi Denis-Courmont To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Originating-IP: 192.100.124.218 Subject: Interface name or ID of /dev/tun tunnels X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jul 2006 07:45:52 -0000 Hello, Is there any clean way to find out the name, or better yet the ID (since ID are immutable while names are not), of a tunnel device allocated from /dev/tun ? The question was already raised here, but I could find no answer: http://lists.freebsd.org/pipermail/freebsd-net/2004-March/003338.html If not, would it be possible to add, say, an ioctl() on tun/tap devices to return their ID (which could be converted to a name via if_indextoname()), or something similar? That should retain full backward compatibility... Or maybe there is another way to configure the tunnel a la ifconfig with only the file descriptor?? Thanks, -- Remi Denis-Courmont http://www.simphalempin.com/home/