Add libssh2_session_abstract.3, libssh2_session_callback_set.3,

libssh2_session_method_pref.3 and libssh2_session_methods.3
This commit is contained in:
James Housley 2007-06-14 15:26:58 +00:00
parent c5ba20a2c0
commit 49fef5e598
5 changed files with 132 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.17 2007/06/14 14:56:32 jehousley Exp $
# $Id: Makefile.am,v 1.18 2007/06/14 15:26:58 jehousley Exp $
EXTRA_DIST = template.3
@ -26,11 +26,15 @@ dist_man_MANS =
libssh2_hostkey_hash.3 \
libssh2_scp_recv.3 \
libssh2_scp_send_ex.3 \
libssh2_session_abstract.3 \
libssh2_session_callback_set.3 \
libssh2_session_free.3 \
libssh2_session_disconnect_ex.3 \
libssh2_session_init.3 \
libssh2_session_last_errno.3 \
libssh2_session_last_error.3 \
libssh2_session_method_pref.3 \
libssh2_session_methods.3 \
libssh2_session_startup.3 \
libssh2_poll.3 \
libssh2_poll_channel_read.3 \

View File

@ -0,0 +1,26 @@
.\" $Id: libssh2_session_abstract.3,v 1.1 2007/06/14 15:26:58 jehousley Exp $
.\"
.TH libssh2_session_abstract 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
.SH NAME
libssh2_session_abstract - return a pointer to a session's abstract pointer
.SH SYNOPSIS
#include <libssh2.h>
void **
libssh2_session_abstract(LIBSSH2_SESSION *session);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
Return a pointer to where the abstract pointer provided to
.BR libssh2_session_init_ex(3)
is stored. By providing a doubly de-referenced pointer, the internal
storage of the session instance may be modified in place.
.SH RETURN VALUE
A pointer to session internal storage whos contents point to previously
provided abstract data.
.SH SEE ALSO
.BR libssh2_session_init_ex(3)

View File

@ -0,0 +1,30 @@
.\" $Id: libssh2_session_callback_set.3,v 1.1 2007/06/14 15:26:58 jehousley Exp $
.\"
.TH libssh2_session_callback_set 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
.SH NAME
libssh2_session_callback_set - set a callback function
.SH SYNOPSIS
#include <libssh2.h>
void *
libssh2_session_callback_set(LIBSSH2_SESSION *session, int cbtype, void *callback);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init(3)
\fIcbtype\fP - Callback type. One of the types listed in Callback Types.
\fIcallback\fP - Pointer to custom callback function. The prototype for
this function must match the associated callback declaration macro.
Sets a custom callback handler for a previously initialized session
object. Callbacks are triggered by the receipt of special packets at
the Transport layer. To disable a callback, set it to NULL.
.SH RETURN VALUE
Pointer to previous callback handler. Returns NULL if no
prior callback handler was set.
.SH SEE ALSO
.BR libssh2_session_init(3)

View File

@ -0,0 +1,42 @@
.\" $Id: libssh2_session_method_pref.3,v 1.1 2007/06/14 15:26:58 jehousley Exp $
.\"
.TH libssh2_session_method_pref 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
.SH NAME
libssh2_session_method_pref - set preferred key exchange method
.SH SYNOPSIS
#include <libssh2.h>
int
libssh2_session_method_pref(LIBSSH2_SESSION *session, int method_type, const char *prefs);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init(3)
\fImethod_type\fP - One of the Method Type constants.
\fIprefs\fP - Coma delimited list of preferred methods to use with
the most preferred listed first and the least preferred listed last.
If a method is listed which is not supported by libssh2 it will be
ignored and not sent to the remote host during protocol negotiation.
Set preferred methods to be negotiated. These
preferrences must be set prior to calling
.BR libssh2_session_startup(3)
as they are used during the protocol initiation phase.
.SH RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
.SH ERRORS
\fILIBSSH2_ERROR_INVAL\fP - The requested method type was invalid.
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_METHOD_NOT_SUPPORTED\fP - The requested method is not supported.
.SH SEE ALSO
.BR libssh2_session_init(3)
.BR libssh2_session_startup(3)

View File

@ -0,0 +1,29 @@
.\" $Id: libssh2_session_methods.3,v 1.1 2007/06/14 15:26:58 jehousley Exp $
.\"
.TH libssh2_session_methods 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
.SH NAME
libssh2_session_methods - return the currently active algorithms
.SH SYNOPSIS
#include <libssh2.h>
const char *
libssh2_session_methods(LIBSSH2_SESSION *session, int method_type);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init(3)
\fImethod_type\fP - One of the Method Type constants.
Return the actual method negotiated for a particular transport parameter.
.SH RETURN VALUE
Negotiated method or NULL if the session has not yet been started.
.SH ERRORS
\fILIBSSH2_ERROR_INVAL\fP - The requested method type was invalid.
\fILIBSSH2_ERROR_METHOD_NONE\fP -
.SH SEE ALSO
.BR libssh2_session_init(3)