summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/channels.h
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2002-01-13 21:31:20 +0000
committermarkus <markus@openbsd.org>2002-01-13 21:31:20 +0000
commit5b0d94c911925a708e3695aff85fe096abbf60af (patch)
treef8f5e54c243c691da5581c02be5788560d19cb73 /usr.bin/ssh/channels.h
parentuse buffer API and avoid static strings of fixed size; ok provos@/mouring@ (diff)
downloadwireguard-openbsd-5b0d94c911925a708e3695aff85fe096abbf60af.tar.xz
wireguard-openbsd-5b0d94c911925a708e3695aff85fe096abbf60af.zip
add chan_set_[io]state(), order states, state is now an u_int,
simplifies debugging messages; ok provos@
Diffstat (limited to 'usr.bin/ssh/channels.h')
-rw-r--r--usr.bin/ssh/channels.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/usr.bin/ssh/channels.h b/usr.bin/ssh/channels.h
index 40142c50972..a857db11ede 100644
--- a/usr.bin/ssh/channels.h
+++ b/usr.bin/ssh/channels.h
@@ -32,7 +32,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* RCSID("$OpenBSD: channels.h,v 1.56 2001/12/28 15:06:00 markus Exp $"); */
+/* RCSID("$OpenBSD: channels.h,v 1.57 2002/01/13 21:31:20 markus Exp $"); */
#ifndef CHANNEL_H
#define CHANNEL_H
@@ -68,8 +68,8 @@ struct Channel {
int type; /* channel type/state */
int self; /* my own channel identifier */
int remote_id; /* channel identifier for remote peer */
- int istate; /* input from channel (state of receive half) */
- int ostate; /* output to channel (state of transmit half) */
+ u_int istate; /* input from channel (state of receive half) */
+ u_int ostate; /* output to channel (state of transmit half) */
int flags; /* close sent/rcvd */
int rfd; /* read fd */
int wfd; /* write fd */
@@ -123,16 +123,16 @@ struct Channel {
#define CHAN_X11_PACKET_DEFAULT (CHAN_X11_WINDOW_DEFAULT/2)
/* possible input states */
-#define CHAN_INPUT_OPEN 0x01
-#define CHAN_INPUT_WAIT_DRAIN 0x02
-#define CHAN_INPUT_WAIT_OCLOSE 0x04
-#define CHAN_INPUT_CLOSED 0x08
+#define CHAN_INPUT_OPEN 0
+#define CHAN_INPUT_WAIT_DRAIN 1
+#define CHAN_INPUT_WAIT_OCLOSE 2
+#define CHAN_INPUT_CLOSED 3
/* possible output states */
-#define CHAN_OUTPUT_OPEN 0x10
-#define CHAN_OUTPUT_WAIT_DRAIN 0x20
-#define CHAN_OUTPUT_WAIT_IEOF 0x40
-#define CHAN_OUTPUT_CLOSED 0x80
+#define CHAN_OUTPUT_OPEN 0
+#define CHAN_OUTPUT_WAIT_DRAIN 1
+#define CHAN_OUTPUT_WAIT_IEOF 2
+#define CHAN_OUTPUT_CLOSED 3
#define CHAN_CLOSE_SENT 0x01
#define CHAN_CLOSE_RCVD 0x02