/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _LIBFMNOTIFY_H
#define _LIBFMNOTIFY_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <alloca.h>
#include <errno.h>
#include <libscf.h>
#include <limits.h>
#include <strings.h>
#include <sys/resource.h>
#include <unistd.h>
#include <fm/diagcode.h>
#include <fm/libfmevent.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct nd_hdl {
/* handle for libfmevent calls */
/* handle for libfmd_msg calls */
char *nh_rootdir;
const char *nh_pname;
} nd_hdl_t;
typedef struct nd_ev_info {
const char *ei_class;
char *ei_descr;
char *ei_severity;
char *ei_diagcode;
char *ei_url;
char *ei_uuid;
char *ei_fmri;
char *ei_from_state;
char *ei_to_state;
char *ei_reason;
} nd_ev_info_t;
void nd_cleanup(nd_hdl_t *);
void nd_daemonize(nd_hdl_t *);
int nd_get_boolean_prop(nd_hdl_t *, const char *, const char *, const char *,
uint8_t *);
int nd_get_astring_prop(nd_hdl_t *, const char *, const char *, const char *,
char **);
uint_t *);
void nd_free_event_info(nd_ev_info_t *);
void nd_free_strarray(char **, uint_t);
#ifdef __cplusplus
}
#endif
#endif /* _LIBFMNOTIFY_H */