2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _FMEV_IMPL_H
2N/A#define _FMEV_IMPL_H
2N/A
2N/A/*
2N/A * libfmevent - private implementation
2N/A *
2N/A * Note: The contents of this file are private to the implementation of
2N/A * libfmevent and are subject to change at any time without notice.
2N/A * This file is not delivered into /usr/include.
2N/A */
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <assert.h>
2N/A#include <errno.h>
2N/A#include <libuutil.h>
2N/A#include <libsysevent.h>
2N/A#include <fm/libfmevent.h>
2N/A#include <fm/libtopo.h>
2N/A
2N/A#include "fmev_channels.h"
2N/A
2N/A#ifdef DEBUG
2N/A#define ASSERT(x) (assert(x))
2N/A#else
2N/A#define ASSERT(x)
2N/A#endif
2N/A
2N/Astruct fmev_hdl_cmn {
2N/A uint32_t hc_magic;
2N/A uint32_t hc_api_vers;
2N/A void *(*hc_alloc)(size_t);
2N/A void *(*hc_zalloc)(size_t);
2N/A void (*hc_free)(void *, size_t);
2N/A};
2N/A
2N/A#define _FMEV_SHMAGIC 0x5368446c /* ShDl */
2N/A
2N/Astruct fmev_hdl_cmn *fmev_shdl_cmn(fmev_shdl_t);
2N/A
2N/Aextern void *dflt_alloc(size_t);
2N/Aextern void *dflt_zalloc(size_t);
2N/Aextern void dflt_free(void *, size_t);
2N/A
2N/Aextern int fmev_api_init(struct fmev_hdl_cmn *);
2N/Aextern int fmev_api_enter(struct fmev_hdl_cmn *, uint32_t);
2N/Aextern void fmev_api_freetsd(void);
2N/Aextern fmev_err_t fmev_seterr(fmev_err_t);
2N/Aextern int fmev_shdl_valid(fmev_shdl_t);
2N/Aextern fmev_t fmev_sysev2fmev(fmev_shdl_t, sysevent_t *sep, char **,
2N/A nvlist_t **);
2N/Aextern topo_hdl_t *fmev_topohdl(fmev_shdl_t);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _FMEV_IMPL_H */