libssh2

Форк
0
/
libssh2_knownhost_writeline.3 
47 строк · 1.6 Кб
1
.\" Copyright (C) Daniel Stenberg
2
.\" SPDX-License-Identifier: BSD-3-Clause
3
.TH libssh2_knownhost_writeline 3 "28 May 2009" "libssh2" "libssh2"
4
.SH NAME
5
libssh2_knownhost_writeline - convert a known host to a line for storage
6
.SH SYNOPSIS
7
.nf
8
#include <libssh2.h>
9

10
int
11
libssh2_knownhost_writeline(LIBSSH2_KNOWNHOSTS *hosts,
12
                            struct libssh2_knownhost *known,
13
                            char *buffer, size_t buflen,
14
                            size_t *outlen,
15
                            int type);
16
.fi
17
.SH DESCRIPTION
18
Converts a single known host to a single line of output for storage, using
19
the 'type' output format.
20

21
\fIknown\fP identifies which particular known host
22

23
\fIbuffer\fP points to an allocated buffer
24

25
\fIbuflen\fP is the size of the \fIbuffer\fP. See RETURN VALUE about the size.
26

27
\fIoutlen\fP must be a pointer to a size_t variable that will get the output
28
length of the stored data chunk. The number does not included the trailing
29
zero!
30

31
\fItype\fP specifies what file type it is, and
32
\fILIBSSH2_KNOWNHOST_FILE_OPENSSH\fP is the only currently supported
33
format.
34
.SH RETURN VALUE
35
Returns a regular libssh2 error code, where negative values are error codes
36
and 0 indicates success.
37

38
If the provided buffer is deemed too small to fit the data libssh2 wants to
39
store in it, LIBSSH2_ERROR_BUFFER_TOO_SMALL will be returned. The application
40
is then advised to call the function again with a larger buffer. The
41
\fIoutlen\fP size will then hold the requested size.
42
.SH AVAILABILITY
43
Added in libssh2 1.2
44
.SH SEE ALSO
45
.BR libssh2_knownhost_get(3)
46
.BR libssh2_knownhost_readline(3)
47
.BR libssh2_knownhost_writefile(3)
48

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.