xref: /illumos-gate/usr/src/cmd/dcs/sparc/sun4u/rdr_param_types.h (revision 2a8bcb4efb45d99ac41c94a75c396b362c414f7f)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 2000-2002 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef _RDR_PARAM_TYPES_H
28*7c478bd9Sstevel@tonic-gate #define	_RDR_PARAM_TYPES_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate /*
31*7c478bd9Sstevel@tonic-gate  * WARNING: The contents of this file are shared by all projects
32*7c478bd9Sstevel@tonic-gate  * that  wish to  perform  remote  Dynamic Reconfiguration  (DR)
33*7c478bd9Sstevel@tonic-gate  * operations. Copies of this file can be found in the following
34*7c478bd9Sstevel@tonic-gate  * locations:
35*7c478bd9Sstevel@tonic-gate  *
36*7c478bd9Sstevel@tonic-gate  *	Project	    Location
37*7c478bd9Sstevel@tonic-gate  *	-------	    --------
38*7c478bd9Sstevel@tonic-gate  *	Solaris	    usr/src/cmd/dcs/sparc/sun4u/%M%
39*7c478bd9Sstevel@tonic-gate  *	SMS	    src/sms/lib/librdr/%M%
40*7c478bd9Sstevel@tonic-gate  *
41*7c478bd9Sstevel@tonic-gate  * In order for proper communication to occur,  the files in the
42*7c478bd9Sstevel@tonic-gate  * above locations must match exactly. Any changes that are made
43*7c478bd9Sstevel@tonic-gate  * to this file should  be made to all of the files in the list.
44*7c478bd9Sstevel@tonic-gate  */
45*7c478bd9Sstevel@tonic-gate 
46*7c478bd9Sstevel@tonic-gate /*
47*7c478bd9Sstevel@tonic-gate  * This file contains the structures that are exposed to the clients
48*7c478bd9Sstevel@tonic-gate  * of the Remote DR (RDR) module. They represent the data that is
49*7c478bd9Sstevel@tonic-gate  * required for the various RDR operations. They are passed into
50*7c478bd9Sstevel@tonic-gate  * the rdr_snd_msg() function and returned from the rdr_rcv_msg()
51*7c478bd9Sstevel@tonic-gate  * function.
52*7c478bd9Sstevel@tonic-gate  */
53*7c478bd9Sstevel@tonic-gate 
54*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
55*7c478bd9Sstevel@tonic-gate extern "C" {
56*7c478bd9Sstevel@tonic-gate #endif
57*7c478bd9Sstevel@tonic-gate 
58*7c478bd9Sstevel@tonic-gate #include <sys/param.h>
59*7c478bd9Sstevel@tonic-gate #include <config_admin.h>
60*7c478bd9Sstevel@tonic-gate #include <time.h>
61*7c478bd9Sstevel@tonic-gate 
62*7c478bd9Sstevel@tonic-gate #ifdef SMSLIB_TARGET
63*7c478bd9Sstevel@tonic-gate #include <libscri/rsrc_info.h>
64*7c478bd9Sstevel@tonic-gate #else
65*7c478bd9Sstevel@tonic-gate #include "rsrc_info.h"
66*7c478bd9Sstevel@tonic-gate #endif /* SMSLIB_TARGET */
67*7c478bd9Sstevel@tonic-gate 
68*7c478bd9Sstevel@tonic-gate 
69*7c478bd9Sstevel@tonic-gate typedef time_t timeout_t;
70*7c478bd9Sstevel@tonic-gate 
71*7c478bd9Sstevel@tonic-gate 
72*7c478bd9Sstevel@tonic-gate typedef struct {
73*7c478bd9Sstevel@tonic-gate 	char			*locale_str;
74*7c478bd9Sstevel@tonic-gate 	unsigned long		session_id;
75*7c478bd9Sstevel@tonic-gate } ses_req_params_t;
76*7c478bd9Sstevel@tonic-gate 
77*7c478bd9Sstevel@tonic-gate 
78*7c478bd9Sstevel@tonic-gate typedef struct {
79*7c478bd9Sstevel@tonic-gate 	unsigned int		error_code;
80*7c478bd9Sstevel@tonic-gate } ses_end_params_t;
81*7c478bd9Sstevel@tonic-gate 
82*7c478bd9Sstevel@tonic-gate 
83*7c478bd9Sstevel@tonic-gate typedef struct {
84*7c478bd9Sstevel@tonic-gate 	cfga_cmd_t 		state_change;
85*7c478bd9Sstevel@tonic-gate 	int			num_ap_ids;
86*7c478bd9Sstevel@tonic-gate 	char *const 		*ap_ids;
87*7c478bd9Sstevel@tonic-gate 	char  			*options;	/* const */
88*7c478bd9Sstevel@tonic-gate 	struct cfga_confirm 	*confp;
89*7c478bd9Sstevel@tonic-gate 	struct cfga_msg		*msgp;
90*7c478bd9Sstevel@tonic-gate 	char			**errstring;
91*7c478bd9Sstevel@tonic-gate 	cfga_flags_t 		flags;
92*7c478bd9Sstevel@tonic-gate 	timeout_t 		timeval;
93*7c478bd9Sstevel@tonic-gate 	int 			retries;
94*7c478bd9Sstevel@tonic-gate } change_state_params_t;
95*7c478bd9Sstevel@tonic-gate 
96*7c478bd9Sstevel@tonic-gate 
97*7c478bd9Sstevel@tonic-gate typedef struct {
98*7c478bd9Sstevel@tonic-gate 	char			*function;	/* const */
99*7c478bd9Sstevel@tonic-gate 	int			num_ap_ids;
100*7c478bd9Sstevel@tonic-gate 	char *const		*ap_ids;
101*7c478bd9Sstevel@tonic-gate 	char 			*options;	/* const */
102*7c478bd9Sstevel@tonic-gate 	struct cfga_confirm 	*confp;
103*7c478bd9Sstevel@tonic-gate 	struct cfga_msg		*msgp;
104*7c478bd9Sstevel@tonic-gate 	char			**errstring;
105*7c478bd9Sstevel@tonic-gate 	cfga_flags_t 		flags;
106*7c478bd9Sstevel@tonic-gate } private_func_params_t;
107*7c478bd9Sstevel@tonic-gate 
108*7c478bd9Sstevel@tonic-gate 
109*7c478bd9Sstevel@tonic-gate typedef struct {
110*7c478bd9Sstevel@tonic-gate 	int			num_ap_ids;
111*7c478bd9Sstevel@tonic-gate 	char *const		*ap_ids;
112*7c478bd9Sstevel@tonic-gate 	char			*options;	/* const */
113*7c478bd9Sstevel@tonic-gate 	struct cfga_msg		*msgp;
114*7c478bd9Sstevel@tonic-gate 	char			**errstring;
115*7c478bd9Sstevel@tonic-gate 	cfga_flags_t 		flags;
116*7c478bd9Sstevel@tonic-gate } test_params_t;
117*7c478bd9Sstevel@tonic-gate 
118*7c478bd9Sstevel@tonic-gate 
119*7c478bd9Sstevel@tonic-gate /*
120*7c478bd9Sstevel@tonic-gate  * A wrapper around the cfga_list_data_t
121*7c478bd9Sstevel@tonic-gate  * that allows sorting information to be
122*7c478bd9Sstevel@tonic-gate  * associated with each ap_id in an array.
123*7c478bd9Sstevel@tonic-gate  */
124*7c478bd9Sstevel@tonic-gate typedef struct {
125*7c478bd9Sstevel@tonic-gate 	uint64_t		sort_order;
126*7c478bd9Sstevel@tonic-gate 	cfga_list_data_t	ap_id_info;
127*7c478bd9Sstevel@tonic-gate } rdr_list_t;
128*7c478bd9Sstevel@tonic-gate 
129*7c478bd9Sstevel@tonic-gate 
130*7c478bd9Sstevel@tonic-gate typedef struct {
131*7c478bd9Sstevel@tonic-gate 	int 			num_ap_ids;
132*7c478bd9Sstevel@tonic-gate 	char			**ap_ids;
133*7c478bd9Sstevel@tonic-gate 	rdr_list_t		**ap_id_list;
134*7c478bd9Sstevel@tonic-gate 	int			*nlist;
135*7c478bd9Sstevel@tonic-gate 	char			*options;
136*7c478bd9Sstevel@tonic-gate 	char			*listopts;
137*7c478bd9Sstevel@tonic-gate 	char			**errstring;
138*7c478bd9Sstevel@tonic-gate 	int 			flags;
139*7c478bd9Sstevel@tonic-gate 	unsigned int		permissions;
140*7c478bd9Sstevel@tonic-gate } list_ext_params_t;
141*7c478bd9Sstevel@tonic-gate 
142*7c478bd9Sstevel@tonic-gate 
143*7c478bd9Sstevel@tonic-gate typedef struct {
144*7c478bd9Sstevel@tonic-gate 	int			num_ap_ids;
145*7c478bd9Sstevel@tonic-gate 	char			**ap_ids;
146*7c478bd9Sstevel@tonic-gate 	struct cfga_msg		*msgp;
147*7c478bd9Sstevel@tonic-gate 	char 			*options;	/* const */
148*7c478bd9Sstevel@tonic-gate 	cfga_flags_t 		flags;
149*7c478bd9Sstevel@tonic-gate } help_params_t;
150*7c478bd9Sstevel@tonic-gate 
151*7c478bd9Sstevel@tonic-gate 
152*7c478bd9Sstevel@tonic-gate typedef struct {
153*7c478bd9Sstevel@tonic-gate 	char			*ap_log_id1;
154*7c478bd9Sstevel@tonic-gate 	char			*ap_log_id2;
155*7c478bd9Sstevel@tonic-gate } ap_id_cmp_params_t;
156*7c478bd9Sstevel@tonic-gate 
157*7c478bd9Sstevel@tonic-gate 
158*7c478bd9Sstevel@tonic-gate typedef struct {
159*7c478bd9Sstevel@tonic-gate 	unsigned long		session_id;
160*7c478bd9Sstevel@tonic-gate } abort_cmd_params_t;
161*7c478bd9Sstevel@tonic-gate 
162*7c478bd9Sstevel@tonic-gate 
163*7c478bd9Sstevel@tonic-gate typedef struct {
164*7c478bd9Sstevel@tonic-gate 	struct cfga_confirm	*confp;
165*7c478bd9Sstevel@tonic-gate 	char			*message;
166*7c478bd9Sstevel@tonic-gate 	int 			response;
167*7c478bd9Sstevel@tonic-gate } confirm_callback_params_t;
168*7c478bd9Sstevel@tonic-gate 
169*7c478bd9Sstevel@tonic-gate 
170*7c478bd9Sstevel@tonic-gate typedef struct {
171*7c478bd9Sstevel@tonic-gate 	struct cfga_msg		*msgp;
172*7c478bd9Sstevel@tonic-gate 	char			*message;
173*7c478bd9Sstevel@tonic-gate } msg_callback_params_t;
174*7c478bd9Sstevel@tonic-gate 
175*7c478bd9Sstevel@tonic-gate 
176*7c478bd9Sstevel@tonic-gate typedef struct {
177*7c478bd9Sstevel@tonic-gate 	int			num_ap_ids;
178*7c478bd9Sstevel@tonic-gate 	char			**ap_ids;
179*7c478bd9Sstevel@tonic-gate 	int			flags;
180*7c478bd9Sstevel@tonic-gate 	ri_hdl_t		*hdl;
181*7c478bd9Sstevel@tonic-gate } rsrc_info_params_t;
182*7c478bd9Sstevel@tonic-gate 
183*7c478bd9Sstevel@tonic-gate 
184*7c478bd9Sstevel@tonic-gate typedef union {
185*7c478bd9Sstevel@tonic-gate 	ses_req_params_t	req;
186*7c478bd9Sstevel@tonic-gate 	ses_end_params_t	end;
187*7c478bd9Sstevel@tonic-gate 	change_state_params_t	change;
188*7c478bd9Sstevel@tonic-gate 	private_func_params_t	priv;
189*7c478bd9Sstevel@tonic-gate 	test_params_t		test;
190*7c478bd9Sstevel@tonic-gate 	list_ext_params_t	list_ext;
191*7c478bd9Sstevel@tonic-gate 	help_params_t		help;
192*7c478bd9Sstevel@tonic-gate 	ap_id_cmp_params_t	cmp;
193*7c478bd9Sstevel@tonic-gate 	abort_cmd_params_t	abort;
194*7c478bd9Sstevel@tonic-gate 	confirm_callback_params_t  conf_cb;
195*7c478bd9Sstevel@tonic-gate 	msg_callback_params_t	msg_cb;
196*7c478bd9Sstevel@tonic-gate 	rsrc_info_params_t	rsrc_info;
197*7c478bd9Sstevel@tonic-gate } cfga_params_t;
198*7c478bd9Sstevel@tonic-gate 
199*7c478bd9Sstevel@tonic-gate 
200*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
201*7c478bd9Sstevel@tonic-gate }
202*7c478bd9Sstevel@tonic-gate #endif
203*7c478bd9Sstevel@tonic-gate 
204*7c478bd9Sstevel@tonic-gate #endif	/* _RDR_PARAM_TYPES_H */
205