On Wed, 2005-10-26 at 17:12 +0000, xuemei wrote:
>  I run “mib2c 1.3.6.1.4.1.123456789”,
> 
> 1.It looks like the mib2c does not like the fake enterprise number ,
> that is why it decides to start from the 1.3.6.1.4.1 each time?

You need to tell mib2c to load the MIB files that define the
MIB subtree you want to implement.

If you've got a file  MY-MIB, that defines a subtree rooted at
.1.3.6.1.4.1.123456789 and named "myRoot", then try

        mib2c  MY-MIB::myRoot

If the MIB files aren't being loaded, then mib2c can't know what
object to generate code for.



> 2.Any way without having a real IANA number, I could actually
>   practice to use mib2c?

You can always use the Net-SNMP experimental area.
Try defining a MIB that sits underneath

        NET-SNMP-MIB::netSnmpPlaypen

That's *exactly* what this subtree is provided for!
(Just please make sure that you don't release any code
 that uses this subtree.)


> 3.once the c code is generated, what is your recommendation,
>   should I recompile the agent to include the new functions
>   or better making them as DLL for agent to load?

To start with, I'd advise compiling your new MIB directly into
the agent.  That's one less complication to deal with when
debugging.  Once you're confident that the module code is
working properly, *then* look at loading this dynamically,
or running as a subagent.
   But to start with, keep things as simple as possible.



>  In case of recompile, should I use the redhat rpmbuild
> command or use the make file in the agent package?

Work with a source tarball, and run

    configure --with-mib-modules=myRoot ; make


You don't actually have to install things while you're
developing the new module - it's perfectly possible to
run the agent from the source tree.


Dave



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
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