summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 23:27:11 +1100
committerDamien Miller <djm@mindrot.org>2002-01-22 23:27:11 +1100
commitabea8ee1c3bd404fdab316f359061a1fd3292099 (patch)
treef486614d3ccb8b84f3703c0302a96ab004025961 /channels.h
parent0e3b87279c3f20630e616b4de1be7cae815682dd (diff)
- markus@cvs.openbsd.org 2002/01/13 21:31:20
[channels.h nchan.c] add chan_set_[io]state(), order states, state is now an u_int, simplifies debugging messages; ok provos@
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/channels.h b/channels.h
index 40142c50..a857db11 100644
--- a/channels.h
+++ b/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