comparison channel.h @ 108:10f4d3319780

- added circular buffering for channels - added stderr support for the client - cleaned up a bunch of "unused" warnings, duplicated header definitions - added exit-status support for the client
author Matt Johnston <matt@ucc.asn.au>
date Thu, 26 Aug 2004 13:16:40 +0000
parents d3eb1fa8484e
children 8c08fd2b7f5b
comparison
equal deleted inserted replaced
107:d3eb1fa8484e 108:10f4d3319780
43 #define SSH_OPEN_RESOURCE_SHORTAGE 4 43 #define SSH_OPEN_RESOURCE_SHORTAGE 4
44 44
45 /* Not a real type */ 45 /* Not a real type */
46 #define SSH_OPEN_IN_PROGRESS 99 46 #define SSH_OPEN_IN_PROGRESS 99
47 47
48 #define MAX_CHANNELS 60 /* simple mem restriction, includes each tcp/x11 48 #define MAX_CHANNELS 100 /* simple mem restriction, includes each tcp/x11
49 connection, so can't be _too_ small */ 49 connection, so can't be _too_ small */
50 50
51 #define CHAN_EXTEND_SIZE 3 /* how many extra slots to add when we need more */ 51 #define CHAN_EXTEND_SIZE 3 /* how many extra slots to add when we need more */
52 52
53 #define RECV_MAXWINDOW 6000 /* tweak */ 53 #define RECV_MAXWINDOW 4000 /* tweak */
54 #define RECV_WINDOWEXTEND (RECV_MAXWINDOW/2) /* We send a "window extend" every 54 #define RECV_WINDOWEXTEND 500 /* We send a "window extend" every
55 RECV_WINDOWEXTEND bytes */ 55 RECV_WINDOWEXTEND bytes */
56 #define RECV_MAXPACKET 1400 /* tweak */ 56 #define RECV_MAXPACKET RECV_MAXWINDOW /* tweak */
57 #define RECV_MINWINDOW 19000 /* when we get below this, we send a windowadjust */
58 57
59 struct ChanType; 58 struct ChanType;
60 59
61 struct Channel { 60 struct Channel {
62 61
63 unsigned int index; /* the local channel index */ 62 unsigned int index; /* the local channel index */
64 unsigned int remotechan; 63 unsigned int remotechan;
65 unsigned int recvwindow, transwindow; 64 unsigned int recvwindow, transwindow;
65 unsigned int recvdonelen;
66 unsigned int recvmaxpacket, transmaxpacket; 66 unsigned int recvmaxpacket, transmaxpacket;
67 void* typedata; /* a pointer to type specific data */ 67 void* typedata; /* a pointer to type specific data */
68 int infd; /* data to send over the wire */ 68 int infd; /* data to send over the wire */
69 int outfd; /* data for consumption, what was in writebuf */ 69 int outfd; /* data for consumption, what was in writebuf */
70 int errfd; /* used like infd or errfd, depending if it's client or server. 70 int errfd; /* used like infd or errfd, depending if it's client or server.