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