comparison session.h @ 22:c1e5d9195402

merge of abac2150ee4f4031a98016241fbd136d24fed127 and ffa047425729e478a5b49b1ab0f8ec71c08a1421
author Matt Johnston <matt@ucc.asn.au>
date Wed, 23 Jun 2004 07:14:16 +0000
parents d7cc5b484a2e
children 469950e86d0f
comparison
equal deleted inserted replaced
14:5ae28f6101c1 22:c1e5d9195402
32 #include "auth.h" 32 #include "auth.h"
33 #include "channel.h" 33 #include "channel.h"
34 #include "queue.h" 34 #include "queue.h"
35 #include "runopts.h" 35 #include "runopts.h"
36 #include "listener.h" 36 #include "listener.h"
37 #include "packet.h"
37 38
38 extern int sessinitdone; /* Is set to 0 somewhere */ 39 extern int sessinitdone; /* Is set to 0 somewhere */
39 extern int exitflag; 40 extern int exitflag;
40 41
41 void common_session_init(int sock, runopts *opts); 42 void common_session_init(int sock, runopts *opts);
104 buffer *decryptreadbuf; /* Post-decryption */ 105 buffer *decryptreadbuf; /* Post-decryption */
105 buffer *payload; /* Post-decompression, the actual SSH packet */ 106 buffer *payload; /* Post-decompression, the actual SSH packet */
106 unsigned int transseq, recvseq; /* Sequence IDs */ 107 unsigned int transseq, recvseq; /* Sequence IDs */
107 108
108 /* Packet-handling flags */ 109 /* Packet-handling flags */
110 const packettype * packettypes; /* Packet handler mappings for this
111 session, see process-packet.c */
112
109 unsigned dataallowed : 1; /* whether we can send data packets or we are in 113 unsigned dataallowed : 1; /* whether we can send data packets or we are in
110 the middle of a KEX or something */ 114 the middle of a KEX or something */
111 115
112 unsigned char expecting; /* byte indicating what packet we expect next, 116 unsigned char requirenext; /* byte indicating what packet we require next,
113 or 0x00 for any */ 117 or 0x00 for any */
114 118
115 unsigned char ignorenext; /* whether to ignore the next packet, 119 unsigned char ignorenext; /* whether to ignore the next packet,
116 used for kex_follows stuff */ 120 used for kex_follows stuff */
117 121
128 buffer* kexhashbuf; /* session hash buffer calculated from various packets*/ 132 buffer* kexhashbuf; /* session hash buffer calculated from various packets*/
129 buffer* transkexinit; /* the kexinit packet we send should be kept so we 133 buffer* transkexinit; /* the kexinit packet we send should be kept so we
130 can add it to the hash when generating keys */ 134 can add it to the hash when generating keys */
131 135
132 136
137 unsigned char authdone; /* Indicates when authentication has been
138 completed. This applies to both client and
139 server - in the server it gets set to 1 when
140 authentication is successful, in the client it
141 is set when the server has told us that auth
142 succeeded */
133 143
134 /* Channel related */ 144 /* Channel related */
135 struct Channel ** channels; /* these pointers may be null */ 145 struct Channel ** channels; /* these pointers may be null */
136 unsigned int chansize; /* the number of Channel*s allocated for channels */ 146 unsigned int chansize; /* the number of Channel*s allocated for channels */
137 const struct ChanType **chantypes; /* The valid channel types */ 147 const struct ChanType **chantypes; /* The valid channel types */
138 148
139 149
140 /* TCP forwarding - where manage listeners */ 150 /* TCP forwarding - where manage listeners */
141 #ifndef DISABLE_REMOTETCPFWD 151 #ifdef USING_LISTENERS
142 struct Listener ** listeners; 152 struct Listener ** listeners;
143 unsigned int listensize; 153 unsigned int listensize;
154 /* Whether to allow binding to privileged ports (<1024). This doesn't
155 * really belong here, but nowhere else fits nicely */
144 #endif 156 #endif
157 int allowprivport;
145 158
146 }; 159 };
147 160
148 struct serversession { 161 struct serversession {
149 162