1 /* 2 * apc-mib.h 3 * 4 * Public header for the APC MIB strategy 5 */ 6 7 /* 8 * Copyright (C) 2010 Adam Kropelin 9 * 10 * This program is free software; you can redistribute it and/or 11 * modify it under the terms of version 2 of the GNU General 12 * Public License as published by the Free Software Foundation. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public 20 * License along with this program; if not, write to the Free 21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 22 * MA 02110-1335, USA. 23 */ 24 25 #ifndef __MIBS_H_ 26 #define __MIBS_H_ 27 28 #include "snmp.h" 29 #include "asn.h" 30 31 // Mapping from CI to SNMP OID and type 32 struct CiOidMap 33 { 34 int ci; // CI 35 int *oid; // SNMP OID 36 Asn::Identifier type; // ASN type for this OID 37 bool dynamic; // True if dynamic parameter, false if static 38 }; 39 40 // Associates a MIB with processing functions for that MIB 41 struct MibStrategy 42 { 43 const char *name; 44 CiOidMap *mib; 45 void (*update_ci_func)(UPSINFO*, int, Snmp::Variable &); 46 int (*killpower_func)(Snmp::SnmpEngine *snmp); 47 int (*shutdown_func)(Snmp::SnmpEngine *snmp); 48 }; 49 50 extern struct MibStrategy *MibStrategies[]; 51 52 #endif 53