17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 59dd0f810Scindi * Common Development and Distribution License (the "License"). 69dd0f810Scindi * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 21d9638e54Smws 227c478bd9Sstevel@tonic-gate /* 23cbf75e67SStephen Hanson * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _FMD_PROTOCOL_H 287c478bd9Sstevel@tonic-gate #define _FMD_PROTOCOL_H 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #include <sys/fm/protocol.h> 317c478bd9Sstevel@tonic-gate #include <libnvpair.h> 327c478bd9Sstevel@tonic-gate #include <stdarg.h> 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate #ifdef __cplusplus 357c478bd9Sstevel@tonic-gate extern "C" { 367c478bd9Sstevel@tonic-gate #endif 377c478bd9Sstevel@tonic-gate 38d9638e54Smws #define FMD_RSRC_CLASS FM_RSRC_CLASS ".fm." 39d9638e54Smws #define FMD_CTL_CLASS FMD_RSRC_CLASS "fmd." 409af3851aSeschrock #define SYSEVENT_RSRC_CLASS FM_RSRC_CLASS ".sysevent." 41d9638e54Smws 427c478bd9Sstevel@tonic-gate #define FMD_RSRC_CLASS_LEN (sizeof (FMD_RSRC_CLASS) - 1) 43d9638e54Smws #define FMD_CTL_CLASS_LEN (sizeof (FMD_CTL_CLASS) - 1) 449af3851aSeschrock #define SYSEVENT_RSRC_CLASS_LEN (sizeof (SYSEVENT_RSRC_CLASS) - 1) 457c478bd9Sstevel@tonic-gate 46d9638e54Smws #define FMD_CTL_ADDHRT FMD_CTL_CLASS "clock.addhrtime" 47d9638e54Smws #define FMD_CTL_ADDHRT_VERS1 1 48d9638e54Smws #define FMD_CTL_ADDHRT_DELTA "delta" 497c478bd9Sstevel@tonic-gate 50d9638e54Smws /* 51d9638e54Smws * The FMD_FLT_* events still use defect.sunos.* for now: a future registry 52d9638e54Smws * putback should define all fmd events and convert these to defect.fm.fmd.* 53d9638e54Smws */ 547c478bd9Sstevel@tonic-gate #define FMD_FLT_NOSUB "defect.sunos.fmd.nosub" 557c478bd9Sstevel@tonic-gate #define FMD_FLT_NODC "defect.sunos.fmd.nodiagcode" 567c478bd9Sstevel@tonic-gate #define FMD_FLT_MOD "defect.sunos.fmd.module" 577c478bd9Sstevel@tonic-gate #define FMD_FLT_CONF "defect.sunos.fmd.config" 587c478bd9Sstevel@tonic-gate 59d9638e54Smws #define FMD_ERR_CLASS "ereport.fm.fmd." 60d9638e54Smws #define FMD_ERR_CLASS_LEN (sizeof (FMD_ERR_CLASS) - 1) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate #define FMD_ERR_MOD_MSG "msg" 637c478bd9Sstevel@tonic-gate #define FMD_ERR_MOD_ERRNO "errno" 647c478bd9Sstevel@tonic-gate #define FMD_ERR_MOD_ERRCLASS "errclass" 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate struct fmd_module; /* see <fmd_module.h> */ 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate extern nvlist_t *fmd_protocol_authority(void); 697c478bd9Sstevel@tonic-gate extern nvlist_t *fmd_protocol_fmri_module(struct fmd_module *); 707c478bd9Sstevel@tonic-gate extern nvlist_t *fmd_protocol_fault(const char *, 719dd0f810Scindi uint8_t, nvlist_t *, nvlist_t *, nvlist_t *, const char *); 72d9638e54Smws extern nvlist_t *fmd_protocol_list(const char *, nvlist_t *, 7344743693Sstephh const char *, const char *, uint_t, nvlist_t **, uint8_t *, int, 74*540db9a9SStephen Hanson struct timeval *, int); 75d9638e54Smws extern nvlist_t *fmd_protocol_rsrc_asru(const char *, nvlist_t *, 7644743693Sstephh const char *, const char *, boolean_t, boolean_t, boolean_t, nvlist_t *, 77*540db9a9SStephen Hanson struct timeval *m, boolean_t, boolean_t, boolean_t, boolean_t, nvlist_t *, 78*540db9a9SStephen Hanson boolean_t); 797c478bd9Sstevel@tonic-gate extern nvlist_t *fmd_protocol_fmderror(int, const char *, va_list); 807c478bd9Sstevel@tonic-gate extern nvlist_t *fmd_protocol_moderror(struct fmd_module *, int, const char *); 81d9638e54Smws extern nvlist_t *fmd_protocol_xprt_ctl(struct fmd_module *, 82d9638e54Smws const char *, uint8_t); 83d9638e54Smws extern nvlist_t *fmd_protocol_xprt_sub(struct fmd_module *, 84d9638e54Smws const char *, uint8_t, const char *); 85d9638e54Smws extern nvlist_t *fmd_protocol_xprt_uuclose(struct fmd_module *, 86d9638e54Smws const char *, uint8_t, const char *); 87cbf75e67SStephen Hanson extern nvlist_t *fmd_protocol_xprt_uuresolved(struct fmd_module *, 88cbf75e67SStephen Hanson const char *, uint8_t, const char *); 89cbf75e67SStephen Hanson extern nvlist_t *fmd_protocol_xprt_updated(struct fmd_module *, 90cbf75e67SStephen Hanson const char *, uint8_t, const char *, uint8_t *, uint8_t *, uint_t); 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate #ifdef __cplusplus 937c478bd9Sstevel@tonic-gate } 947c478bd9Sstevel@tonic-gate #endif 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate #endif /* _FMD_PROTOCOL_H */ 97