f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby/*
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * CDDL HEADER START
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby *
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * The contents of this file are subject to the terms of the
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * Common Development and Distribution License (the "License").
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * You may not use this file except in compliance with the License.
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby *
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * or http://www.opensolaris.org/os/licensing.
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * See the License for the specific language governing permissions
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * and limitations under the License.
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby *
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * When distributing Covered Code, include this CDDL HEADER in each
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * If applicable, add the following below this CDDL HEADER, with the
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * fields enclosed by brackets "[]" replaced with your own identifying
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * information: Portions Copyright [yyyy] [name of copyright owner]
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby *
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * CDDL HEADER END
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby */
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby/*
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby */
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby#include "../common/sw_impl.h"
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltbystatic const fmd_prop_t swrp_props[] = {
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby { "enable", FMD_TYPE_BOOL, "true" },
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby { NULL, 0, NULL }
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby};
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltbystatic const fmd_hdl_ops_t swrp_ops = {
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby sw_recv, /* fmdo_recv - provided by common code */
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby sw_timeout, /* fmdo_timeout */
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby NULL, /* fmdo_close */
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby NULL, /* fmdo_stats */
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby NULL, /* fmdo_gc */
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby NULL, /* fmdo_send */
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby NULL /* fmdo_topo */
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby};
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltbyconst fmd_hdl_info_t swrp_info = {
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby "Software Response Agent", "0.1", &swrp_ops, swrp_props
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby};
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby/*
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby * Subsidiary response "modules" that we host.
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby */
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltbystatic const struct sw_subinfo *subrp[SW_SUB_MAX] = {
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby &smf_response_info,
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby};
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltbyvoid
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby_fmd_init(fmd_hdl_t *hdl)
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby{
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby (void) sw_fmd_init(hdl, &swrp_info, &subrp);
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby}
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltbyvoid
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby_fmd_fini(fmd_hdl_t *hdl)
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby{
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby sw_fmd_fini(hdl);
f6e214c7418f43af38bd8c3a557e3d0a1d311cfaGavin Maltby}