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] |
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.
conf | maps pointer to the main configuration maps |
Close an opened SSH connection.
conf | maps pointer to the main configuration maps |
con | SSHCON pointer to the SSH connection |
Connect to a remote host using SSH protocol.
conf | maps The main configuration maps |
bool ssh_copy | ( | maps * | conf, |
const char * | localPath, | ||
const char * | targetPath, | ||
int | cnt | ||
) |
Upload a file over an opened SSH connection.
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 |
int ssh_exec | ( | maps * | conf, |
const char * | command, | ||
int | cnt | ||
) |
Execute a command over an opened SSH connection.
conf | maps pointer to the main configuration maps |
command | const char pointer to the command to be executed |
int ssh_fetch | ( | maps * | conf, |
const char * | localPath, | ||
const char * | targetPath, | ||
int | cnt | ||
) |
Download a file over an opened SSH connection.
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 |
size_t ssh_file_exists | ( | maps * | conf, |
const char * | targetPath, | ||
int | cnt | ||
) |
Verify if a file exists on the remote host.
conf | maps pointer to the main configuration maps |
targetPath | const char* defining the path for storing the file on the remote host |
int ssh_get_cnt | ( | maps * | conf | ) |
Get the number of opened SSH connections.
conf | maps pointer to the main configuration maps |
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.
socket_fd | int defining the sockket file descriptor |
session | an exeisting LIBSSH2_SESSION |
SSHCON* sessions[MAX_PARALLEL_SSH_CON] |