xref: /titanic_52/usr/src/cmd/dcs/sparc/sun4u/rdr_param_types.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1 /*
2  * CDDL HEADER START
3  *
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
7  * with the License.
8  *
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.
13  *
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]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2000-2002 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _RDR_PARAM_TYPES_H
28 #define	_RDR_PARAM_TYPES_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
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
36  * locations:
37  *
38  *	Project	    Location
39  *	-------	    --------
40  *	Solaris	    usr/src/cmd/dcs/sparc/sun4u/%M%
41  *	SMS	    src/sms/lib/librdr/%M%
42  *
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.
46  */
47 
48 /*
49  * This file contains the structures that are exposed to the clients
50  * of the Remote DR (RDR) module. They represent the data that is
51  * required for the various RDR operations. They are passed into
52  * the rdr_snd_msg() function and returned from the rdr_rcv_msg()
53  * function.
54  */
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 #include <sys/param.h>
61 #include <config_admin.h>
62 #include <time.h>
63 
64 #ifdef SMSLIB_TARGET
65 #include <libscri/rsrc_info.h>
66 #else
67 #include "rsrc_info.h"
68 #endif /* SMSLIB_TARGET */
69 
70 
71 typedef time_t timeout_t;
72 
73 
74 typedef struct {
75 	char			*locale_str;
76 	unsigned long		session_id;
77 } ses_req_params_t;
78 
79 
80 typedef struct {
81 	unsigned int		error_code;
82 } ses_end_params_t;
83 
84 
85 typedef struct {
86 	cfga_cmd_t 		state_change;
87 	int			num_ap_ids;
88 	char *const 		*ap_ids;
89 	char  			*options;	/* const */
90 	struct cfga_confirm 	*confp;
91 	struct cfga_msg		*msgp;
92 	char			**errstring;
93 	cfga_flags_t 		flags;
94 	timeout_t 		timeval;
95 	int 			retries;
96 } change_state_params_t;
97 
98 
99 typedef struct {
100 	char			*function;	/* const */
101 	int			num_ap_ids;
102 	char *const		*ap_ids;
103 	char 			*options;	/* const */
104 	struct cfga_confirm 	*confp;
105 	struct cfga_msg		*msgp;
106 	char			**errstring;
107 	cfga_flags_t 		flags;
108 } private_func_params_t;
109 
110 
111 typedef struct {
112 	int			num_ap_ids;
113 	char *const		*ap_ids;
114 	char			*options;	/* const */
115 	struct cfga_msg		*msgp;
116 	char			**errstring;
117 	cfga_flags_t 		flags;
118 } test_params_t;
119 
120 
121 /*
122  * A wrapper around the cfga_list_data_t
123  * that allows sorting information to be
124  * associated with each ap_id in an array.
125  */
126 typedef struct {
127 	uint64_t		sort_order;
128 	cfga_list_data_t	ap_id_info;
129 } rdr_list_t;
130 
131 
132 typedef struct {
133 	int 			num_ap_ids;
134 	char			**ap_ids;
135 	rdr_list_t		**ap_id_list;
136 	int			*nlist;
137 	char			*options;
138 	char			*listopts;
139 	char			**errstring;
140 	int 			flags;
141 	unsigned int		permissions;
142 } list_ext_params_t;
143 
144 
145 typedef struct {
146 	int			num_ap_ids;
147 	char			**ap_ids;
148 	struct cfga_msg		*msgp;
149 	char 			*options;	/* const */
150 	cfga_flags_t 		flags;
151 } help_params_t;
152 
153 
154 typedef struct {
155 	char			*ap_log_id1;
156 	char			*ap_log_id2;
157 } ap_id_cmp_params_t;
158 
159 
160 typedef struct {
161 	unsigned long		session_id;
162 } abort_cmd_params_t;
163 
164 
165 typedef struct {
166 	struct cfga_confirm	*confp;
167 	char			*message;
168 	int 			response;
169 } confirm_callback_params_t;
170 
171 
172 typedef struct {
173 	struct cfga_msg		*msgp;
174 	char			*message;
175 } msg_callback_params_t;
176 
177 
178 typedef struct {
179 	int			num_ap_ids;
180 	char			**ap_ids;
181 	int			flags;
182 	ri_hdl_t		*hdl;
183 } rsrc_info_params_t;
184 
185 
186 typedef union {
187 	ses_req_params_t	req;
188 	ses_end_params_t	end;
189 	change_state_params_t	change;
190 	private_func_params_t	priv;
191 	test_params_t		test;
192 	list_ext_params_t	list_ext;
193 	help_params_t		help;
194 	ap_id_cmp_params_t	cmp;
195 	abort_cmd_params_t	abort;
196 	confirm_callback_params_t  conf_cb;
197 	msg_callback_params_t	msg_cb;
198 	rsrc_info_params_t	rsrc_info;
199 } cfga_params_t;
200 
201 
202 #ifdef __cplusplus
203 }
204 #endif
205 
206 #endif	/* _RDR_PARAM_TYPES_H */
207