On 21/04/2008, Paul Pocock <[EMAIL PROTECTED]> wrote:
> I want to use a MIB in my application but don't know how to specify one
> - comparable to the -m argument in snmp v3 calls.
If you are using the 'snmp_parse_args()' API to handle command-line
options, then this will support the '-m' flag automatically.
Otherwise, simply set the environmental variable 'MIBS' within your code:
setenv("MIBS", "My-MIB", 1);
> Can I specify a MIB or can I only use numeric ID's such as:
>
> read_objid(".1.3.6.1.2.1.1.1.0", anOID, &anOID_len);
No - you can definitely use MIB object names.
In fact, if you use something like
read_objid("My-MIB::myObject", anOID, &anOID_len);
then you don't need the 'setenv' call at all.
Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users