[hipl-commit] [trunk] Rev 4011: Removed TCP timeout stuff. It was disabled with #if 0 and wasn't really

  • From: Miika Komu <miika@xxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Thu, 18 Mar 2010 19:12:13 +0200

Committer: Miika Komu <miika@xxxxxx>
Date: 18/03/2010 at 19:12:13
Revision: 4011
Revision-id: miika@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Removed TCP timeout stuff. It was disabled with #if 0 and wasn't really 
  that useful according to Tao's thesis.

Modified:
  D  hipd/tcptimeout.c
  D  hipd/tcptimeout.h
  M  Android.mk
  M  Makefile.am
  M  doc/verbose-header-files.txt
  M  hipd/hipd.c
  M  hipd/init.c
  M  hipd/init.h
  M  hipd/user.c
  M  hipd/user.h
  M  lib/conf/hipconf.c
  M  lib/core/builder.c
  M  lib/core/icomm.h
  M  verbose-headers.txt

=== modified file 'Android.mk'
--- Android.mk  2010-03-10 10:03:40 +0000
+++ Android.mk  2010-03-18 17:12:09 +0000
@@ -39,7 +39,6 @@
                     accessor.c \
                     oppipdb.c \
                     dh.c \
-                    tcptimeout.c \
                     cert.c \
                     user_ipsec_sadb_api.c \
                     user_ipsec_hipd_msg.c \

=== modified file 'Makefile.am'
--- Makefile.am 2010-03-18 13:02:44 +0000
+++ Makefile.am 2010-03-18 17:12:09 +0000
@@ -151,7 +151,6 @@
                     hipd/accessor.c \
                     hipd/oppipdb.c \
                     hipd/dh.c \
-                    hipd/tcptimeout.c \
                     hipd/cert.c \
                     hipd/user_ipsec_sadb_api.c \
                     hipd/user_ipsec_hipd_msg.c \

=== modified file 'doc/verbose-header-files.txt'
--- doc/verbose-header-files.txt        2010-03-18 12:09:47 +0000
+++ doc/verbose-header-files.txt        2010-03-18 17:12:09 +0000
@@ -36,7 +36,6 @@
 libhipconf/hipconf.h : ACTION_RUN
 libhipconf/hipconf.h : ACTION_SET
 libhipconf/hipconf.h : ACTION_SHOTGUN
-libhipconf/hipconf.h : ACTION_TCPTIMEOUT
 libhipconf/hipconf.h : ACTION_TRANSORDER
 firewall/esp_prot_api firewall/user_ipsec_sadb.h : active_item_length
 libhipcore/hip_statistics.h : added_squared_values
@@ -250,7 +249,6 @@
 libhipconf/hipconf.h : hip_conf_handle_service
 libhipconf/hipconf.h : hip_conf_handle_set
 libhipconf/hipconf.h : hip_conf_handle_shotgun_toggle
-libhipconf/hipconf.h : hip_conf_handle_tcptimeout
 libhipconf/hipconf.h : hip_conf_handle_trans_order
 libhipconf/hipconf.h : hip_conf_handle_ttl
 firewall/conndb.h : hip_conn
@@ -528,7 +526,6 @@
 libhipcore/state.h : hip_stateless_info
 libhipcore/hip_statistics.h : HIP_STATISTICS_H_
 libhipcore/protodefs.h : hip_stun
-hipd/tcptimeout.h : HIP_TCPTIMEOUT
 libhipcore/protodefs.h : HIP_TEREDO_TYPE_MASK_100
 libhipcore/utils.h : HIP_TMP_FNAME_TEMPLATE
 libhipcore/state.h : hip_turn_info
@@ -1178,20 +1175,10 @@
 agent/str_var.h : str_var_empty
 agent/str_var.h : str_var_find
 libhipandroid/regex.h : syntax
-hipd/tcptimeout.h : sysctl_set_command
-hipd/tcptimeout.h : SYSCTL_SET_COMMAND
+
 libipsec/libpfkey.h : __SYSDEP_SA_LEN__
 libhipcore/debug.h : SYSLOG_FACILITY
 libhipcore/debug.h : SYSLOG_OPT
-hipd/tcptimeout.h : TCP_RETRIES_1_DEFAULT
-hipd/tcptimeout.h : TCP_RETRIES_1_NEW
-hipd/tcptimeout.h : TCP_RETRIES_1_STRING
-hipd/tcptimeout.h : TCP_RETRIES_2_DEFAULT
-hipd/tcptimeout.h : TCP_RETRIES_2_NEW
-hipd/tcptimeout.h : TCP_RETRIES_2_STRING
-hipd/tcptimeout.h : TCP_SLOW_START_AFTER_IDLE_DEFAULT
-hipd/tcptimeout.h : TCP_SLOW_START_AFTER_IDLE_NEW
-hipd/tcptimeout.h : TCP_SLOW_START_AFTER_IDLE_STRING
 test/unittest.h : TEST_CASE
 firewall/rule_management.h : test_parse_copy
 firewall/rule_management.h : test_rule_management
@@ -1250,7 +1237,6 @@
 firewall/common_types.h : TYPES_H_
 libhipconf/hipconf.h : TYPE_SHOTGUN
 firewall/rule_management.h : TYPE_STR
-libhipconf/hipconf.h : TYPE_TCPTIMEOUT
 libhipconf/hipconf.h : TYPE_TTL
 hipd/hiprelay.h : udp_port_r
 test/suite test/unittest.h : unit_test_suite_list_userspace

=== modified file 'hipd/hipd.c'
--- hipd/hipd.c 2010-03-18 12:09:47 +0000
+++ hipd/hipd.c 2010-03-18 17:12:09 +0000
@@ -121,9 +121,6 @@
 /* Tells to the daemon should it build LOCATOR parameters to R1 and I2 */
 int hip_locator_status             = HIP_MSG_SET_LOCATOR_OFF;
 
-/* It tells the daemon to set tcp timeout parameters. Added By Tao Wan, on 
09.Jan.2008 */
-int hip_tcptimeout_status          = HIP_MSG_SET_TCPTIMEOUT_ON;
-
 /* Create /etc/hip stuff and exit (used for binary hipfw packaging) */
 int create_configs_and_exit        = 0;
 

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-03-18 12:09:47 +0000
+++ hipd/init.c 2010-03-18 17:12:09 +0000
@@ -671,13 +671,6 @@
         HIP_DEBUG("Initializing cert configuration file returned error\n");
     }
 
-#if 0
-    /* init new tcptimeout parameters, added by Tao Wan on 14.Jan.2008*/
-
-    HIP_IFEL(set_new_tcptimeout_parameters_value(), -1,
-             "set new tcptimeout parameters error\n");
-#endif
-
     hitdberr = 0;
 #ifdef CONFIG_HIP_AGENT
     hitdberr = hip_init_daemon_hitdb();
@@ -1082,10 +1075,6 @@
     /* Close SAs with all peers */
     // hip_send_close(NULL);
 
-#if 0
-    /*reset TCP timeout to be original vaule , added By Tao Wan on 
14.Jan.2008. */
-    reset_default_tcptimeout_parameters_value();
-#endif
     if (hipd_msg) {
         HIP_FREE(hipd_msg);
     }

=== modified file 'hipd/init.h'
--- hipd/init.h 2010-03-03 13:16:18 +0000
+++ hipd/init.h 2010-03-18 17:12:09 +0000
@@ -14,7 +14,6 @@
 #include "oppipdb.h"
 #include "lib/core/debug.h"
 #include "hiprelay.h"
-#include "tcptimeout.h"
 #include "hadb.h"
 #include "hi3.h"
 #include "nsupdate.h"

=== modified file 'hipd/user.c'
--- hipd/user.c 2010-03-18 13:21:41 +0000
+++ hipd/user.c 2010-03-18 17:12:09 +0000
@@ -276,29 +276,6 @@
         HIP_IFEL(hip_set_blind_off(), -1, "hip_set_blind_off failed\n");
         break;
 #endif
-    case HIP_MSG_SET_TCPTIMEOUT_ON:
-        HIP_DEBUG("Setting TCP TIMEOUT ON\n");
-        hip_tcptimeout_status = HIP_MSG_SET_TCPTIMEOUT_ON;
-        HIP_DEBUG("hip tcp timeout status =  %d (should be %d)\n",
-                  hip_tcptimeout_status, HIP_MSG_SET_TCPTIMEOUT_ON);
-
-        /* paramters setting to do here */
-        HIP_IFEL(set_new_tcptimeout_parameters_value(), -1,
-                 "set new tcptimeout parameters error\n");
-        break;
-
-    case HIP_MSG_SET_TCPTIMEOUT_OFF:
-        HIP_DEBUG("Setting TCP TIMEOUT OFF\n");
-        hip_tcptimeout_status = HIP_MSG_SET_TCPTIMEOUT_OFF;
-        HIP_DEBUG("hip tcp timeout status =  %d (should be %d)\n",
-                  hip_tcptimeout_status, HIP_MSG_SET_TCPTIMEOUT_OFF);
-
-        /* paramters resetting */
-        HIP_IFEL(reset_default_tcptimeout_parameters_value(), -1,
-                 "reset tcptimeout parameters to be default error\n");
-
-        break;
-
 #ifdef CONFIG_HIP_DHT
     case HIP_MSG_DHT_GW:
     {

=== modified file 'hipd/user.h'
--- hipd/user.h 2010-03-18 13:19:05 +0000
+++ hipd/user.h 2010-03-18 17:12:09 +0000
@@ -21,7 +21,6 @@
 #include "hidb.h"
 #include "cert.h"
 #include "hipd.h"
-#include "tcptimeout.h"
 #include "registration.h"
 #include "esp_prot_hipd_msg.h"
 #include "user_ipsec_hipd_msg.h"

=== modified file 'lib/conf/hipconf.c'
--- lib/conf/hipconf.c  2010-03-18 12:09:47 +0000
+++ lib/conf/hipconf.c  2010-03-18 17:12:09 +0000
@@ -82,7 +82,7 @@
 #define TYPE_DHT           22
 #define TYPE_OPPTCP        23
 #define TYPE_ORDER         24
-#define TYPE_TCPTIMEOUT    25 /* add By Tao Wan, on 04.01.2008*/
+/* free slot */
 #define TYPE_HIPPROXY      26
 #define TYPE_HEARTBEAT     27
 #define TYPE_HI3           28
@@ -151,7 +151,6 @@
     "locator on|off|get\n"
     "debug all|medium|none\n"
     "restart daemon\n"
-    "set tcptimeout on|off\n" /*added by Tao Wan*/
     "transform order <integer> "
     " (1=AES, 2=3DES, 3=NULL and place them to order\n"
     "  like 213 for the order 3DES, AES and NULL)\n"
@@ -510,8 +509,6 @@
         ret = ACTION_TRANSORDER;
     } else if (!strcmp("restart", argv[1])) {
         ret = ACTION_RESTART;
-    } else if (!strcmp("tcptimeout", argv[1])) { /*added by Tao Wan, 
08.Jan.2008 */
-        ret = ACTION_TCPTIMEOUT;
     } else if (!strcmp("reinit", argv[1])) {
         ret = ACTION_REINIT;
     } else if (!strcmp("hi3", argv[1])) {
@@ -586,7 +583,6 @@
     case ACTION_DEBUG:
     case ACTION_RESTART:
     case ACTION_REINIT:
-    case ACTION_TCPTIMEOUT:
     case ACTION_NSUPDATE:
     case ACTION_HIT_TO_IP:
     case ACTION_HIT_TO_IP_SET:
@@ -663,8 +659,6 @@
         }
     } else if (strcmp("locator", argv[1]) == 0)     {
         ret = TYPE_LOCATOR;
-    } else if (!strcmp("tcptimeout", text)) {
-        ret = TYPE_TCPTIMEOUT;
     } else if ((!strcmp("all", text)) && (strcmp("bos", argv[1]) == 0)) {
         ret = TYPE_BOS;
     } else if (!strcmp("debug", text)) {
@@ -771,7 +765,6 @@
     case ACTION_BOS:
     case ACTION_MHADDR:
     case ACTION_HANDOVER:
-    case ACTION_TCPTIMEOUT:
     case ACTION_TRANSORDER:
     case ACTION_REINIT:
 #ifdef CONFIG_HIP_HIPPROXY
@@ -2754,41 +2747,6 @@
     return err;
 }
 
-/**
- * Handles the hipconf commands where the type is @ tcptimeout. Experimental.
- * Tries to pimp up TCP using /proc file system to tolerate mobility better.
- *
- * @param msg    a pointer to the buffer where the message for hipd will
- *               be written.
- * @param action the numeric action identifier for the action to be performed.
- * @param opt    an array of pointers to the command line arguments after
- *               the action and type.
- * @param optc   the number of elements in the array (@b 0).
- * @return       zero on success, or negative error value on error.
- */
-static int hip_conf_handle_tcptimeout(struct hip_common *msg,
-                                      int action,
-                                      const char *opt[],
-                                      int optc,
-                                      int send_only)
-{
-    int err = 0, status = 0;
-
-    if (!strcmp("on", opt[0])) {
-        HIP_INFO("tcptimeout set on\n");
-        status = HIP_MSG_SET_TCPTIMEOUT_ON;
-    } else if (!strcmp("off", opt[0])) {
-        HIP_INFO("tcptimeout set off\n");
-        status = HIP_MSG_SET_TCPTIMEOUT_OFF;
-    } else {
-        HIP_IFEL(1, -1, "bad args\n");
-        // err = -1;
-    }
-    HIP_IFEL(hip_build_user_hdr(msg, status, 0), -1, "build hdr failed: %s\n", 
strerror(err));
-
-out_err:
-    return err;
-}
 
 /**
  * Function that is used to set HIP PROXY on or off
@@ -3223,7 +3181,7 @@
     hip_conf_handle_dht_toggle,         /* 22: TYPE_DHT */
     hip_conf_handle_opptcp,             /* 23: TYPE_OPPTCP */
     hip_conf_handle_trans_order,        /* 24: TYPE_ORDER */
-    hip_conf_handle_tcptimeout,         /* 25: TYPE_TCPTIMEOUT */
+    NULL,
     hip_conf_handle_hipproxy,           /* 26: TYPE_HIPPROXY */
     hip_conf_handle_heartbeat,          /* 27: TYPE_HEARTBEAT */
     hip_conf_handle_hi3,                /* 28: TYPE_HI3 */

=== modified file 'lib/core/builder.c'
--- lib/core/builder.c  2010-03-18 12:09:47 +0000
+++ lib/core/builder.c  2010-03-18 17:12:09 +0000
@@ -1248,8 +1248,6 @@
     case HIP_MSG_HIPPROXY_STATUS_REQUEST: return 
"HIP_MSG_HIPPROXY_STATUS_REQUEST";
     case HIP_MSG_OPPTCP_UNBLOCK_AND_BLACKLIST: return 
"HIP_MSG_OPPTCP_UNBLOCK_AND_BLACKLIST";
     case HIP_MSG_FW_BEX_DONE:        return "HIP_MSG_FW_BEX_DONE";
-    case HIP_MSG_SET_TCPTIMEOUT_ON:  return "HIP_MSG_SET_TCPTIMEOUT_ON";
-    case HIP_MSG_SET_TCPTIMEOUT_OFF: return "HIP_MSG_SET_TCPTIMEOUT_OFF";
     case HIP_MSG_SET_NAT_ICE_UDP:    return "HIP_MSG_SET_NAT_ICE_UDP";
     case HIP_MSG_IPSEC_ADD_SA:       return "HIP_MSG_IPSEC_ADD_SA";
     case HIP_MSG_USERSPACE_IPSEC:    return "HIP_MSG_USERSPACE_IPSEC";

=== modified file 'lib/core/icomm.h'
--- lib/core/icomm.h    2010-03-18 12:09:47 +0000
+++ lib/core/icomm.h    2010-03-18 17:12:09 +0000
@@ -150,8 +150,7 @@
 #define HIP_MSG_HIPPROXY_STATUS_REQUEST          134
 #define HIP_MSG_OPPTCP_UNBLOCK_AND_BLACKLIST     135
 #define HIP_MSG_IPSEC_ADD_SA                     136
-#define HIP_MSG_SET_TCPTIMEOUT_ON                137
-#define HIP_MSG_SET_TCPTIMEOUT_OFF               138
+/* free slots */
 #define HIP_MSG_SET_NAT_ICE_UDP                  139
 #define HIP_PARAM_INT                           140
 #define HIP_MSG_CERT_SPKI_SIGN                   141

=== modified file 'verbose-headers.txt'
--- verbose-headers.txt 2010-03-18 12:09:47 +0000
+++ verbose-headers.txt 2010-03-18 17:12:09 +0000
@@ -318,18 +318,6 @@
 hipd/registration.h : hip_set_srv_max_lifetime
 hipd/registration.h : hip_set_srv_min_lifetime
 hipd/registration.h : hip_srv_status_t
-hipd/tcptimeout.h : HIP_TCPTIMEOUT
-hipd/tcptimeout.h : sysctl_set_command
-hipd/tcptimeout.h : SYSCTL_SET_COMMAND
-hipd/tcptimeout.h : TCP_RETRIES_1_DEFAULT
-hipd/tcptimeout.h : TCP_RETRIES_1_NEW
-hipd/tcptimeout.h : TCP_RETRIES_1_STRING
-hipd/tcptimeout.h : TCP_RETRIES_2_DEFAULT
-hipd/tcptimeout.h : TCP_RETRIES_2_NEW
-hipd/tcptimeout.h : TCP_RETRIES_2_STRING
-hipd/tcptimeout.h : TCP_SLOW_START_AFTER_IDLE_DEFAULT
-hipd/tcptimeout.h : TCP_SLOW_START_AFTER_IDLE_NEW
-hipd/tcptimeout.h : TCP_SLOW_START_AFTER_IDLE_STRING
 hipd/user_ipsec_hipd_msg.h : USER_IPSEC_HIPD_MSG_H_
 hipd/user_ipsec_sadb_api.h : hip_userspace_ipsec_send_to_fw
 hipd/user_ipsec_sadb_api.h : USER_IPSEC_SADB_API_H_
@@ -369,7 +357,6 @@
 libhipconf/hipconf.h : ACTION_RUN
 libhipconf/hipconf.h : ACTION_SET
 libhipconf/hipconf.h : ACTION_SHOTGUN
-libhipconf/hipconf.h : ACTION_TCPTIMEOUT
 libhipconf/hipconf.h : ACTION_TRANSORDER
 libhipconf/hipconf.h : LIB_LENGTH
 libhipconf/hipconf.h : OPT_HI_FILE

Other related posts:

  • » [hipl-commit] [trunk] Rev 4011: Removed TCP timeout stuff. It was disabled with #if 0 and wasn't really - Miika Komu