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