1 /* 2 * This C header file has been generated by smidump 0.4.3. 3 * It is intended to be used with the NET-SNMP package. 4 * 5 * This header is derived from the UPS-MIB module. 6 * 7 * $Id: rfc1628-mib.h,v 1.4 2005-11-05 21:10:47 adk0212 Exp $ 8 */ 9 10 #ifndef _UPS_MIB_H_ 11 #define _UPS_MIB_H_ 12 13 /* 14 * C type definitions for UPS-MIB::upsIdent. 15 */ 16 17 typedef struct upsIdent { 18 u_char *upsIdentManufacturer; 19 size_t _upsIdentManufacturerLength; 20 u_char *upsIdentModel; 21 size_t _upsIdentModelLength; 22 u_char *upsIdentUPSSoftwareVersion; 23 size_t _upsIdentUPSSoftwareVersionLength; 24 u_char *upsIdentAgentSoftwareVersion; 25 size_t _upsIdentAgentSoftwareVersionLength; 26 u_char *upsIdentName; 27 size_t _upsIdentNameLength; 28 u_char *upsIdentAttachedDevices; 29 size_t _upsIdentAttachedDevicesLength; 30 void *_clientData; /* pointer to client data structure */ 31 32 /* private space to hold actual values */ 33 34 u_char __upsIdentManufacturer[31]; 35 u_char __upsIdentModel[63]; 36 u_char __upsIdentUPSSoftwareVersion[63]; 37 u_char __upsIdentAgentSoftwareVersion[63]; 38 u_char __upsIdentName[63]; 39 u_char __upsIdentAttachedDevices[63]; 40 } upsIdent_t; 41 42 /* 43 * C manager interface stubs for UPS-MIB::upsIdent. 44 */ 45 46 extern int 47 ups_mib_mgr_get_upsIdent(struct snmp_session *s, upsIdent_t **upsIdent); 48 49 /* 50 * C agent interface stubs for UPS-MIB::upsIdent. 51 */ 52 53 extern int 54 ups_mib_agt_read_upsIdent(upsIdent_t *upsIdent); 55 extern int 56 ups_mib_agt_register_upsIdent(); 57 58 /* 59 * C type definitions for UPS-MIB::upsBattery. 60 */ 61 62 typedef struct upsBattery { 63 int32_t *upsBatteryStatus; 64 int32_t *upsSecondsOnBattery; 65 int32_t *upsEstimatedMinutesRemaining; 66 int32_t *upsEstimatedChargeRemaining; 67 int32_t *upsBatteryVoltage; 68 int32_t *upsBatteryCurrent; 69 int32_t *upsBatteryTemperature; 70 void *_clientData; /* pointer to client data structure */ 71 72 /* private space to hold actual values */ 73 74 int32_t __upsBatteryStatus; 75 int32_t __upsSecondsOnBattery; 76 int32_t __upsEstimatedMinutesRemaining; 77 int32_t __upsEstimatedChargeRemaining; 78 int32_t __upsBatteryVoltage; 79 int32_t __upsBatteryCurrent; 80 int32_t __upsBatteryTemperature; 81 } upsBattery_t; 82 83 /* 84 * C manager interface stubs for UPS-MIB::upsBattery. 85 */ 86 87 extern int 88 ups_mib_mgr_get_upsBattery(struct snmp_session *s, upsBattery_t **upsBattery); 89 90 /* 91 * C agent interface stubs for UPS-MIB::upsBattery. 92 */ 93 94 extern int 95 ups_mib_agt_read_upsBattery(upsBattery_t *upsBattery); 96 extern int 97 ups_mib_agt_register_upsBattery(); 98 99 /* 100 * C type definitions for UPS-MIB::upsInput. 101 */ 102 103 typedef struct upsInput { 104 uint32_t *upsInputLineBads; 105 int32_t *upsInputNumLines; 106 void *_clientData; /* pointer to client data structure */ 107 108 /* private space to hold actual values */ 109 110 uint32_t __upsInputLineBads; 111 int32_t __upsInputNumLines; 112 } upsInput_t; 113 114 /* 115 * C manager interface stubs for UPS-MIB::upsInput. 116 */ 117 118 extern int 119 ups_mib_mgr_get_upsInput(struct snmp_session *s, upsInput_t **upsInput); 120 121 /* 122 * C agent interface stubs for UPS-MIB::upsInput. 123 */ 124 125 extern int 126 ups_mib_agt_read_upsInput(upsInput_t *upsInput); 127 extern int 128 ups_mib_agt_register_upsInput(); 129 130 /* 131 * C type definitions for UPS-MIB::upsInputEntry. 132 */ 133 134 typedef struct upsInputEntry { 135 int32_t *upsInputLineIndex; 136 int32_t *upsInputFrequency; 137 int32_t *upsInputVoltage; 138 int32_t *upsInputCurrent; 139 int32_t *upsInputTruePower; 140 void *_clientData; /* pointer to client data structure */ 141 struct upsInputEntry *_nextPtr; /* pointer to next table entry */ 142 143 /* private space to hold actual values */ 144 145 int32_t __upsInputLineIndex; 146 int32_t __upsInputFrequency; 147 int32_t __upsInputVoltage; 148 int32_t __upsInputCurrent; 149 int32_t __upsInputTruePower; 150 } upsInputEntry_t; 151 152 /* 153 * C manager interface stubs for UPS-MIB::upsInputEntry. 154 */ 155 156 extern int 157 ups_mib_mgr_get_upsInputEntry(struct snmp_session *s, upsInputEntry_t **upsInputEntry); 158 159 /* 160 * C agent interface stubs for UPS-MIB::upsInputEntry. 161 */ 162 163 extern int 164 ups_mib_agt_read_upsInputEntry(upsInputEntry_t *upsInputEntry); 165 extern int 166 ups_mib_agt_register_upsInputEntry(); 167 168 /* 169 * C type definitions for UPS-MIB::upsOutput. 170 */ 171 172 typedef struct upsOutput { 173 int32_t *upsOutputSource; 174 int32_t *upsOutputFrequency; 175 int32_t *upsOutputNumLines; 176 void *_clientData; /* pointer to client data structure */ 177 178 /* private space to hold actual values */ 179 180 int32_t __upsOutputSource; 181 int32_t __upsOutputFrequency; 182 int32_t __upsOutputNumLines; 183 } upsOutput_t; 184 185 /* 186 * C manager interface stubs for UPS-MIB::upsOutput. 187 */ 188 189 extern int 190 ups_mib_mgr_get_upsOutput(struct snmp_session *s, upsOutput_t **upsOutput); 191 192 /* 193 * C agent interface stubs for UPS-MIB::upsOutput. 194 */ 195 196 extern int 197 ups_mib_agt_read_upsOutput(upsOutput_t *upsOutput); 198 extern int 199 ups_mib_agt_register_upsOutput(); 200 201 /* 202 * C type definitions for UPS-MIB::upsOutputEntry. 203 */ 204 205 typedef struct upsOutputEntry { 206 int32_t *upsOutputLineIndex; 207 int32_t *upsOutputVoltage; 208 int32_t *upsOutputCurrent; 209 int32_t *upsOutputPower; 210 int32_t *upsOutputPercentLoad; 211 void *_clientData; /* pointer to client data structure */ 212 struct upsOutputEntry *_nextPtr; /* pointer to next table entry */ 213 214 /* private space to hold actual values */ 215 216 int32_t __upsOutputLineIndex; 217 int32_t __upsOutputVoltage; 218 int32_t __upsOutputCurrent; 219 int32_t __upsOutputPower; 220 int32_t __upsOutputPercentLoad; 221 } upsOutputEntry_t; 222 223 /* 224 * C manager interface stubs for UPS-MIB::upsOutputEntry. 225 */ 226 227 extern int 228 ups_mib_mgr_get_upsOutputEntry(struct snmp_session *s, upsOutputEntry_t **upsOutputEntry); 229 230 /* 231 * C agent interface stubs for UPS-MIB::upsOutputEntry. 232 */ 233 234 extern int 235 ups_mib_agt_read_upsOutputEntry(upsOutputEntry_t *upsOutputEntry); 236 extern int 237 ups_mib_agt_register_upsOutputEntry(); 238 239 /* 240 * C type definitions for UPS-MIB::upsBypass. 241 */ 242 243 typedef struct upsBypass { 244 int32_t *upsBypassFrequency; 245 int32_t *upsBypassNumLines; 246 void *_clientData; /* pointer to client data structure */ 247 248 /* private space to hold actual values */ 249 250 int32_t __upsBypassFrequency; 251 int32_t __upsBypassNumLines; 252 } upsBypass_t; 253 254 /* 255 * C manager interface stubs for UPS-MIB::upsBypass. 256 */ 257 258 extern int 259 ups_mib_mgr_get_upsBypass(struct snmp_session *s, upsBypass_t **upsBypass); 260 261 /* 262 * C agent interface stubs for UPS-MIB::upsBypass. 263 */ 264 265 extern int 266 ups_mib_agt_read_upsBypass(upsBypass_t *upsBypass); 267 extern int 268 ups_mib_agt_register_upsBypass(); 269 270 /* 271 * C type definitions for UPS-MIB::upsBypassEntry. 272 */ 273 274 typedef struct upsBypassEntry { 275 int32_t *upsBypassLineIndex; 276 int32_t *upsBypassVoltage; 277 int32_t *upsBypassCurrent; 278 int32_t *upsBypassPower; 279 void *_clientData; /* pointer to client data structure */ 280 struct upsBypassEntry *_nextPtr; /* pointer to next table entry */ 281 282 /* private space to hold actual values */ 283 284 int32_t __upsBypassLineIndex; 285 int32_t __upsBypassVoltage; 286 int32_t __upsBypassCurrent; 287 int32_t __upsBypassPower; 288 } upsBypassEntry_t; 289 290 /* 291 * C manager interface stubs for UPS-MIB::upsBypassEntry. 292 */ 293 294 extern int 295 ups_mib_mgr_get_upsBypassEntry(struct snmp_session *s, upsBypassEntry_t **upsBypassEntry); 296 297 /* 298 * C agent interface stubs for UPS-MIB::upsBypassEntry. 299 */ 300 301 extern int 302 ups_mib_agt_read_upsBypassEntry(upsBypassEntry_t *upsBypassEntry); 303 extern int 304 ups_mib_agt_register_upsBypassEntry(); 305 306 /* 307 * C type definitions for UPS-MIB::upsAlarm. 308 */ 309 310 typedef struct upsAlarm { 311 uint32_t *upsAlarmsPresent; 312 void *_clientData; /* pointer to client data structure */ 313 314 /* private space to hold actual values */ 315 316 uint32_t __upsAlarmsPresent; 317 } upsAlarm_t; 318 319 /* 320 * C manager interface stubs for UPS-MIB::upsAlarm. 321 */ 322 323 extern int 324 ups_mib_mgr_get_upsAlarm(struct snmp_session *s, upsAlarm_t **upsAlarm); 325 326 /* 327 * C agent interface stubs for UPS-MIB::upsAlarm. 328 */ 329 330 extern int 331 ups_mib_agt_read_upsAlarm(upsAlarm_t *upsAlarm); 332 extern int 333 ups_mib_agt_register_upsAlarm(); 334 335 /* 336 * C type definitions for UPS-MIB::upsAlarmEntry. 337 */ 338 339 typedef struct upsAlarmEntry { 340 int32_t *upsAlarmId; 341 uint32_t *upsAlarmDescr; 342 size_t _upsAlarmDescrLength; 343 uint32_t *upsAlarmTime; 344 void *_clientData; /* pointer to client data structure */ 345 struct upsAlarmEntry *_nextPtr; /* pointer to next table entry */ 346 347 /* private space to hold actual values */ 348 349 int32_t __upsAlarmId; 350 uint32_t __upsAlarmDescr[128]; 351 uint32_t __upsAlarmTime; 352 } upsAlarmEntry_t; 353 354 /* 355 * C manager interface stubs for UPS-MIB::upsAlarmEntry. 356 */ 357 358 extern int 359 ups_mib_mgr_get_upsAlarmEntry(struct snmp_session *s, upsAlarmEntry_t **upsAlarmEntry); 360 361 /* 362 * C agent interface stubs for UPS-MIB::upsAlarmEntry. 363 */ 364 365 extern int 366 ups_mib_agt_read_upsAlarmEntry(upsAlarmEntry_t *upsAlarmEntry); 367 extern int 368 ups_mib_agt_register_upsAlarmEntry(); 369 370 /* 371 * C type definitions for UPS-MIB::upsTest. 372 */ 373 374 typedef struct upsTest { 375 uint32_t *upsTestId; 376 size_t _upsTestIdLength; 377 int32_t *upsTestSpinLock; 378 int32_t *upsTestResultsSummary; 379 u_char *upsTestResultsDetail; 380 size_t _upsTestResultsDetailLength; 381 uint32_t *upsTestStartTime; 382 int32_t *upsTestElapsedTime; 383 void *_clientData; /* pointer to client data structure */ 384 385 /* private space to hold actual values */ 386 387 uint32_t __upsTestId[128]; 388 int32_t __upsTestSpinLock; 389 int32_t __upsTestResultsSummary; 390 u_char __upsTestResultsDetail[255]; 391 uint32_t __upsTestStartTime; 392 int32_t __upsTestElapsedTime; 393 } upsTest_t; 394 395 /* 396 * C manager interface stubs for UPS-MIB::upsTest. 397 */ 398 399 extern int 400 ups_mib_mgr_get_upsTest(struct snmp_session *s, upsTest_t **upsTest); 401 402 /* 403 * C agent interface stubs for UPS-MIB::upsTest. 404 */ 405 406 extern int 407 ups_mib_agt_read_upsTest(upsTest_t *upsTest); 408 extern int 409 ups_mib_agt_register_upsTest(); 410 411 /* 412 * C type definitions for UPS-MIB::upsControl. 413 */ 414 415 typedef struct upsControl { 416 int32_t *upsShutdownType; 417 int32_t *upsShutdownAfterDelay; 418 int32_t *upsStartupAfterDelay; 419 int32_t *upsRebootWithDuration; 420 int32_t *upsAutoRestart; 421 void *_clientData; /* pointer to client data structure */ 422 423 /* private space to hold actual values */ 424 425 int32_t __upsShutdownType; 426 int32_t __upsShutdownAfterDelay; 427 int32_t __upsStartupAfterDelay; 428 int32_t __upsRebootWithDuration; 429 int32_t __upsAutoRestart; 430 } upsControl_t; 431 432 /* 433 * C manager interface stubs for UPS-MIB::upsControl. 434 */ 435 436 extern int 437 ups_mib_mgr_get_upsControl(struct snmp_session *s, upsControl_t **upsControl); 438 439 /* 440 * C agent interface stubs for UPS-MIB::upsControl. 441 */ 442 443 extern int 444 ups_mib_agt_read_upsControl(upsControl_t *upsControl); 445 extern int 446 ups_mib_agt_register_upsControl(); 447 448 /* 449 * C type definitions for UPS-MIB::upsConfig. 450 */ 451 452 typedef struct upsConfig { 453 int32_t *upsConfigInputVoltage; 454 int32_t *upsConfigInputFreq; 455 int32_t *upsConfigOutputVoltage; 456 int32_t *upsConfigOutputFreq; 457 int32_t *upsConfigOutputVA; 458 int32_t *upsConfigOutputPower; 459 int32_t *upsConfigLowBattTime; 460 int32_t *upsConfigAudibleStatus; 461 int32_t *upsConfigLowVoltageTransferPoint; 462 int32_t *upsConfigHighVoltageTransferPoint; 463 void *_clientData; /* pointer to client data structure */ 464 465 /* private space to hold actual values */ 466 467 int32_t __upsConfigInputVoltage; 468 int32_t __upsConfigInputFreq; 469 int32_t __upsConfigOutputVoltage; 470 int32_t __upsConfigOutputFreq; 471 int32_t __upsConfigOutputVA; 472 int32_t __upsConfigOutputPower; 473 int32_t __upsConfigLowBattTime; 474 int32_t __upsConfigAudibleStatus; 475 int32_t __upsConfigLowVoltageTransferPoint; 476 int32_t __upsConfigHighVoltageTransferPoint; 477 } upsConfig_t; 478 479 /* 480 * C manager interface stubs for UPS-MIB::upsConfig. 481 */ 482 483 extern int 484 ups_mib_mgr_get_upsConfig(struct snmp_session *s, upsConfig_t **upsConfig); 485 486 /* 487 * C agent interface stubs for UPS-MIB::upsConfig. 488 */ 489 490 extern int 491 ups_mib_agt_read_upsConfig(upsConfig_t *upsConfig); 492 extern int 493 ups_mib_agt_register_upsConfig(); 494 495 496 typedef struct ups_mib { 497 upsIdent_t *upsIdent; 498 upsBattery_t *upsBattery; 499 upsInput_t *upsInput; 500 upsInputEntry_t *upsInputEntry; 501 upsOutput_t *upsOutput; 502 upsOutputEntry_t *upsOutputEntry; 503 upsBypass_t *upsBypass; 504 upsBypassEntry_t *upsBypassEntry; 505 upsAlarm_t *upsAlarm; 506 upsAlarmEntry_t *upsAlarmEntry; 507 upsTest_t *upsTest; 508 upsControl_t *upsControl; 509 upsConfig_t *upsConfig; 510 } ups_mib_t; 511 512 /* 513 * Initialization function: 514 */ 515 516 void ups_mib_agt_init(void); 517 518 #endif /* _UPS_MIB_H_ */ 519