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