aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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 */