Skip to content

Commit

Permalink
CHANGES: man: BUG: 3190725: Document snmp{,_sess}synch_response and s…
Browse files Browse the repository at this point in the history
…nmp_async_send

git-svn-id: file:///home/hardaker/lib/sf-bkups/net-snmp-convert-svnrepo/trunk@20440 06827809-a52a-0410-b366-d66718629ded
  • Loading branch information
Dave Shield committed May 19, 2011
1 parent 8188353 commit 257a34e
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 4 deletions.
23 changes: 22 additions & 1 deletion man/netsnmp_sess_api.3.def
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH NETSNMP_SESS_API 3 "13 Aug 2010" VVERSIONINFO "Net-SNMP"
.TH NETSNMP_SESS_API 3 "19 May 2011" VVERSIONINFO "Net-SNMP"
.SH NAME
snmp_sess_init,
snmp_sess_open,
Expand All @@ -8,6 +8,7 @@ snmp_sess_async_send,
snmp_sess_select_info,
snmp_sess_read,
snmp_sess_timeout,
snmp_sess_synch_response,
snmp_sess_close,
snmp_sess_error - session functions
.SH SYNOPSIS
Expand Down Expand Up @@ -41,6 +42,13 @@ snmp_sess_error - session functions
.PP
.BI "void snmp_sess_timeout(void *" handle ");"
.PP
.BI "int snmp_sess_synch_response ( void *" "handle,"
.RS
.BI "netsnmp_pdu *" "pdu" ", "
.br
.BI "netsnmp_pdu **" "response" );
.RE
.PP
.BI "int snmp_sess_close(void *" handle ");"
.PP
.BI "void snmp_sess_error(void *" handle ", int *" pcliberr ", "
Expand Down Expand Up @@ -99,6 +107,12 @@ an open session.
.PP
Consult snmp_api.h for the definitions of these structures.
.PP
With the
.I snmp_sess_async_send()
call,
.I snmp_sess_read
will invoke the specified callback when the response is received.
.PP
.BR snmp_sess_select_info() ", " snmp_sess_read() " and " snmp_sess_timeout()
provide an interface for the use of the
.BR select (2)
Expand Down Expand Up @@ -148,6 +162,13 @@ times out (that is, it returns zero),
.B snmp_sess_timeout()
should be called to see if a timeout has occurred on the SNMP
session.
.PP
.I snmp_sess_synch_response
is a convenience routine that will send the request,
wait for the response and process it before returning.
See the descriptions of
.I "snmp_sess_send" ", " "snmp_sess_read"
etc for details.
.SH DIAGNOSTICS
.PP
Error return status from
Expand Down
39 changes: 36 additions & 3 deletions man/netsnmp_session_api.3.def
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@
.\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
.\" SOFTWARE.
.\" ******************************************************************/
.TH NETSNMP_SESSION_API 3 "13 Aug 2010" VVERSIONINFO "Net-SNMP"
.TH NETSNMP_SESSION_API 3 "19 May 2011" VVERSIONINFO "Net-SNMP"
.SH NAME
snmp_sess_init,
snmp_open,
snmp_send,
snmp_async_send,
snmp_select_info,
snmp_read,
snmp_timeout,
snmp_synch_response,
snmp_close,
snmp_perror,
snmp_sess_perror,
Expand All @@ -51,6 +53,15 @@ snmp_api_errstring \- netsnmp_session_api functions
.BI "netsnmp_pdu *" "pdu" );
.RE
.PP
.BI "int snmp_async_send ( netsnmp_session *" "session,"
.RS
.BI " netsnmp_pdu *" pdu ", "
.br
.BI " snmp_callback " callback ", "
.br
.BI " void *" callbackData ");"
.RE
.PP
.BI "int snmp_select_info ( int * " numfds, "fd_set *" fdset,
.RS
.BI "struct timeval *" timeout, "int *" block );
Expand All @@ -60,6 +71,13 @@ snmp_api_errstring \- netsnmp_session_api functions
.PP
.B void snmp_timeout ( void );
.PP
.BI "int snmp_synch_response ( netsnmp_session *" "session,"
.RS
.BI "netsnmp_pdu *" "pdu" ", "
.br
.BI "netsnmp_pdu **" "response" );
.RE
.PP
.BI "int snmp_close ( netsnmp_session *" session );
.br
.B "int snmp_close_sessions ( void );
Expand Down Expand Up @@ -98,15 +116,23 @@ returns a pointer to a newly-formed
object, which the application must use to reference the
active SNMP session.
.PP
.I Snmp_send
takes as input a pointer to a
.I snmp_send
and
.I snmp_async_send()
each take as input a pointer to a
.I netsnmp_pdu
object.
This structure contains information that describes a transaction
that will be performed over an open session.
.PP
Consult snmp_api.h for the definitions of these structures.
.PP
With the
.I snmp_async_send()
call,
.I snmp_read
will invoke the specified callback when the response is received.
.PP
.I Snmp_read, snmp_select_info,
and
.I snmp_timeout
Expand Down Expand Up @@ -156,6 +182,13 @@ If
times out,
.I snmp_timeout
should be called to see if the timeout was intended for SNMP.
.PP
.I snmp_synch_response
is a convenience routine that will send the request,
wait for the response and process it before returning.
See the descriptions of
.I "snmp_send" ", " "snmp_read"
etc for details.
.SH DIAGNOSTICS
.PP
Previous versions of the library used
Expand Down

0 comments on commit 257a34e

Please sign in to comment.