comparison session.h @ 733:70811267715c

Run the cleanup handler also when we close due to TCP connection being closed
author Matt Johnston <matt@ucc.asn.au>
date Mon, 01 Apr 2013 22:26:55 +0800
parents 00bc3df3a9c3
children 077bbe1eb220
comparison
equal deleted inserted replaced
732:2e5f2bc60e40 733:70811267715c
42 extern int sessinitdone; /* Is set to 0 somewhere */ 42 extern int sessinitdone; /* Is set to 0 somewhere */
43 extern int exitflag; 43 extern int exitflag;
44 44
45 void common_session_init(int sock_in, int sock_out); 45 void common_session_init(int sock_in, int sock_out);
46 void session_loop(void(*loophandler)()); 46 void session_loop(void(*loophandler)());
47 void common_session_cleanup(); 47 void session_cleanup();
48 void send_session_identification(); 48 void send_session_identification();
49 void send_msg_ignore(); 49 void send_msg_ignore();
50 50
51 const char* get_user_shell(); 51 const char* get_user_shell();
52 void fill_passwd(const char* username); 52 void fill_passwd(const char* username);
56 void svr_dropbear_exit(int exitcode, const char* format, va_list param) ATTRIB_NORETURN; 56 void svr_dropbear_exit(int exitcode, const char* format, va_list param) ATTRIB_NORETURN;
57 void svr_dropbear_log(int priority, const char* format, va_list param); 57 void svr_dropbear_log(int priority, const char* format, va_list param);
58 58
59 /* Client */ 59 /* Client */
60 void cli_session(int sock_in, int sock_out); 60 void cli_session(int sock_in, int sock_out);
61 void cli_session_cleanup();
62 void cleantext(unsigned char* dirtytext); 61 void cleantext(unsigned char* dirtytext);
63 62
64 /* crypto parameters that are stored individually for transmit and receive */ 63 /* crypto parameters that are stored individually for transmit and receive */
65 struct key_context_directional { 64 struct key_context_directional {
66 const struct dropbear_cipher *algo_crypt; 65 const struct dropbear_cipher *algo_crypt;
179 hence the function-pointer callback.*/ 178 hence the function-pointer callback.*/
180 179
181 void(*remoteclosed)(); /* A callback to handle closure of the 180 void(*remoteclosed)(); /* A callback to handle closure of the
182 remote connection */ 181 remote connection */
183 182
183 void(*extra_session_cleanup)(); /* client or server specific cleanup */
184 184
185 struct AuthState authstate; /* Common amongst client and server, since most 185 struct AuthState authstate; /* Common amongst client and server, since most
186 struct elements are common */ 186 struct elements are common */
187 187
188 /* Channel related */ 188 /* Channel related */