Advice/example on how to do snmp walk
Opened this issue · 1 comments
opensourcegeek commented
I'm trying to do a SNMP walk using getnext but I'm not too sure how to make it keep running until it hits end of the sub-tree. Even some pseudo-code will be really helpful.
usbalbin commented
Probably too late to answer now, but what about something along these lines(very pseudo-ish)?
last_oid = tree;
loop {
response = getnext(last_oid);
if last_oid is prefix of tree {
do_stuff_with(response);
last_oid = response.varbinds.last();
} else {
break;
}
}