xref: /illumos-gate/usr/src/lib/fm/libfmd_snmp/common/fmd_snmp.h (revision 84f7a9b9dca4f23b5f50edef0e59d7eb44301114)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SUNFM_H
28 #define	_SUNFM_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * These values are derived from, and must remain consistent with, the
38  * MIB definitions.
39  */
40 #define	MODNAME_STR	"sunFM"
41 #define	SUNFM_OID	1, 3, 6, 1, 4, 1, 42, 2, 195, 1
42 
43 #define	SUNFMPROBLEMTABLE_OID		SUNFM_OID, 1
44 
45 #define	SUNFMPROBLEM_COL_UUIDINDEX	1
46 #define	SUNFMPROBLEM_COL_UUID		2
47 #define	SUNFMPROBLEM_COL_CODE		3
48 #define	SUNFMPROBLEM_COL_URL		4
49 #define	SUNFMPROBLEM_COL_DIAGENGINE	5
50 #define	SUNFMPROBLEM_COL_DIAGTIME	6
51 #define	SUNFMPROBLEM_COL_SUSPECTCOUNT	7
52 
53 #define	SUNFMPROBLEM_COLMIN		SUNFMPROBLEM_COL_UUID
54 #define	SUNFMPROBLEM_COLMAX		SUNFMPROBLEM_COL_SUSPECTCOUNT
55 
56 #define	SUNFMFAULTEVENTTABLE_OID	SUNFM_OID, 2
57 
58 #define	SUNFMFAULTEVENT_COL_UUIDINDEX	1
59 #define	SUNFMFAULTEVENT_COL_INDEX	2
60 #define	SUNFMFAULTEVENT_COL_PROBLEMUUID	3
61 #define	SUNFMFAULTEVENT_COL_CLASS	4
62 #define	SUNFMFAULTEVENT_COL_CERTAINTY	5
63 #define	SUNFMFAULTEVENT_COL_ASRU	6
64 #define	SUNFMFAULTEVENT_COL_FRU		7
65 #define	SUNFMFAULTEVENT_COL_RESOURCE	8
66 
67 #define	SUNFMFAULTEVENT_COLMIN		SUNFMFAULTEVENT_COL_PROBLEMUUID
68 #define	SUNFMFAULTEVENT_COLMAX		SUNFMFAULTEVENT_COL_RESOURCE
69 
70 #define	SUNFMMODULETABLE_OID		SUNFM_OID, 3
71 
72 #define	SUNFMMODULE_COL_INDEX		1
73 #define	SUNFMMODULE_COL_NAME		2
74 #define	SUNFMMODULE_COL_VERSION		3
75 #define	SUNFMMODULE_COL_STATUS		4
76 #define	SUNFMMODULE_COL_DESCRIPTION	5
77 
78 #define	SUNFMMODULE_COLMIN		SUNFMMODULE_COL_NAME
79 #define	SUNFMMODULE_COLMAX		SUNFMMODULE_COL_DESCRIPTION
80 
81 #define	SUNFMMODULE_STATE_OTHER		1
82 #define	SUNFMMODULE_STATE_ACTIVE	2
83 #define	SUNFMMODULE_STATE_FAILED	3
84 
85 #define	SUNFMRESOURCECOUNT_OID		SUNFM_OID, 4
86 
87 #define	SUNFMRESOURCETABLE_OID		SUNFM_OID, 5
88 
89 #define	SUNFMRESOURCE_COL_INDEX		1
90 #define	SUNFMRESOURCE_COL_FMRI		2
91 #define	SUNFMRESOURCE_COL_STATUS	3
92 #define	SUNFMRESOURCE_COL_DIAGNOSISUUID	4
93 
94 #define	SUNFMRESOURCE_COLMIN		SUNFMRESOURCE_COL_FMRI
95 #define	SUNFMRESOURCE_COLMAX		SUNFMRESOURCE_COL_DIAGNOSISUUID
96 
97 #define	SUNFMRESOURCE_STATE_OTHER	1
98 #define	SUNFMRESOURCE_STATE_OK		2
99 #define	SUNFMRESOURCE_STATE_DEGRADED	3
100 #define	SUNFMRESOURCE_STATE_UNKNOWN	4
101 #define	SUNFMRESOURCE_STATE_FAULTED	5
102 
103 #define	SUNFMTRAPS_OID			SUNFM_OID, 7, 0
104 #define	SUNFMPROBLEMTRAP_OID		SUNFMTRAPS_OID, 1
105 
106 #define	SNMP_URL_MSG	"snmp-url"
107 
108 extern int	init_sunFM(void);
109 
110 #ifdef	__cplusplus
111 }
112 #endif
113 
114 #endif	/* _SUNFM_H */
115