libssh2_session_method_pref.3 (1430B)
1.TH libssh2_session_method_pref 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 2.SH NAME 3libssh2_session_method_pref - set preferred key exchange method 4.SH SYNOPSIS 5.nf 6#include <libssh2.h> 7 8int 9libssh2_session_method_pref(LIBSSH2_SESSION *session, 10 int method_type, const char *prefs); 11.fi 12.SH DESCRIPTION 13\fIsession\fP - Session instance as returned by 14.BR libssh2_session_init_ex(3) 15 16\fImethod_type\fP - One of the Method Type constants. 17 18\fIprefs\fP - Coma delimited list of preferred methods to use with 19the most preferred listed first and the least preferred listed last. 20If a method is listed which is not supported by libssh2 it will be 21ignored and not sent to the remote host during protocol negotiation. 22 23Set preferred methods to be negotiated. These 24preferences must be set prior to calling 25.BR libssh2_session_handshake(3) 26as they are used during the protocol initiation phase. 27.SH RETURN VALUE 28Return 0 on success or negative on failure. It returns 29LIBSSH2_ERROR_EAGAIN when it would otherwise block. While 30LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. 31.SH ERRORS 32\fILIBSSH2_ERROR_INVAL\fP - The requested method type was invalid. 33 34\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. 35 36\fILIBSSH2_ERROR_METHOD_NOT_SUPPORTED\fP - The requested method is not supported. 37.SH SEE ALSO 38.BR libssh2_session_init_ex(3) 39.BR libssh2_session_handshake(3)