2008/6/23 xiao ren <[EMAIL PROTECTED]>:
> I don't install the MIB files

The MIB files are what defines the conversion between MIB object names
('system')
and numeric OIDs.   If the MIB files aren't available, then the
library won't understand
object names.

> According to the tutorial, it seems to me that this 'asyncapp.c' sample don't 
> need
>any further installation, just 'make and run'.

The application doesn't need anything special.
But it does assume that you've got the Net-SNMP library and accompanying
stuff installed.


> Could you please show me where and how to install this MIB files?

The MIB files would normally be handled as part of installing the basic
Net-SNMP software - either from source ("make install") or as part of
a binary package.



> I replaced the function read_objid() to snmp_parse_oid() and the sample
> application works fine. Is read_objid() updated or something?

Strange - snmp_parse_oid is effectively a wrapper round read_objid.
Both of them rely on having the MIB files available.

Still, if that works for you, then fair enough.

It might be worth trying read_objid with
oids[] = {
 { "SNMPv2-MIB::sysDescr.0" },
 { "IF-MIB::ifNumber.1" },
 { "IF-MIBifNumber.0" },
 { NULL }
};


That's all I can think of offhand.

Dave

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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

Reply via email to