=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/channels.h,v retrieving revision 1.139 retrieving revision 1.140 diff -u -r1.139 -r1.140 --- src/usr.bin/ssh/channels.h 2022/01/06 21:46:23 1.139 +++ src/usr.bin/ssh/channels.h 2022/01/06 21:48:38 1.140 @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.139 2022/01/06 21:46:23 djm Exp $ */ +/* $OpenBSD: channels.h,v 1.140 2022/01/06 21:48:38 djm Exp $ */ /* * Author: Tatu Ylonen @@ -138,15 +138,16 @@ int sock; /* sock fd */ u_int io_want; /* bitmask of SSH_CHAN_IO_* */ u_int io_ready; /* bitmask of SSH_CHAN_IO_* */ + int pollfd_offset; /* base offset into pollfd array (or -1) */ int ctl_chan; /* control channel (multiplexed connections) */ int isatty; /* rfd is a tty */ int client_tty; /* (client) TTY has been requested */ int force_drain; /* force close on iEOF */ time_t notbefore; /* Pause IO until deadline (time_t) */ - int delayed; /* post-select handlers for newly created + int delayed; /* post-IO handlers for newly created * channels are delayed until the first call - * to a matching pre-select handler. - * this way post-select handlers are not + * to a matching pre-IO handler. + * this way post-IO handlers are not * accidentally called if a FD gets reused */ int restore_block; /* fd mask to restore blocking status */ struct sshbuf *input; /* data read from socket, to be sent over @@ -235,8 +236,10 @@ #define SSH_CHAN_IO_WFD 0x02 #define SSH_CHAN_IO_EFD_R 0x04 #define SSH_CHAN_IO_EFD_W 0x08 +#define SSH_CHAN_IO_EFD (SSH_CHAN_IO_EFD_R|SSH_CHAN_IO_EFD_W) #define SSH_CHAN_IO_SOCK_R 0x10 #define SSH_CHAN_IO_SOCK_W 0x20 +#define SSH_CHAN_IO_SOCK (SSH_CHAN_IO_SOCK_R|SSH_CHAN_IO_SOCK_W) /* Read buffer size */ #define CHAN_RBUF (16*1024) @@ -305,10 +308,11 @@ int channel_input_status_confirm(int, u_int32_t, struct ssh *); /* file descriptor handling (read/write) */ +struct pollfd; -void channel_prepare_select(struct ssh *, fd_set **, fd_set **, int *, - u_int*, time_t*); -void channel_after_select(struct ssh *, fd_set *, fd_set *); +void channel_prepare_poll(struct ssh *, struct pollfd **, + u_int *, u_int *, u_int, time_t *); +void channel_after_poll(struct ssh *, struct pollfd *, u_int); void channel_output_poll(struct ssh *); int channel_not_very_much_buffered_data(struct ssh *);