1 /* -- DO NOT EDIT -- 2 * Generated by smidump version 0.4.3-pre1: 3 * smidump -f scli IF-MIB 4 * 5 * Derived from IF-MIB: 6 * The MIB module to describe generic objects for network 7 * interface sub-layers. This MIB is an updated version of 8 * MIB-II's ifTable, and incorporates the extensions defined in 9 * RFC 1229. 10 * 11 * Revision 2000-06-14 00:00: 12 * Clarifications agreed upon by the Interfaces MIB WG, and 13 * published as RFC 2863. 14 * 15 * Revision 1996-02-28 21:55: 16 * Revisions made by the Interfaces MIB WG, and published in 17 * RFC 2233. 18 * 19 * Revision 1993-11-08 21:55: 20 * Initial revision, published as part of RFC 1573. 21 * 22 * $Id: if-mib.h 744 2004-10-15 15:17:20Z schoenw $ 23 */ 24 25 #ifndef _IF_MIB_H_ 26 #define _IF_MIB_H_ 27 28 #include "gsnmp.h" 29 30 G_BEGIN_DECLS 31 32 /* 33 * Tables to map enumerations to strings and vice versa. 34 */ 35 36 #define IF_MIB_IFADMINSTATUS_UP 1 37 #define IF_MIB_IFADMINSTATUS_DOWN 2 38 #define IF_MIB_IFADMINSTATUS_TESTING 3 39 40 extern GNetSnmpEnum const if_mib_enums_ifAdminStatus[]; 41 42 #define IF_MIB_IFOPERSTATUS_UP 1 43 #define IF_MIB_IFOPERSTATUS_DOWN 2 44 #define IF_MIB_IFOPERSTATUS_TESTING 3 45 #define IF_MIB_IFOPERSTATUS_UNKNOWN 4 46 #define IF_MIB_IFOPERSTATUS_DORMANT 5 47 #define IF_MIB_IFOPERSTATUS_NOTPRESENT 6 48 #define IF_MIB_IFOPERSTATUS_LOWERLAYERDOWN 7 49 50 extern GNetSnmpEnum const if_mib_enums_ifOperStatus[]; 51 52 #define IF_MIB_IFLINKUPDOWNTRAPENABLE_ENABLED 1 53 #define IF_MIB_IFLINKUPDOWNTRAPENABLE_DISABLED 2 54 55 extern GNetSnmpEnum const if_mib_enums_ifLinkUpDownTrapEnable[]; 56 57 #define IF_MIB_IFTESTSTATUS_NOTINUSE 1 58 #define IF_MIB_IFTESTSTATUS_INUSE 2 59 60 extern GNetSnmpEnum const if_mib_enums_ifTestStatus[]; 61 62 #define IF_MIB_IFTESTRESULT_NONE 1 63 #define IF_MIB_IFTESTRESULT_SUCCESS 2 64 #define IF_MIB_IFTESTRESULT_INPROGRESS 3 65 #define IF_MIB_IFTESTRESULT_NOTSUPPORTED 4 66 #define IF_MIB_IFTESTRESULT_UNABLETORUN 5 67 #define IF_MIB_IFTESTRESULT_ABORTED 6 68 #define IF_MIB_IFTESTRESULT_FAILED 7 69 70 extern GNetSnmpEnum const if_mib_enums_ifTestResult[]; 71 72 #define IF_MIB_IFRCVADDRESSTYPE_OTHER 1 73 #define IF_MIB_IFRCVADDRESSTYPE_VOLATILE 2 74 #define IF_MIB_IFRCVADDRESSTYPE_NONVOLATILE 3 75 76 extern GNetSnmpEnum const if_mib_enums_ifRcvAddressType[]; 77 78 79 /* 80 * C type definitions for IF-MIB::interfaces. 81 */ 82 83 #define IF_MIB_IFNUMBER (1 << 0) 84 85 typedef struct { 86 gint32 *ifNumber; /* ro Integer32 */ 87 } if_mib_interfaces_t; 88 89 extern if_mib_interfaces_t * 90 if_mib_new_interfaces(void); 91 92 extern void 93 if_mib_get_interfaces(GNetSnmp *s, if_mib_interfaces_t **interfaces, gint64 mask); 94 95 extern void 96 if_mib_free_interfaces(if_mib_interfaces_t *interfaces); 97 98 /* 99 * C type definitions for IF-MIB::ifEntry. 100 */ 101 102 #define IF_MIB_IFINDEX (1 << 0) 103 #define IF_MIB_IFDESCR (1 << 1) 104 #define IF_MIB_IFTYPE (1 << 2) 105 #define IF_MIB_IFMTU (1 << 3) 106 #define IF_MIB_IFSPEED (1 << 4) 107 #define IF_MIB_IFPHYSADDRESS (1 << 5) 108 #define IF_MIB_IFADMINSTATUS (1 << 6) 109 #define IF_MIB_IFOPERSTATUS (1 << 7) 110 #define IF_MIB_IFLASTCHANGE (1 << 8) 111 #define IF_MIB_IFINOCTETS (1 << 9) 112 #define IF_MIB_IFINUCASTPKTS (1 << 10) 113 #define IF_MIB_IFINNUCASTPKTS (1 << 11) 114 #define IF_MIB_IFINDISCARDS (1 << 12) 115 #define IF_MIB_IFINERRORS (1 << 13) 116 #define IF_MIB_IFINUNKNOWNPROTOS (1 << 14) 117 #define IF_MIB_IFOUTOCTETS (1 << 15) 118 #define IF_MIB_IFOUTUCASTPKTS (1 << 16) 119 #define IF_MIB_IFOUTNUCASTPKTS (1 << 17) 120 #define IF_MIB_IFOUTDISCARDS (1 << 18) 121 #define IF_MIB_IFOUTERRORS (1 << 19) 122 #define IF_MIB_IFOUTQLEN (1 << 20) 123 #define IF_MIB_IFSPECIFIC (1 << 21) 124 125 typedef struct { 126 gint32 ifIndex; /* ro IF-MIB::InterfaceIndex */ 127 guchar *ifDescr; /* ro */ 128 #define IF_MIB_IFDESCRMINLENGTH 0 129 #define IF_MIB_IFDESCRMAXLENGTH 255 130 guint16 _ifDescrLength; 131 gint32 *ifType; /* ro IANAifType-MIB::IANAifType */ 132 gint32 *ifMtu; /* ro Integer32 */ 133 guint32 *ifSpeed; /* ro SNMPv2-SMI::Gauge32 */ 134 guchar *ifPhysAddress; /* ro SNMPv2-TC::PhysAddress */ 135 #define IF_MIB_IFPHYSADDRESSMINLENGTH 0 136 #define IF_MIB_IFPHYSADDRESSMAXLENGTH 65535 137 guint16 _ifPhysAddressLength; 138 gint32 *ifAdminStatus; /* rw */ 139 gint32 *ifOperStatus; /* ro */ 140 guint32 *ifLastChange; /* ro SNMPv2-SMI::TimeTicks */ 141 guint32 *ifInOctets; /* ro SNMPv2-SMI::Counter32 */ 142 guint32 *ifInUcastPkts; /* ro SNMPv2-SMI::Counter32 */ 143 guint32 *ifInNUcastPkts; /* ro SNMPv2-SMI::Counter32 */ 144 guint32 *ifInDiscards; /* ro SNMPv2-SMI::Counter32 */ 145 guint32 *ifInErrors; /* ro SNMPv2-SMI::Counter32 */ 146 guint32 *ifInUnknownProtos; /* ro SNMPv2-SMI::Counter32 */ 147 guint32 *ifOutOctets; /* ro SNMPv2-SMI::Counter32 */ 148 guint32 *ifOutUcastPkts; /* ro SNMPv2-SMI::Counter32 */ 149 guint32 *ifOutNUcastPkts; /* ro SNMPv2-SMI::Counter32 */ 150 guint32 *ifOutDiscards; /* ro SNMPv2-SMI::Counter32 */ 151 guint32 *ifOutErrors; /* ro SNMPv2-SMI::Counter32 */ 152 guint32 *ifOutQLen; /* ro SNMPv2-SMI::Gauge32 */ 153 guint32 *ifSpecific; /* ro ObjectIdentifier */ 154 #define IF_MIB_IFSPECIFICMINLENGTH 0 155 #define IF_MIB_IFSPECIFICMAXLENGTH 128 156 guint16 _ifSpecificLength; 157 } if_mib_ifEntry_t; 158 159 extern void 160 if_mib_get_ifTable(GNetSnmp *s, if_mib_ifEntry_t ***ifEntry, gint64 mask); 161 162 extern void 163 if_mib_free_ifTable(if_mib_ifEntry_t **ifEntry); 164 165 extern if_mib_ifEntry_t * 166 if_mib_new_ifEntry(void); 167 168 extern void 169 if_mib_get_ifEntry(GNetSnmp *s, if_mib_ifEntry_t **ifEntry, gint32 ifIndex, gint64 mask); 170 171 extern void 172 if_mib_set_ifEntry(GNetSnmp *s, if_mib_ifEntry_t *ifEntry, gint64 mask); 173 174 extern void 175 if_mib_free_ifEntry(if_mib_ifEntry_t *ifEntry); 176 177 /* 178 * C type definitions for IF-MIB::ifMIBObjects. 179 */ 180 181 #define IF_MIB_IFTABLELASTCHANGE (1 << 0) 182 #define IF_MIB_IFSTACKLASTCHANGE (1 << 1) 183 184 typedef struct { 185 guint32 *ifTableLastChange; /* ro SNMPv2-SMI::TimeTicks */ 186 guint32 *ifStackLastChange; /* ro SNMPv2-SMI::TimeTicks */ 187 } if_mib_ifMIBObjects_t; 188 189 extern if_mib_ifMIBObjects_t * 190 if_mib_new_ifMIBObjects(void); 191 192 extern void 193 if_mib_get_ifMIBObjects(GNetSnmp *s, if_mib_ifMIBObjects_t **ifMIBObjects, gint64 mask); 194 195 extern void 196 if_mib_free_ifMIBObjects(if_mib_ifMIBObjects_t *ifMIBObjects); 197 198 /* 199 * C type definitions for IF-MIB::ifXEntry. 200 */ 201 202 #define IF_MIB_IFNAME (1 << 0) 203 #define IF_MIB_IFINMULTICASTPKTS (1 << 1) 204 #define IF_MIB_IFINBROADCASTPKTS (1 << 2) 205 #define IF_MIB_IFOUTMULTICASTPKTS (1 << 3) 206 #define IF_MIB_IFOUTBROADCASTPKTS (1 << 4) 207 #define IF_MIB_IFHCINOCTETS (1 << 5) 208 #define IF_MIB_IFHCINUCASTPKTS (1 << 6) 209 #define IF_MIB_IFHCINMULTICASTPKTS (1 << 7) 210 #define IF_MIB_IFHCINBROADCASTPKTS (1 << 8) 211 #define IF_MIB_IFHCOUTOCTETS (1 << 9) 212 #define IF_MIB_IFHCOUTUCASTPKTS (1 << 10) 213 #define IF_MIB_IFHCOUTMULTICASTPKTS (1 << 11) 214 #define IF_MIB_IFHCOUTBROADCASTPKTS (1 << 12) 215 #define IF_MIB_IFLINKUPDOWNTRAPENABLE (1 << 13) 216 #define IF_MIB_IFHIGHSPEED (1 << 14) 217 #define IF_MIB_IFPROMISCUOUSMODE (1 << 15) 218 #define IF_MIB_IFCONNECTORPRESENT (1 << 16) 219 #define IF_MIB_IFALIAS (1 << 17) 220 #define IF_MIB_IFCOUNTERDISCONTINUITYTIME (1 << 18) 221 222 typedef struct { 223 gint32 ifIndex; /* ro IF-MIB::InterfaceIndex */ 224 guchar *ifName; /* ro SNMPv2-TC::DisplayString */ 225 #define IF_MIB_IFNAMEMINLENGTH 0 226 #define IF_MIB_IFNAMEMAXLENGTH 255 227 guint16 _ifNameLength; 228 guint32 *ifInMulticastPkts; /* ro SNMPv2-SMI::Counter32 */ 229 guint32 *ifInBroadcastPkts; /* ro SNMPv2-SMI::Counter32 */ 230 guint32 *ifOutMulticastPkts; /* ro SNMPv2-SMI::Counter32 */ 231 guint32 *ifOutBroadcastPkts; /* ro SNMPv2-SMI::Counter32 */ 232 guint64 *ifHCInOctets; /* ro SNMPv2-SMI::Counter64 */ 233 guint64 *ifHCInUcastPkts; /* ro SNMPv2-SMI::Counter64 */ 234 guint64 *ifHCInMulticastPkts; /* ro SNMPv2-SMI::Counter64 */ 235 guint64 *ifHCInBroadcastPkts; /* ro SNMPv2-SMI::Counter64 */ 236 guint64 *ifHCOutOctets; /* ro SNMPv2-SMI::Counter64 */ 237 guint64 *ifHCOutUcastPkts; /* ro SNMPv2-SMI::Counter64 */ 238 guint64 *ifHCOutMulticastPkts; /* ro SNMPv2-SMI::Counter64 */ 239 guint64 *ifHCOutBroadcastPkts; /* ro SNMPv2-SMI::Counter64 */ 240 gint32 *ifLinkUpDownTrapEnable; /* rw */ 241 guint32 *ifHighSpeed; /* ro SNMPv2-SMI::Gauge32 */ 242 gint32 *ifPromiscuousMode; /* rw SNMPv2-TC::TruthValue */ 243 gint32 *ifConnectorPresent; /* ro SNMPv2-TC::TruthValue */ 244 guchar *ifAlias; /* rw */ 245 #define IF_MIB_IFALIASMINLENGTH 0 246 #define IF_MIB_IFALIASMAXLENGTH 64 247 guint16 _ifAliasLength; 248 guint32 *ifCounterDiscontinuityTime; /* ro SNMPv2-TC::TimeStamp */ 249 } if_mib_ifXEntry_t; 250 251 extern void 252 if_mib_get_ifXTable(GNetSnmp *s, if_mib_ifXEntry_t ***ifXEntry, gint64 mask); 253 254 extern void 255 if_mib_free_ifXTable(if_mib_ifXEntry_t **ifXEntry); 256 257 extern if_mib_ifXEntry_t * 258 if_mib_new_ifXEntry(void); 259 260 extern void 261 if_mib_get_ifXEntry(GNetSnmp *s, if_mib_ifXEntry_t **ifXEntry, gint32 ifIndex, gint64 mask); 262 263 extern void 264 if_mib_set_ifXEntry(GNetSnmp *s, if_mib_ifXEntry_t *ifXEntry, gint64 mask); 265 266 extern void 267 if_mib_free_ifXEntry(if_mib_ifXEntry_t *ifXEntry); 268 269 /* 270 * C type definitions for IF-MIB::ifStackEntry. 271 */ 272 273 #define IF_MIB_IFSTACKSTATUS (1 << 0) 274 275 typedef struct { 276 gint32 ifStackHigherLayer; /* na IF-MIB::InterfaceIndexOrZero */ 277 gint32 ifStackLowerLayer; /* na IF-MIB::InterfaceIndexOrZero */ 278 gint32 *ifStackStatus; /* rw SNMPv2-TC::RowStatus */ 279 } if_mib_ifStackEntry_t; 280 281 extern void 282 if_mib_get_ifStackTable(GNetSnmp *s, if_mib_ifStackEntry_t ***ifStackEntry, gint64 mask); 283 284 extern void 285 if_mib_free_ifStackTable(if_mib_ifStackEntry_t **ifStackEntry); 286 287 extern if_mib_ifStackEntry_t * 288 if_mib_new_ifStackEntry(void); 289 290 extern void 291 if_mib_get_ifStackEntry(GNetSnmp *s, if_mib_ifStackEntry_t **ifStackEntry, gint32 ifStackHigherLayer, gint32 ifStackLowerLayer, gint64 mask); 292 293 extern void 294 if_mib_set_ifStackEntry(GNetSnmp *s, if_mib_ifStackEntry_t *ifStackEntry, gint64 mask); 295 296 extern void 297 if_mib_free_ifStackEntry(if_mib_ifStackEntry_t *ifStackEntry); 298 299 /* 300 * C type definitions for IF-MIB::ifTestEntry. 301 */ 302 303 #define IF_MIB_IFTESTID (1 << 0) 304 #define IF_MIB_IFTESTSTATUS (1 << 1) 305 #define IF_MIB_IFTESTTYPE (1 << 2) 306 #define IF_MIB_IFTESTRESULT (1 << 3) 307 #define IF_MIB_IFTESTCODE (1 << 4) 308 #define IF_MIB_IFTESTOWNER (1 << 5) 309 310 typedef struct { 311 gint32 ifIndex; /* ro IF-MIB::InterfaceIndex */ 312 gint32 *ifTestId; /* rw SNMPv2-TC::TestAndIncr */ 313 gint32 *ifTestStatus; /* rw */ 314 guint32 *ifTestType; /* rw SNMPv2-TC::AutonomousType */ 315 #define IF_MIB_IFTESTTYPEMINLENGTH 0 316 #define IF_MIB_IFTESTTYPEMAXLENGTH 128 317 guint16 _ifTestTypeLength; 318 gint32 *ifTestResult; /* ro */ 319 guint32 *ifTestCode; /* ro ObjectIdentifier */ 320 #define IF_MIB_IFTESTCODEMINLENGTH 0 321 #define IF_MIB_IFTESTCODEMAXLENGTH 128 322 guint16 _ifTestCodeLength; 323 guchar *ifTestOwner; /* rw IF-MIB::OwnerString */ 324 #define IF_MIB_IFTESTOWNERMINLENGTH 0 325 #define IF_MIB_IFTESTOWNERMAXLENGTH 255 326 guint16 _ifTestOwnerLength; 327 } if_mib_ifTestEntry_t; 328 329 extern void 330 if_mib_get_ifTestTable(GNetSnmp *s, if_mib_ifTestEntry_t ***ifTestEntry, gint64 mask); 331 332 extern void 333 if_mib_free_ifTestTable(if_mib_ifTestEntry_t **ifTestEntry); 334 335 extern if_mib_ifTestEntry_t * 336 if_mib_new_ifTestEntry(void); 337 338 extern void 339 if_mib_get_ifTestEntry(GNetSnmp *s, if_mib_ifTestEntry_t **ifTestEntry, gint32 ifIndex, gint64 mask); 340 341 extern void 342 if_mib_set_ifTestEntry(GNetSnmp *s, if_mib_ifTestEntry_t *ifTestEntry, gint64 mask); 343 344 extern void 345 if_mib_free_ifTestEntry(if_mib_ifTestEntry_t *ifTestEntry); 346 347 /* 348 * C type definitions for IF-MIB::ifRcvAddressEntry. 349 */ 350 351 #define IF_MIB_IFRCVADDRESSSTATUS (1 << 0) 352 #define IF_MIB_IFRCVADDRESSTYPE (1 << 1) 353 354 typedef struct { 355 gint32 ifIndex; /* ro IF-MIB::InterfaceIndex */ 356 guchar ifRcvAddressAddress[117]; /* na SNMPv2-TC::PhysAddress */ 357 #define IF_MIB_IFRCVADDRESSADDRESSMINLENGTH 0 358 #define IF_MIB_IFRCVADDRESSADDRESSMAXLENGTH 117 359 guint16 _ifRcvAddressAddressLength; 360 gint32 *ifRcvAddressStatus; /* rw SNMPv2-TC::RowStatus */ 361 gint32 *ifRcvAddressType; /* rw */ 362 } if_mib_ifRcvAddressEntry_t; 363 364 extern void 365 if_mib_get_ifRcvAddressTable(GNetSnmp *s, if_mib_ifRcvAddressEntry_t ***ifRcvAddressEntry, gint64 mask); 366 367 extern void 368 if_mib_free_ifRcvAddressTable(if_mib_ifRcvAddressEntry_t **ifRcvAddressEntry); 369 370 extern if_mib_ifRcvAddressEntry_t * 371 if_mib_new_ifRcvAddressEntry(void); 372 373 extern void 374 if_mib_get_ifRcvAddressEntry(GNetSnmp *s, if_mib_ifRcvAddressEntry_t **ifRcvAddressEntry, gint32 ifIndex, guchar *ifRcvAddressAddress, guint16 _ifRcvAddressAddressLength, gint64 mask); 375 376 extern void 377 if_mib_set_ifRcvAddressEntry(GNetSnmp *s, if_mib_ifRcvAddressEntry_t *ifRcvAddressEntry, gint64 mask); 378 379 extern void 380 if_mib_free_ifRcvAddressEntry(if_mib_ifRcvAddressEntry_t *ifRcvAddressEntry); 381 382 383 G_END_DECLS 384 385 #endif /* _IF_MIB_H_ */ 386