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
5*f6e214c7SGavin Maltby  * Common Development and Distribution License (the "License").
6*f6e214c7SGavin Maltby  * 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 /*
23*f6e214c7SGavin Maltby  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef	_FMD_BUILTIN_H
277c478bd9Sstevel@tonic-gate #define	_FMD_BUILTIN_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
307c478bd9Sstevel@tonic-gate extern "C" {
317c478bd9Sstevel@tonic-gate #endif
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate #include <fmd_module.h>
347c478bd9Sstevel@tonic-gate #include <fmd_api.h>
357c478bd9Sstevel@tonic-gate 
367c478bd9Sstevel@tonic-gate /*
377c478bd9Sstevel@tonic-gate  * fmd_builtin.h
387c478bd9Sstevel@tonic-gate  *
397c478bd9Sstevel@tonic-gate  * This header file provides prototypes for any built-in diagnosis engines and
407c478bd9Sstevel@tonic-gate  * agents that are compiled directly into fmd.  Prototypes for their init and
417c478bd9Sstevel@tonic-gate  * fini routines can be added here and corresponding linkage information to
427c478bd9Sstevel@tonic-gate  * these functions should be added to the table found in fmd_builtin.c.
437c478bd9Sstevel@tonic-gate  */
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate typedef struct fmd_builtin {
467c478bd9Sstevel@tonic-gate 	const char *bltin_name;
477c478bd9Sstevel@tonic-gate 	void (*bltin_init)(fmd_hdl_t *);
487c478bd9Sstevel@tonic-gate 	void (*bltin_fini)(fmd_hdl_t *);
49*f6e214c7SGavin Maltby 	int bltin_ctxts;
507c478bd9Sstevel@tonic-gate } fmd_builtin_t;
517c478bd9Sstevel@tonic-gate 
52*f6e214c7SGavin Maltby #define	FMD_BUILTIN_CTXT_GLOBALZONE	0x1
53*f6e214c7SGavin Maltby #define	FMD_BUILTIN_CTXT_NONGLOBALZONE	0x2
54*f6e214c7SGavin Maltby 
55*f6e214c7SGavin Maltby #define	FMD_BUILTIN_ALLCTXT \
56*f6e214c7SGavin Maltby 	(FMD_BUILTIN_CTXT_GLOBALZONE | FMD_BUILTIN_CTXT_NONGLOBALZONE)
57*f6e214c7SGavin Maltby 
58d9638e54Smws extern int fmd_builtin_loadall(fmd_modhash_t *);
597c478bd9Sstevel@tonic-gate 
607c478bd9Sstevel@tonic-gate extern void self_init(fmd_hdl_t *);	/* see fmd_self.c */
617c478bd9Sstevel@tonic-gate extern void self_fini(fmd_hdl_t *);	/* see fmd_self.c */
627c478bd9Sstevel@tonic-gate 
63d9638e54Smws extern void sysev_init(fmd_hdl_t *);	/* see fmd_transport.c */
64d9638e54Smws extern void sysev_fini(fmd_hdl_t *);	/* see fmd_transport.c */
65d9638e54Smws 
667c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
677c478bd9Sstevel@tonic-gate }
687c478bd9Sstevel@tonic-gate #endif
697c478bd9Sstevel@tonic-gate 
707c478bd9Sstevel@tonic-gate #endif	/* _FMD_BUILTIN_H */
71