This is a first degree walk and it will throw an exception if there is more that one degree of values.
I.e. the following query with sample results:
walk1d( '.1.0.8802.1.1.2.1.3.7.1.4' )
.1.0.8802.1.1.2.1.3.7.1.4.1 = STRING: "GigabitEthernet1/0/1"
.1.0.8802.1.1.2.1.3.7.1.4.2 = STRING: "GigabitEthernet1/0/2"
.1.0.8802.1.1.2.1.3.7.1.4.3 = STRING: "GigabitEthernet1/0/3"
.....
would yield an array:
1 => GigabitEthernet1/0/1
2 => GigabitEthernet1/0/2
3 => GigabitEthernet1/0/3
]]>subOidWalk( '.1.3.6.1.4.1.9.9.23.1.2.1.1.9', 15 )
.1.3.6.1.4.1.9.9.23.1.2.1.1.9.10101.5 = Hex-STRING: 00 00 00 01
.1.3.6.1.4.1.9.9.23.1.2.1.1.9.10105.2 = Hex-STRING: 00 00 00 01
.1.3.6.1.4.1.9.9.23.1.2.1.1.9.10108.4 = Hex-STRING: 00 00 00 01
would yield an array:
10101 => Hex-STRING: 00 00 00 01
10105 => Hex-STRING: 00 00 00 01
10108 => Hex-STRING: 00 00 00 01
]]>Huh? Just read the code below!
]]>See the examples for more information.
]]>.1.3.6.1.2.1.31.1.1.1.1.10128 = STRING: Gi1/0/28 .1.3.6.1.2.1.31.1.1.1.1.10129 = STRING: Gi1/0/29 ...
[10128] => "Gi1/0/28"
[10129] => "Gi1/0/29"
]]>.1.3.6.1.2.1.2.2.1.2.18.10128 = STRING: Connection to switch2 .1.3.6.1.2.1.2.2.1.2.18.10129 = STRING: Connection to switch3 ...
[10128] => "Connection to switch2"
[10129] => "Connection to switch3"
]]>.1.3.6.1.2.1.31.1.1.1.1.10128 = STRING: GigabitEthernet1/0/28 .1.3.6.1.2.1.31.1.1.1.1.10129 = STRING: GigabitEthernet1/0/29 ...
[10128] => "GigabitEthernet1/0/28"
[10129] => "GigabitEthernet1/0/29"
]]>.1.3.6.1.2.1.2.2.1.5.10128 = Gauge32: 1000000000 .1.3.6.1.2.1.2.2.1.5.10129 = Gauge32: 100000000 ...
[10128] => 1000000000
[10129] => 100000000
NB: operating speed as opposed to maximum speed
]]>.1.3.6.1.2.1.2.2.1.8.10128 = INTEGER: up(1) .1.3.6.1.2.1.2.2.1.8.10129 = INTEGER: down(2) ...
[10128] => 1
[10129] => 2
]]>Array ( [10101] => GigabitEthernet0/1 [10102] => FastEthernet0/2 [10103] => GigabitEthernet1/0/24 [10105] => GigabitEthernet1/0/2 )
meaning, for example, that our local port with ID 10101 is connected to port GigabitEthernet0/1 on the neighbour connected to that local port. You can discover the neighbour ID via neighbourId().
]]>Array ( [cr-sw03.ixdub1.opensolutions.ie] => Array ( [0] => Array ( [localPortId] => 10101 [localPort] => GigabitEthernet1/0/1 [remotePort] => GigabitEthernet0/1 )
[1] => Array
(
[localPortId] => 10102
[localPort] => GigabitEthernet1/0/2
[remotePort] => FastEthernet0/2
)
)
[ ... ]
)
]]>This function will also convert STP port IDs to the device proper port IDs. E.g. sample output:
Array ( [10101] => 3 [10103] => 3 [10105] => 3 [5048] => 2 )
]]>This function will also convert STP port IDs to the device proper port IDs. E.g. sample output:
Array ( [10101] => 3 [10103] => 3 [10105] => 3 [5048] => 2 )
]]>