Re: question regarding how to use mib2c

"Xuan Pan" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Thanks for your reply. That explains a lot.

When programming a SNMP agent, normally how do we organize the source
code. Assume we are still using my previous example. It has one module
that consists of a number of scalars (I see all managed objects other than
tables are scalars such as IpAddress, Integer, Counters. Please correct me
if I am wrong) and two tables. Am I supposed to generate template code in
multiple times and mix them together into one .h file and one .c file?

/Pan


>>>>>> "XP" == Xuan Pan <[email protected]> writes:
>
> XP> The fact is the contents in my MIB file consist of not only tables but
> XP> also many other data types. Is it still possible that I can make use
> of
> XP> the template generation feature somehow and which conf file I should
> XP> use?
>
> There are only two types of data that mib2c can think about: tables, and
> scalars.  If you have a lot of scalars in your MIBs, those are
> frequently easier to write and need less template code actually.  You
> can, however, run "mib2c -c mib2c.scalar.conf SCALAROID" in order to
> have it generate scalar code.
>
> XP> For example I have a number of Integers, Display strings, some
> counters
> XP> and two tables (one for a Radius server pool one for a DHCP server
> pool)
> XP> defined in the MIB file.
>
> You'll need to run mib2c multiple times to create a few template code
> files.
> --
> Wes Hardaker
> Sparta, Inc.
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> 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
>
>



-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
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.