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