IF-MIB rewrite

From Net-SNMP Wiki
Revision as of 10:59, 15 November 2006 by Tanders (Talk | contribs) (Porting Status)

Jump to: navigation, search

Starting with net-snmp 5.2 there's a new IF-MIB implementation that covers much more MIB objects (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, FreeBSD and Solaris (off by default, need to "./configure --enable-mfd-rewrites", also enabled the udp-mib and tcp-mib rewrites for Solaris).

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.