Hi Dave,
Is there an api (function call) in net-snmp to do that? If not, is mib2c
compiler source code available anywhere? After the mib file loaded by
net-snmp, I want to register individual mib node and its corresponding
handler function using its node name instead of oid (if I don't run mib2c
first), is it possible to do that directly and is there an existing api to
do that? If not, if there is an api that can return oid based on the node
name, from where I can still register the handler function at the end in
two steps. Again, all of this is for the purpose of avoiding using mib2c.
Thanks.
--
Shawn He
Online Technology
Office:858-824-5969 Fax: 858-824-5878
AIM: CivRealtor
"Dave Shield" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
10/30/2007 02:15 AM
To
Shawn He/SDPD/[EMAIL PROTECTED]
cc
net-snmp-users@lists.sourceforge.net
Subject
Re: Is it possible to retrieve oid from mib node name
On 30/10/2007, <[EMAIL PROTECTED]> wrote:
> Suppose mib node names in a subtree are all unique,
The node names within a single MIB module must be unique.
As must all node names within "official" IETF MIBs.
It's not strictly necessary for node names in private MIBs to
be globally unique, but it's relatively uncommon for the same
name to appear in two different MIBs.
> is it possible to retrieve an oid using a node name?
It is definitely possible to retrieve an OID using the syntax
MIB-NAME::mibNode
It is *usually* possible to retrieve an OID using the bare node name
(with a small risk of getting the wrong node, if there happen to be
two different versions in the list of loaded MIBs).
> Is there a way to do that in net-snmp?
Yes - the standard lookup routines will handle this quite happily.
The MIB::node syntax is handled automatically, the bare node
name might work straight off, or you may need to explicitly enable
it using the '-IR' command-line option (or equivalent)
Suck it and see.
Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users