1libssh2_knownhost_writeline(3)      libssh2     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       int
13       libssh2_knownhost_writeline(LIBSSH2_KNOWNHOSTS *hosts,
14                                   struct libssh2_knownhost *known,
15                                   char *buffer, size_t buflen,
16                                   size_t *outlen,
17                                   int type);
18

DESCRIPTION

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

RETURN VALUE

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

AVAILABILITY

46       Added in libssh2 1.2
47

SEE ALSO

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