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*f6e214c7SGavin Maltby  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
24749f21d3Swesolows  */
25749f21d3Swesolows 
26*f6e214c7SGavin Maltby #ifndef _FMD_SNMP_H
27*f6e214c7SGavin Maltby #define	_FMD_SNMP_H
28749f21d3Swesolows 
29749f21d3Swesolows #ifdef	__cplusplus
30749f21d3Swesolows extern "C" {
31749f21d3Swesolows #endif
32749f21d3Swesolows 
33749f21d3Swesolows /*
34749f21d3Swesolows  * These values are derived from, and must remain consistent with, the
35*f6e214c7SGavin Maltby  * MIB definitions in SUN-FM-MIB.
36749f21d3Swesolows  */
37749f21d3Swesolows #define	MODNAME_STR	"sunFM"
38749f21d3Swesolows #define	SUNFM_OID	1, 3, 6, 1, 4, 1, 42, 2, 195, 1
39749f21d3Swesolows 
40749f21d3Swesolows #define	SUNFMPROBLEMTABLE_OID		SUNFM_OID, 1
41749f21d3Swesolows 
42749f21d3Swesolows #define	SUNFMPROBLEM_COL_UUIDINDEX	1
43749f21d3Swesolows #define	SUNFMPROBLEM_COL_UUID		2
44749f21d3Swesolows #define	SUNFMPROBLEM_COL_CODE		3
45749f21d3Swesolows #define	SUNFMPROBLEM_COL_URL		4
46749f21d3Swesolows #define	SUNFMPROBLEM_COL_DIAGENGINE	5
47749f21d3Swesolows #define	SUNFMPROBLEM_COL_DIAGTIME	6
48749f21d3Swesolows #define	SUNFMPROBLEM_COL_SUSPECTCOUNT	7
49749f21d3Swesolows 
50749f21d3Swesolows #define	SUNFMPROBLEM_COLMIN		SUNFMPROBLEM_COL_UUID
51749f21d3Swesolows #define	SUNFMPROBLEM_COLMAX		SUNFMPROBLEM_COL_SUSPECTCOUNT
52749f21d3Swesolows 
53749f21d3Swesolows #define	SUNFMFAULTEVENTTABLE_OID	SUNFM_OID, 2
54749f21d3Swesolows 
55749f21d3Swesolows #define	SUNFMFAULTEVENT_COL_UUIDINDEX	1
56749f21d3Swesolows #define	SUNFMFAULTEVENT_COL_INDEX	2
57749f21d3Swesolows #define	SUNFMFAULTEVENT_COL_PROBLEMUUID	3
58749f21d3Swesolows #define	SUNFMFAULTEVENT_COL_CLASS	4
59749f21d3Swesolows #define	SUNFMFAULTEVENT_COL_CERTAINTY	5
60749f21d3Swesolows #define	SUNFMFAULTEVENT_COL_ASRU	6
61749f21d3Swesolows #define	SUNFMFAULTEVENT_COL_FRU		7
62749f21d3Swesolows #define	SUNFMFAULTEVENT_COL_RESOURCE	8
6325c6ff4bSstephh #define	SUNFMFAULTEVENT_COL_STATUS	9
6425c6ff4bSstephh #define	SUNFMFAULTEVENT_COL_LOCATION	10
65749f21d3Swesolows 
66749f21d3Swesolows #define	SUNFMFAULTEVENT_COLMIN		SUNFMFAULTEVENT_COL_PROBLEMUUID
6725c6ff4bSstephh #define	SUNFMFAULTEVENT_COLMAX		SUNFMFAULTEVENT_COL_LOCATION
6825c6ff4bSstephh 
6925c6ff4bSstephh #define	SUNFMFAULTEVENT_STATE_OTHER	1
7025c6ff4bSstephh #define	SUNFMFAULTEVENT_STATE_FAULTY	2
7125c6ff4bSstephh #define	SUNFMFAULTEVENT_STATE_REMOVED	3
7225c6ff4bSstephh #define	SUNFMFAULTEVENT_STATE_REPLACED	4
7325c6ff4bSstephh #define	SUNFMFAULTEVENT_STATE_REPAIRED	5
7425c6ff4bSstephh #define	SUNFMFAULTEVENT_STATE_ACQUITTED	6
75749f21d3Swesolows 
76749f21d3Swesolows #define	SUNFMMODULETABLE_OID		SUNFM_OID, 3
77749f21d3Swesolows 
78749f21d3Swesolows #define	SUNFMMODULE_COL_INDEX		1
79749f21d3Swesolows #define	SUNFMMODULE_COL_NAME		2
80749f21d3Swesolows #define	SUNFMMODULE_COL_VERSION		3
81749f21d3Swesolows #define	SUNFMMODULE_COL_STATUS		4
82749f21d3Swesolows #define	SUNFMMODULE_COL_DESCRIPTION	5
83749f21d3Swesolows 
84749f21d3Swesolows #define	SUNFMMODULE_COLMIN		SUNFMMODULE_COL_NAME
85749f21d3Swesolows #define	SUNFMMODULE_COLMAX		SUNFMMODULE_COL_DESCRIPTION
86749f21d3Swesolows 
87749f21d3Swesolows #define	SUNFMMODULE_STATE_OTHER		1
88749f21d3Swesolows #define	SUNFMMODULE_STATE_ACTIVE	2
89749f21d3Swesolows #define	SUNFMMODULE_STATE_FAILED	3
90749f21d3Swesolows 
91749f21d3Swesolows #define	SUNFMRESOURCECOUNT_OID		SUNFM_OID, 4
92749f21d3Swesolows 
93749f21d3Swesolows #define	SUNFMRESOURCETABLE_OID		SUNFM_OID, 5
94749f21d3Swesolows 
95749f21d3Swesolows #define	SUNFMRESOURCE_COL_INDEX		1
96749f21d3Swesolows #define	SUNFMRESOURCE_COL_FMRI		2
97749f21d3Swesolows #define	SUNFMRESOURCE_COL_STATUS	3
98749f21d3Swesolows #define	SUNFMRESOURCE_COL_DIAGNOSISUUID	4
99749f21d3Swesolows 
100749f21d3Swesolows #define	SUNFMRESOURCE_COLMIN		SUNFMRESOURCE_COL_FMRI
101749f21d3Swesolows #define	SUNFMRESOURCE_COLMAX		SUNFMRESOURCE_COL_DIAGNOSISUUID
102749f21d3Swesolows 
103749f21d3Swesolows #define	SUNFMRESOURCE_STATE_OTHER	1
104749f21d3Swesolows #define	SUNFMRESOURCE_STATE_OK		2
105749f21d3Swesolows #define	SUNFMRESOURCE_STATE_DEGRADED	3
106749f21d3Swesolows #define	SUNFMRESOURCE_STATE_UNKNOWN	4
107749f21d3Swesolows #define	SUNFMRESOURCE_STATE_FAULTED	5
108749f21d3Swesolows 
109749f21d3Swesolows #define	SUNFMTRAPS_OID			SUNFM_OID, 7, 0
110749f21d3Swesolows #define	SUNFMPROBLEMTRAP_OID		SUNFMTRAPS_OID, 1
111749f21d3Swesolows 
112749f21d3Swesolows #define	SNMP_URL_MSG	"snmp-url"
113749f21d3Swesolows 
114*f6e214c7SGavin Maltby /*
115*f6e214c7SGavin Maltby  * Definitions from SUN-IREPORT-MIB
116*f6e214c7SGavin Maltby  */
117*f6e214c7SGavin Maltby #define	SUNIREPORT_OID	1, 3, 6, 1, 4, 1, 42, 2, 197, 1
118*f6e214c7SGavin Maltby 
119*f6e214c7SGavin Maltby #define	SUNIREPORTNOTIFICATIONENTRY	SUNIREPORT_OID, 1
120*f6e214c7SGavin Maltby 
121*f6e214c7SGavin Maltby #define	SUNIREPORTHOSTNAME_OID		SUNIREPORTNOTIFICATIONENTRY, 1
122*f6e214c7SGavin Maltby #define	SUNIREPORTMSGID_OID		SUNIREPORTNOTIFICATIONENTRY, 2
123*f6e214c7SGavin Maltby #define	SUNIREPORTDESCRIPTION_OID	SUNIREPORTNOTIFICATIONENTRY, 3
124*f6e214c7SGavin Maltby #define	SUNIREPORTTIME_OID		SUNIREPORTNOTIFICATIONENTRY, 4
125*f6e214c7SGavin Maltby #define	SUNIREPORTSMFFMRI_OID		SUNIREPORTNOTIFICATIONENTRY, 5
126*f6e214c7SGavin Maltby #define	SUNIREPORTSMFFROMSTATE_OID	SUNIREPORTNOTIFICATIONENTRY, 6
127*f6e214c7SGavin Maltby #define	SUNIREPORTSMFTOSTATE_OID	SUNIREPORTNOTIFICATIONENTRY, 7
128*f6e214c7SGavin Maltby #define	SUNIREPORTTRANSITIONREASON_OID	SUNIREPORTNOTIFICATIONENTRY, 8
129*f6e214c7SGavin Maltby 
130*f6e214c7SGavin Maltby #define	SUNIREPORTTRAPS_OID		SUNIREPORT_OID, 2, 0
131*f6e214c7SGavin Maltby #define	SUNIREPORTTRAP_OID		SUNIREPORTTRAPS_OID, 1
132*f6e214c7SGavin Maltby 
133*f6e214c7SGavin Maltby 
134749f21d3Swesolows extern int	init_sunFM(void);
135749f21d3Swesolows 
136749f21d3Swesolows #ifdef	__cplusplus
137749f21d3Swesolows }
138749f21d3Swesolows #endif
139749f21d3Swesolows 
140*f6e214c7SGavin Maltby #endif	/* _FMD_SNMP_H */
141