[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.171 and 1.172

version 1.171, 2010/11/05 02:46:47 version 1.172, 2010/11/13 23:27:50
Line 1734 
Line 1734 
 }  }
   
 static void  static void
 packet_set_tos(int interactive)  packet_set_tos(int tos)
 {  {
         int tos = interactive ? IPTOS_LOWDELAY : IPTOS_THROUGHPUT;  
   
         if (!packet_connection_is_on_socket() ||          if (!packet_connection_is_on_socket() ||
             !packet_connection_is_ipv4())              !packet_connection_is_ipv4())
                 return;                  return;
           debug3("%s: set IP_TOS 0x%02x", __func__, tos);
         if (setsockopt(active_state->connection_in, IPPROTO_IP, IP_TOS, &tos,          if (setsockopt(active_state->connection_in, IPPROTO_IP, IP_TOS, &tos,
             sizeof(tos)) < 0)              sizeof(tos)) < 0)
                 error("setsockopt IP_TOS %d: %.100s:",                  error("setsockopt IP_TOS %d: %.100s:",
Line 1750 
Line 1749 
 /* Informs that the current session is interactive.  Sets IP flags for that. */  /* Informs that the current session is interactive.  Sets IP flags for that. */
   
 void  void
 packet_set_interactive(int interactive)  packet_set_interactive(int interactive, int qos_interactive, int qos_bulk)
 {  {
         if (active_state->set_interactive_called)          if (active_state->set_interactive_called)
                 return;                  return;
Line 1763 
Line 1762 
         if (!packet_connection_is_on_socket())          if (!packet_connection_is_on_socket())
                 return;                  return;
         set_nodelay(active_state->connection_in);          set_nodelay(active_state->connection_in);
         packet_set_tos(interactive);          packet_set_tos(interactive ? qos_interactive : qos_bulk);
 }  }
   
 /* Returns true if the current connection is interactive. */  /* Returns true if the current connection is interactive. */

Legend:
Removed from v.1.171  
changed lines
  Added in v.1.172