]> andersk Git - openssh.git/blobdiff - channels.h
- stevesk@cvs.openbsd.org 2002/06/10 21:21:10
[openssh.git] / channels.h
index b637ab32c5f39a7f53f4aecc4aca682b2ef42e11..bd31c455825b8f927906cc496b7e8c87456f529c 100644 (file)
@@ -1,3 +1,5 @@
+/*     $OpenBSD: channels.h,v 1.67 2002/03/26 22:50:39 markus Exp $    */
+
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, 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 */
 
This page took 0.131276 seconds and 4 git commands to generate.