>
> TG> Is there a reason the cache is not invalidated before calling 
> TG> _cache_load()?
>
> Yes.. the old entries are needed to
>
> a) implement 64 bit counters (esp on 32 bit systems)
> b) notice when interfaces appear and disappear
>
> If you look at the code, it wouldn't be too to add code to remove interfaces
> that go down, bit it should be configurable and default to off. People who
> have vlans that periodically go up and down should have the option of keeping
> the running counters.

Currently, the code displays the interfaces regardless of the interface 
status (up/down).


For example:

Notice that eth0, eth1 or eth0.100 are in DOWN state here, but still are 
displayed by snmpwalk.

      root:~# ip link show
      1: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc 
pfifo_fast vrf global qlen 1000
         link/ether 00:15:17:20:d9:ad brd ff:ff:ff:ff:ff:ff
      2: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast vrf 
global qlen 1000
         link/ether 00:04:23:bd:7a:8a brd ff:ff:ff:ff:ff:ff
      3: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue vrf global
         link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      38: eth0....@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop vrf 
global
          link/ether 00:15:17:20:d9:ad brd ff:ff:ff:ff:ff:ff


      root:~# snmpwalk localhost ifName
      IF-MIB::ifName.1 = STRING: eth0
      IF-MIB::ifName.2 = STRING: eth1
      IF-MIB::ifName.3 = STRING: lo
      IF-MIB::ifName.38 = STRING: eth0.100


I remove the eth0.100 interface here:

      root:~#  vconfig rem eth0.100
      Removed VLAN -:eth0.100:-


The interface list looks like:

      root:~# ip link show
      1: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc 
pfifo_fast vrf global qlen 1000
         link/ether 00:15:17:20:d9:ad brd ff:ff:ff:ff:ff:ff
      2: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast vrf 
global qlen 1000
         link/ether 00:04:23:bd:7a:8a brd ff:ff:ff:ff:ff:ff
      3: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue vrf global
         link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00


snmpwalk still shows the interface eth0.100:

      root:~# snmpwalk localhost ifName
      IF-MIB::ifName.1 = STRING: eth0
      IF-MIB::ifName.2 = STRING: eth1
      IF-MIB::ifName.3 = STRING: lo
      IF-MIB::ifName.38 = STRING: eth0.100                 <-----



I notice the 'known_missing' flag, that seems to be set for the VLAN 
interface that is removed.  This flag is not _used_ anywhere in the 
code.  A possibility is not report the interface entry when this flag is 
set, when responding to GET requests.


Suggestions/critique appreciated.


Many thanks,

- Tushar



------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to