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 struct fmd_rpc_serdinfo *rsi_next; 98 }; 99 100 struct fmd_rpc_serdlist { 101 enum fmd_adm_error rsl_err; 102 struct fmd_rpc_serdinfo *rsl_list; 103 uint32_t rsl_len; 104 }; 105 106 struct fmd_rpc_xprtlist { 107 int32_t rxl_buf<>; 108 uint32_t rxl_len; 109 enum fmd_adm_error rxl_err; 110 }; 111 112 struct fmd_rpc_caseinfo { 113 opaque rci_evbuf<>; 114 enum fmd_adm_error rci_err; 115 }; 116 117 struct fmd_rpc_caselist { 118 opaque rcl_buf<>; 119 uint32_t rcl_len; 120 uint32_t rcl_cnt; 121 enum fmd_adm_error rcl_err; 122 }; 123 124 program FMD_ADM { 125 version FMD_ADM_VERSION_1 { 126 struct fmd_rpc_modlist FMD_ADM_MODINFO(void) = 1; 127 struct fmd_rpc_modstat FMD_ADM_MODCSTAT(string) = 2; 128 struct fmd_rpc_modstat FMD_ADM_MODDSTAT(string) = 3; 129 struct fmd_rpc_modstat FMD_ADM_MODGSTAT(void) = 4; 130 int FMD_ADM_MODLOAD(string) = 5; 131 int FMD_ADM_MODUNLOAD(string) = 6; 132 int FMD_ADM_MODRESET(string) = 7; 133 int FMD_ADM_MODGC(string) = 8; 134 struct fmd_rpc_rsrclist FMD_ADM_RSRCLIST(bool) = 9; 135 struct fmd_rpc_rsrcinfo FMD_ADM_RSRCINFO(string) = 10; 136 int FMD_ADM_RSRCFLUSH(string) = 11; 137 int FMD_ADM_RSRCREPAIRED(string) = 12; 138 struct fmd_rpc_serdlist FMD_ADM_SERDINFO(string) = 13; 139 int FMD_ADM_SERDRESET(string, string) = 14; 140 int FMD_ADM_LOGROTATE(string) = 15; 141 int FMD_ADM_CASEREPAIR(string) = 16; 142 struct fmd_rpc_xprtlist FMD_ADM_XPRTLIST(void) = 17; 143 struct fmd_rpc_modstat FMD_ADM_XPRTSTAT(int32_t) = 18; 144 struct fmd_rpc_caselist FMD_ADM_CASELIST(void) = 19; 145 struct fmd_rpc_caseinfo FMD_ADM_CASEINFO(string) = 20; 146 int FMD_ADM_RSRCREPLACED(string) = 21; 147 int FMD_ADM_RSRCACQUIT(string, string) = 22; 148 int FMD_ADM_CASEACQUIT(string) = 23; 149 } = 1; 150 } = 100169; 151 152 %extern void fmd_adm_1(struct svc_req *, SVCXPRT *); 153 %extern bool_t xdr_fmd_stat(XDR *, struct fmd_stat *); 154 155 %#undef RW_READ_HELD 156 %#undef RW_WRITE_HELD 157 %#undef RW_LOCK_HELD 158 %#undef MUTEX_HELD 159