1*12967Sgavin.maltby@oracle.com /*
2*12967Sgavin.maltby@oracle.com  * CDDL HEADER START
3*12967Sgavin.maltby@oracle.com  *
4*12967Sgavin.maltby@oracle.com  * 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.
7*12967Sgavin.maltby@oracle.com  *
8*12967Sgavin.maltby@oracle.com  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*12967Sgavin.maltby@oracle.com  * or http://www.opensolaris.org/os/licensing.
10*12967Sgavin.maltby@oracle.com  * See the License for the specific language governing permissions
11*12967Sgavin.maltby@oracle.com  * and limitations under the License.
12*12967Sgavin.maltby@oracle.com  *
13*12967Sgavin.maltby@oracle.com  * When distributing Covered Code, include this CDDL HEADER in each
14*12967Sgavin.maltby@oracle.com  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*12967Sgavin.maltby@oracle.com  * If applicable, add the following below this CDDL HEADER, with the
16*12967Sgavin.maltby@oracle.com  * fields enclosed by brackets "[]" replaced with your own identifying
17*12967Sgavin.maltby@oracle.com  * information: Portions Copyright [yyyy] [name of copyright owner]
18*12967Sgavin.maltby@oracle.com  *
19*12967Sgavin.maltby@oracle.com  * CDDL HEADER END
20*12967Sgavin.maltby@oracle.com  */
21*12967Sgavin.maltby@oracle.com 
22*12967Sgavin.maltby@oracle.com /*
23*12967Sgavin.maltby@oracle.com  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24*12967Sgavin.maltby@oracle.com  */
25*12967Sgavin.maltby@oracle.com 
26*12967Sgavin.maltby@oracle.com #include "../common/sw_impl.h"
27*12967Sgavin.maltby@oracle.com 
28*12967Sgavin.maltby@oracle.com static const fmd_prop_t swrp_props[] = {
29*12967Sgavin.maltby@oracle.com 	{ "enable", FMD_TYPE_BOOL, "true" },
30*12967Sgavin.maltby@oracle.com 	{ NULL, 0, NULL }
31*12967Sgavin.maltby@oracle.com };
32*12967Sgavin.maltby@oracle.com 
33*12967Sgavin.maltby@oracle.com static const fmd_hdl_ops_t swrp_ops = {
34*12967Sgavin.maltby@oracle.com 	sw_recv,	/* fmdo_recv - provided by common code */
35*12967Sgavin.maltby@oracle.com 	sw_timeout,	/* fmdo_timeout */
36*12967Sgavin.maltby@oracle.com 	NULL,		/* fmdo_close */
37*12967Sgavin.maltby@oracle.com 	NULL,		/* fmdo_stats */
38*12967Sgavin.maltby@oracle.com 	NULL,		/* fmdo_gc */
39*12967Sgavin.maltby@oracle.com 	NULL,		/* fmdo_send */
40*12967Sgavin.maltby@oracle.com 	NULL		/* fmdo_topo */
41*12967Sgavin.maltby@oracle.com };
42*12967Sgavin.maltby@oracle.com 
43*12967Sgavin.maltby@oracle.com const fmd_hdl_info_t swrp_info = {
44*12967Sgavin.maltby@oracle.com 	"Software Response Agent", "0.1", &swrp_ops, swrp_props
45*12967Sgavin.maltby@oracle.com };
46*12967Sgavin.maltby@oracle.com 
47*12967Sgavin.maltby@oracle.com /*
48*12967Sgavin.maltby@oracle.com  * Subsidiary response "modules" that we host.
49*12967Sgavin.maltby@oracle.com  */
50*12967Sgavin.maltby@oracle.com static const struct sw_subinfo *subrp[SW_SUB_MAX] = {
51*12967Sgavin.maltby@oracle.com 	&smf_response_info,
52*12967Sgavin.maltby@oracle.com };
53*12967Sgavin.maltby@oracle.com 
54*12967Sgavin.maltby@oracle.com void
_fmd_init(fmd_hdl_t * hdl)55*12967Sgavin.maltby@oracle.com _fmd_init(fmd_hdl_t *hdl)
56*12967Sgavin.maltby@oracle.com {
57*12967Sgavin.maltby@oracle.com 	(void) sw_fmd_init(hdl, &swrp_info, &subrp);
58*12967Sgavin.maltby@oracle.com }
59*12967Sgavin.maltby@oracle.com 
60*12967Sgavin.maltby@oracle.com void
_fmd_fini(fmd_hdl_t * hdl)61*12967Sgavin.maltby@oracle.com _fmd_fini(fmd_hdl_t *hdl)
62*12967Sgavin.maltby@oracle.com {
63*12967Sgavin.maltby@oracle.com 	sw_fmd_fini(hdl);
64*12967Sgavin.maltby@oracle.com }
65