2009/11/5 seshu babu <seshum...@gmail.com>:
> 1. The net-snmp-devel rpm doesn't have a mib2c compiler that means I can do
>     away with the mib2c compiler instead depend on dlmod for code & mib 
> changes?

mib2c is written in perl, so you need to install the RPM
'net-snmp-perl' as well.
This includes the mib2c script.


Whether or not you use mib2c is completely separate from whether
you use the dlmod mechanism or some other approach.

Mib2c is concerned with helping you to *generate* the code for your MIB.
You don't need to use this - it's perfectly possible to write this code by hand.
But  mib2c takes care of a lot of the donkey work for you - it gives you a
code framework to start from, rather than having to write all this yourself.

dlmod (along with AgentX and re-compiling the agent) are concerned
with what you do with that code when it's finished.   How you get this
MIB that you've written into the agent, so it can be queried.
   Personally, I typically start by compiling the new MIB code directly into
the agent.   This is probably the simplest to get working on a test system
for development purposes, but does require using the Net-SNMP source
tarball from the project website (rather than vendor-supplied RPMs).

Note that  you can always re-package the MIB to use dlmod (or AgentX) later.
The same code can be used for all three approaches.



> 2.To write C code & integrate with the net-snmp agent or change/Add mib's,
> which is the right rpm to use?

If you're working with pre-packaged binaries, then you need the following:
    net-snmp          The standard agent binary
    net-snmp-libs    libraries (and MIB files)
    net-snmp-utils   command-line tools (snmpget/snmpwalk/etc)
    net-snmp-devel The header files (and static libraries)
    net-snmp-perl   If you want to use 'mib2c'

With that setup, you'll need to use 'dlmod' (or AgentX) to include
your new MIB module into the running agent.


> Is it mandatory to use net-snmp source code for this?

If you're linking MIB code into the Net-SNMP agent directly, then yes.
You'd have to get the source tarball from the Net-SNMP project website,
and compile from that.   (In which case, you don't need *any* of the
above RPMs).


Dave

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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

Reply via email to