Attach/detach devices

M. Warner Losh imp at bsdimp.com
Fri Aug 11 20:20:45 UTC 2006


In message: <00bb01c6bd6f$77c8ddb0$2bba90c1 at Altair>
            "Johnny Choque" <jchoque at tlmat.unican.es> writes:
: Hi,
: 
: I'm trying to do a userland program that detect the event when a device is
: attached/detached. In particular, I would like to detect these events for
: wireless pc card insertion/ejection or when tear down the connection of the
: wireless interface build-in laptop. I've found that functions
: device_attach/device_detach are used by the kernel when a device is
: attached/detached respectively, and, e.g, when a device is detached "a
: notification event is sent to userland for user-based device management
: service", how can I use that notification event in my userland program?
: Could you give me some ideas to do my program?

man 8 devd

Warner


More information about the freebsd-hackers mailing list