1libssh2_session_method_pref(3)  libssh2 manual  libssh2_session_method_pref(3)
2
3
4

NAME

6       libssh2_session_method_pref - set preferred key exchange method
7

SYNOPSIS

9       #include <libssh2.h>
10
11       int     libssh2_session_method_pref(LIBSSH2_SESSION    *session,    int
12       method_type, const char *prefs);
13
14

DESCRIPTION

16       session - Session instance as returned by libssh2_session_init_ex(3)
17
18       method_type - One of the Method Type constants.
19
20       prefs - Coma delimited list of preferred methods to use with  the  most
21       preferred  listed  first  and  the  least  preferred listed last.  If a
22       method is listed which is not supported by libssh2 it will  be  ignored
23       and not sent to the remote host during protocol negotiation.
24
25       Set  preferred  methods to be negotiated. These preferences must be set
26       prior to calling libssh2_session_handshake(3) as they are  used  during
27       the protocol initiation phase.
28
29

RETURN VALUE

31       Return   0  on  success  or  negative  on  failure.   It  returns  LIB‐
32       SSH2_ERROR_EAGAIN  when  it   would   otherwise   block.   While   LIB‐
33       SSH2_ERROR_EAGAIN  is  a negative number, it isn't really a failure per
34       se.
35
36

ERRORS

38       LIBSSH2_ERROR_INVAL - The requested method type was invalid.
39
40       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
41
42       LIBSSH2_ERROR_METHOD_NOT_SUPPORTED - The requested method is  not  sup‐
43       ported.
44
45

SEE ALSO

47       libssh2_session_init_ex(3) libssh2_session_handshake(3)
48
49
50
51libssh2 0.15                      1 Jun 2007    libssh2_session_method_pref(3)
Impressum