2008/7/7 deka aditia <[EMAIL PROTECTED]>:
> Anyone know how to write mib module for a scalar object ?
> just by using mib2c -c mib2c.scalar.conf $name   just producing 2 file ..
> (object.c and object.h)

That's a good start, yes.

> i dont know what should i do ..., it's completely different when reproduce
> mib module using table object ...

I'm sorry?
The output generated by mib2c.scalar.conf is fairly similar to that
generated by (for example)  mib2c.table_data.conf or mib2c.iterate.conf.

It's significantly simpler, since there is only a single value to worry about.
But the framework for handling GET and SET requests is much the
same in all three cases.

It's significantly different to the MfD structure, I would agree.
But that is not the only mib2c framework for handling tables
(nor the best, in my opinion).


> where should i put get and set method, when there is such operation ?

You don't need explicit get and set methods, though you could code
things that way if you prefer.


> i have to read some external file to read and write the value of this object

Reading the value from the external file would be done in the MODE_GET
block.    Setting the value would probably be done in the MODE_ACTION
block, and you should also handle reversing this assignment in the
MODE_UNDO block.

See the file AGENT.txt for a fuller description of set processing.

Dave

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to