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) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _FMD_MSG_H
2N/A#define _FMD_MSG_H
2N/A
2N/A#include <sys/types.h>
2N/A#include <sys/nvpair.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * Fault Management Daemon msg File Interfaces
2N/A *
2N/A * Note: The contents of this file are private to the implementation of the
2N/A * Solaris system and FMD subsystem and are subject to change at any time
2N/A * without notice. Applications and drivers using these interfaces will fail
2N/A * to run on future releases. These interfaces should not be used for any
2N/A * purpose until they are publicly documented for use outside of Sun.
2N/A */
2N/A
2N/A#define FMD_MSG_VERSION 1 /* libary ABI interface version */
2N/A
2N/A#define FMD_MSG_URL_DEFAULT "http://support.oracle.com/msg/"
2N/A#define FMD_MSG_CODE_NOPOMSG "FMD-8000-77"
2N/A#define FMD_MSG_CODE_NOPOMSG_PROXIED "FMD-8000-8G"
2N/A
2N/Atypedef struct fmd_msg_hdl fmd_msg_hdl_t;
2N/A
2N/Atypedef enum {
2N/A FMD_MSG_ITEM_TYPE,
2N/A FMD_MSG_ITEM_SEVERITY,
2N/A FMD_MSG_ITEM_DESC,
2N/A FMD_MSG_ITEM_RESPONSE,
2N/A FMD_MSG_ITEM_IMPACT,
2N/A FMD_MSG_ITEM_ACTION,
2N/A FMD_MSG_ITEM_URL,
2N/A FMD_MSG_ITEM_MAX
2N/A} fmd_msg_item_t;
2N/A
2N/Aextern void fmd_msg_lock(void);
2N/Aextern void fmd_msg_unlock(void);
2N/A
2N/Afmd_msg_hdl_t *fmd_msg_init(const char *, int);
2N/Avoid fmd_msg_fini(fmd_msg_hdl_t *);
2N/A
2N/Aextern int fmd_msg_locale_set(fmd_msg_hdl_t *, const char *);
2N/Aextern const char *fmd_msg_locale_get(fmd_msg_hdl_t *);
2N/A
2N/Aextern int fmd_msg_url_set(fmd_msg_hdl_t *, const char *);
2N/Aextern const char *fmd_msg_url_get(fmd_msg_hdl_t *);
2N/A
2N/Aextern char *fmd_msg_gettext_nv(fmd_msg_hdl_t *, const char *, nvlist_t *);
2N/Aextern char *fmd_msg_gettext_id(fmd_msg_hdl_t *, const char *, const char *);
2N/Aextern char *fmd_msg_gettext_key(fmd_msg_hdl_t *, const char *, const char *,
2N/A const char *);
2N/Aextern char *fmd_msg_decode_tokens(nvlist_t *, const char *, const char *);
2N/Aextern char *fmd_msg_getitem_nv(fmd_msg_hdl_t *,
2N/A const char *, nvlist_t *, fmd_msg_item_t);
2N/A
2N/Aextern char *fmd_msg_getitem_id(fmd_msg_hdl_t *,
2N/A const char *, const char *, fmd_msg_item_t);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _FMD_MSG_H */