4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _LIBHOTPLUG_IMPL_H
28 #define _LIBHOTPLUG_IMPL_H
34 #include <sys/param.h>
35 #include <libhotplug.h>
38 * Definition of a node in a hotplug information snapshot.
47 time_t hp_last_change
;
54 * Definitions used for packing/unpacking snapshots.
56 #define HP_INFO_BASE "hp_info.basepath"
57 #define HP_INFO_NODE "hp_info.node"
58 #define HP_INFO_BRANCH "hp_info.branch"
59 #define HP_INFO_TYPE "hp_info.type"
60 #define HP_INFO_NAME "hp_info.name"
61 #define HP_INFO_USAGE "hp_info.usage"
62 #define HP_INFO_STATE "hp_info.state"
63 #define HP_INFO_DESC "hp_info.description"
64 #define HP_INFO_TIME "hp_info.last_change"
67 * Definitions for the door interface to hotplugd(1m).
69 #define HOTPLUGD_PID "/var/run/hotplugd.pid"
70 #define HOTPLUGD_DOOR "/var/run/hotplugd_door"
80 #define HPD_CMD "hp_door.cmd"
81 #define HPD_PATH "hp_door.path"
82 #define HPD_CONNECTION "hp_door.connection"
83 #define HPD_FLAGS "hp_door.flags"
84 #define HPD_STATE "hp_door.state"
85 #define HPD_OPTIONS "hp_door.options"
86 #define HPD_INFO "hp_door.info"
87 #define HPD_STATUS "hp_door.status"
88 #define HPD_SEQNUM "hp_door.seqnum"
91 * Definition of macros to validate flags.
93 #define HP_INIT_FLAGS_VALID(f) ((f & ~(HPINFOUSAGE)) == 0)
94 #define HP_SET_STATE_FLAGS_VALID(f) ((f & ~(HPFORCE | HPQUERY)) == 0)
97 * Definition of global flag to enable debug.
99 extern int libhotplug_debug
;
105 #endif /* _LIBHOTPLUG_IMPL_H */