Hello all,

In getName(int index) (mibgroup/tunnel.c) there are two ways to
get the interface name.  Here are excerpts:

The first way:

#ifndef USING_IF_MIB_IFTABLE_IFTABLE_MODULE

oid     name[MAX_OID_LEN] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 2 };
size_t  length = 10;
struct  variable ifName_variable =
        { 2, ASN_INTEGER, RONLY, var_ifEntry, 10,
        {1, 3, 6, 1, 2, 1, 2, 2, 1, 2}};

p = var_ifEntry(&ifName_variable,
                name, &length,
                1 /* exact */ , 
                &var_len, &write_method);

Or there is also:

netsnmp_access_interface_name_find(index);

My puzzling revolves around:

Why would there be two ways of getting the interface name ?  What
was the problem behind this that needed to be solved by two
different approaches ?  Does this mean that one method could fail
while the other would succeed in some conditions ?

Any insight on this would be greatly appreciated as I'm having a
problem getting a WAN interface name - the ppp name over the T1
connection - using netsnmp_access_interface_name_find(index) for
trap generation with an index returned by Netlink in the
following scenario: 

The trap generation is based on Netlink events. When the WAN
cable is unplugged, one trap has index 14 with the WAN interface
name, then the subsequent trap has index 15 with still the WAN
interface name and not the ppp link name. I'm trying to see if
that problem is related to the WAN driver or to net-snmp itself.

When the connection is up and running a SNMP walk would return
the right names:

 IF-MIB::ifName.14 = STRING: w2c1
 IF-MIB::ifName.15 = STRING: w2c1ppp

Thanks for any suggestions/ideas/hints.





------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to