Hi Dave,

But do the net-snmp agent also keeps the mapping array for its own purpose?

I know some agent keeps an array where it maps all the OID names and the 
associated numeric identifiers.

Likewise do net-snmp maintains any such array of all the registered objects?
For example,

{" 1.3.6.1.2.1.2.1",    "ifNumber"},
{ " 1.3.6.1.2.1.2.2",   "ifTable" },
{" 1.3.6.1.2.1.2.2.1",  "ifEntry"},
{" 1.3.6.1.2.1.2.2.1.1",        "ifIndex"},
{" 1.3.6.1.2.1.2.2.1.2",        "ifDescr"},
....
....
....

Or is there a way to derive this kind of information from the agent?

Thanks,
Siva..

-----Original Message-----
From: dave.shi...@gmail.com [mailto:dave.shi...@gmail.com] On Behalf Of Dave 
Shield
Sent: Tuesday, August 07, 2012 4:56 PM
To: Siva Esana -X (sesana - Tech Mahindra at Cisco)
Cc: net-snmp-coders@lists.sourceforge.net
Subject: Re: OID name to numeric mapping.

On 7 August 2012 12:16, Siva Esana -X (sesana - Tech Mahindra at
Cisco) <ses...@cisco.com> wrote:
> I would like to know whether the net-snmp derives and keeps an array 
> of all the OID names to OID number.
>
> I know a simple walk from the root will give all the OIDs implemented 
> in this agent. But what I am interested is the OID name to numeric 
> identifier mapping.

The mapping between numeric OIDs and MIB object names is handled by the
MIB files loaded by the client.   See the FAQ entry
   "How do I add a MIB to the tools"
for further details.

Note that the information returned by the agent is exactly the same.
regardless of whether or not the relevant MIBs are available to the client.
These MIB files are purely used for how the client application will
*display* the information returned from the agent.

Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to