version 1.48, 2001/02/06 22:43:02 |
version 1.49, 2001/02/08 19:30:51 |
|
|
/* Returns the user\'s terminal to normal mode if it had been put in raw mode. */ |
/* Returns the user\'s terminal to normal mode if it had been put in raw mode. */ |
|
|
void |
void |
leave_raw_mode() |
leave_raw_mode(void) |
{ |
{ |
if (!in_raw_mode) |
if (!in_raw_mode) |
return; |
return; |
|
|
/* Puts the user\'s terminal in raw mode. */ |
/* Puts the user\'s terminal in raw mode. */ |
|
|
void |
void |
enter_raw_mode() |
enter_raw_mode(void) |
{ |
{ |
struct termios tio; |
struct termios tio; |
|
|
|
|
/* Restores stdin to blocking mode. */ |
/* Restores stdin to blocking mode. */ |
|
|
void |
void |
leave_non_blocking() |
leave_non_blocking(void) |
{ |
{ |
if (in_non_blocking_mode) { |
if (in_non_blocking_mode) { |
(void) fcntl(fileno(stdin), F_SETFL, 0); |
(void) fcntl(fileno(stdin), F_SETFL, 0); |
|
|
/* Puts stdin terminal in non-blocking mode. */ |
/* Puts stdin terminal in non-blocking mode. */ |
|
|
void |
void |
enter_non_blocking() |
enter_non_blocking(void) |
{ |
{ |
in_non_blocking_mode = 1; |
in_non_blocking_mode = 1; |
(void) fcntl(fileno(stdin), F_SETFL, O_NONBLOCK); |
(void) fcntl(fileno(stdin), F_SETFL, O_NONBLOCK); |
|
|
*/ |
*/ |
|
|
double |
double |
get_current_time() |
get_current_time(void) |
{ |
{ |
struct timeval tv; |
struct timeval tv; |
gettimeofday(&tv, NULL); |
gettimeofday(&tv, NULL); |
|
|
*/ |
*/ |
|
|
void |
void |
client_check_initial_eof_on_stdin() |
client_check_initial_eof_on_stdin(void) |
{ |
{ |
int len; |
int len; |
char buf[1]; |
char buf[1]; |
|
|
*/ |
*/ |
|
|
void |
void |
client_make_packets_from_stdin_data() |
client_make_packets_from_stdin_data(void) |
{ |
{ |
u_int len; |
u_int len; |
|
|
|
|
*/ |
*/ |
|
|
void |
void |
client_check_window_change() |
client_check_window_change(void) |
{ |
{ |
struct winsize ws; |
struct winsize ws; |
|
|
|
|
*/ |
*/ |
|
|
void |
void |
client_process_buffered_input_packets() |
client_process_buffered_input_packets(void) |
{ |
{ |
dispatch_run(DISPATCH_NONBLOCK, &quit_pending, NULL); |
dispatch_run(DISPATCH_NONBLOCK, &quit_pending, NULL); |
} |
} |
|
|
} |
} |
|
|
void |
void |
client_init_dispatch_20() |
client_init_dispatch_20(void) |
{ |
{ |
dispatch_init(&dispatch_protocol_error); |
dispatch_init(&dispatch_protocol_error); |
dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose); |
dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose); |
|
|
dispatch_set(SSH2_MSG_CHANNEL_WINDOW_ADJUST, &channel_input_window_adjust); |
dispatch_set(SSH2_MSG_CHANNEL_WINDOW_ADJUST, &channel_input_window_adjust); |
} |
} |
void |
void |
client_init_dispatch_13() |
client_init_dispatch_13(void) |
{ |
{ |
dispatch_init(NULL); |
dispatch_init(NULL); |
dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_close); |
dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_close); |
|
|
&x11_input_open : &deny_input_open); |
&x11_input_open : &deny_input_open); |
} |
} |
void |
void |
client_init_dispatch_15() |
client_init_dispatch_15(void) |
{ |
{ |
client_init_dispatch_13(); |
client_init_dispatch_13(); |
dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_ieof); |
dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_ieof); |
dispatch_set(SSH_MSG_CHANNEL_CLOSE_CONFIRMATION, & channel_input_oclose); |
dispatch_set(SSH_MSG_CHANNEL_CLOSE_CONFIRMATION, & channel_input_oclose); |
} |
} |
void |
void |
client_init_dispatch() |
client_init_dispatch(void) |
{ |
{ |
if (compat20) |
if (compat20) |
client_init_dispatch_20(); |
client_init_dispatch_20(); |