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 2008 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 FMD_ADM_ERR_XPRTSRCH, 51 FMD_ADM_ERR_CASEXPRT 52 }; 53 54 struct fmd_rpc_modstat { 55 struct fmd_stat rms_buf<>; 56 enum fmd_adm_error rms_err; 57 }; 58 59 struct fmd_rpc_modinfo { 60 string rmi_name<>; 61 string rmi_desc<>; 62 string rmi_vers<>; 63 bool rmi_faulty; 64 struct fmd_rpc_modinfo *rmi_next; 65 }; 66 67 struct fmd_rpc_modlist { 68 enum fmd_adm_error rml_err; 69 struct fmd_rpc_modinfo *rml_list; 70 uint32_t rml_len; 71 }; 72 73 struct fmd_rpc_rsrcinfo { 74 string rri_fmri<>; 75 string rri_uuid<>; 76 string rri_case<>; 77 bool rri_faulty; 78 bool rri_unusable; 79 bool rri_invisible; 80 enum fmd_adm_error rri_err; 81 }; 82 83 struct fmd_rpc_rsrclist { 84 opaque rrl_buf<>; 85 uint32_t rrl_len; 86 uint32_t rrl_cnt; 87 enum fmd_adm_error rrl_err; 88 bool rrl_all; 89 }; 90 91 struct fmd_rpc_serdinfo { 92 string rsi_name<>; 93 uint64_t rsi_delta; 94 uint32_t rsi_count; 95 bool rsi_fired; 96 uint64_t rsi_n; 97 uint64_t rsi_t; 98 struct fmd_rpc_serdinfo *rsi_next; 99 }; 100 101 struct fmd_rpc_serdlist { 102 enum fmd_adm_error rsl_err; 103 struct fmd_rpc_serdinfo *rsl_list; 104 uint32_t rsl_len; 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(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 } = 1; 151 } = 100169; 152 153 %extern void fmd_adm_1(struct svc_req *, SVCXPRT *); 154 %extern bool_t xdr_fmd_stat(XDR *, struct fmd_stat *); 155 156 %#undef RW_READ_HELD 157 %#undef RW_WRITE_HELD 158 %#undef RW_LOCK_HELD 159 %#undef MUTEX_HELD 160