aboutsummaryrefslogtreecommitdiff
path: root/include/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2008-03-04 00:44:02 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2008-03-04 00:44:02 +0000
commit077dd81fcc9453613de18c6d037ef61f3a8e161c (patch)
tree027bfb56ae17b1395100809a6ab791551ab8ca0e /include/libssh
parent9b5f8935132433d64757ac60ce0ee4e8c59a8af8 (diff)
downloadlibssh-077dd81fcc9453613de18c6d037ef61f3a8e161c.tar.gz
libssh-077dd81fcc9453613de18c6d037ef61f3a8e161c.tar.xz
libssh-077dd81fcc9453613de18c6d037ef61f3a8e161c.zip
added the socket class and created wrappers
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@137 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/priv.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index b871e1f7..08f9744d 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -285,7 +285,7 @@ struct error_struct {
struct ssh_session {
struct error_struct error;
- int fd;
+ struct socket *socket;
SSH_OPTIONS *options;
char *serverbanner;
char *clientbanner;
@@ -422,6 +422,21 @@ struct ssh_message {
struct ssh_channel_request channel_request;
};
+/* socketc.c */
+
+struct socket;
+struct socket *ssh_socket_new();
+void ssh_socket_free(struct socket *s);
+void ssh_socket_set_fd(struct socket *s, int fd);
+int ssh_socket_get_fd(struct socket *s);
+void ssh_socket_close(struct socket *s);
+int ssh_socket_read(struct socket *s, void *buffer, int len);
+int ssh_socket_write(struct socket *s,const void *buffer, int len);
+int ssh_socket_is_open(struct socket *s);
+int ssh_socket_fd_isset(struct socket *s, fd_set *set);
+void ssh_socket_fd_set(struct socket *s, fd_set *set, int *fd_max);
+int ssh_socket_completeread(struct socket *s, void *buffer, int len);
+
/* session.c */
void ssh_cleanup(SSH_SESSION *session);
@@ -603,7 +618,7 @@ char *my_gcry_bn2dec(bignum bn);
#endif /* !HAVE_LIBGCRYPT */
#ifdef __cplusplus
-} ;
+}
#endif
#endif /* _LIBSSH_PRIV_H */