On Tue, 2005-04-12 at 20:34, Toth, Gregory S wrote:
> We have a mib that contains both scalars and table values.  We wish
> to implement a mib module for our agent to support this mib.

Fair enough.
If there are a large number of scalar variables, we've
found it more maintainable to implement these in one file,
and implement the table in a separate file.  (Or several
files if there are several tables).
   But if you've only got a few scalars, or they're very
closely linked to the tables (e.g. the number of rows in
the table, or when it was last changed), then it makes
sense to keep them in the same file.

It makes absolutely no difference as far as the management
tools are concerned, and the agent doesn't really care
either.

> Is there a way to generate ourModule.c/h with support for
> both tables and scalars?

Of course.  It's called "an editor" :-)

> Or do we have to copy the contents of one ourModule.c
> into the other ourModule.c?

Yup - that's the way to do it.

You can probably get away with appending "ourModule2.c"
to "outModule1.c", calling ourModule2_init() from within
the ourModule1_init() routine, and tidying up the
header files.


But this is something you need to do manually.
The mib2c tool isn't clever enough to handle it automatically.

Dave



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to