Document the ssh server bind functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@756 7dcaeef0-15fb-0310-b436-a5af3365683c
Этот коммит содержится в:
родитель
f0432cc24f
Коммит
1657d0932f
@ -39,15 +39,88 @@ extern "C" {
|
||||
|
||||
typedef struct ssh_bind_struct SSH_BIND;
|
||||
|
||||
/**
|
||||
* @brief Creates a new SSH server bind.
|
||||
*
|
||||
* @return A newly allocated ssh_bind session pointer.
|
||||
*/
|
||||
SSH_BIND *ssh_bind_new(void);
|
||||
|
||||
/**
|
||||
* @brief Set the opitons for the current SSH server bind.
|
||||
*
|
||||
* @param ssh_bind The ssh server bind to use.
|
||||
*
|
||||
* @param options The option structure to set.
|
||||
*/
|
||||
void ssh_bind_set_options(SSH_BIND *ssh_bind, SSH_OPTIONS *options);
|
||||
|
||||
/**
|
||||
* @brief Start listening to the socket.
|
||||
*
|
||||
* @param ssh_bind The ssh server bind to use.
|
||||
*
|
||||
* @return 0 on success, < 0 on error.
|
||||
*/
|
||||
int ssh_bind_listen(SSH_BIND *ssh_bind);
|
||||
void ssh_bind_set_blocking(SSH_BIND *ssh_bind,int blocking);
|
||||
|
||||
/**
|
||||
* @brief Set the session to blocking/nonblocking mode.
|
||||
*
|
||||
* @param ssh_bind The ssh server bind to use.
|
||||
*
|
||||
* @param blocking Zero for nonblocking mode.
|
||||
*/
|
||||
void ssh_bind_set_blocking(SSH_BIND *ssh_bind, int blocking);
|
||||
|
||||
/**
|
||||
* @brief Recover the file descriptor from the session.
|
||||
*
|
||||
* @param ssh_bind The ssh server bind to get the fd from.
|
||||
*
|
||||
* @return The file descriptor.
|
||||
*/
|
||||
socket_t ssh_bind_get_fd(SSH_BIND *ssh_bind);
|
||||
|
||||
/**
|
||||
* @brief Set the file descriptor for a session.
|
||||
*
|
||||
* @param ssh_bind The ssh server bind to set the fd.
|
||||
*
|
||||
* @param fd The file descriptor.
|
||||
*/
|
||||
void ssh_bind_set_fd(SSH_BIND *ssh_bind, socket_t fd);
|
||||
|
||||
/**
|
||||
* @brief Allow the file descriptor to accept new sessions.
|
||||
*
|
||||
* @param ssh_bind The ssh server bind to use.
|
||||
*/
|
||||
void ssh_bind_fd_toaccept(SSH_BIND *ssh_bind);
|
||||
|
||||
/**
|
||||
* @brief Accept an incoming ssh connection and initialize the session.
|
||||
*
|
||||
* @param ssh_bind The ssh server bind to accept a connection.
|
||||
*
|
||||
* @return A newly allocated ssh session, NULL on error.
|
||||
*/
|
||||
SSH_SESSION *ssh_bind_accept(SSH_BIND *ssh_bind);
|
||||
|
||||
/**
|
||||
* @brief Free a ssh servers bind.
|
||||
*
|
||||
* @param ssh_bind The ssh server bind to free.
|
||||
*/
|
||||
void ssh_bind_free(SSH_BIND *ssh_bind);
|
||||
|
||||
/**
|
||||
* @brief Exchange the banner and cryptographic keys.
|
||||
*
|
||||
* @param session The ssh session to accept a connection.
|
||||
*
|
||||
* @return 0 on success, < 0 on error.
|
||||
*/
|
||||
int ssh_accept(SSH_SESSION *session);
|
||||
|
||||
/* messages.c */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user