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

NAME

6       libssh2_knownhost_writeline  - convert a known host to a line for stor‐
7       age
8

SYNOPSIS

10       #include <libssh2.h>
11
12       libssh2_knownhost_writeline(LIBSSH2_KNOWNHOSTS *hosts,
13                                   struct libssh2_knownhost *known,
14                                   char *buffer, size_t buflen,
15                                   size_t *outlen,
16                                   int type);
17

DESCRIPTION

19       Converts a single known host to a single line of  output  for  storage,
20       using the 'type' output format.
21
22       known identifies which particular known host
23
24       buffer points to an allocated buffer
25
26       buflen is the size of the buffer. See RETURN VALUE about the size.
27
28       outlen  must be a pointer to a size_t variable that will get the output
29       length of the stored data chunk.  The  number  does  not  included  the
30       trailing zero!
31
32       type specifies what file type it is, and LIBSSH2_KNOWNHOST_FILE_OPENSSH
33       is the only currently supported format.
34

RETURN VALUE

36       Returns a regular libssh2 error code, where negative values  are  error
37       codes and 0 indicates success.
38
39       If  the  provided  buffer  is  deemed too small to fit the data libssh2
40       wants to store in it, LIBSSH2_ERROR_BUFFER_TOO_SMALL will be  returned.
41       The  application  is  then  advised  to  call the function again with a
42       larger buffer. The outlen size will then hold the requested size.
43

AVAILABILITY

45       Added in libssh2 1.2
46

SEE ALSO

48       libssh2_knownhost_get(3)  libssh2_knownhost_readline(3)  libssh2_known‐
49       host_writefile(3)
50
51
52
53
54libssh2 1.2                       28 May 2009   libssh2_knownhost_writeline(3)
Impressum