Skip to content
Snippets Groups Projects
  • Adam Wujek's avatar
    lib/snmp: partial implementation of SNMP_GET_NEXT · 186cc157
    Adam Wujek authored
    
    snmp_get_next works only when requesting oid is valid. Otherwise it fails to
    find next entry.
    
    Due to the above the snmpwalk works only when the walk is started from
    the existing oid. Since snmp walk scans only oids in the current branch,
    there was a need to create a special oid .1.3.
    
    $ snmpwalk -On -c public -v 1 192.168.1.20 1.3
    .1.3.6.1.2.1.1.5.0 = STRING: "wrc"
    .1.3.6.1.2.1.25.1.1.0 = Timeticks: (792773) 2:12:07.73
    .1.3.6.1.2.1.25.1.2.0 = Hex-STRING: 07 B2 00 01 05 00 00 00
    .1.3.6.1.4.1.96.100.7.5.1.15.1 = Counter32: 445
    .1.3.6.1.4.1.96.100.7.5.1.16.1 = INTEGER: 10
    .1.3.6.1.4.1.96.100.7.5.1.17.1 = INTEGER: 174810
    .1.3.6.1.4.1.96.100.7.5.1.18.1 = INTEGER: 191115
    .1.3.6.1.4.1.96.100.7.5.1.19.1 = INTEGER: 157655
    Timeout: No Response from 192.168.1.20
    
    NOTE: Timeout message appears becasue there is no responce from node when
    wrong packet is sent.
    
    Signed-off-by: default avatarAdam Wujek <adam.wujek@cern.ch>
    186cc157