On 02/08/06, Siva Prakash Reddy G <[EMAIL PROTECTED]> wrote:
>         1. what is use of the var_XXXXX() function, what it does?

This is the routine that actually does the real work.
When a request for an XXXXX object arrives, this is the code that
provides the corresponding value.


> snmpd_register_config_handler("sysdescr", system_parse_config_sysdescr,...)

This registers a config handler routine (system_parse_config_sysdescr),
to be used for processing the "sysdescr" token.    It doesn't call
that routine immediately - it just registers it.

> initially configuration file contains nothing,

If there are no config directives to process, then none of the parsing
routines will be called.

> so, system_parse_config_sysdescr function fails

No.   It won't fail - it simply won't be called at all.



>            3. can you give feasible solution to execute this code and to
> check the configuration file.

Decide on the format of each of the configure directive(s) that you
need to support, write a "parse_config_xxx" routine for each one, and
register them in the module init_xxx() routine.


>       Some files are telling, header_generic function used to check request 
> is valid or not.
> Here request means what?

"request" here means a single varbind in an incoming GET (or GETNEXT
or SET, etc) PDU.   The old v4 API (which seems to be what you're
looking at), processes each varbind individually.  The newer v5 API
allows you to process multiple (relevant) varbinds from a single
request PDU in one go.
   But it's probably simpler to concentrate on the one-at-a-time model
first, until you get a feel for what's happening.  That'll then give a
solid basis for understanding the newer architecture.

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to