From: Jean Tourrilhes <jt@bo...> - 2002-03-14 19:28:20
jpruett wrote :
> Lostbie question:
> I need to write a script to fire off some stuff whenever irda is discovered.
> Are there proc parsers or shell-traps or something to do this?
> Any suggestions appreciated :-)
3 Avenues :
o poll and parse at regular interval /proc/net/irda/discovery
o write C program that do getsockopt(IRLMP_WAITDEVICE)
o wait on /dev/irnet for discovery event
I've been using the last two, but within C programs. The third
one is my favorite, but it works only for device that support IrNET