rtnetlink interface state monitoring problems.
Quoted 5 lines · David Woodhouse
IrDA devices are network devices. The core network code sends a
RTM_NETLINKmessage when they go up or down. All is well, and once the permission fix gets into the kernel I'm using, my irda monitor applet no longer needs to poll the state of the interface.
Actually, I'm not 100% happy with the IrDA situation. I would
not mind someone exporting more events to RtNetlink, very similar to the functionality/events I already provide in the IrNET control channel (discovery/expiry/link blocked/...).
Note that if you are only interested in IrNET, then the IrNET
control channel gives you everything you need, and you don't really need to use RtNetlink. Personally, I think the future of IrDA is IrNET, so that's why I don't bother with the rest.
In any case, send me a link to you applet, I'll add that on my
web page.
Quoted 4 lines
But Bluetooth devices are not network devices, it seems. There exists no current mechanism for notifying anyone of state changes. Should we invent a new method of notification using netlink, or should Bluetooth interfaces in fact be normal network devices just like IrDA devices are?
Check this thread :
http://sourceforge.net/mailarchive/forum.php?thread_id=1165868&forum_id=1881
Basically, you need to check the code in hcid.c (in utils) to
know how to collect this events. I've coded this and it works perfect. Yeah, it's another socket to manage.
Quoted 2 lines
--
dwmw2
Have fun... Jean