Skip to contentSkip to conversation

Simple list of tun devices?

Bridge Michael Bueker 2 participants 2 messages Nov 7, 2005 Ethernet bridge

lore
Share & tools
lore
#0 lore raw

Hello,

I'm using acustom script to bring up and take down my bridge. For that, I need to know the bridge devices that are currently active for use in a bash for-loop.
I reckon that I could grep and sed the output of ifconfig or brctl show, but that seems very kludgy to me. The tun* devices do not appear in /dev and neither did a grep in all of /proc return any useful result.

So, is there a simple way to tell which tun devices are up at any moment?

Cheers,
~Mik

Signature · 1 line
Was passiert, wenn man einem Therapiepatienten ein asymmetrisches Mandala zum Ausmalen gibt? Wird er dann erst recht wahnsinnig?
#1 lore raw
Quoted 9 lines · On Mon, 07 Nov 2005 21:16:28 +0100 Michael Bueker <[email protected]> wrote:

Hello,

I'm using acustom script to bring up and take down my bridge. For that, I need to know the bridge devices that are currently active for use in a bash for-loop.
I reckon that I could grep and sed the output of ifconfig or brctl show, but that seems very kludgy to me. The tun* devices do not appear in /dev and neither did a grep in all of /proc return any useful result.

Quoted 4 lines

So, is there a simple way to tell which tun devices are up at any moment?

Cheers,
~Mik

you could look at /sys/class/net/*/brport

Signature · 2 lines
Stephen Hemminger <[email protected]>
OSDL http://developer.osdl.org/~shemminger