Re: Net-SNMP basic questions

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
> (1) Using mib2c utility of Net-SNMP , when I convert my MIB into a C
> program which I would certainly compile and load it in my agent. Then
> will it be able to respond to any custom parameter values ?

That code would then be able to respond to requests for the objects
defined in that MIB, yes.

>                                       Will I need
> to modify this auto-generated C to populate needed information ?

Yes.
The 'mib2c' tool gebnerates a *template* for the code that you need.
It can handle the basic structure and syntax of implementing the MIB,
but it can't actually handle the task of retrieving the values themselves.
How is it to know where to get this information from?

That's your job.

> Here my main concern is how do the values for custom fields get set.

The template code contains the framework of the MIB implementation,
including code to set the values.  But this will typically be setting dummy
or placeholder values.   It's up to you to replace this with code that
returns the *real* values - retrieved from your application.


Have a look at some of the modules in the Net-SNMP source, to
get a feel of how this might be done.

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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.