summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2022-01-06 21:46:23 +0000
committerDamien Miller <djm@mindrot.org>2022-01-07 09:11:58 +1100
commit5c79952dfe1aa36105c93b3f383ce9be04dee384 (patch)
tree59b1773b2e805e9362e14d9d5e6d3e49190ddee0 /channels.h
parent24c5187edfef4651a625b7d5d692c8c7e794f71f (diff)
downloadopenssh-git-5c79952dfe1aa36105c93b3f383ce9be04dee384.tar.gz
upstream: prepare for conversion of ssh, sshd mainloop from
select() to poll() by moving FD_SET construction out of channel handlers into separate functions. ok markus OpenBSD-Commit-ID: 937fbf2a4de12b19fb9d5168424e206124807027
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/channels.h b/channels.h
index 6bf86b00..88898f89 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.h,v 1.138 2021/05/19 01:24:05 djm Exp $ */
+/* $OpenBSD: channels.h,v 1.139 2022/01/06 21:46:23 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -136,6 +136,8 @@ struct Channel {
int wfd; /* write fd */
int efd; /* extended fd */
int sock; /* sock fd */
+ u_int io_want; /* bitmask of SSH_CHAN_IO_* */
+ u_int io_ready; /* bitmask of SSH_CHAN_IO_* */
int ctl_chan; /* control channel (multiplexed connections) */
int isatty; /* rfd is a tty */
#ifdef _AIX
@@ -231,6 +233,14 @@ struct Channel {
#define CHAN_EOF_RCVD 0x08
#define CHAN_LOCAL 0x10
+/* file descriptor events */
+#define SSH_CHAN_IO_RFD 0x01
+#define SSH_CHAN_IO_WFD 0x02
+#define SSH_CHAN_IO_EFD_R 0x04
+#define SSH_CHAN_IO_EFD_W 0x08
+#define SSH_CHAN_IO_SOCK_R 0x10
+#define SSH_CHAN_IO_SOCK_W 0x20
+
/* Read buffer size */
#define CHAN_RBUF (16*1024)