Print this page
NEX-16536 SUN-IREPORT-MIB is broken
NEX-16537 enhance FM traps
NEX-16545 SMF dict should have obsolete entries removed
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Cynthia Eastham <cynthia.eastham@nexenta.com>
Reviewed by: Alexander Eremin <alexander.eremin@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/lib/fm/libfmnotify/common/libfmnotify.h
+++ new/usr/src/lib/fm/libfmnotify/common/libfmnotify.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24 24 */
25 +
26 +/*
27 + * Copyright 2018 Nexenta Systems, Inc.
28 + */
29 +
25 30 #ifndef _LIBFMNOTIFY_H
26 31 #define _LIBFMNOTIFY_H
27 32
28 33 #include <stdio.h>
29 34 #include <stdlib.h>
30 35 #include <string.h>
31 36 #include <alloca.h>
32 37 #include <errno.h>
33 38 #include <libscf.h>
34 39 #include <limits.h>
35 40 #include <strings.h>
36 41 #include <sys/corectl.h>
37 42 #include <sys/resource.h>
38 43 #include <sys/types.h>
39 44 #include <unistd.h>
40 45 #include <fm/diagcode.h>
41 46 #include <fm/fmd_msg.h>
42 47 #include <fm/libfmevent.h>
43 48
44 49 #ifdef __cplusplus
45 50 extern "C" {
46 51 #endif
47 52
48 53 #define ND_DICTDIR "usr/lib/fm/dict"
49 54 #define ND_UNKNOWN "UNKNOWN"
50 55
51 56 typedef struct nd_hdl {
52 57 boolean_t nh_debug;
53 58 boolean_t nh_is_daemon;
54 59 boolean_t nh_keep_running;
55 60 /* handle for libfmevent calls */
56 61 fmev_shdl_t nh_evhdl;
57 62 /* handle for libfmd_msg calls */
58 63 fmd_msg_hdl_t *nh_msghdl;
|
↓ open down ↓ |
24 lines elided |
↑ open up ↑ |
59 64 FILE *nh_log_fd;
60 65 char *nh_rootdir;
61 66 const char *nh_pname;
62 67 } nd_hdl_t;
63 68
64 69 const char FMNOTIFY_MSG_DOMAIN[] = "FMNOTIFY";
65 70
66 71 typedef struct nd_ev_info {
67 72 fmev_t ei_ev;
68 73 const char *ei_class;
69 - char *ei_descr;
70 - char *ei_severity;
74 + char *ei_uuid;
71 75 char *ei_diagcode;
76 + char *ei_type;
77 + char *ei_severity;
72 78 char *ei_url;
73 - char *ei_uuid;
79 + char *ei_descr;
74 80 char *ei_fmri;
75 81 char *ei_from_state;
76 82 char *ei_to_state;
77 83 char *ei_reason;
78 84 nvlist_t *ei_payload;
79 85 } nd_ev_info_t;
80 86
81 -
82 87 void nd_cleanup(nd_hdl_t *);
83 88 void nd_dump_nvlist(nd_hdl_t *, nvlist_t *);
84 89 void nd_debug(nd_hdl_t *, const char *, ...);
85 90 void nd_error(nd_hdl_t *, const char *, ...);
86 91 void nd_abort(nd_hdl_t *, const char *, ...);
87 92 void nd_daemonize(nd_hdl_t *);
88 93 int nd_get_boolean_prop(nd_hdl_t *, const char *, const char *, const char *,
89 94 uint8_t *);
90 95 int nd_get_astring_prop(nd_hdl_t *, const char *, const char *, const char *,
91 96 char **);
92 97 char *nd_get_event_fmri(nd_hdl_t *, fmev_t);
93 98 int nd_get_event_info(nd_hdl_t *, const char *, fmev_t, nd_ev_info_t **);
94 99 int nd_get_notify_prefs(nd_hdl_t *, const char *, fmev_t, nvlist_t ***,
95 100 uint_t *);
96 101 int nd_split_list(nd_hdl_t *, char *, char *, char ***, uint_t *);
97 102 int nd_join_strarray(nd_hdl_t *, char **, uint_t, char **);
98 103 int nd_merge_strarray(nd_hdl_t *, char **, uint_t, char **, uint_t, char ***);
99 104 void nd_free_event_info(nd_ev_info_t *);
100 105 void nd_free_nvlarray(nvlist_t **, uint_t);
101 106 void nd_free_strarray(char **, uint_t);
102 107 int nd_get_diagcode(nd_hdl_t *, const char *, const char *, char *, size_t);
103 108
104 109
105 110 #ifdef __cplusplus
106 111 }
107 112 #endif
108 113
109 114 #endif /* _LIBFMNOTIFY_H */
|
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX