xref: /onnv-gate/usr/src/cmd/picl/plugins/sun4v/include/picloids.h (revision 3941:328be6a20f20)
1*3941Svenki /*
2*3941Svenki  * CDDL HEADER START
3*3941Svenki  *
4*3941Svenki  * The contents of this file are subject to the terms of the
5*3941Svenki  * Common Development and Distribution License (the "License").
6*3941Svenki  * You may not use this file except in compliance with the License.
7*3941Svenki  *
8*3941Svenki  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*3941Svenki  * or http://www.opensolaris.org/os/licensing.
10*3941Svenki  * See the License for the specific language governing permissions
11*3941Svenki  * and limitations under the License.
12*3941Svenki  *
13*3941Svenki  * When distributing Covered Code, include this CDDL HEADER in each
14*3941Svenki  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*3941Svenki  * If applicable, add the following below this CDDL HEADER, with the
16*3941Svenki  * fields enclosed by brackets "[]" replaced with your own identifying
17*3941Svenki  * information: Portions Copyright [yyyy] [name of copyright owner]
18*3941Svenki  *
19*3941Svenki  * CDDL HEADER END
20*3941Svenki  */
21*3941Svenki 
22*3941Svenki /*
23*3941Svenki  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24*3941Svenki  * Use is subject to license terms.
25*3941Svenki  */
26*3941Svenki 
27*3941Svenki #ifndef	_PICLOIDS_H
28*3941Svenki #define	_PICLOIDS_H
29*3941Svenki 
30*3941Svenki #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*3941Svenki 
32*3941Svenki #ifdef	__cplusplus
33*3941Svenki extern "C" {
34*3941Svenki #endif
35*3941Svenki 
36*3941Svenki /*
37*3941Svenki  * IETF OIDs (not all are used by PICL)
38*3941Svenki  */
39*3941Svenki #define	OID_ISO				"1"
40*3941Svenki #define	OID_ORG				OID_ISO ".3"
41*3941Svenki #define	OID_DOD				OID_ORG ".6"
42*3941Svenki #define	OID_INTERNET			OID_DOD ".1"
43*3941Svenki 
44*3941Svenki #define	OID_PRIVATE			OID_INTERNET ".4"
45*3941Svenki #define	OID_ENTERPRISES			OID_PRIVATE ".1"
46*3941Svenki #define	OID_SUN				OID_ENTERPRISES ".42"
47*3941Svenki 
48*3941Svenki #define	OID_MGMT			OID_INTERNET ".2"
49*3941Svenki #define	OID_MIB2			OID_MGMT ".1"
50*3941Svenki #define	OID_entityMIB			OID_MIB2 ".47"
51*3941Svenki #define	OID_entityMIBObjects		OID_entityMIB ".1"
52*3941Svenki 
53*3941Svenki #define	OID_entityPhysical		OID_entityMIBObjects ".1"
54*3941Svenki #define	OID_entPhysicalTable		OID_entityPhysical ".1"
55*3941Svenki #define	OID_entPhysicalEntry		OID_entPhysicalTable ".1"
56*3941Svenki 
57*3941Svenki #define	OID_entPhysicalIndex		OID_entPhysicalEntry ".1"
58*3941Svenki #define	OID_entPhysicalDescr		OID_entPhysicalEntry ".2"
59*3941Svenki #define	OID_entPhysicalVendorType	OID_entPhysicalEntry ".3"
60*3941Svenki #define	OID_entPhysicalContainedIn	OID_entPhysicalEntry ".4"
61*3941Svenki #define	OID_entPhysicalClass		OID_entPhysicalEntry ".5"
62*3941Svenki #define	OID_entPhysicalParentRelPos	OID_entPhysicalEntry ".6"
63*3941Svenki #define	OID_entPhysicalName		OID_entPhysicalEntry ".7"
64*3941Svenki #define	OID_entPhysicalHardwareRev	OID_entPhysicalEntry ".8"
65*3941Svenki #define	OID_entPhysicalFirmwareRev	OID_entPhysicalEntry ".9"
66*3941Svenki #define	OID_entPhysicalSoftwareRev	OID_entPhysicalEntry ".10"
67*3941Svenki #define	OID_entPhysicalSerialNum	OID_entPhysicalEntry ".11"
68*3941Svenki #define	OID_entPhysicalMfgName		OID_entPhysicalEntry ".12"
69*3941Svenki #define	OID_entPhysicalModelName	OID_entPhysicalEntry ".13"
70*3941Svenki #define	OID_entPhysicalAlias		OID_entPhysicalEntry ".14"
71*3941Svenki #define	OID_entPhysicalAssetID		OID_entPhysicalEntry ".15"
72*3941Svenki #define	OID_entPhysicalIsFRU		OID_entPhysicalEntry ".16"
73*3941Svenki 
74*3941Svenki /*
75*3941Svenki  * Conceptual row change time for handling hotplug/hotswap events
76*3941Svenki  */
77*3941Svenki #define	OID_entityGeneral		OID_entityMIBObjects ".4"
78*3941Svenki #define	OID_entLastChangeTime		OID_entityGeneral ".1"
79*3941Svenki 
80*3941Svenki /*
81*3941Svenki  * Sun Platform MIB OIDs used by PICL
82*3941Svenki  */
83*3941Svenki #define	OID_products			OID_SUN ".2"
84*3941Svenki #define	OID_sunFire			OID_products ".70"
85*3941Svenki #define	OID_sunPlatMIB			OID_sunFire ".101"
86*3941Svenki #define	OID_sunPlatMIBObjects		OID_sunPlatMIB ".1"
87*3941Svenki #define	OID_sunPlatMIBPhysicalObjects	OID_sunPlatMIBObjects ".1"
88*3941Svenki 
89*3941Svenki /*
90*3941Svenki  * Equipment Table
91*3941Svenki  */
92*3941Svenki #define	OID_sunPlatEquipmentTable	OID_sunPlatMIBPhysicalObjects ".2"
93*3941Svenki #define	OID_sunPlatEquipmentEntry	OID_sunPlatEquipmentTable ".1"
94*3941Svenki #define	OID_sunPlatEquipmentOperationalState	\
95*3941Svenki 					OID_sunPlatEquipmentEntry ".2"
96*3941Svenki 
97*3941Svenki /*
98*3941Svenki  * Equipment Holder Table
99*3941Svenki  */
100*3941Svenki #define	OID_sunPlatEquipmentHolderTable	OID_sunPlatMIBPhysicalObjects ".3"
101*3941Svenki #define	OID_sunPlatEquipmentHolderEntry	OID_sunPlatEquipmentHolderTable ".1"
102*3941Svenki #define	OID_sunPlatEquipmentHolderAcceptableTypes	\
103*3941Svenki 					OID_sunPlatEquipmentHolderEntry ".2"
104*3941Svenki 
105*3941Svenki /*
106*3941Svenki  * Circuit Pack Table
107*3941Svenki  */
108*3941Svenki #define	OID_sunPlatCircuitPackTable	OID_sunPlatMIBPhysicalObjects ".4"
109*3941Svenki #define	OID_sunPlatCircuitPackEntry	OID_sunPlatCircuitPackTable ".1"
110*3941Svenki #define	OID_sunPlatCircuitPackReplaceable	\
111*3941Svenki 					OID_sunPlatCircuitPackEntry ".3"
112*3941Svenki #define	OID_sunPlatCircuitPackHotSwappable	\
113*3941Svenki 					OID_sunPlatCircuitPackEntry ".4"
114*3941Svenki 
115*3941Svenki /*
116*3941Svenki  * Physical Class Table
117*3941Svenki  */
118*3941Svenki #define	OID_sunPlatPhysicalTable	OID_sunPlatMIBPhysicalObjects ".5"
119*3941Svenki #define	OID_sunPlatPhysicalEntry	OID_sunPlatPhysicalTable ".1"
120*3941Svenki #define	OID_sunPlatPhysicalClass	OID_sunPlatPhysicalEntry ".1"
121*3941Svenki 
122*3941Svenki /*
123*3941Svenki  * Sensor Table
124*3941Svenki  */
125*3941Svenki #define	OID_sunPlatSensorTable		OID_sunPlatMIBPhysicalObjects ".6"
126*3941Svenki #define	OID_sunPlatSensorEntry		OID_sunPlatSensorTable ".1"
127*3941Svenki #define	OID_sunPlatSensorClass		OID_sunPlatSensorEntry ".1"
128*3941Svenki #define	OID_sunPlatSensorType		OID_sunPlatSensorEntry ".2"
129*3941Svenki 
130*3941Svenki /*
131*3941Svenki  * Binary Sensor Table
132*3941Svenki  */
133*3941Svenki #define	OID_sunPlatBinarySensorTable	OID_sunPlatMIBPhysicalObjects ".7"
134*3941Svenki #define	OID_sunPlatBinarySensorEntry	OID_sunPlatBinarySensorTable ".1"
135*3941Svenki 
136*3941Svenki #define	OID_sunPlatBinarySensorCurrent	OID_sunPlatBinarySensorEntry ".1"
137*3941Svenki #define	OID_sunPlatBinarySensorExpected	OID_sunPlatBinarySensorEntry ".2"
138*3941Svenki #define	OID_sunPlatBinarySensorInterpretTrue	\
139*3941Svenki 					OID_sunPlatBinarySensorEntry ".3"
140*3941Svenki #define	OID_sunPlatBinarySensorInterpretFalse	\
141*3941Svenki 					OID_sunPlatBinarySensorEntry ".4"
142*3941Svenki 
143*3941Svenki /*
144*3941Svenki  * Numeric Sensor Table
145*3941Svenki  */
146*3941Svenki #define	OID_sunPlatNumericSensorTable	OID_sunPlatMIBPhysicalObjects ".8"
147*3941Svenki #define	OID_sunPlatNumericSensorEntry	OID_sunPlatNumericSensorTable ".1"
148*3941Svenki #define	OID_sunPlatNumericSensorCurrent	OID_sunPlatNumericSensorEntry ".4"
149*3941Svenki #define	OID_sunPlatNumericSensorBaseUnits	\
150*3941Svenki 					OID_sunPlatNumericSensorEntry ".1"
151*3941Svenki #define	OID_sunPlatNumericSensorExponent	\
152*3941Svenki 					OID_sunPlatNumericSensorEntry ".2"
153*3941Svenki #define	OID_sunPlatNumericSensorRateUnits	\
154*3941Svenki 					OID_sunPlatNumericSensorEntry ".3"
155*3941Svenki #define	OID_sunPlatNumericSensorLowerThresholdNonCritical	\
156*3941Svenki 					OID_sunPlatNumericSensorEntry ".8"
157*3941Svenki #define	OID_sunPlatNumericSensorUpperThresholdNonCritical	\
158*3941Svenki 					OID_sunPlatNumericSensorEntry ".9"
159*3941Svenki #define	OID_sunPlatNumericSensorLowerThresholdCritical	\
160*3941Svenki 					OID_sunPlatNumericSensorEntry ".10"
161*3941Svenki #define	OID_sunPlatNumericSensorUpperThresholdCritical	\
162*3941Svenki 					OID_sunPlatNumericSensorEntry ".11"
163*3941Svenki #define	OID_sunPlatNumericSensorLowerThresholdFatal	\
164*3941Svenki 					OID_sunPlatNumericSensorEntry ".12"
165*3941Svenki #define	OID_sunPlatNumericSensorUpperThresholdFatal	\
166*3941Svenki 					OID_sunPlatNumericSensorEntry ".13"
167*3941Svenki #define	OID_sunPlatNumericSensorEnabledThresholds	\
168*3941Svenki 					OID_sunPlatNumericSensorEntry ".15"
169*3941Svenki 
170*3941Svenki /*
171*3941Svenki  * Alarm Table
172*3941Svenki  */
173*3941Svenki #define	OID_sunPlatAlarmTable		OID_sunPlatMIBPhysicalObjects ".12"
174*3941Svenki #define	OID_sunPlatAlarmEntry		OID_sunPlatAlarmTable ".1"
175*3941Svenki #define	OID_sunPlatAlarmType		OID_sunPlatAlarmEntry ".1"
176*3941Svenki #define	OID_sunPlatAlarmState		OID_sunPlatAlarmEntry ".2"
177*3941Svenki 
178*3941Svenki /*
179*3941Svenki  * Power Supply Table
180*3941Svenki  */
181*3941Svenki #define	OID_sunPlatPowerSupplyTable	OID_sunPlatMIBPhysicalObjects ".14"
182*3941Svenki #define	OID_sunPlatPowerSupplyEntry	OID_sunPlatPowerSupplyTable ".1"
183*3941Svenki #define	OID_sunPlatPowerSupplyClass	OID_sunPlatPowerSupplyEntry ".1"
184*3941Svenki 
185*3941Svenki /*
186*3941Svenki  * Battery Table
187*3941Svenki  */
188*3941Svenki #define	OID_sunPlatBatteryTable		OID_sunPlatMIBPhysicalObjects ".15"
189*3941Svenki #define	OID_sunPlatBatteryEntry		OID_sunPlatBatteryTable ".1"
190*3941Svenki #define	OID_sunPlatBatteryStatus	OID_sunPlatBatteryEntry ".1"
191*3941Svenki 
192*3941Svenki /*
193*3941Svenki  * Integer enumeration classes used by PICL
194*3941Svenki  */
195*3941Svenki typedef enum {
196*3941Svenki 	ST_TRUE = 1,
197*3941Svenki 	ST_FALSE = 2
198*3941Svenki } snmp_truthval_t;
199*3941Svenki 
200*3941Svenki /*
201*3941Svenki  * Note that the truth values could be much longer than the length
202*3941Svenki  * of the strings "true" or "false", since we actuallly interpret them
203*3941Svenki  * using InterpretTrue and InterpretFalse values in the MIB. Currently
204*3941Svenki  * we limit them to be 32 (see MAX_TRUTHVAL_LEN definition below)
205*3941Svenki  */
206*3941Svenki #define	STR_ST_TRUE	"true"
207*3941Svenki #define	STR_ST_FALSE	"false"
208*3941Svenki 
209*3941Svenki /* entPhysicalClass */
210*3941Svenki typedef enum {
211*3941Svenki 	SPC_OTHER = 1,
212*3941Svenki 	SPC_UNKNOWN = 2,
213*3941Svenki 	SPC_CHASSIS = 3,
214*3941Svenki 	SPC_BACKPLANE = 4,
215*3941Svenki 	SPC_CONTAINER = 5,
216*3941Svenki 	SPC_POWERSUPPLY = 6,
217*3941Svenki 	SPC_FAN = 7,
218*3941Svenki 	SPC_SENSOR = 8,
219*3941Svenki 	SPC_MODULE = 9,
220*3941Svenki 	SPC_PORT = 10,
221*3941Svenki 	SPC_STACK = 11
222*3941Svenki } snmp_physical_class_t;
223*3941Svenki 
224*3941Svenki /* sunPlatEquipmentOperationalState */
225*3941Svenki typedef enum {
226*3941Svenki 	SSOS_DISABLED = 1,
227*3941Svenki 	SSOS_ENABLED = 2
228*3941Svenki } snmp_sunplat_op_state_t;
229*3941Svenki 
230*3941Svenki /*
231*3941Svenki  * Update MAX_OPSTATE_LEN below if these strings are changed
232*3941Svenki  */
233*3941Svenki #define	STR_SSOS_DISABLED	"disabled"
234*3941Svenki #define	STR_SSOS_ENABLED	"enabled"
235*3941Svenki 
236*3941Svenki /* sunPlatPhysicalClass */
237*3941Svenki typedef enum {
238*3941Svenki 	SSPC_OTHER = 1,
239*3941Svenki 	SSPC_ALARM = 2,
240*3941Svenki 	SSPC_WATCHDOG = 3
241*3941Svenki } snmp_sunplat_phys_class_t;
242*3941Svenki 
243*3941Svenki /* sunPlatSensorClass */
244*3941Svenki typedef enum {
245*3941Svenki 	SSSC_BINARY = 1,
246*3941Svenki 	SSSC_NUMERIC = 2,
247*3941Svenki 	SSSC_DISCRETE = 3
248*3941Svenki } snmp_sunplat_sensor_class_t;
249*3941Svenki 
250*3941Svenki /* sunPlatSensorType */
251*3941Svenki typedef enum {
252*3941Svenki 	SSST_OTHER = 1,
253*3941Svenki 	SSST_UNKNOWN = 2,
254*3941Svenki 	SSST_TEMPERATURE = 3,
255*3941Svenki 	SSST_VOLTAGE = 4,
256*3941Svenki 	SSST_CURRENT = 5,
257*3941Svenki 	SSST_TACHOMETER = 6,
258*3941Svenki 	SSST_COUNTER = 7,
259*3941Svenki 	SSST_SWITCH = 8,
260*3941Svenki 	SSST_LOCK = 9,
261*3941Svenki 	SSST_HUMIDITY = 10,
262*3941Svenki 	SSST_SMOKE_DETECTION = 11,
263*3941Svenki 	SSST_PRESENCE = 12,
264*3941Svenki 	SSST_AIRFLOW = 13
265*3941Svenki } snmp_sunplat_sensor_type_t;
266*3941Svenki 
267*3941Svenki /* sunPlatAlarmType */
268*3941Svenki typedef enum {
269*3941Svenki 	SSAT_OTHER = 1,
270*3941Svenki 	SSAT_AUDIBLE = 2,
271*3941Svenki 	SSAT_VISIBLE = 3,
272*3941Svenki 	SSAT_MOTION = 4,
273*3941Svenki 	SSAT_SWITCH = 5
274*3941Svenki } snmp_sunplat_alarm_type_t;
275*3941Svenki 
276*3941Svenki /* sunPlatAlarmState */
277*3941Svenki typedef enum {
278*3941Svenki 	SSAS_UNKNOWN = 1,
279*3941Svenki 	SSAS_OFF = 2,
280*3941Svenki 	SSAS_STEADY = 3,
281*3941Svenki 	SSAS_ALTERNATING = 4
282*3941Svenki } snmp_sunplat_alarm_state_t;
283*3941Svenki 
284*3941Svenki /*
285*3941Svenki  * Update MAX_ALARMSTATE_LEN below if these strings are changed
286*3941Svenki  */
287*3941Svenki #define	STR_SSAS_UNKNOWN	"unknown"
288*3941Svenki #define	STR_SSAS_OFF		"off"
289*3941Svenki #define	STR_SSAS_STEADY		"steady"
290*3941Svenki #define	STR_SSAS_ALTERNATING	"alternating"
291*3941Svenki 
292*3941Svenki /*
293*3941Svenki  * Bit masks for the sunPlatNumericSensorEnabledThresholds
294*3941Svenki  */
295*3941Svenki #define	LOWER_NON_CRITICAL	0x80
296*3941Svenki #define	UPPER_NON_CRITICAL	0x40
297*3941Svenki #define	LOWER_CRITICAL		0x20
298*3941Svenki #define	UPPER_CRITICAL		0x10
299*3941Svenki #define	LOWER_FATAL		0x08
300*3941Svenki #define	UPPER_FATAL		0x04
301*3941Svenki 
302*3941Svenki /*
303*3941Svenki  * sunPlatPowerSupplyClass
304*3941Svenki  */
305*3941Svenki typedef enum {
306*3941Svenki 	SSPSC_OTHER = 1,
307*3941Svenki 	SSPSC_POWERSUPPLY = 2,
308*3941Svenki 	SSPSC_BATTERY = 3
309*3941Svenki } snmp_sunplat_power_supply_class_t;
310*3941Svenki 
311*3941Svenki /*
312*3941Svenki  * sunPlatBatteryStatus
313*3941Svenki  */
314*3941Svenki typedef enum {
315*3941Svenki 	SSBS_OTHER = 1,
316*3941Svenki 	SSBS_UNKNOWN = 2,
317*3941Svenki 	SSBS_FULLYCHARGED = 3,
318*3941Svenki 	SSBS_LOW = 4,
319*3941Svenki 	SSBS_CRITICAL = 5,
320*3941Svenki 	SSBS_CHARGING = 6,
321*3941Svenki 	SSBS_CHARGING_AND_LOW = 7,
322*3941Svenki 	SSBS_CHARGING_AND_HIGH = 8,
323*3941Svenki 	SSBS_CHARGING_AND_CRITICAL = 9,
324*3941Svenki 	SSBS_UNDEFINED = 10,
325*3941Svenki 	SSBS_PARTIALLY_CHARGED = 11
326*3941Svenki } snmp_sunplat_battery_status_t;
327*3941Svenki 
328*3941Svenki /*
329*3941Svenki  * Update MAX_BATTERYSTATUS_LEN below if these strings are changed
330*3941Svenki  */
331*3941Svenki #define	STR_SSBS_OTHER			"Other"
332*3941Svenki #define	STR_SSBS_UNKNOWN		"Unknown"
333*3941Svenki #define	STR_SSBS_FULLYCHARGED		"Fully Charged"
334*3941Svenki #define	STR_SSBS_LOW			"Low"
335*3941Svenki #define	STR_SSBS_CRITICAL		"Critical"
336*3941Svenki #define	STR_SSBS_CHARGING		"Charging"
337*3941Svenki #define	STR_SSBS_CHARGING_AND_LOW	"Charging and Low"
338*3941Svenki #define	STR_SSBS_CHARGING_AND_HIGH	"Charging and High"
339*3941Svenki #define	STR_SSBS_CHARGING_AND_CRITICAL	"Charging and Critical"
340*3941Svenki #define	STR_SSBS_UNDEFINED		"Undefined"
341*3941Svenki #define	STR_SSBS_PARTIALLY_CHARGED	"Partially Charged"
342*3941Svenki 
343*3941Svenki /*
344*3941Svenki  * Max limits of all volatiles
345*3941Svenki  */
346*3941Svenki #define	MAX_OPSTATE_LEN			10
347*3941Svenki #define	MAX_ALARMSTATE_LEN		12
348*3941Svenki #define	MAX_TRUTHVAL_LEN		32
349*3941Svenki #define	MAX_BATTERYSTATUS_LEN		32
350*3941Svenki 
351*3941Svenki #ifdef	__cplusplus
352*3941Svenki }
353*3941Svenki #endif
354*3941Svenki 
355*3941Svenki #endif	/* _PICLOIDS_H */
356