4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 2000 by Sun Microsystems, Inc.
24 * All rights reserved.
30 #pragma ident "%Z%%M% %I% %E% SMI"
33 * WARNING: The contents of this file are shared by all projects
34 * that wish to perform remote Dynamic Reconfiguration (DR)
35 * operations. Copies of this file can be found in the following
40 * Solaris usr/src/cmd/dcs/sparc/sun4u/%M%
41 * SMS src/sms/lib/librdr/%M%
43 * In order for proper communication to occur, the files in the
44 * above locations must match exactly. Any changes that are made
45 * to this file should be made to all of the files in the list.
49 * This file contains definitions for a transport layer interface socket
50 * interface between a domain configuration server (DCS) and a domain
51 * configuration agent (DCA). The domain configuration server resides
52 * within Solaris on a domain. The domain configuration agent resides on
53 * the system controller.
62 * The data_type field indicates whether the message is REQUEST
68 } rdr_msg_data_type_t
;
72 * The error_msg_ctl field indicates whether error messages
73 * should be generated or not. See the errstring argument in
74 * the config_admin(3CFGADM) man page.
77 RDR_GENERATE_ERR_MSGS
= 1,
78 RDR_DONT_GENERATE_ERR_MSGS
79 } rdr_error_msg_ctl_t
;
83 * The list_msg_ctl field indicates whether a list should
84 * be generated for all attachment points in the device tree or
85 * only those attachment points specified in the message. See
86 * the comment on the first two arguments for config_list_ext
87 * in the config_admin(3CFGADM) man page.
90 RDR_LIST_ONLY_PARAM_APS
= 1,
92 } rdr_list_msg_control_t
;
96 * The permissions field indicates if the list_ext command should
97 * filter out attachment points that the remote user doesn't have
98 * sufficient access permissions to view.
101 RDR_NOT_PRIVILEGED
= 0,
103 } rdr_list_permission_control_t
;
107 * The message_opcode value of the message indicates the purpose
108 * of the request. The defined values for message_opcode are:
111 RDR_SES_REQ
= 1, /* Session open. */
112 RDR_SES_ESTBL
, /* Session Establishment. */
113 RDR_SES_END
, /* Session end. */
114 RDR_CONF_CHANGE_STATE
, /* Change state of an attachment point. */
115 RDR_CONF_PRIVATE_FUNC
, /* Invoke h/w specific func. */
116 RDR_CONF_TEST
, /* Test the system board. */
117 RDR_CONF_LIST_EXT
, /* Listing interface. */
118 RDR_CONF_HELP
, /* Request output of localized help msg */
119 RDR_CONF_AP_ID_CMP
, /* Compare two attachment point ids. */
120 RDR_CONF_ABORT_CMD
, /* Abort the current config command. */
121 RDR_CONF_CONFIRM_CALLBACK
, /* Confirm call-back. */
122 RDR_CONF_MSG_CALLBACK
, /* Message call-back. */
123 RDR_RSRC_INFO
, /* System board resource info. */
129 * The status is valid only if the data_type is REPLY. The possible
130 * values for status are, FAILED or SUCCESS.
139 * The following typedefs define message formats for use in the
140 * rdr_msg_type_t union. The rdr_msg_type_t union contains the
141 * majority of the information in the messages sent between the
144 * Some types require variable length data to follow the fixed
145 * length information in the struct. If this is required, a
146 * comment is placed at the end of the struct that shows the
147 * contents of that information along with the required number
150 * All *_size fields are the length of the string + 1 to account
151 * for NULL termination.
156 unsigned int locale_size
;
157 /* locale string (locale_size bytes) */
162 unsigned long session_id
;
163 } rdr_ses_req_reply_t
;
167 unsigned int num_ap_ids
;
168 unsigned int ap_id_char_size
;
169 unsigned int options_size
;
170 unsigned long confirm_callback_id
;
171 unsigned long confirm_appdata_ptr
;
172 unsigned long msg_callback_id
;
173 unsigned long msg_appdata_ptr
;
175 unsigned long timeval
;
176 unsigned short state_change_cmd
;
177 unsigned short error_msg_ctl
;
180 /* ap id strings (ap_id_char_size bytes) */
181 /* option string (options_size bytes) */
182 } rdr_change_state_t
;
186 unsigned int errstring_size
;
187 /* error string (errstring_size bytes) */
188 } rdr_change_state_reply_t
;
192 unsigned int num_ap_ids
;
193 unsigned int ap_id_char_size
;
194 unsigned int options_size
;
195 unsigned int function_size
;
196 unsigned long confirm_callback_id
;
197 unsigned long confirm_appdata_ptr
;
198 unsigned long msg_callback_id
;
199 unsigned long msg_appdata_ptr
;
201 unsigned short error_msg_ctl
;
204 /* ap id strings (ap_id_char_size bytes) */
205 /* option string (options_size bytes) */
206 /* function string (function_size bytes) */
207 } rdr_private_func_t
;
211 unsigned int errstring_size
;
212 /* error string (errstring_size bytes) */
213 } rdr_private_func_reply_t
;
217 unsigned int num_ap_ids
;
218 unsigned int ap_id_char_size
;
219 unsigned int options_size
;
220 unsigned long msg_callback_id
;
221 unsigned long msg_appdata_ptr
;
223 unsigned short error_msg_ctl
;
226 /* ap id strings (ap_id_char_size bytes) */
227 /* option string (options_size bytes) */
232 unsigned int errstring_size
;
233 /* error string (errstring_size bytes) */
238 unsigned int num_ap_ids
;
239 unsigned int ap_id_char_size
;
240 unsigned int options_size
;
241 unsigned int listopts_size
;
242 unsigned short error_msg_ctl
;
243 unsigned short list_msg_ctl
;
245 unsigned int permissions
;
246 /* ap id strings (ap_id_char_size bytes) */
247 /* option string (options_size bytes) */
248 /* list opt string (listopts_size bytes) */
253 * The num_ap_ids is the total number of ap_ids in the sequence of
254 * messages for the list_ext reply. The list data array is an
255 * array of cfga_list_data_t (see config_admin (3CFGA)) structs
256 * that has num_ap_ids elements.
259 unsigned int num_ap_ids
;
260 unsigned int errstring_size
;
261 /* list data array (num_ap_ids elements) */
262 /* error string (errstring_size bytes) */
263 } rdr_list_ext_reply_t
;
267 unsigned int num_ap_ids
;
268 unsigned int ap_id_char_size
;
269 unsigned long msg_callback_id
;
270 unsigned long msg_appdata_ptr
;
271 unsigned int options_size
;
273 /* ap id strings (ap_id_char_size bytes) */
274 /* option string (options_size bytes) */
279 unsigned int ap_id1_size
;
280 unsigned int ap_id2_size
;
281 /* ap id 1 string (ap_id1_size bytes) */
282 /* ap id 2 string (ap_id1_size bytes) */
287 unsigned long session_id
;
292 unsigned long confirm_callback_id
;
293 unsigned long appdata_ptr
;
294 unsigned int message_size
;
295 /* prompt message (message_size bytes) */
296 } rdr_confirm_callback_t
;
300 unsigned long confirm_callback_id
;
301 unsigned long appdata_ptr
;
303 } rdr_confirm_callback_reply_t
;
307 unsigned long msg_callback_id
;
308 unsigned long appdata_ptr
;
309 unsigned int message_size
;
310 /* user message (message_size bytes) */
311 } rdr_msg_callback_t
;
315 unsigned int num_ap_ids
;
316 unsigned int ap_id_char_size
;
318 /* ap id strings (ap_id_char_size bytes) */
323 unsigned long packed_hdl_size
;
324 /* rsrc info buf (packed_hdl_size bytes) */
325 } rdr_rsrc_info_reply_t
;
329 rdr_ses_req_t ses_req
;
330 rdr_ses_req_reply_t ses_req_reply
;
331 rdr_change_state_t change_state
;
332 rdr_change_state_reply_t change_state_reply
;
333 rdr_private_func_t private_func
;
334 rdr_private_func_reply_t private_func_reply
;
336 rdr_test_reply_t test_reply
;
337 rdr_list_ext_t list_ext
;
338 rdr_list_ext_reply_t list_ext_reply
;
340 rdr_ap_id_cmp_t ap_id_cmp
;
341 rdr_abort_cmd_t abort
;
342 rdr_confirm_callback_t confirm_callback
;
343 rdr_confirm_callback_reply_t confirm_callback_reply
;
344 rdr_msg_callback_t msg_callback
;
345 rdr_rsrc_info_t rsrc_info
;
346 rdr_rsrc_info_reply_t rsrc_info_reply
;
351 * The RDR message will contain the following members:
354 unsigned long data_length
;
356 /* Message Op, Type, and Status */
357 unsigned char message_opcode
; /* rdr_msg_opcode_t */
358 unsigned char data_type
; /* rdr_msg_data_type_t */
361 unsigned long status
; /* rdr_msg_status_t */
363 /* These are for security and version */
364 unsigned long random_req
;
365 unsigned long random_resp
;
367 unsigned short major_version
;
368 unsigned short minor_version
;
373 * The RDR message body:
385 #endif /* _REMOTE_CFG_H */