Title: Message
Hi I'm an snmp-net newbie.
I have snmp-net working on a Linux Server, that works perfectly.
I need to create some C code to walk some OIDs.
 
Specifically I want to recover the MAC addresses off Cisco 2900 Switches using OIDs:
.1.3.6.1.2.1.17.4.3.1.1 (dot1dTpFdbAddress)
and
.1.3.6.1.2.1.17.4.3.1.2 (dot1dTpFdbPort).
 
The Command line Tools are fine...
Using snmpwalk I can traverse these tables and recover the values.
I cannot do the same with snmpget - presumably because these 'learnt MACs' are dynamic and the snmpget works on exact OIDs, so fails because it lacks
the "instance" of the particular object being requested.
 
Anyway, to create my C code I examined snmpwalk.c, and pinched its
 
while (running) {... 
                       pdu = snmp_pdu_create(SNMP_MSG_GETNEXT);
                 ... }
 
loop and this works, in the respect that it recovers a single oid e.g.
 
SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.57.112.7.243 = INTEGER: 24
 
 and then stops, reporting:
 
"Error: OID not increasing: SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.57.112.7.243".
 
Note. I pinched the Error checking from snmpwalk.c too!
 ;o)
 
My problem is I cannot get it to increment the OID value, so that I can 'walk' through the rest of the table, surely this must be simple, yet I cannot fathom out how!
Many Thanks in anticipation.
 
PS  I couldn't find an answer on your archives after much searching :o(
Regards
 
Greg
 
G. C. McCawley
Senior Analyst/Programmer
Academic and External Client Support Group
Information Services
Staffordshire University
 
Internal Telephone:  3778
External Telephone:  +44 (0)1785 353778
 

The information in this email is confidential and is intended solely for the addressee. Access to this email by anyone else is unauthorised.

If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, except for the purpose of delivery to the addressee, is prohibited and may be unlawful. Kindly notify the sender and delete the message and any attachment from your computer.

Reply via email to