IF-MIB rewrite

From Net-SNMP Wiki
Revision as of 20:30, 11 July 2006 by Tanders (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Starting with net-snmp 5.2 there's a new IF-MIB implementation that covers much more MIB object (e.g. 64-bit ifHC* counters) than the old instrumentation. This IF-MIB rewrite has initially been provided for Linux only, but can easily be ported to other platforms.

Porting Status

net-snmp 5.2.x (configure --enable-mfd-rewrites) and 5.3.x (by default) support the new IF-MIB implementation for Linux only. net-snmp 5.4.x will also have support for OpenBSD. There's also a patch for FreeBSD waiting to be applied (testers welcome).

Porting HOWTO

Here's what needs to be done to port the IF-MIB rewrite to a new platform. We're looking for Volunteers!

There's really only one pair of files that need to be coded:

 agent/mibgroup/if-mib/data_access/interface_XXXX.[ch]

It should contain the following routines:

 netsnmp_arch_interface_init
 netsnmp_arch_interface_index_find
 netsnmp_arch_interface_container_load

See the routines for Linux for an example.

To see how the old implementation retrieved the relevant data from kernel, refer to

 agent/mibgroup/mibII/interfaces.c

and related files.

Discussion

If you're interested, please get in touch with us on the lists and/or IRC.