10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*12967Sgavin.maltby@oracle.com * Common Development and Distribution License (the "License"). 6*12967Sgavin.maltby@oracle.com * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 211193Smws 220Sstevel@tonic-gate /* 23*12967Sgavin.maltby@oracle.com * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _FMD_BUILTIN_H 270Sstevel@tonic-gate #define _FMD_BUILTIN_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate #ifdef __cplusplus 300Sstevel@tonic-gate extern "C" { 310Sstevel@tonic-gate #endif 320Sstevel@tonic-gate 330Sstevel@tonic-gate #include <fmd_module.h> 340Sstevel@tonic-gate #include <fmd_api.h> 350Sstevel@tonic-gate 360Sstevel@tonic-gate /* 370Sstevel@tonic-gate * fmd_builtin.h 380Sstevel@tonic-gate * 390Sstevel@tonic-gate * This header file provides prototypes for any built-in diagnosis engines and 400Sstevel@tonic-gate * agents that are compiled directly into fmd. Prototypes for their init and 410Sstevel@tonic-gate * fini routines can be added here and corresponding linkage information to 420Sstevel@tonic-gate * these functions should be added to the table found in fmd_builtin.c. 430Sstevel@tonic-gate */ 440Sstevel@tonic-gate 450Sstevel@tonic-gate typedef struct fmd_builtin { 460Sstevel@tonic-gate const char *bltin_name; 470Sstevel@tonic-gate void (*bltin_init)(fmd_hdl_t *); 480Sstevel@tonic-gate void (*bltin_fini)(fmd_hdl_t *); 49*12967Sgavin.maltby@oracle.com int bltin_ctxts; 500Sstevel@tonic-gate } fmd_builtin_t; 510Sstevel@tonic-gate 52*12967Sgavin.maltby@oracle.com #define FMD_BUILTIN_CTXT_GLOBALZONE 0x1 53*12967Sgavin.maltby@oracle.com #define FMD_BUILTIN_CTXT_NONGLOBALZONE 0x2 54*12967Sgavin.maltby@oracle.com 55*12967Sgavin.maltby@oracle.com #define FMD_BUILTIN_ALLCTXT \ 56*12967Sgavin.maltby@oracle.com (FMD_BUILTIN_CTXT_GLOBALZONE | FMD_BUILTIN_CTXT_NONGLOBALZONE) 57*12967Sgavin.maltby@oracle.com 581193Smws extern int fmd_builtin_loadall(fmd_modhash_t *); 590Sstevel@tonic-gate 600Sstevel@tonic-gate extern void self_init(fmd_hdl_t *); /* see fmd_self.c */ 610Sstevel@tonic-gate extern void self_fini(fmd_hdl_t *); /* see fmd_self.c */ 620Sstevel@tonic-gate 631193Smws extern void sysev_init(fmd_hdl_t *); /* see fmd_transport.c */ 641193Smws extern void sysev_fini(fmd_hdl_t *); /* see fmd_transport.c */ 651193Smws 660Sstevel@tonic-gate #ifdef __cplusplus 670Sstevel@tonic-gate } 680Sstevel@tonic-gate #endif 690Sstevel@tonic-gate 700Sstevel@tonic-gate #endif /* _FMD_BUILTIN_H */ 71