1240303Smm/* $OpenBSD: hotplug.h,v 1.5 2006/05/28 16:52:34 mk Exp $ */ 2240303Smm/* 3240303Smm * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> 4240303Smm * 5240303Smm * Permission to use, copy, modify, and distribute this software for any 6240303Smm * purpose with or without fee is hereby granted, provided that the above 7240303Smm * copyright notice and this permission notice appear in all copies. 8240303Smm * 9240303Smm * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10240303Smm * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11240303Smm * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12240303Smm * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13240303Smm * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14240303Smm * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15240303Smm * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16240303Smm */ 17240303Smm 18240303Smm#ifndef _SYS_HOTPLUG_H_ 19240303Smm#define _SYS_HOTPLUG_H_ 20240303Smm 21240303Smm/* 22240303Smm * Public interface for enqueuing and dequeueing device 23240303Smm * attachment and detachment notifications. 24240303Smm */ 25240303Smm 26240303Smm#define HOTPLUG_DEVAT 0x01 /* device attached */ 27240303Smm#define HOTPLUG_DEVDT 0x02 /* device detached */ 28240303Smm 29240303Smmstruct hotplug_event { 30240303Smm int he_type; /* event type */ 31240303Smm enum devclass he_devclass; /* device class */ 32240303Smm char he_devname[16]; /* device name */ 33240415Smm}; 34240415Smm 35240415Smm#ifdef _KERNEL 36240415Smmvoid hotplug_device_attach(enum devclass, char *); 37240303Smmvoid hotplug_device_detach(enum devclass, char *); 38240303Smm#endif 39240303Smm 40240303Smm#endif /* _SYS_HOTPLUG_H_ */ 41240303Smm