Hello Robert,

Thanks for you advice.
I understand table container is the way to add rows to ifTable in the code IF-MIB/data_access/interface_linux.c and interface_common.c. The function to create more rows is netsnmp_access_interface_entry_create(), so I modified it to create row #5 to #8 for example. The first 3 rows are IPv4 interfaces in /proc/net/dev, and the rest of rows are what my switchport subagent want to support.

    IF-MIB::ifDescr.1 = STRING: IPv4 interfaces
    IF-MIB::ifDescr.2 = STRING: IPv4 interfaces
    IF-MIB::ifDescr.3 = STRING: IPv4 interfaces
    IF-MIB::ifDescr.5 = STRING: switch port
    IF-MIB::ifDescr.6 = STRING: switch port
    IF-MIB::ifDescr.7 = STRING: switch port
    IF-MIB::ifDescr.8 = STRING: switch port
My goal is to separate IPv4 interfaces from the switchport interfaces. I use mibII/interfaces.c as master agent, and modify if-mib/ifTable to be my subagent. My goal is to let the master agent support for IPv4 interfaces as in /proc/net/dev, and my subagent only support the other switch ports. It seems to me Net-Snmp only allow to register once for the same ifTable(or OID 1.3.6.1.2.1.2.2), how can I register the other additional rows and exclude IPv4 interfaces in my subagent?
Thanks again for your support.
Emi ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to