X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/ea9700ba72956ee2ef0180e62c6d5fe58271dc9a..ad2e1857ead440bc890368595899b6b51f1fe9bb:/channels.h diff --git a/channels.h b/channels.h index b637ab32..bd31c455 100644 --- a/channels.h +++ b/channels.h @@ -1,3 +1,5 @@ +/* $OpenBSD: channels.h,v 1.67 2002/03/26 22:50:39 markus Exp $ */ + /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -32,7 +34,6 @@ * (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.64 2002/02/14 23:28:00 markus Exp $"); */ #ifndef CHANNEL_H #define CHANNEL_H @@ -134,6 +135,18 @@ struct Channel { #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 */