Closed devqazi closed 2 years ago
Hi @devqazi - no, the library's session.walk
command doesn't support fetching all OIDs for a null or empty-string OID. Even though the library call is not designed to directly mimic the Net-SNMP functionality, it would be possible to change the library to align with the Net-SNMP command-line snmpwalk behaviour for this case.
However, on thinking about this further, I'm of the opinion to leave the current behaviour as is. The reason being that it is fairly easy to forget to define a variable, and in that case I would rather throw an error than have the calling code mistakenly walk the entire MIB of a device. So I think the current behaviour is safer, and therefore will keep it unchanged.
If you do want to walk the entire MIB, simply call:
session.walk ('1.3.6.1', maxRepetitions, feedCb, doneCb)
I cant thank you enough. Thats exactly what I needed. I thought the library ddint support walking the whole MIB at all
No problems @devqazi !
If we use snampwalk from command line without any oid, it fetches all of the oids. I similar not supported in the
session.walk
method. I tried omitting the first parameter in the method but apparently it didnt work.