summaryrefslogtreecommitdiff
path: root/usr/src/cmd/picl/plugins/sun4v/include/picloids.h
blob: 3149cdcd4dae08942b33c73f0340a581a530ae4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef	_PICLOIDS_H
#define	_PICLOIDS_H

#pragma ident	"%Z%%M%	%I%	%E% SMI"

#ifdef	__cplusplus
extern "C" {
#endif

/*
 * IETF OIDs (not all are used by PICL)
 */
#define	OID_ISO				"1"
#define	OID_ORG				OID_ISO ".3"
#define	OID_DOD				OID_ORG ".6"
#define	OID_INTERNET			OID_DOD ".1"

#define	OID_PRIVATE			OID_INTERNET ".4"
#define	OID_ENTERPRISES			OID_PRIVATE ".1"
#define	OID_SUN				OID_ENTERPRISES ".42"

#define	OID_MGMT			OID_INTERNET ".2"
#define	OID_MIB2			OID_MGMT ".1"
#define	OID_entityMIB			OID_MIB2 ".47"
#define	OID_entityMIBObjects		OID_entityMIB ".1"

#define	OID_entityPhysical		OID_entityMIBObjects ".1"
#define	OID_entPhysicalTable		OID_entityPhysical ".1"
#define	OID_entPhysicalEntry		OID_entPhysicalTable ".1"

#define	OID_entPhysicalIndex		OID_entPhysicalEntry ".1"
#define	OID_entPhysicalDescr		OID_entPhysicalEntry ".2"
#define	OID_entPhysicalVendorType	OID_entPhysicalEntry ".3"
#define	OID_entPhysicalContainedIn	OID_entPhysicalEntry ".4"
#define	OID_entPhysicalClass		OID_entPhysicalEntry ".5"
#define	OID_entPhysicalParentRelPos	OID_entPhysicalEntry ".6"
#define	OID_entPhysicalName		OID_entPhysicalEntry ".7"
#define	OID_entPhysicalHardwareRev	OID_entPhysicalEntry ".8"
#define	OID_entPhysicalFirmwareRev	OID_entPhysicalEntry ".9"
#define	OID_entPhysicalSoftwareRev	OID_entPhysicalEntry ".10"
#define	OID_entPhysicalSerialNum	OID_entPhysicalEntry ".11"
#define	OID_entPhysicalMfgName		OID_entPhysicalEntry ".12"
#define	OID_entPhysicalModelName	OID_entPhysicalEntry ".13"
#define	OID_entPhysicalAlias		OID_entPhysicalEntry ".14"
#define	OID_entPhysicalAssetID		OID_entPhysicalEntry ".15"
#define	OID_entPhysicalIsFRU		OID_entPhysicalEntry ".16"

/*
 * Conceptual row change time for handling hotplug/hotswap events
 */
#define	OID_entityGeneral		OID_entityMIBObjects ".4"
#define	OID_entLastChangeTime		OID_entityGeneral ".1"

/*
 * Sun Platform MIB OIDs used by PICL
 */
#define	OID_products			OID_SUN ".2"
#define	OID_sunFire			OID_products ".70"
#define	OID_sunPlatMIB			OID_sunFire ".101"
#define	OID_sunPlatMIBObjects		OID_sunPlatMIB ".1"
#define	OID_sunPlatMIBPhysicalObjects	OID_sunPlatMIBObjects ".1"

/*
 * Equipment Table
 */
#define	OID_sunPlatEquipmentTable	OID_sunPlatMIBPhysicalObjects ".2"
#define	OID_sunPlatEquipmentEntry	OID_sunPlatEquipmentTable ".1"
#define	OID_sunPlatEquipmentOperationalState	\
					OID_sunPlatEquipmentEntry ".2"

/*
 * Equipment Holder Table
 */
#define	OID_sunPlatEquipmentHolderTable	OID_sunPlatMIBPhysicalObjects ".3"
#define	OID_sunPlatEquipmentHolderEntry	OID_sunPlatEquipmentHolderTable ".1"
#define	OID_sunPlatEquipmentHolderAcceptableTypes	\
					OID_sunPlatEquipmentHolderEntry ".2"

/*
 * Circuit Pack Table
 */
#define	OID_sunPlatCircuitPackTable	OID_sunPlatMIBPhysicalObjects ".4"
#define	OID_sunPlatCircuitPackEntry	OID_sunPlatCircuitPackTable ".1"
#define	OID_sunPlatCircuitPackReplaceable	\
					OID_sunPlatCircuitPackEntry ".3"
#define	OID_sunPlatCircuitPackHotSwappable	\
					OID_sunPlatCircuitPackEntry ".4"

/*
 * Physical Class Table
 */
#define	OID_sunPlatPhysicalTable	OID_sunPlatMIBPhysicalObjects ".5"
#define	OID_sunPlatPhysicalEntry	OID_sunPlatPhysicalTable ".1"
#define	OID_sunPlatPhysicalClass	OID_sunPlatPhysicalEntry ".1"

/*
 * Sensor Table
 */
#define	OID_sunPlatSensorTable		OID_sunPlatMIBPhysicalObjects ".6"
#define	OID_sunPlatSensorEntry		OID_sunPlatSensorTable ".1"
#define	OID_sunPlatSensorClass		OID_sunPlatSensorEntry ".1"
#define	OID_sunPlatSensorType		OID_sunPlatSensorEntry ".2"

/*
 * Binary Sensor Table
 */
#define	OID_sunPlatBinarySensorTable	OID_sunPlatMIBPhysicalObjects ".7"
#define	OID_sunPlatBinarySensorEntry	OID_sunPlatBinarySensorTable ".1"

#define	OID_sunPlatBinarySensorCurrent	OID_sunPlatBinarySensorEntry ".1"
#define	OID_sunPlatBinarySensorExpected	OID_sunPlatBinarySensorEntry ".2"
#define	OID_sunPlatBinarySensorInterpretTrue	\
					OID_sunPlatBinarySensorEntry ".3"
#define	OID_sunPlatBinarySensorInterpretFalse	\
					OID_sunPlatBinarySensorEntry ".4"

/*
 * Numeric Sensor Table
 */
#define	OID_sunPlatNumericSensorTable	OID_sunPlatMIBPhysicalObjects ".8"
#define	OID_sunPlatNumericSensorEntry	OID_sunPlatNumericSensorTable ".1"
#define	OID_sunPlatNumericSensorCurrent	OID_sunPlatNumericSensorEntry ".4"
#define	OID_sunPlatNumericSensorBaseUnits	\
					OID_sunPlatNumericSensorEntry ".1"
#define	OID_sunPlatNumericSensorExponent	\
					OID_sunPlatNumericSensorEntry ".2"
#define	OID_sunPlatNumericSensorRateUnits	\
					OID_sunPlatNumericSensorEntry ".3"
#define	OID_sunPlatNumericSensorLowerThresholdNonCritical	\
					OID_sunPlatNumericSensorEntry ".8"
#define	OID_sunPlatNumericSensorUpperThresholdNonCritical	\
					OID_sunPlatNumericSensorEntry ".9"
#define	OID_sunPlatNumericSensorLowerThresholdCritical	\
					OID_sunPlatNumericSensorEntry ".10"
#define	OID_sunPlatNumericSensorUpperThresholdCritical	\
					OID_sunPlatNumericSensorEntry ".11"
#define	OID_sunPlatNumericSensorLowerThresholdFatal	\
					OID_sunPlatNumericSensorEntry ".12"
#define	OID_sunPlatNumericSensorUpperThresholdFatal	\
					OID_sunPlatNumericSensorEntry ".13"
#define	OID_sunPlatNumericSensorEnabledThresholds	\
					OID_sunPlatNumericSensorEntry ".15"

/*
 * Alarm Table
 */
#define	OID_sunPlatAlarmTable		OID_sunPlatMIBPhysicalObjects ".12"
#define	OID_sunPlatAlarmEntry		OID_sunPlatAlarmTable ".1"
#define	OID_sunPlatAlarmType		OID_sunPlatAlarmEntry ".1"
#define	OID_sunPlatAlarmState		OID_sunPlatAlarmEntry ".2"

/*
 * Power Supply Table
 */
#define	OID_sunPlatPowerSupplyTable	OID_sunPlatMIBPhysicalObjects ".14"
#define	OID_sunPlatPowerSupplyEntry	OID_sunPlatPowerSupplyTable ".1"
#define	OID_sunPlatPowerSupplyClass	OID_sunPlatPowerSupplyEntry ".1"

/*
 * Battery Table
 */
#define	OID_sunPlatBatteryTable		OID_sunPlatMIBPhysicalObjects ".15"
#define	OID_sunPlatBatteryEntry		OID_sunPlatBatteryTable ".1"
#define	OID_sunPlatBatteryStatus	OID_sunPlatBatteryEntry ".1"

/*
 * Integer enumeration classes used by PICL
 */
typedef enum {
	ST_TRUE = 1,
	ST_FALSE = 2
} snmp_truthval_t;

/*
 * Note that the truth values could be much longer than the length
 * of the strings "true" or "false", since we actuallly interpret them
 * using InterpretTrue and InterpretFalse values in the MIB. Currently
 * we limit them to be 32 (see MAX_TRUTHVAL_LEN definition below)
 */
#define	STR_ST_TRUE	"true"
#define	STR_ST_FALSE	"false"

/* entPhysicalClass */
typedef enum {
	SPC_OTHER = 1,
	SPC_UNKNOWN = 2,
	SPC_CHASSIS = 3,
	SPC_BACKPLANE = 4,
	SPC_CONTAINER = 5,
	SPC_POWERSUPPLY = 6,
	SPC_FAN = 7,
	SPC_SENSOR = 8,
	SPC_MODULE = 9,
	SPC_PORT = 10,
	SPC_STACK = 11
} snmp_physical_class_t;

/* sunPlatEquipmentOperationalState */
typedef enum {
	SSOS_DISABLED = 1,
	SSOS_ENABLED = 2
} snmp_sunplat_op_state_t;

/*
 * Update MAX_OPSTATE_LEN below if these strings are changed
 */
#define	STR_SSOS_DISABLED	"disabled"
#define	STR_SSOS_ENABLED	"enabled"

/* sunPlatPhysicalClass */
typedef enum {
	SSPC_OTHER = 1,
	SSPC_ALARM = 2,
	SSPC_WATCHDOG = 3
} snmp_sunplat_phys_class_t;

/* sunPlatSensorClass */
typedef enum {
	SSSC_BINARY = 1,
	SSSC_NUMERIC = 2,
	SSSC_DISCRETE = 3
} snmp_sunplat_sensor_class_t;

/* sunPlatSensorType */
typedef enum {
	SSST_OTHER = 1,
	SSST_UNKNOWN = 2,
	SSST_TEMPERATURE = 3,
	SSST_VOLTAGE = 4,
	SSST_CURRENT = 5,
	SSST_TACHOMETER = 6,
	SSST_COUNTER = 7,
	SSST_SWITCH = 8,
	SSST_LOCK = 9,
	SSST_HUMIDITY = 10,
	SSST_SMOKE_DETECTION = 11,
	SSST_PRESENCE = 12,
	SSST_AIRFLOW = 13
} snmp_sunplat_sensor_type_t;

/* sunPlatAlarmType */
typedef enum {
	SSAT_OTHER = 1,
	SSAT_AUDIBLE = 2,
	SSAT_VISIBLE = 3,
	SSAT_MOTION = 4,
	SSAT_SWITCH = 5
} snmp_sunplat_alarm_type_t;

/* sunPlatAlarmState */
typedef enum {
	SSAS_UNKNOWN = 1,
	SSAS_OFF = 2,
	SSAS_STEADY = 3,
	SSAS_ALTERNATING = 4
} snmp_sunplat_alarm_state_t;

/*
 * Update MAX_ALARMSTATE_LEN below if these strings are changed
 */
#define	STR_SSAS_UNKNOWN	"unknown"
#define	STR_SSAS_OFF		"off"
#define	STR_SSAS_STEADY		"steady"
#define	STR_SSAS_ALTERNATING	"alternating"

/*
 * Bit masks for the sunPlatNumericSensorEnabledThresholds
 */
#define	LOWER_NON_CRITICAL	0x80
#define	UPPER_NON_CRITICAL	0x40
#define	LOWER_CRITICAL		0x20
#define	UPPER_CRITICAL		0x10
#define	LOWER_FATAL		0x08
#define	UPPER_FATAL		0x04

/*
 * sunPlatPowerSupplyClass
 */
typedef enum {
	SSPSC_OTHER = 1,
	SSPSC_POWERSUPPLY = 2,
	SSPSC_BATTERY = 3
} snmp_sunplat_power_supply_class_t;

/*
 * sunPlatBatteryStatus
 */
typedef enum {
	SSBS_OTHER = 1,
	SSBS_UNKNOWN = 2,
	SSBS_FULLYCHARGED = 3,
	SSBS_LOW = 4,
	SSBS_CRITICAL = 5,
	SSBS_CHARGING = 6,
	SSBS_CHARGING_AND_LOW = 7,
	SSBS_CHARGING_AND_HIGH = 8,
	SSBS_CHARGING_AND_CRITICAL = 9,
	SSBS_UNDEFINED = 10,
	SSBS_PARTIALLY_CHARGED = 11
} snmp_sunplat_battery_status_t;

/*
 * Update MAX_BATTERYSTATUS_LEN below if these strings are changed
 */
#define	STR_SSBS_OTHER			"Other"
#define	STR_SSBS_UNKNOWN		"Unknown"
#define	STR_SSBS_FULLYCHARGED		"Fully Charged"
#define	STR_SSBS_LOW			"Low"
#define	STR_SSBS_CRITICAL		"Critical"
#define	STR_SSBS_CHARGING		"Charging"
#define	STR_SSBS_CHARGING_AND_LOW	"Charging and Low"
#define	STR_SSBS_CHARGING_AND_HIGH	"Charging and High"
#define	STR_SSBS_CHARGING_AND_CRITICAL	"Charging and Critical"
#define	STR_SSBS_UNDEFINED		"Undefined"
#define	STR_SSBS_PARTIALLY_CHARGED	"Partially Charged"

/*
 * Max limits of all volatiles
 */
#define	MAX_OPSTATE_LEN			10
#define	MAX_ALARMSTATE_LEN		12
#define	MAX_TRUTHVAL_LEN		32
#define	MAX_BATTERYSTATUS_LEN		32

#ifdef	__cplusplus
}
#endif

#endif	/* _PICLOIDS_H */