Re: A question bout API description.

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 23/07/07, 高翔 <[email protected]> wrote:
>
>  1.About snmp_sess_init(), "May perform one time minimal library
> initialization.", what is it mean?

If you look at the file snmplib/snmp_api.c, the comment immedately
before the routine '_init_snmp' says:


 * Primordial SNMP library initialization.
 * Initializes mutex locks.
 * Invokes minimum required initialization for displaying MIB objects.
 * Gets initial request ID for all transactions,
 * and finds which port SNMP over UDP uses.


That's what is covered by this "minimal library initialization".



> 2.About snmp_read(), "Each socket with it's fd set has a packet read from it
> and snmp_parse is called on the packet received." , what is it mean ?

The 'snmp_read()' routine is passed a set of file descriptors.
It may be a single file descriptor - it may be several.

For each of these file descriptors, if there is an SNMP packet waiting
to be processed, then 'snmp_read' will read this in, and call 'snmp_parse'
to convert it into an 'snmp_pdu' structure, ready for the rest of the
application to work with.
   This will be done for each of the file descriptors in turn.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

_______________________________________________
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.