#include "vsl_api.h"
Go to the source code of this file.
Functions | |
| int | ssh_close (vsl_sock *sock, char *errmsg) |
| int | ssh_daemonize (void) |
| int | ssh_fork (vsl_sock *sock, const char *host, const char *user, const char *cmd, int argc, const char *const *argv) |
| int | ssh_read_port (vsl_sock *sock, int *port) |
| int | ssh_read_secret (unsigned char *secret) |
| int | ssh_send_port (int port) |
| int | ssh_send_secret (vsl_sock *sock, const unsigned char *secret) |
| int | ssh_vfer_accept (vsl_sock *sock) |
| int | ssh_vfer_connect (vsl_sock *sock, const char *host, int port) |
| int | ssh_vfer_listen (vsl_sock *sock, int *port) |
Definition in file vsl_ssh.h.
| int ssh_close | ( | vsl_sock * | sock, | |
| char * | errmsg | |||
| ) |
Close ssh process
| [in] | sock | socket to use |
| [out] | errmsg | if the ssh process returned an error message, it is written into this variable, which has to have a minimum length of 513 bytes. |
| int ssh_daemonize | ( | void | ) |
| int ssh_fork | ( | vsl_sock * | sock, | |
| const char * | host, | |||
| const char * | user, | |||
| const char * | cmd, | |||
| int | argc, | |||
| const char *const * | argv | |||
| ) |
Fork ssh process to connect to remote host and and start server process.
Stores pid and stdin of the ssh process in the socket.
| [in] | sock | VSL socket to use |
| [in] | host | hostname to connect to |
| [in] | user | username for SSH connection, NULL to use current user |
| [in] | cmd | program name of the server application |
| [in] | argc | number of arguments in argv that are passed to the server application |
| [in] | argv | arguments that is passed to the server application |
| int ssh_read_port | ( | vsl_sock * | sock, | |
| int * | port | |||
| ) |
Read port number from ssh process
| [in] | sock | socket to use |
| [out] | port | read port |
| int ssh_read_secret | ( | unsigned char * | secret | ) |
Reads the secret from stdin and stores it in the socket.
| [out] | secret | variable to store secret in, minimum length VSL_KEYLEN |
| int ssh_send_port | ( | int | port | ) |
| int ssh_send_secret | ( | vsl_sock * | sock, | |
| const unsigned char * | secret | |||
| ) |
Sends the secret over the ssh connection.
| [in] | sock | socket to use |
| [in] | secret | secret to send (length VSL_KEYLENGTH) |
| int ssh_vfer_accept | ( | vsl_sock * | sock | ) |
Waits for a vfer connection and closes the listening socket.
| [in] | sock | socket to use |
| int ssh_vfer_connect | ( | vsl_sock * | sock, | |
| const char * | host, | |||
| int | port | |||
| ) |
| int ssh_vfer_listen | ( | vsl_sock * | sock, | |
| int * | port | |||
| ) |
1.4.7