[BACK]Return to clientloop.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/clientloop.c between version 1.19 and 1.20

version 1.19, 2000/04/14 10:09:15 version 1.20, 2000/04/14 10:30:30
Line 1 
Line 1 
 /*  /*
  *   *
  * clientloop.c   * clientloop.c
  *   *
  * Author: Tatu Ylonen <ylo@cs.hut.fi>   * Author: Tatu Ylonen <ylo@cs.hut.fi>
  *   *
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland   * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved   *                    All rights reserved
  *   *
  *   *
  * Created: Sat Sep 23 12:23:57 1995 ylo   * Created: Sat Sep 23 12:23:57 1995 ylo
  *   *
  * The main loop for the interactive session (client side).   * The main loop for the interactive session (client side).
  *   *
  * SSH2 support added by Markus Friedl.   * SSH2 support added by Markus Friedl.
  */   */
   
Line 83 
Line 83 
   
 /* 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()
 {  {
         if (!in_raw_mode)          if (!in_raw_mode)
Line 97 
Line 97 
   
 /* Puts the user\'s terminal in raw mode. */  /* Puts the user\'s terminal in raw mode. */
   
 void  void
 enter_raw_mode()  enter_raw_mode()
 {  {
         struct termios tio;          struct termios tio;
Line 123 
Line 123 
   
 /* Restores stdin to blocking mode. */  /* Restores stdin to blocking mode. */
   
 void  void
 leave_non_blocking()  leave_non_blocking()
 {  {
         if (in_non_blocking_mode) {          if (in_non_blocking_mode) {
Line 135 
Line 135 
   
 /* Puts stdin terminal in non-blocking mode. */  /* Puts stdin terminal in non-blocking mode. */
   
 void  void
 enter_non_blocking()  enter_non_blocking()
 {  {
         in_non_blocking_mode = 1;          in_non_blocking_mode = 1;
Line 148 
Line 148 
  * flag indicating that the window has changed.   * flag indicating that the window has changed.
  */   */
   
 void  void
 window_change_handler(int sig)  window_change_handler(int sig)
 {  {
         received_window_change_signal = 1;          received_window_change_signal = 1;
Line 160 
Line 160 
  * signals must be trapped to restore terminal modes.   * signals must be trapped to restore terminal modes.
  */   */
   
 void  void
 signal_handler(int sig)  signal_handler(int sig)
 {  {
         if (in_raw_mode)          if (in_raw_mode)
Line 177 
Line 177 
  * available resolution.   * available resolution.
  */   */
   
 double  double
 get_current_time()  get_current_time()
 {  {
         struct timeval tv;          struct timeval tv;
Line 191 
Line 191 
  * not appear to wake up when redirecting from /dev/null.   * not appear to wake up when redirecting from /dev/null.
  */   */
   
 void  void
 client_check_initial_eof_on_stdin()  client_check_initial_eof_on_stdin()
 {  {
         int len;          int len;
Line 245 
Line 245 
  * connection.   * connection.
  */   */
   
 void  void
 client_make_packets_from_stdin_data()  client_make_packets_from_stdin_data()
 {  {
         unsigned int len;          unsigned int len;
Line 276 
Line 276 
  * appropriate.   * appropriate.
  */   */
   
 void  void
 client_check_window_change()  client_check_window_change()
 {  {
         struct winsize ws;          struct winsize ws;
Line 313 
Line 313 
  * one of the file descriptors).   * one of the file descriptors).
  */   */
   
 void  void
 client_wait_until_can_do_something(fd_set * readset, fd_set * writeset)  client_wait_until_can_do_something(fd_set * readset, fd_set * writeset)
 {  {
         /*debug("client_wait_until_can_do_something"); */          /*debug("client_wait_until_can_do_something"); */
Line 380 
Line 380 
         }          }
 }  }
   
 void  void
 client_suspend_self()  client_suspend_self()
 {  {
         struct winsize oldws, newws;          struct winsize oldws, newws;
Line 425 
Line 425 
         enter_raw_mode();          enter_raw_mode();
 }  }
   
 void  void
 client_process_net_input(fd_set * readset)  client_process_net_input(fd_set * readset)
 {  {
         int len;          int len;
Line 468 
Line 468 
         }          }
 }  }
   
 void  void
 client_process_input(fd_set * readset)  client_process_input(fd_set * readset)
 {  {
         int len, pid;          int len, pid;
Line 657 
Line 657 
         }          }
 }  }
   
 void  void
 client_process_output(fd_set * writeset)  client_process_output(fd_set * writeset)
 {  {
         int len;          int len;
Line 717 
Line 717 
  * preparatory phase.   * preparatory phase.
  */   */
   
 void  void
 client_process_buffered_input_packets()  client_process_buffered_input_packets()
 {  {
         dispatch_run(DISPATCH_NONBLOCK, &quit_pending);          dispatch_run(DISPATCH_NONBLOCK, &quit_pending);
Line 730 
Line 730 
  * character for terminating or suspending the session.   * character for terminating or suspending the session.
  */   */
   
 int  int
 client_loop(int have_pty, int escape_char_arg)  client_loop(int have_pty, int escape_char_arg)
 {  {
         extern Options options;          extern Options options;
Line 953 
Line 953 
         quit_pending = 1;          quit_pending = 1;
 }  }
   
 void  void
 client_init_dispatch_20()  client_init_dispatch_20()
 {  {
         dispatch_init(&dispatch_protocol_error);          dispatch_init(&dispatch_protocol_error);
Line 966 
Line 966 
         dispatch_set(SSH2_MSG_CHANNEL_REQUEST, &channel_input_channel_request);          dispatch_set(SSH2_MSG_CHANNEL_REQUEST, &channel_input_channel_request);
         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()
 {  {
         dispatch_init(NULL);          dispatch_init(NULL);
Line 983 
Line 983 
         dispatch_set(SSH_SMSG_STDOUT_DATA, &client_input_stdout_data);          dispatch_set(SSH_SMSG_STDOUT_DATA, &client_input_stdout_data);
         dispatch_set(SSH_SMSG_X11_OPEN, &x11_input_open);          dispatch_set(SSH_SMSG_X11_OPEN, &x11_input_open);
 }  }
 void  void
 client_init_dispatch_15()  client_init_dispatch_15()
 {  {
         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()
 {  {
         if (compat20)          if (compat20)

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20