----- Original Message ----- From: "Stephen Hemminger" <shemminger@xxxxxxxx> > > The old way is to do ioctl() SIOCDEV_PRIVATE with BRCTL_GET_BRIDGES > and that gives a table of ifindices, you can use that to map port -> > ifindex -> etherdevice > > Newer way is to look in directory: > /sys/class/net/brX/brif > It has symlinks to the devices that are being bridged. > /sys/class/net/eth0/brport/port_id > contains the portid of eth0 in what ever bridge it is in. > Works perfectly. Thanks Joergen