4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
26 #include <sys/types.h>
30 const fmd_prop_t fmevt_props
[] = {
31 { "protocol_forward_disable", FMD_TYPE_BOOL
, "false" },
32 { "outbound_channel", FMD_TYPE_STRING
, FMD_SNOOP_CHANNEL
},
33 { "outbound_channel_depth", FMD_TYPE_INT32
, "256" },
34 { "user_priv_highval_channel", FMD_TYPE_STRING
,
35 FMEV_CHAN_USER_PRIV_HV
},
36 { "user_priv_lowval_channel", FMD_TYPE_STRING
,
37 FMEV_CHAN_USER_PRIV_LV
},
38 { "sidprefix", FMD_TYPE_STRING
, "fmd" },
39 { "inbound_postprocess_smf", FMD_TYPE_BOOL
, "true" },
43 static const fmd_hdl_ops_t fmd_ops
= {
44 fmevt_recv
, /* fmdo_recv */
45 NULL
, /* fmdo_timeout */
46 NULL
, /* fmdo_close */
47 NULL
, /* fmdo_stats */
53 static const fmd_hdl_info_t fmd_info
= {
54 "External FM event transport", "0.2", &fmd_ops
, fmevt_props
60 _fmd_init(fmd_hdl_t
*hdl
)
63 * Register the handle, pulling in configuration from our
64 * conf file. This includes our event class subscriptions
65 * for those events that we will forward out of fmd.
67 if (fmd_hdl_register(hdl
, FMD_API_VERSION
, &fmd_info
) != 0)
72 fmevt_init_outbound(hdl
);
73 fmevt_init_inbound(hdl
);
77 _fmd_fini(fmd_hdl_t
*hdl
)
79 fmevt_fini_outbound(hdl
);
80 fmevt_fini_inbound(hdl
);