]> andersk Git - openssh.git/blobdiff - channels.h
- (stevesk) [auth1.c] fix password auth for protocol 1 when
[openssh.git] / channels.h
index 781c49d479ad9f3bdb012e4b6572cb3330d5bfaf..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.62 2002/02/03 17:58:21 markus Exp $"); */
 
 #ifndef CHANNEL_H
 #define CHANNEL_H
@@ -113,12 +114,12 @@ struct Channel {
 #define CHAN_EXTENDED_WRITE            2
 
 /* default window/packet sizes for tcp/x11-fwd-channel */
-#define CHAN_SES_WINDOW_DEFAULT        (32*1024)
-#define CHAN_SES_PACKET_DEFAULT        (CHAN_SES_WINDOW_DEFAULT/2)
-#define CHAN_TCP_WINDOW_DEFAULT        (32*1024)
-#define CHAN_TCP_PACKET_DEFAULT        (CHAN_TCP_WINDOW_DEFAULT/2)
-#define CHAN_X11_WINDOW_DEFAULT        (4*1024)
-#define CHAN_X11_PACKET_DEFAULT        (CHAN_X11_WINDOW_DEFAULT/2)
+#define CHAN_SES_PACKET_DEFAULT        (32*1024)
+#define CHAN_SES_WINDOW_DEFAULT        (4*CHAN_SES_PACKET_DEFAULT)
+#define CHAN_TCP_PACKET_DEFAULT        (32*1024)
+#define CHAN_TCP_WINDOW_DEFAULT        (4*CHAN_TCP_PACKET_DEFAULT)
+#define CHAN_X11_PACKET_DEFAULT        (16*1024)
+#define CHAN_X11_WINDOW_DEFAULT        (4*CHAN_X11_PACKET_DEFAULT)
 
 /* possible input states */
 #define CHAN_INPUT_OPEN                        0
@@ -134,18 +135,29 @@ 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 */
 
 Channel        *channel_lookup(int);
 Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int);
-void    channel_set_fds(int, int, int, int, int, int);
+void    channel_set_fds(int, int, int, int, int, int, u_int);
 void    channel_free(Channel *);
 void    channel_free_all(void);
 void    channel_stop_listening(void);
 
 void    channel_send_open(int);
-void    channel_request(int, char *, int);
 void    channel_request_start(int, char *, int);
 void    channel_register_cleanup(int, channel_callback_fn *);
 void    channel_register_confirm(int, channel_callback_fn *);
This page took 0.06123 seconds and 4 git commands to generate.