On 15/12/06, Clement Hsu <[EMAIL PROTECTED]> wrote:
> the version I used is net-snmp 5-4, and its mib
> template seems much simple than net-snmp-5-3-1.

Unlikely.
Both versions of the toolkit offer the choice of several different MIB
templates,
and v54 will include *all* that 5.3.1 does (and possibly more).


> The problem is that many codes which net-snmp package  provided  is so
> different to mib template. such as sysdescr , ... and so on.

Correct.
Different templates are used for different MIB modules - sometimes due to
the different characteristics of the MIB information being reported.
Sometimes due to the preferences of the person writing the implementation.
Sometimes due to the age of the code.

The 'sysdescr' object dates from the previous "ucd-snmp" era, so uses
the earlier "var_xxx" style template - sometimes referred to as the v4 API.
This is discussed in the AGENT.txt file.
   More recent MIB modules tend to use one of the more recent helpers,
which rely on the v5 (or "handler-based") APIs.   There is some discussion
of these in the FAQ - in particular the section "CODING".  I suggest you
read through that.


> So , if I want to set hrSystemDate, the problem comes from
> which function should I modify. Does there exist MODE_SET_ACTION
> or I should add a selection case like MODE_SET_ACTION?

No.
The hr_system MIB module uses the earlier v4 API, which has a completely
different structure.  You would need to take the existing writable
implementation
(solaris), and adapt that to your requirements.
   If you're going to do this, I'd suggest you read through AGENT.txt a few
times first, until you are happy that you understand how things work.


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-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to