Bridge interface: Netlink socket notification

Hi,

For one of my application(Linux 2.6) I am using a netlink socket to get the interface changes notification.

socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE)

Application receives netlink notification for Ethernet, bond interfaces but there is no notification about bridge interfaces changes.

It would be of great help if someone can point me out on how to get the bridge interface netlink notification.

Thanks,
Anand

What sort of notifications are you getting? If you're monitoring for port state changes, i.e. cable unplugged, I'm not sure that makes sense for a bridge interface, you may need to monitor its constituent parts.

I am looking for change in operation state and change of Address(L2 & L3) from bridge interface. I do get the above said notifications for on-board and bonding interfaces but not for bridge.

Change in operation state doesn't make much sense for a bridge. What should it give you, the average?

I agree on the operation state for bridge interface since it is going to be always up(atleast in my env). But my main concern is the change in address. If you know of a way to get the netlink notification for change in address happens in a bridge interface then it would help me lot.

I'm beginning to suspect a kernel patch would be needed. I found a patch for linux 2.4 kernels. Unfortunately I don't see any direct way to apply this to 2.6, as the underlying code has changed significantly.

I was also looking on the web but did not find anything useful, I will keep an eye on it. Thanks for your time, please keep me posted if you come across 2.6 kernel patch.