From owner-freebsd-net@FreeBSD.ORG Fri May 10 05:19:51 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3A37338C for ; Fri, 10 May 2013 05:19:51 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-ie0-x231.google.com (mail-ie0-x231.google.com [IPv6:2607:f8b0:4001:c03::231]) by mx1.freebsd.org (Postfix) with ESMTP id 088A4D81 for ; Fri, 10 May 2013 05:19:50 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id 9so7281118iec.36 for ; Thu, 09 May 2013 22:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=x-received:references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to; bh=u9AoySA4M3m8QTZnmHcM+Uz+gTl9hhqiIzoU+oKEqNY=; b=RFqtiQb+RSAKhYfphD3ZggLLjeKJ+a+aSX9w61vF4rFq/CNCFDhhSeyYiWzRrzYHBs 2yqQfBJyiiZ0hlFXMB8EPZH2EeBMQNGwPemFIfewyCZ5G8VF7IkTxWFIZaIvtr7XBJQF UkuqpfCcTq+a8PHLfiwja48rHQXnubFJf27ys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to:x-gm-message-state; bh=u9AoySA4M3m8QTZnmHcM+Uz+gTl9hhqiIzoU+oKEqNY=; b=QlEru8tBSvsJOkm7q0PHJK/u9TvwF1HexcXNM/S8CgfOYRRx575vysAuPpjJhrUJQL epdK0I2jCLzysMbcP+W5vAyuHOIqJSnDmzBWxF3FWMiqjxMCjbv8hG6mFyS+zrMGAMcO hA6di3G5SCjWR8fdvcGAVxq40T+5rzdDwe9g4Q5aD4iSIOlCzcG2xanBb/S6mtVi4Eo+ KLpDAUD8wJ9/vOxcLYNI4xdLije1WU4lpxs1+opURV+Ve8X7drHuwUBMIx0CW+uuYW0H u0bXRLRRRPOLSw3qfpPqn//zim6ejU8rQzyfYUOulWSSZLxNGO7ftPWv4V21bbmFPAbh MOoA== X-Received: by 10.50.49.7 with SMTP id q7mr848848ign.6.1368163190671; Thu, 09 May 2013 22:19:50 -0700 (PDT) Received: from [192.168.30.77] (24-236-152-143.dhcp.aldl.mi.charter.com. [24.236.152.143]) by mx.google.com with ESMTPSA id d4sm2158175igc.3.2013.05.09.22.19.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 22:19:49 -0700 (PDT) References: <518C7F85.3000405@hub.org> Mime-Version: 1.0 (1.0) In-Reply-To: <518C7F85.3000405@hub.org> Message-Id: <746BAC62-DA57-4D4D-A7F4-46A1C74C73B6@DataIX.net> X-Mailer: iPhone Mail (10B329) From: Jason Hellenthal Subject: Re: status of a tap device ... Date: Fri, 10 May 2013 01:19:45 -0400 To: "Marc G. Fournier" X-Gm-Message-State: ALoCoQmXBfYrJBkf4L6npfVytYVQBZsc12drYVRNt1GUgr70no1IlSCZxAwdwY+m1vSbw0uQC9+m Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2013 05:19:51 -0000 Ifconfig -v tap0 ? Does this work for you ? Also upon opening a tap... ifconfig tap create Will return the numeric portion of the tap that was created with $? So scripting it out it would be similar to... ifconfig tap create && export MYTUNIS=3D"$?" echo "tap$MYTAPIS" --=20 Jason Hellenthal IS&T Services Professional Inbox: jhellenthal@DataIX.net JJH48-ARIN On May 10, 2013, at 1:03, "Marc G. Fournier" wrote: >=20 > Quick question ... is there a command I can run that will tell me if a tap= device is open? I know I can do 'ifconfig tap0' and see the 'Opened by' li= ne, but I want to do this within a perl script, for instance, akin to how I c= an use the fstat function to get information about a file ... >=20 > Rather avoid re-creating the wheel, so to say, if its already been created= ... >=20 > Thx > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"