xref: /titanic_52/usr/src/lib/fm/libfmd_snmp/common/problem.h (revision 25c6ff4b77fcddf4097ce78a8277275ca603b46c)
1749f21d3Swesolows /*
2749f21d3Swesolows  * CDDL HEADER START
3749f21d3Swesolows  *
4749f21d3Swesolows  * The contents of this file are subject to the terms of the
5749f21d3Swesolows  * Common Development and Distribution License (the "License").
6749f21d3Swesolows  * You may not use this file except in compliance with the License.
7749f21d3Swesolows  *
8749f21d3Swesolows  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9749f21d3Swesolows  * or http://www.opensolaris.org/os/licensing.
10749f21d3Swesolows  * See the License for the specific language governing permissions
11749f21d3Swesolows  * and limitations under the License.
12749f21d3Swesolows  *
13749f21d3Swesolows  * When distributing Covered Code, include this CDDL HEADER in each
14749f21d3Swesolows  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15749f21d3Swesolows  * If applicable, add the following below this CDDL HEADER, with the
16749f21d3Swesolows  * fields enclosed by brackets "[]" replaced with your own identifying
17749f21d3Swesolows  * information: Portions Copyright [yyyy] [name of copyright owner]
18749f21d3Swesolows  *
19749f21d3Swesolows  * CDDL HEADER END
20749f21d3Swesolows  */
21749f21d3Swesolows 
22749f21d3Swesolows /*
23*25c6ff4bSstephh  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24749f21d3Swesolows  * Use is subject to license terms.
25749f21d3Swesolows  */
26749f21d3Swesolows 
27749f21d3Swesolows #ifndef	_PROBLEM_H
28749f21d3Swesolows #define	_PROBLEM_H
29749f21d3Swesolows 
30749f21d3Swesolows #pragma ident	"%Z%%M%	%I%	%E% SMI"
31749f21d3Swesolows 
32749f21d3Swesolows #ifdef	__cplusplus
33749f21d3Swesolows extern "C" {
34749f21d3Swesolows #endif
35749f21d3Swesolows 
36749f21d3Swesolows #include <sys/types.h>
37749f21d3Swesolows #include <libuutil.h>
38749f21d3Swesolows #include <libnvpair.h>
39749f21d3Swesolows 
40749f21d3Swesolows typedef struct sunFmProblem_data {
41749f21d3Swesolows 	int		d_valid;
42749f21d3Swesolows 	uu_avl_node_t	d_uuid_avl;
43749f21d3Swesolows 	const char	*d_aci_uuid;
44749f21d3Swesolows 	const char	*d_aci_code;
45749f21d3Swesolows 	const char	*d_aci_url;
46749f21d3Swesolows 	const char	*d_diag_engine;
47749f21d3Swesolows 	struct timeval	d_diag_time;
48749f21d3Swesolows 	ulong_t		d_nsuspects;
49749f21d3Swesolows 	nvlist_t	**d_suspects;
50749f21d3Swesolows 	nvlist_t	*d_aci_event;
51*25c6ff4bSstephh 	uint8_t		*d_statuses;
52749f21d3Swesolows } sunFmProblem_data_t;
53749f21d3Swesolows 
54749f21d3Swesolows typedef struct sunFmProblem_update_ctx {
55749f21d3Swesolows 	const char	*uc_host;
56749f21d3Swesolows 	uint32_t	uc_prog;
57749f21d3Swesolows 	int		uc_version;
58749f21d3Swesolows 	const char	*uc_index;
59749f21d3Swesolows 	uint32_t	uc_type;
60749f21d3Swesolows } sunFmProblem_update_ctx_t;
61749f21d3Swesolows 
62749f21d3Swesolows typedef nvlist_t sunFmFaultEvent_data_t;
63*25c6ff4bSstephh typedef uint8_t sunFmFaultStatus_data_t;
64749f21d3Swesolows 
65749f21d3Swesolows int sunFmProblemTable_init(void);
66749f21d3Swesolows int sunFmFaultEventTable_init(void);
67749f21d3Swesolows 
68749f21d3Swesolows #ifdef	__cplusplus
69749f21d3Swesolows }
70749f21d3Swesolows #endif
71749f21d3Swesolows 
72749f21d3Swesolows #endif	/* _PROBLEM_H */
73