libssh2
1.\" Copyright (C) The libssh2 project and its contributors.
2.\" SPDX-License-Identifier: BSD-3-Clause
3.TH libssh2_session_banner_set 3 "9 Sep 2011" "libssh2" "libssh2"
4.SH NAME
5libssh2_session_banner_set - set the SSH protocol banner for the local client
6.SH SYNOPSIS
7.nf
8#include <libssh2.h>
9
10int
11libssh2_session_banner_set(LIBSSH2_SESSION *session, const char *banner);
12.fi
13.SH DESCRIPTION
14\fIsession\fP - Session instance as returned by
15.BR libssh2_session_init_ex(3)
16
17\fIbanner\fP - A pointer to a zero-terminated string holding the user defined
18banner
19
20Set the banner that will be sent to the remote host when the SSH session is
21started with \fIlibssh2_session_handshake(3)\fP This is optional; a banner
22corresponding to the protocol and libssh2 version will be sent by default.
23.SH RETURN VALUE
24Returns 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN
25when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative
26number, it is not really a failure per se.
27.SH ERRORS
28\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
29.SH AVAILABILITY
30Added in 1.4.0.
31
32Before 1.4.0 this function was known as libssh2_banner_set(3)
33.SH SEE ALSO
34.BR libssh2_session_handshake(3),
35.BR libssh2_session_banner_get(3)
36