comparison session.h @ 454:7e43f5e473b9

- Add -K keepalive flag for dropbear and dbclient - Try to reduce the frequency of select() timeouts - Add a max receive window size of 1MB
author Matt Johnston <matt@ucc.asn.au>
date Wed, 08 Aug 2007 15:12:06 +0000
parents 4cab61369879
children e3db1f7a2e43
comparison
equal deleted inserted replaced
453:29953de278ae 454:7e43f5e473b9
43 43
44 void common_session_init(int sock, char* remotehost); 44 void common_session_init(int sock, char* remotehost);
45 void session_loop(void(*loophandler)()); 45 void session_loop(void(*loophandler)());
46 void common_session_cleanup(); 46 void common_session_cleanup();
47 void session_identification(); 47 void session_identification();
48 void send_msg_ignore();
48 49
49 50
50 /* Server */ 51 /* Server */
51 void svr_session(int sock, int childpipe, char *remotehost, char *addrstring); 52 void svr_session(int sock, int childpipe, char *remotehost, char *addrstring);
52 void svr_dropbear_exit(int exitcode, const char* format, va_list param); 53 void svr_dropbear_exit(int exitcode, const char* format, va_list param);
90 struct sshsession { 91 struct sshsession {
91 92
92 /* Is it a client or server? */ 93 /* Is it a client or server? */
93 unsigned char isserver; 94 unsigned char isserver;
94 95
95 long connecttimeout; /* time to disconnect if we have a timeout (for 96 time_t connect_time; /* time the connection was established
96 userauth etc), or 0 for no timeout */ 97 (cleared after auth once we're not
98 respecting AUTH_TIMEOUT any more) */
97 99
98 int sock; 100 int sock;
99 101
100 unsigned char *remotehost; /* the peer hostname */ 102 unsigned char *remotehost; /* the peer hostname */
101 103
129 131
130 unsigned char lastpacket; /* What the last received packet type was */ 132 unsigned char lastpacket; /* What the last received packet type was */
131 133
132 int signal_pipe[2]; /* stores endpoints of a self-pipe used for 134 int signal_pipe[2]; /* stores endpoints of a self-pipe used for
133 race-free signal handling */ 135 race-free signal handling */
136
137 time_t last_packet_time; /* time of the last packet transmission, for
138 keepalive purposes */
134 139
135 /* KEX/encryption related */ 140 /* KEX/encryption related */
136 struct KEXState kexstate; 141 struct KEXState kexstate;
137 struct key_context *keys; 142 struct key_context *keys;
138 struct key_context *newkeys; 143 struct key_context *newkeys;