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

NAME

6       libssh2_scp_recv - request a remote file via SCP
7

SYNOPSIS

9       #include <libssh2.h>
10
11       LIBSSH2_CHANNEL * libssh2_scp_recv(LIBSSH2_SESSION *session, const char
12       *path, struct stat *sb);
13
14

DESCRIPTION

16       session - Session instance as returned by libssh2_session_init(3)
17
18       path - Full path and filename of file to transfer
19
20       sb - Populated with remote file's size, mode, mtime, and atime
21
22       Request a file from the remote host via SCP. This function  acts  as  a
23       wrapper   calling   libssh2_channel_open_session(3)   ,   libssh2_chan‐
24       nel_exec(3) , and negotiating rcp protocol handshakes.
25
26

RETURN VALUE

28       Pointer to a newly  allocated  LIBSSH2_CHANNEL  instance,  or  NULL  on
29       errors.
30
31

ERRORS

33       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
34
35       LIBSSH2_ERROR_SCP_PROTOCOL -
36
37       LIBSSH2_ERROR_EAGAIN  -  Marked for non-blocking I/O but the call would
38       block.
39
40

SEE ALSO

42       libssh2_session_init(3)  libssh2_channel_open_session(3)  libssh2_chan‐
43       nel_exec(3)
44
45
46
47libssh2 0.15                      1 Jun 2007               libssh2_scp_recv(3)
Impressum