snmpwalk

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Remo Rickli

    snmpwalk

    I couldn't find in depth info anywhere else so...

    I use PHP to query switches and routers in my network management
    software (http://nedi.web.psi.ch).

    PHP assign it's own indexes on a snmpwalk:

    $ifip = snmpwalk("$_GET[ip]","$comm","1.3. 6.1.2.1.4.20.1. 1");

    so $ifip[0] would be the first interface, but on the real device the
    index starts with 1!
    Using snmprealwalk("$ _GET[ip]","$comm","1.3. 6.1.2.1.4.20.1. 1"); does
    basically what I want, but adds "IF-MIB::ifIndex.". Since it's not even
    numerical (like 1.3.6.1.2.1), I never know how much I'd have to substr etc.

    Is there a way around this? Could an option be implemented to use real
    indexes directly?

    Hope this makes sense somehow...
    -Remo
Working...