Re: which conf file is used...

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 12/02/2008, BIbhudatta Nayak <[email protected]> wrote:
> I have created my own MIB with two object of type counter32.
> The module name is "telesModuleMIB"

The name of the module isn't a lot of help.
What would be more useful would be to see the definitions
of these MIB objects - whether they are scalar objects
or part of a table.


> Which conf file will i use to compile it with mib2c to generate c templates.
>
> c:\> mib2c -c mib2c.scalar.conf telesModuleMIB
> c:\> mib2c -c mib2c.int_watch.conf telesModuleMIB
>
> Which one is correct.

It's not a matter of which one is correct - that depends
on what these MIB objects are meant to do.

"int_watch" is designed to implement a MIB object that
effectively tracks a given internal C variable.
When the agent receives a GET (or GETNEXT) request,
then it will return the current value of this C variable.
When it receives a SET request, it will update this variable.

Most of this is handled "internally" within the agent helpers,
so there's relatively little processing done in the generated
code itself.


"scalar" is a more general-purpose framework.
It will also return or update the value of some internal
variable, but the code for this is done in the generated
code framework.   So if you need to get the current value
from some underlying subsystem, or react to updates
in some way - then you can add the necessary code to
the handler routine.


If you need to do this additional processing, then use
the "scalar" template.   If you don't, then "int_watch"
should be fine.

Suck it and See.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.