29 typedef struct pollfd ssh_pollfd_t;
35 typedef struct ssh_pollfd_struct {
41 typedef unsigned long int nfds_t;
46 #define POLLRDNORM 0x0100
49 #define POLLRDBAND 0x0200
52 #define POLLIN (POLLRDNORM | POLLRDBAND)
55 #define POLLPRI 0x0400
59 #define POLLWRNORM 0x0010
62 #define POLLOUT (POLLWRNORM)
65 #define POLLWRBAND 0x0020
69 #define POLLERR 0x0001
72 #define POLLHUP 0x0002
75 #define POLLNVAL 0x0004
98 #define POLLNVAL 0x020
102 #define POLLRDNORM 0x040
105 #define POLLRDBAND 0x080
108 #define POLLWRNORM 0x100
111 #define POLLWRBAND 0x200
117 void ssh_poll_init(
void);
118 void ssh_poll_cleanup(
void);
119 int ssh_poll(ssh_pollfd_t *fds, nfds_t nfds,
int timeout);
120 typedef struct ssh_poll_ctx_struct *ssh_poll_ctx;
121 typedef struct ssh_poll_handle_struct *ssh_poll_handle;
135 typedef int (*ssh_poll_callback)(ssh_poll_handle p, socket_t fd,
int revents,
138 struct ssh_socket_struct;
140 ssh_poll_handle
ssh_poll_new(socket_t fd,
short events, ssh_poll_callback cb,
157 ssh_poll_ctx ssh_poll_get_default_ctx(ssh_session session);