Hi,
how do I get notifications when hardware (e.g. USB devices) is hotplugged from a C/C++ application? On Linux, I can listen for those events on a socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT) -- there's probably something similar in FreeBSD?
Also, is there a way to get notifications when a network cable is plugged in or out (equivalent to monitoring ifi_flags on a socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE) on Linux)?
Thanks
bero
how do I get notifications when hardware (e.g. USB devices) is hotplugged from a C/C++ application? On Linux, I can listen for those events on a socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT) -- there's probably something similar in FreeBSD?
Also, is there a way to get notifications when a network cable is plugged in or out (equivalent to monitoring ifi_flags on a socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE) on Linux)?
Thanks
bero