ZOO-Project: sshapi.c File Reference
ZOO-Project
sshapi.c File Reference
#include "sshapi.h"
#include "service_internal.h"

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...
 
SSHCONssh_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

SSHCONsessions [MAX_PARALLEL_SSH_CON]
 

Function Documentation

bool addToUploadQueue ( maps **  conf,
maps input 
)
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
confmaps pointer to the main configuration maps
Returns
true in case of success, false if failure occured
bool ssh_close_session ( maps conf,
SSHCON con 
)

Close an opened SSH connection.

Parameters
confmaps pointer to the main configuration maps
con

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png