Date: Thu, 09 May 2013 22:32:56 -0700 From: "Marc G. Fournier" <scrappy@hub.org> To: Jason Hellenthal <jhellenthal@dataix.net>, freebsd-net@freebsd.org Subject: Re: status of a tap device ... Message-ID: <518C8688.5040908@hub.org> In-Reply-To: <746BAC62-DA57-4D4D-A7F4-46A1C74C73B6@DataIX.net> References: <518C7F85.3000405@hub.org> <746BAC62-DA57-4D4D-A7F4-46A1C74C73B6@DataIX.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Ended up finding the perl module: p5-Net-Ifconfig-Wrapper that does the trick ... Although your suggestinos are much appreciated below, the problem is that I have the tap devices, and bridge 'addm's happening on server reboot, but need to know which one is in use before starting up / using them for vBox ... Thank you for the response though ... On 2013-05-09 10:19 PM, Jason Hellenthal wrote: > 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="$?" > > echo "tap$MYTAPIS" > > /-- / > > /*Jason Hellenthal*/ > > IS&T Services Professional > > Inbox: /jhellenthal@DataIX.net <mailto:jhellenthal@DataIX.net>/ > > JJH48-ARIN > > > > On May 10, 2013, at 1:03, "Marc G. Fournier" <scrappy@hub.org > <mailto:scrappy@hub.org>> wrote: > >> >> 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' line, but I want to do this within a perl script, for >> instance, akin to how I can use the fstat function to get information >> about a file ... >> >> Rather avoid re-creating the wheel, so to say, if its already been >> created ... >> >> Thx >> _______________________________________________ >> freebsd-net@freebsd.org <mailto: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 >> <mailto:freebsd-net-unsubscribe@freebsd.org>"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?518C8688.5040908>