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]
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
26 * This file includes structures, macros used to communicate with linkmgmt
33 #include <sys/types.h>
41 * datalink management related macros, structures.
47 #define DLMGMT_CMD_CREATE_LINKID (DLMGMT_CMD_BASE + 0)
48 #define DLMGMT_CMD_DESTROY_LINKID (DLMGMT_CMD_BASE + 1)
49 #define DLMGMT_CMD_REMAP_LINKID (DLMGMT_CMD_BASE + 2)
50 #define DLMGMT_CMD_CREATECONF (DLMGMT_CMD_BASE + 3)
51 #define DLMGMT_CMD_OPENCONF (DLMGMT_CMD_BASE + 4)
52 #define DLMGMT_CMD_WRITECONF (DLMGMT_CMD_BASE + 5)
53 #define DLMGMT_CMD_UP_LINKID (DLMGMT_CMD_BASE + 6)
54 #define DLMGMT_CMD_SETATTR (DLMGMT_CMD_BASE + 7)
55 #define DLMGMT_CMD_UNSETATTR (DLMGMT_CMD_BASE + 8)
56 #define DLMGMT_CMD_REMOVECONF (DLMGMT_CMD_BASE + 9)
57 #define DLMGMT_CMD_DESTROYCONF (DLMGMT_CMD_BASE + 10)
58 #define DLMGMT_CMD_GETATTR (DLMGMT_CMD_BASE + 11)
59 #define DLMGMT_CMD_GETCONFSNAPSHOT (DLMGMT_CMD_BASE + 12)
60 #define DLMGMT_CMD_ZONEBOOT (DLMGMT_CMD_BASE + 13)
61 #define DLMGMT_CMD_ZONEHALT (DLMGMT_CMD_BASE + 14)
63 typedef struct dlmgmt_door_createid_s
{
65 char ld_link
[MAXLINKNAMELEN
];
66 datalink_class_t ld_class
;
70 } dlmgmt_door_createid_t
;
72 typedef struct dlmgmt_door_destroyid_s
{
74 datalink_id_t ld_linkid
;
76 } dlmgmt_door_destroyid_t
;
78 typedef struct dlmgmt_door_remapid_s
{
80 datalink_id_t ld_linkid
;
81 char ld_link
[MAXLINKNAMELEN
];
82 } dlmgmt_door_remapid_t
;
84 typedef struct dlmgmt_door_upid_s
{
86 datalink_id_t ld_linkid
;
89 typedef struct dlmgmt_door_createconf_s
{
91 char ld_link
[MAXLINKNAMELEN
];
92 datalink_id_t ld_linkid
;
93 datalink_class_t ld_class
;
95 } dlmgmt_door_createconf_t
;
97 typedef struct dlmgmt_door_setattr_s
{
100 char ld_attr
[MAXLINKATTRLEN
];
102 dladm_datatype_t ld_type
;
103 char ld_attrval
[MAXLINKATTRVALLEN
];
104 } dlmgmt_door_setattr_t
;
106 typedef struct dlmgmt_door_unsetattr_s
{
109 char ld_attr
[MAXLINKATTRLEN
];
110 } dlmgmt_door_unsetattr_t
;
112 typedef struct dlmgmt_door_writeconf_s
{
115 } dlmgmt_door_writeconf_t
;
117 typedef struct dlmgmt_door_removeconf_s
{
119 datalink_id_t ld_linkid
;
120 } dlmgmt_door_removeconf_t
;
122 typedef struct dlmgmt_door_destroyconf_s
{
125 } dlmgmt_door_destroyconf_t
;
127 typedef struct dlmgmt_door_openconf_s
{
129 datalink_id_t ld_linkid
;
130 } dlmgmt_door_openconf_t
;
132 typedef struct dlmgmt_door_getconfsnapshot_s
{
134 datalink_id_t ld_linkid
;
135 } dlmgmt_door_getconfsnapshot_t
;
137 typedef struct dlmgmt_door_getattr_s
{
140 char ld_attr
[MAXLINKATTRLEN
];
141 } dlmgmt_door_getattr_t
;
143 typedef struct dlmgmt_createconf_retval_s
{
146 } dlmgmt_createconf_retval_t
;
148 typedef struct dlmgmt_openconf_retval_s
{
151 } dlmgmt_openconf_retval_t
;
153 typedef struct dlmgmt_getconfsnapshot_retval_s
{
157 } dlmgmt_getconfsnapshot_retval_t
;
159 typedef struct dlmgmt_door_zone_s
{
162 } dlmgmt_door_zoneboot_t
, dlmgmt_door_zonehalt_t
;
164 typedef struct dlmgmt_retval_s dlmgmt_remapid_retval_t
,
165 dlmgmt_upid_retval_t
,
166 dlmgmt_destroyid_retval_t
,
167 dlmgmt_setattr_retval_t
,
168 dlmgmt_unsetattr_retval_t
,
169 dlmgmt_writeconf_retval_t
,
170 dlmgmt_removeconf_retval_t
,
171 dlmgmt_destroyconf_retval_t
,
172 dlmgmt_zoneboot_retval_t
,
173 dlmgmt_zonehalt_retval_t
;
175 typedef struct dlmgmt_linkid_retval_s dlmgmt_createid_retval_t
;
181 #endif /* _LIBDLMGMT_H */