]> src.bluestatic.org Git - printdrop.git/blob - man3/libssh2_session_method_pref.3
Add a help menu item to display the current print queue
[printdrop.git] / man3 / libssh2_session_method_pref.3
1 .\" $Id: libssh2_session_method_pref.3,v 1.1 2007/06/14 15:26:58 jehousley Exp $
2 .\"
3 .TH libssh2_session_method_pref 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
4 .SH NAME
5 libssh2_session_method_pref - set preferred key exchange method
6 .SH SYNOPSIS
7 #include <libssh2.h>
8
9 int
10 libssh2_session_method_pref(LIBSSH2_SESSION *session, int method_type, const char *prefs);
11
12 .SH DESCRIPTION
13 \fIsession\fP - Session instance as returned by
14 .BR libssh2_session_init(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
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.
22
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.
27
28 .SH RETURN VALUE
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.
32
33 .SH ERRORS
34 \fILIBSSH2_ERROR_INVAL\fP - The requested method type was invalid.
35
36 \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
37
38 \fILIBSSH2_ERROR_METHOD_NOT_SUPPORTED\fP - The requested method is not supported.
39
40 .SH SEE ALSO
41 .BR libssh2_session_init(3)
42 .BR libssh2_session_startup(3)