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

Diff for /src/usr.bin/ssh/packet.c between version 1.72 and 1.73

version 1.72, 2001/11/10 13:37:20 version 1.73, 2001/12/05 03:56:39
Line 147 
Line 147 
 /* Returns 1 if remote host is connected via socket, 0 if not. */  /* Returns 1 if remote host is connected via socket, 0 if not. */
   
 int  int
 packet_connection_is_on_socket()  packet_connection_is_on_socket(void)
 {  {
         struct sockaddr_storage from, to;          struct sockaddr_storage from, to;
         socklen_t fromlen, tolen;          socklen_t fromlen, tolen;
Line 173 
Line 173 
 /* returns 1 if connection is via ipv4 */  /* returns 1 if connection is via ipv4 */
   
 int  int
 packet_connection_is_ipv4()  packet_connection_is_ipv4(void)
 {  {
         struct sockaddr_storage to;          struct sockaddr_storage to;
         socklen_t tolen = sizeof(to);          socklen_t tolen = sizeof(to);
Line 189 
Line 189 
 /* Sets the connection into non-blocking mode. */  /* Sets the connection into non-blocking mode. */
   
 void  void
 packet_set_nonblocking()  packet_set_nonblocking(void)
 {  {
         /* Set the socket into non-blocking mode. */          /* Set the socket into non-blocking mode. */
         if (fcntl(connection_in, F_SETFL, O_NONBLOCK) < 0)          if (fcntl(connection_in, F_SETFL, O_NONBLOCK) < 0)
Line 204 
Line 204 
 /* Returns the socket used for reading. */  /* Returns the socket used for reading. */
   
 int  int
 packet_get_connection_in()  packet_get_connection_in(void)
 {  {
         return connection_in;          return connection_in;
 }  }
Line 212 
Line 212 
 /* Returns the descriptor used for writing. */  /* Returns the descriptor used for writing. */
   
 int  int
 packet_get_connection_out()  packet_get_connection_out(void)
 {  {
         return connection_out;          return connection_out;
 }  }
Line 220 
Line 220 
 /* Closes the connection and clears and frees internal data structures. */  /* Closes the connection and clears and frees internal data structures. */
   
 void  void
 packet_close()  packet_close(void)
 {  {
         if (!initialized)          if (!initialized)
                 return;                  return;
Line 253 
Line 253 
 /* Returns the remote protocol flags set earlier by the above function. */  /* Returns the remote protocol flags set earlier by the above function. */
   
 u_int  u_int
 packet_get_protocol_flags()  packet_get_protocol_flags(void)
 {  {
         return remote_protocol_flags;          return remote_protocol_flags;
 }  }
Line 594 
Line 594 
 }  }
   
 void  void
 packet_send()  packet_send(void)
 {  {
         if (compat20)          if (compat20)
                 packet_send2();                  packet_send2();
Line 964 
Line 964 
 /* Returns a character from the packet. */  /* Returns a character from the packet. */
   
 u_int  u_int
 packet_get_char()  packet_get_char(void)
 {  {
         char ch;          char ch;
         buffer_get(&incoming_packet, &ch, 1);          buffer_get(&incoming_packet, &ch, 1);
Line 974 
Line 974 
 /* Returns an integer from the packet data. */  /* Returns an integer from the packet data. */
   
 u_int  u_int
 packet_get_int()  packet_get_int(void)
 {  {
         return buffer_get_int(&incoming_packet);          return buffer_get_int(&incoming_packet);
 }  }
Line 1111 
Line 1111 
 /* Checks if there is any buffered output, and tries to write some of the output. */  /* Checks if there is any buffered output, and tries to write some of the output. */
   
 void  void
 packet_write_poll()  packet_write_poll(void)
 {  {
         int len = buffer_len(&output);          int len = buffer_len(&output);
         if (len > 0) {          if (len > 0) {
Line 1132 
Line 1132 
  */   */
   
 void  void
 packet_write_wait()  packet_write_wait(void)
 {  {
         fd_set *setp;          fd_set *setp;
   
Line 1154 
Line 1154 
 /* Returns true if there is buffered data to write to the connection. */  /* Returns true if there is buffered data to write to the connection. */
   
 int  int
 packet_have_data_to_write()  packet_have_data_to_write(void)
 {  {
         return buffer_len(&output) != 0;          return buffer_len(&output) != 0;
 }  }
Line 1162 
Line 1162 
 /* Returns true if there is not too much data to write to the connection. */  /* Returns true if there is not too much data to write to the connection. */
   
 int  int
 packet_not_very_much_data_to_write()  packet_not_very_much_data_to_write(void)
 {  {
         if (interactive_mode)          if (interactive_mode)
                 return buffer_len(&output) < 16384;                  return buffer_len(&output) < 16384;
Line 1221 
Line 1221 
 /* Returns true if the current connection is interactive. */  /* Returns true if the current connection is interactive. */
   
 int  int
 packet_is_interactive()  packet_is_interactive(void)
 {  {
         return interactive_mode;          return interactive_mode;
 }  }

Legend:
Removed from v.1.72  
changed lines
  Added in v.1.73