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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 %#include <fm/fmd_api.h>
28 
29 enum fmd_adm_error {
30 	FMD_ADM_ERR_NOMEM = 1,
31 	FMD_ADM_ERR_PERM,
32 	FMD_ADM_ERR_MODSRCH,
33 	FMD_ADM_ERR_MODBUSY,
34 	FMD_ADM_ERR_MODFAIL,
35 	FMD_ADM_ERR_MODNOENT,
36 	FMD_ADM_ERR_MODEXIST,
37 	FMD_ADM_ERR_MODINIT,
38 	FMD_ADM_ERR_MODLOAD,
39 	FMD_ADM_ERR_RSRCSRCH,
40 	FMD_ADM_ERR_RSRCNOTF,
41 	FMD_ADM_ERR_SERDSRCH,
42 	FMD_ADM_ERR_SERDFIRED,
43 	FMD_ADM_ERR_ROTSRCH,
44 	FMD_ADM_ERR_ROTFAIL,
45 	FMD_ADM_ERR_ROTBUSY,
46 	FMD_ADM_ERR_CASESRCH,
47 	FMD_ADM_ERR_CASEOPEN,
48 	FMD_ADM_ERR_XPRTSRCH,
49 	FMD_ADM_ERR_CASEXPRT,
50 	FMD_ADM_ERR_RSRCNOTR
51 };
52 
53 struct fmd_rpc_modstat {
54 	struct fmd_stat rms_buf<>;
55 	enum fmd_adm_error rms_err;
56 };
57 
58 struct fmd_rpc_modinfo {
59 	string rmi_name<>;
60 	string rmi_desc<>;
61 	string rmi_vers<>;
62 	bool rmi_faulty;
63 	struct fmd_rpc_modinfo *rmi_next;
64 };
65 
66 struct fmd_rpc_modlist {
67 	enum fmd_adm_error rml_err;
68 	struct fmd_rpc_modinfo *rml_list;
69 	uint32_t rml_len;
70 };
71 
72 struct fmd_rpc_rsrcinfo {
73 	string rri_fmri<>;
74 	string rri_uuid<>;
75 	string rri_case<>;
76 	bool rri_faulty;
77 	bool rri_unusable;
78 	bool rri_invisible;
79 	enum fmd_adm_error rri_err;
80 };
81 
82 struct fmd_rpc_rsrclist {
83 	opaque rrl_buf<>;
84 	uint32_t rrl_len;
85 	uint32_t rrl_cnt;
86 	enum fmd_adm_error rrl_err;
87 	bool rrl_all;
88 };
89 
90 struct fmd_rpc_serdinfo {
91 	string rsi_name<>;
92 	uint64_t rsi_delta;
93 	uint32_t rsi_count;
94 	bool rsi_fired;
95 	uint64_t rsi_n;
96 	uint64_t rsi_t;
97 	enum fmd_adm_error rsi_err;
98 };
99 
100 struct fmd_rpc_serdlist {
101 	opaque rsl_buf<>;
102 	uint32_t rsl_len;
103 	uint32_t rsl_cnt;
104 	enum fmd_adm_error rsl_err;
105 };
106 
107 struct fmd_rpc_xprtlist {
108 	int32_t rxl_buf<>;
109 	uint32_t rxl_len;
110 	enum fmd_adm_error rxl_err;
111 };
112 
113 struct fmd_rpc_caseinfo {
114 	opaque rci_evbuf<>;
115 	enum fmd_adm_error rci_err;
116 };
117 
118 struct fmd_rpc_caselist {
119 	opaque rcl_buf<>;
120 	uint32_t rcl_len;
121 	uint32_t rcl_cnt;
122 	enum fmd_adm_error rcl_err;
123 };
124 
125 program FMD_ADM {
126 	version FMD_ADM_VERSION_1 {
127 		struct fmd_rpc_modlist FMD_ADM_MODINFO(void) = 1;
128 		struct fmd_rpc_modstat FMD_ADM_MODCSTAT(string) = 2;
129 		struct fmd_rpc_modstat FMD_ADM_MODDSTAT(string) = 3;
130 		struct fmd_rpc_modstat FMD_ADM_MODGSTAT(void) = 4;
131 		int FMD_ADM_MODLOAD(string) = 5;
132 		int FMD_ADM_MODUNLOAD(string) = 6;
133 		int FMD_ADM_MODRESET(string) = 7;
134 		int FMD_ADM_MODGC(string) = 8;
135 		struct fmd_rpc_rsrclist FMD_ADM_RSRCLIST(bool) = 9;
136 		struct fmd_rpc_rsrcinfo FMD_ADM_RSRCINFO(string) = 10;
137 		int FMD_ADM_RSRCFLUSH(string) = 11;
138 		int FMD_ADM_RSRCREPAIRED(string) = 12;
139 		struct fmd_rpc_serdlist FMD_ADM_SERDINFO_OLD(string) = 13;
140 		int FMD_ADM_SERDRESET(string, string) = 14;
141 		int FMD_ADM_LOGROTATE(string) = 15;
142 		int FMD_ADM_CASEREPAIR(string) = 16;
143 		struct fmd_rpc_xprtlist FMD_ADM_XPRTLIST(void) = 17;
144 		struct fmd_rpc_modstat FMD_ADM_XPRTSTAT(int32_t) = 18;
145 		struct fmd_rpc_caselist FMD_ADM_CASELIST(void) = 19;
146 		struct fmd_rpc_caseinfo FMD_ADM_CASEINFO(string) = 20;
147 		int FMD_ADM_RSRCREPLACED(string) = 21;
148 		int FMD_ADM_RSRCACQUIT(string, string) = 22;
149 		int FMD_ADM_CASEACQUIT(string) = 23;
150 		struct fmd_rpc_serdlist FMD_ADM_SERDLIST(string) = 24;
151 		struct fmd_rpc_serdinfo FMD_ADM_SERDINFO(string, string) = 25;
152 	} = 1;
153 } = 100169;
154 
155 %extern void fmd_adm_1(struct svc_req *, SVCXPRT *);
156 %extern bool_t xdr_fmd_stat(XDR *, struct fmd_stat *);
157 
158 %#undef	RW_READ_HELD
159 %#undef	RW_WRITE_HELD
160 %#undef	RW_LOCK_HELD
161 %#undef	MUTEX_HELD
162