xref: /illumos-gate/usr/src/cmd/fm/fmd/common/fmd_rpc_adm.x (revision 88f8b78a88cbdc6d8c1af5c3e54bc49d25095c98)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 %#pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 %#include <fm/fmd_api.h>
30 
31 enum fmd_adm_error {
32 	FMD_ADM_ERR_NOMEM = 1,
33 	FMD_ADM_ERR_PERM,
34 	FMD_ADM_ERR_MODSRCH,
35 	FMD_ADM_ERR_MODBUSY,
36 	FMD_ADM_ERR_MODFAIL,
37 	FMD_ADM_ERR_MODNOENT,
38 	FMD_ADM_ERR_MODEXIST,
39 	FMD_ADM_ERR_MODINIT,
40 	FMD_ADM_ERR_MODLOAD,
41 	FMD_ADM_ERR_RSRCSRCH,
42 	FMD_ADM_ERR_RSRCNOTF,
43 	FMD_ADM_ERR_SERDSRCH,
44 	FMD_ADM_ERR_SERDFIRED,
45 	FMD_ADM_ERR_ROTSRCH,
46 	FMD_ADM_ERR_ROTFAIL,
47 	FMD_ADM_ERR_ROTBUSY,
48 	FMD_ADM_ERR_CASESRCH,
49 	FMD_ADM_ERR_CASEOPEN
50 };
51 
52 struct fmd_rpc_modstat {
53 	struct fmd_stat rms_buf<>;
54 	enum fmd_adm_error rms_err;
55 };
56 
57 struct fmd_rpc_modinfo {
58 	string rmi_name<>;
59 	string rmi_desc<>;
60 	string rmi_vers<>;
61 	bool rmi_faulty;
62 	struct fmd_rpc_modinfo *rmi_next;
63 };
64 
65 struct fmd_rpc_modlist {
66 	enum fmd_adm_error rml_err;
67 	struct fmd_rpc_modinfo *rml_list;
68 	uint32_t rml_len;
69 };
70 
71 struct fmd_rpc_rsrcinfo {
72 	string rri_fmri<>;
73 	string rri_uuid<>;
74 	string rri_case<>;
75 	bool rri_faulty;
76 	bool rri_unusable;
77 	bool rri_invisible;
78 	enum fmd_adm_error rri_err;
79 };
80 
81 struct fmd_rpc_rsrclist {
82 	opaque rrl_buf<>;
83 	uint32_t rrl_len;
84 	uint32_t rrl_cnt;
85 	enum fmd_adm_error rrl_err;
86 	bool rrl_all;
87 };
88 
89 struct fmd_rpc_serdinfo {
90 	string rsi_name<>;
91 	uint64_t rsi_delta;
92 	uint32_t rsi_count;
93 	bool rsi_fired;
94 	uint64_t rsi_n;
95 	uint64_t rsi_t;
96 	struct fmd_rpc_serdinfo *rsi_next;
97 };
98 
99 struct fmd_rpc_serdlist {
100 	enum fmd_adm_error rsl_err;
101 	struct fmd_rpc_serdinfo *rsl_list;
102 	uint32_t rsl_len;
103 };
104 
105 program FMD_ADM {
106 	version FMD_ADM_VERSION_1 {
107 		struct fmd_rpc_modlist FMD_ADM_MODINFO(void) = 1;
108 		struct fmd_rpc_modstat FMD_ADM_MODCSTAT(string) = 2;
109 		struct fmd_rpc_modstat FMD_ADM_MODDSTAT(string) = 3;
110 		struct fmd_rpc_modstat FMD_ADM_MODGSTAT(void) = 4;
111 		int FMD_ADM_MODLOAD(string) = 5;
112 		int FMD_ADM_MODUNLOAD(string) = 6;
113 		int FMD_ADM_MODRESET(string) = 7;
114 		int FMD_ADM_MODGC(string) = 8;
115 		struct fmd_rpc_rsrclist FMD_ADM_RSRCLIST(bool) = 9;
116 		struct fmd_rpc_rsrcinfo FMD_ADM_RSRCINFO(string) = 10;
117 		int FMD_ADM_RSRCFLUSH(string) = 11;
118 		int FMD_ADM_RSRCREPAIR(string) = 12;
119 		struct fmd_rpc_serdlist FMD_ADM_SERDINFO(string) = 13;
120 		int FMD_ADM_SERDRESET(string, string) = 14;
121 		int FMD_ADM_LOGROTATE(string) = 15;
122 		int FMD_ADM_CASEREPAIR(string) = 16;
123 	} = 1;
124 } = 100169;
125 
126 %extern void fmd_adm_1(struct svc_req *, SVCXPRT *);
127 %extern bool_t xdr_fmd_stat(XDR *, struct fmd_stat *);
128 
129 %#undef	RW_READ_HELD
130 %#undef	RW_WRITE_HELD
131 %#undef	RW_LOCK_HELD
132 %#undef	MUTEX_HELD
133