ZOO-Project
|
Functions | |
int | waitsocket (int socket_fd, LIBSSH2_SESSION *session) |
Wait until one or more file descriptor has been changed for the socket for a time defined by timeout. More... | |
SSHCON * | ssh_connect (maps *conf) |
Connect to a remote host using SSH protocol. More... | |
int | ssh_get_cnt (maps *conf) |
Get the number of opened SSH connections. More... | |
size_t | ssh_file_exists (maps *conf, const char *targetPath, int cnt) |
Verify if a file exists on the remote host. More... | |
bool | ssh_copy (maps *conf, const char *localPath, const char *targetPath, int cnt) |
Upload a file over an opened SSH connection. More... | |
int | ssh_fetch (maps *conf, const char *localPath, const char *targetPath, int cnt) |
Download a file over an opened SSH connection. More... | |
int | ssh_exec (maps *conf, const char *command, int cnt) |
Execute a command over an opened SSH connection. More... | |
bool | ssh_close_session (maps *conf, SSHCON *con) |
Close an opened SSH connection. More... | |
bool | ssh_close (maps *conf) |
Close all the opened SSH connections. More... | |
bool | addToUploadQueue (maps **conf, maps *input) |
int | fileMd5Check (maps **conf, const char *localPath, const char *targetPath) |
bool | runUpload (maps **conf) |
Variables | |
SSHCON * | sessions [MAX_PARALLEL_SSH_CON] |
Function Documentation
int fileMd5Check | ( | maps ** | conf, |
const char * | localPath, | ||
const char * | targetPath | ||
) |
bool runUpload | ( | maps ** | conf | ) |
bool ssh_close | ( | maps * | conf | ) |
Close all the opened SSH connections.
- Parameters
-
conf maps pointer to the main configuration maps
- Returns
- true in case of success, false if failure occured
Close an opened SSH connection.
- Parameters
-
conf maps pointer to the main configuration maps con SSHCON pointer to the SSH connection
- Returns
- true in case of success, false if failure occured
Connect to a remote host using SSH protocol.
- Parameters
-
conf maps The main configuration maps
- Returns
- the libssh2 sessions pointer or NULL in case any failure occured.
bool ssh_copy | ( | maps * | conf, |
const char * | localPath, | ||
const char * | targetPath, | ||
int | cnt | ||
) |
Upload a file over an opened SSH connection.
- Parameters
-
conf maps pointer to the main configuration maps localPath const char* defining the local path for accessing the file targetPath const char* defining the path for storing the file on the remote host
- Returns
- true in case of success, false if failure occured
int ssh_exec | ( | maps * | conf, |
const char * | command, | ||
int | cnt | ||
) |
Execute a command over an opened SSH connection.
- Parameters
-
conf maps pointer to the main configuration maps command const char pointer to the command to be executed
- Returns
- bytecount resulting from the execution of the command
int ssh_fetch | ( | maps * | conf, |
const char * | localPath, | ||
const char * | targetPath, | ||
int | cnt | ||
) |
Download a file over an opened SSH connection.
- Parameters
-
conf maps pointer to the main configuration maps localPath const char* defining the local path for storing the file targetPath const char* defining the path for accessing the file on the remote host
- Returns
- 0 in case of success, -1 if failure occured
size_t ssh_file_exists | ( | maps * | conf, |
const char * | targetPath, | ||
int | cnt | ||
) |
Verify if a file exists on the remote host.
- Parameters
-
conf maps pointer to the main configuration maps targetPath const char* defining the path for storing the file on the remote host
- Returns
- true in case of success, false if failure occured
int ssh_get_cnt | ( | maps * | conf | ) |
Get the number of opened SSH connections.
- Parameters
-
conf maps pointer to the main configuration maps
- Returns
- the number of opened SSH connections
int waitsocket | ( | int | socket_fd, |
LIBSSH2_SESSION * | session | ||
) |
Wait until one or more file descriptor has been changed for the socket for a time defined by timeout.
- Parameters
-
socket_fd int defining the sockket file descriptor session an exeisting LIBSSH2_SESSION
Variable Documentation
SSHCON* sessions[MAX_PARALLEL_SSH_CON] |
Generated on Sun Nov 24 2024 19:01:15 for ZOO-Project by 1.8.9.1