=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/channels.h,v retrieving revision 1.50.2.2 retrieving revision 1.50.2.3 diff -u -r1.50.2.2 -r1.50.2.3 --- src/usr.bin/ssh/channels.h 2002/03/07 17:37:46 1.50.2.2 +++ src/usr.bin/ssh/channels.h 2002/05/17 00:03:23 1.50.2.3 @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.50.2.2 2002/03/07 17:37:46 jason Exp $ */ +/* $OpenBSD: channels.h,v 1.50.2.3 2002/05/17 00:03:23 miod Exp $ */ /* * Author: Tatu Ylonen @@ -135,6 +135,18 @@ #define CHAN_CLOSE_SENT 0x01 #define CHAN_CLOSE_RCVD 0x02 +#define CHAN_EOF_SENT 0x04 +#define CHAN_EOF_RCVD 0x08 + +/* check whether 'efd' is still in use */ +#define CHANNEL_EFD_INPUT_ACTIVE(c) \ + (compat20 && c->extended_usage == CHAN_EXTENDED_READ && \ + (c->efd != -1 || \ + buffer_len(&c->extended) > 0)) +#define CHANNEL_EFD_OUTPUT_ACTIVE(c) \ + (compat20 && c->extended_usage == CHAN_EXTENDED_WRITE && \ + ((c->efd != -1 && !(c->flags & (CHAN_EOF_RCVD|CHAN_CLOSE_RCVD))) || \ + buffer_len(&c->extended) > 0)) /* channel management */