[hipl-commit] [trunk] Rev 4500: Remove i3 code.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 12 May 2010 16:58:11 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 12/05/2010 at 16:58:11
Revision: 4500
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Remove i3 code.

Modified:
  D  hipd/hi3.c
  D  hipd/hi3.h
  D  i3/
  D  i3/aeshash/
  D  i3/aeshash/aes.h
  D  i3/aeshash/aescpp.hh
  D  i3/aeshash/aescrypt.c
  D  i3/aeshash/aeshash.c
  D  i3/aeshash/aeskey.c
  D  i3/aeshash/aeskeypp.c
  D  i3/aeshash/aesopt.h
  D  i3/aeshash/aestab.c
  D  i3/chord/
  D  i3/chord/api.c
  D  i3/chord/chord.c
  D  i3/chord/chord.h
  D  i3/chord/chord_api.h
  D  i3/chord/chord_getfingers.c
  D  i3/chord/chord_traceroute.c
  D  i3/chord/debug.h
  D  i3/chord/finger.c
  D  i3/chord/gen_conf.c
  D  i3/chord/gen_conf_same.c
  D  i3/chord/hosts.c
  D  i3/chord/join.c
  D  i3/chord/pack.c
  D  i3/chord/process.c
  D  i3/chord/sendpkt.c
  D  i3/chord/stabilize.c
  D  i3/chord/test.c
  D  i3/chord/util.c
  D  i3/i3/
  D  i3/i3-cfg-PL.xml
  D  i3/i3/debug_fns.h
  D  i3/i3/i3.h
  D  i3/i3/i3_addr.c
  D  i3/i3/i3_addr.h
  D  i3/i3/i3_api.c
  D  i3/i3/i3_api.h
  D  i3/i3/i3_config.c
  D  i3/i3/i3_config.h
  D  i3/i3/i3_debug.c
  D  i3/i3/i3_debug.h
  D  i3/i3/i3_fun.h
  D  i3/i3/i3_header.c
  D  i3/i3/i3_header.h
  D  i3/i3/i3_id.c
  D  i3/i3/i3_id.h
  D  i3/i3/i3_misc.c
  D  i3/i3/i3_misc.h
  D  i3/i3/i3_options.c
  D  i3/i3/i3_options.h
  D  i3/i3/i3_ping.c
  D  i3/i3/i3_ping.h
  D  i3/i3/i3_stack.c
  D  i3/i3/i3_stack.h
  D  i3/i3/i3_tcp_fns.c
  D  i3/i3/i3_tcp_fns.h
  D  i3/i3/i3_trigger.c
  D  i3/i3/i3_trigger.h
  D  i3/i3/i3_utils.c
  D  i3/i3/i3_utils.h
  D  i3/i3/token_bucket.c
  D  i3/i3/token_bucket.h
  D  i3/i3_client/
  D  i3/i3_client/coordinates.c
  D  i3/i3_client/coordinates.h
  D  i3/i3_client/downhill_simplex.c
  D  i3/i3_client/downhill_simplex.h
  D  i3/i3_client/http.c
  D  i3/i3_client/http.h
  D  i3/i3_client/i3_client.h
  D  i3/i3_client/i3_client_api.c
  D  i3/i3_client/i3_client_api.h
  D  i3/i3_client/i3_client_api_ctx.c
  D  i3/i3_client/i3_client_api_ctx.h
  D  i3/i3_client/i3_client_callback.c
  D  i3/i3_client/i3_client_callback.h
  D  i3/i3_client/i3_client_context.c
  D  i3/i3_client/i3_client_context.h
  D  i3/i3_client/i3_client_fd.c
  D  i3/i3_client/i3_client_fd.h
  D  i3/i3_client/i3_client_fun.h
  D  i3/i3_client/i3_client_id.c
  D  i3/i3_client/i3_client_id.h
  D  i3/i3_client/i3_client_params.h
  D  i3/i3_client/i3_client_pkt.c
  D  i3/i3_client/i3_client_pkt.h
  D  i3/i3_client/i3_client_timer.c
  D  i3/i3_client/i3_client_timer.h
  D  i3/i3_client/i3_client_trigger.c
  D  i3/i3_client/i3_client_trigger.h
  D  i3/i3_client/i3server_list.c
  D  i3/i3_client/i3server_list.h
  D  i3/i3_client/ping.c
  D  i3/i3_client/ping.h
  D  i3/i3_client/ping_thread.c
  D  i3/i3_client/ping_thread.h
  D  i3/i3_client/qsort.c
  D  i3/i3_client/qsort.h
  D  i3/utils/
  D  i3/utils/byteorder.c
  D  i3/utils/byteorder.h
  D  i3/utils/eprintf.c
  D  i3/utils/eprintf.h
  D  i3/utils/event.c
  D  i3/utils/event.h
  D  i3/utils/gen_utils.c
  D  i3/utils/gen_utils.h
  D  i3/utils/inetfns.c
  D  i3/utils/inetfns.h
  D  i3/utils/netwrap.h
  D  i3/utils/netwrap_posix.c
  D  i3/utils/netwrap_win32.c
  D  i3/utils/utils.h
  M  COPYING
  M  Makefile.am
  M  configure.ac
  M  debian/rules
  M  doc/HOWTO.xml
  M  hipd/accessor.c
  M  hipd/accessor.h
  M  hipd/hadb.c
  M  hipd/hipd.c
  M  hipd/hipd.h
  M  hipd/init.c
  M  hipd/init.h
  M  hipd/input.c
  M  hipd/input.h
  M  hipd/netdev.c
  M  hipd/output.c
  M  hipd/output.h
  M  hipd/user.c
  M  lib/conf/conf.c
  M  lib/conf/conf.h
  M  lib/core/builder.c
  M  lib/core/icomm.h
  M  lib/core/state.h
  M  packaging/openwrt/package/Makefile
  M  tools/hipl_autobuild.sh

=== modified file 'COPYING'
--- COPYING     2010-05-12 12:55:11 +0000
+++ COPYING     2010-05-12 13:57:56 +0000
@@ -35,7 +35,6 @@
   * firewall/user_ipsec_esp.c
   * tools/hipdnsproxy/DNS
   * lib/tool
-  * i3
 
 MIT (Expat) License
 ===================

=== modified file 'Makefile.am'
--- Makefile.am 2010-05-12 12:29:33 +0000
+++ Makefile.am 2010-05-12 13:57:56 +0000
@@ -1,10 +1,9 @@
 ACLOCAL_AMFLAGS  = -I m4
 
-HIPL_HEADER_LIST = $(wildcard $(addprefix $(srcdir)/,agent/*.h firewall/*.h 
hipd/*.h i3/*/*.h lib/*/*.h))
+HIPL_HEADER_LIST = $(wildcard $(addprefix $(srcdir)/,agent/*.h firewall/*.h 
hipd/*.h lib/*/*.h))
 
 # For "make dist"
 EXTRA_DIST =  .vimrc debian doc patches release.version version.h
-EXTRA_DIST += i3/i3-cfg-PL.xml i3/aeshash/aescpp.hh i3/i3/i3_debug.c 
i3/utils/netwrap_win32.c
 EXTRA_DIST += packaging tools/maintainer
 EXTRA_DIST += $(wildcard $(addprefix $(srcdir)/agent/,*.lang))
 EXTRA_DIST += $(wildcard $(addprefix $(srcdir)/lib/dht/,*.txt))
@@ -32,14 +31,6 @@
 bin_PROGRAMS += test/dh_performance
 endif
 
-if HIP_I3
-noinst_PROGRAMS = i3/chord/chord_getfingers \
-                  i3/chord/chord_traceroute \
-                  i3/chord/gen_conf         \
-                  i3/chord/gen_conf_same    \
-                  i3/chord/test
-endif
-
 
 ### superuser programs ###
 sbin_PROGRAMS = hipd/hipd      \
@@ -66,10 +57,6 @@
 lib_LTLIBRARIES += lib/gui/libhipgui.la
 endif
 
-if HIP_I3
-lib_LTLIBRARIES += i3/libi3.la \
-                   i3/chord/libchord.la
-endif
 
 ### source declarations ###
 
@@ -116,10 +103,6 @@
                     hipd/user_ipsec_hipd_msg.c   \
                     hipd/user_ipsec_sadb_api.c
 
-if HIP_I3
-hipd_hipd_SOURCES += hipd/hi3.c
-endif
-
 if HIP_DHT
 hipd_hipd_SOURCES += hipd/dht.c
 endif
@@ -230,66 +213,6 @@
 lib_opphip_libopphip_la_SOURCES  = lib/opphip/wrap.c \
                                    lib/opphip/wrap_db.c
 
-i3_libi3_la_SOURCES = i3/aeshash/aescrypt.c              \
-                      i3/aeshash/aeshash.c               \
-                      i3/aeshash/aeskey.c                \
-                      i3/aeshash/aeskeypp.c              \
-                      i3/aeshash/aestab.c                \
-                      i3/i3/i3_addr.c                    \
-                      i3/i3/i3_api.c                     \
-                      i3/i3/i3_config.c                  \
-                      i3/i3/i3_header.c                  \
-                      i3/i3/i3_id.c                      \
-                      i3/i3/i3_misc.c                    \
-                      i3/i3/i3_options.c                 \
-                      i3/i3/i3_ping.c                    \
-                      i3/i3/i3_stack.c                   \
-                      i3/i3/i3_tcp_fns.c                 \
-                      i3/i3/i3_trigger.c                 \
-                      i3/i3/i3_utils.c                   \
-                      i3/i3/token_bucket.c               \
-                      i3/i3_client/coordinates.c         \
-                      i3/i3_client/downhill_simplex.c    \
-                      i3/i3_client/http.c                \
-                      i3/i3_client/i3_client_api.c       \
-                      i3/i3_client/i3_client_api_ctx.c   \
-                      i3/i3_client/i3_client_callback.c  \
-                      i3/i3_client/i3_client_context.c   \
-                      i3/i3_client/i3_client_fd.c        \
-                      i3/i3_client/i3_client_id.c        \
-                      i3/i3_client/i3_client_pkt.c       \
-                      i3/i3_client/i3_client_timer.c     \
-                      i3/i3_client/i3_client_trigger.c   \
-                      i3/i3_client/i3server_list.c       \
-                      i3/i3_client/ping.c                \
-                      i3/i3_client/ping_thread.c         \
-                      i3/i3_client/qsort.c               \
-                      i3/utils/byteorder.c               \
-                      i3/utils/eprintf.c                 \
-                      i3/utils/event.c                   \
-                      i3/utils/gen_utils.c               \
-                      i3/utils/inetfns.c                 \
-                      i3/utils/netwrap_posix.c
-
-i3_chord_libchord_la_SOURCES = i3/chord/api.c        \
-                               i3/chord/chord.c      \
-                               i3/chord/finger.c     \
-                               i3/chord/hosts.c      \
-                               i3/chord/join.c       \
-                               i3/chord/pack.c       \
-                               i3/chord/process.c    \
-                               i3/chord/sendpkt.c    \
-                               i3/chord/stabilize.c  \
-                               i3/chord/util.c       \
-                               i3/utils/eprintf.c    \
-                               i3/utils/gen_utils.c
-
-i3_chord_chord_getfingers_SOURCES = i3/chord/chord_getfingers.c
-i3_chord_chord_traceroute_SOURCES = i3/chord/chord_traceroute.c
-i3_chord_gen_conf_SOURCES         = i3/chord/gen_conf.c
-i3_chord_gen_conf_same_SOURCES    = i3/chord/gen_conf_same.c
-i3_chord_test_SOURCES             = i3/chord/test.c
-
 
 ### library dependencies ###
 
@@ -303,21 +226,11 @@
 tools_hipconf_LDADD            = lib/core/libhipcore.la
 tools_pisacert_LDADD           = lib/core/libhipcore.la
 
-if HIP_I3
-hipd_hipd_LDADD += i3/libi3.la
-endif
-
 agent_hipagent_LDADD = lib/gui/libhipgui.la   \
                        lib/core/libhipcore.la
 
 agent_hipagent_LDFLAGS = `pkg-config --libs gtk+-2.0 gthread-2.0`
 
-i3_chord_chord_getfingers_LDADD = i3/chord/libchord.la
-i3_chord_chord_traceroute_LDADD = i3/chord/libchord.la
-i3_chord_gen_conf_LDADD         = i3/chord/libchord.la
-i3_chord_gen_conf_same_LDADD    = i3/chord/libchord.la
-i3_chord_test_LDADD             = i3/chord/libchord.la
-
 
 if HAVE_PYTHON
 dist_sbin_SCRIPTS = tools/hipdnskeyparse/hipdnskeyparse \
@@ -384,7 +297,7 @@
 %.ho: %.h
        $(CC) -I$(srcdir) -I$(builddir) $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 
-o $@ $<
 
-i3/i3/i3_config.lo lib/dht/libhipdhtxml.lo: CFLAGS += `xml2-config --cflags`
+lib/dht/libhipdhtxml.lo: CFLAGS += `xml2-config --cflags`
 lib/gui/%: CFLAGS += @GTK_CFLAGS@ -Wno-strict-prototypes
 
 # Ensure that version.h is created before everything else. This does not work

=== modified file 'configure.ac'
--- configure.ac        2010-05-12 12:29:33 +0000
+++ configure.ac        2010-05-12 13:57:56 +0000
@@ -150,21 +150,6 @@
     AH_TEMPLATE(CONFIG_HIP_HIPPROXY, [Defined to 1 if HIP Proxy is enabled.])
 fi
 
-AC_ARG_ENABLE(i3,
-               AS_HELP_STRING([--enable-i3],
-               [HIP i3  (default is NO)]),
-               [ac_cv_use_i3=$enableval],)
-AC_CACHE_CHECK([whether to use i3],
-               [ac_cv_use_i3],
-               [ac_cv_use_i3=no])
-if test x"$ac_cv_use_i3" = x"yes"; then
-    AC_CHECK_LIB(xml2, xmlFreeDoc,, AC_MSG_ERROR(libxml2 not found))
-    AC_CHECK_LIB(pthread, pthread_create,, AC_MSG_ERROR(libpthread not found))
-    AC_DEFINE(CONFIG_HIP_I3)
-    AH_TEMPLATE(CONFIG_HIP_I3, [Defined to 1 if i3 is enabled.])
-fi
-AM_CONDITIONAL(HIP_I3, test x"$ac_cv_use_i3" = x"yes")
-
 AC_ARG_ENABLE(opportunistic,
                AS_HELP_STRING([--enable-opportunistic],
                               [HIP opportunistic mode (default is YES)]),

=== modified file 'debian/rules'
--- debian/rules        2010-05-04 21:10:09 +0000
+++ debian/rules        2010-05-12 13:57:56 +0000
@@ -35,7 +35,6 @@
                          --enable-shared \
                          --disable-dht \
                          --disable-agent \
-                         --disable-i3 \
                          --disable-debug
 
 

=== modified file 'doc/HOWTO.xml'
--- doc/HOWTO.xml       2010-05-12 10:46:51 +0000
+++ doc/HOWTO.xml       2010-05-12 13:57:56 +0000
@@ -4481,30 +4481,6 @@
 
   </section>
 
-  <section id="ch_hi3_support">
-    <title>Hi3 Support</title>
-    <note><title>NOTE:</title>
-      <para>
-        It has been a while since this extension was implementated and tested.
-        As of 24th July 2008, the code compiles but HIP daemon does not respond
-        to hipconf commands. This extension is defunct.
-      </para>
-    </note>
-    <itemizedlist>
-    <listitem><para>
-          Compile HIPL with ./configure --enable-hi3 --disable-opendht
-    </para></listitem>
-    <listitem><para>
-          Start the daemon: hipd -3 i3/i3-cfg-PL.xml
-    </para></listitem>
-    <listitem><para>
-          Wait until the trigger is inserted (see log file) and continue with 
e.g.
-          ping6 or nc6 with testing.
-    </para></listitem>
-        </itemizedlist>
-
-  </section>
-
   <section id="ch_shotgun">
     <title>"Shotgun" Extension</title>
 

=== modified file 'hipd/accessor.c'
--- hipd/accessor.c     2010-04-20 10:47:50 +0000
+++ hipd/accessor.c     2010-05-12 13:57:56 +0000
@@ -234,63 +234,6 @@
 }
 #endif /* CONFIG_HIP_OPPORTUNISTIC */
 
-#ifdef CONFIG_HIP_I3
-/**
- * turn hi3 support on or off
- *
- * @param msg a message with type HIP_MSG_SET_HI3_ON or HIP_MSG_SET_HI3_OFF
- */
-void hip_set_hi3_status(struct hip_common *msg)
-{
-    struct sockaddr_in6 sock_addr;
-    int retry, type, n;
-
-    type = hip_get_msg_type(msg);
-
-    _HIP_DEBUG("type=%d\n", type);
-
-    bzero(&sock_addr, sizeof(sock_addr));
-    sock_addr.sin6_family = AF_INET6;
-    sock_addr.sin6_port   = htons(HIP_FIREWALL_PORT);
-    sock_addr.sin6_addr   = in6addr_loopback;
-
-    for (retry = 0; retry < 3; retry++) {
-        n = hip_sendto_user(msg, (struct sockaddr *) &sock_addr);
-        if (n <= 0) {
-            HIP_ERROR("hipconf hi3 failed (round %d)\n", retry);
-            HIP_DEBUG("Sleeping few seconds to wait for fw\n");
-            sleep(2);
-        } else {
-            HIP_DEBUG("hipconf hi3 ok (sent %d bytes)\n", n);
-            break;
-        }
-    }
-
-    if (type == HIP_MSG_SET_HI3_ON) {
-        hip_i3_init();
-        hip_use_hi3        = 1;
-        hip_locator_status = HIP_MSG_SET_LOCATOR_ON;
-    } else {
-        hip_locator_status = HIP_MSG_SET_LOCATOR_OFF;
-        hip_hi3_clean();
-        hip_use_hi3        = 0;
-    }
-
-    HIP_DEBUG("hi3 set %s\n",
-              (hip_use_hi3 ? "on" : "off"));
-}
-
-/**
- * query if Hi3 is enabled or not
- *
- * @return 1 if it is enabled or 0 otherwise
- */
-int hip_get_hi3_status(void)
-{
-    return hip_use_hi3;
-}
-#endif /* CONFIG_HIP_I3 */
-
 /**
  * Query status of client-side HIP proxy
  *

=== modified file 'hipd/accessor.h'
--- hipd/accessor.h     2010-04-22 10:12:54 +0000
+++ hipd/accessor.h     2010-05-12 13:57:56 +0000
@@ -52,9 +52,6 @@
 int hip_query_opportunistic_mode(struct hip_common *msg);
 int hip_query_ip_hit_mapping(struct hip_common *msg);
 
-int hip_get_hi3_status(void);
-void hip_set_hi3_status(struct hip_common *msg);
-
 int hip_get_hip_proxy_status(void);
 int hip_set_hip_proxy_on(void);
 int hip_set_hip_proxy_off(void);

=== modified file 'hipd/hadb.c'
--- hipd/hadb.c 2010-04-16 18:41:06 +0000
+++ hipd/hadb.c 2010-05-12 13:57:56 +0000
@@ -503,9 +503,6 @@
 #ifdef CONFIG_HIP_OPPORTUNISTIC
     entry->hip_is_opptcp_on = hip_get_opportunistic_tcp_status();
 #endif /* CONFIG_HIP_OPPORTUNISTIC */
-#ifdef CONFIG_HIP_I3
-    entry->hip_is_hi3_on    =    hip_get_hi3_status();
-#endif
 #ifdef CONFIG_HIP_HIPPROXY
     entry->hipproxy         = hip_get_hip_proxy_status();
 #endif
@@ -1215,17 +1212,8 @@
     /* insert your alternative function sets here!*/
 
     /* xmit function set */
-#ifdef CONFIG_HIP_I3
-    if (hip_get_hi3_status()) {
-        default_xmit_func_set.hip_send_pkt = hip_send_i3;
-    } else
-#endif
-    {
-        default_xmit_func_set.hip_send_pkt = hip_send_pkt;
-    }
-
-
-    nat_xmit_func_set.hip_send_pkt = hip_send_pkt;
+    default_xmit_func_set.hip_send_pkt = hip_send_pkt;
+    nat_xmit_func_set.hip_send_pkt     = hip_send_pkt;
 
     /* filter function sets */
     /* Compiler warning: assignment from incompatible pointer type.

=== modified file 'hipd/hipd.c'
--- hipd/hipd.c 2010-05-11 13:04:56 +0000
+++ hipd/hipd.c 2010-05-12 13:57:56 +0000
@@ -155,7 +155,6 @@
 int hip_wait_addr_changes_to_stabilize       = 1;
 
 int hip_use_opptcp                           = 0; // false
-int hip_use_hi3                              = 0; // false
 
 /* the opp tcp */
 

=== modified file 'hipd/hipd.h'
--- hipd/hipd.h 2010-04-29 14:59:33 +0000
+++ hipd/hipd.h 2010-05-12 13:57:56 +0000
@@ -39,8 +39,6 @@
 #include "dhtqueue.h"
 #include "blind.h"
 
-#include "i3/i3_client/i3_client_api.h"
-
 
 #define HIP_HIT_DEV "dummy0"
 
@@ -83,7 +81,6 @@
 #define HIPD_NL_GROUP 32
 
 extern int hip_use_opptcp;
-extern int hip_use_hi3;
 #ifdef CONFIG_HIP_AGENT
 extern sqlite3 *daemon_db;
 #endif

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-05-12 12:29:33 +0000
+++ hipd/init.c 2010-05-12 13:57:56 +0000
@@ -148,9 +148,6 @@
 
     hip_create_file_unless_exists(HIPL_HOSTS_FILE, HIPL_HOSTS_FILE_EX);
 
-#ifdef CONFIG_HIP_I3
-    hip_create_file_unless_exists(HIPL_HI3_FILE, HIPL_HI3_FILE_EX);
-#endif
     hip_create_file_unless_exists(HIPL_DHTSERVERS_FILE, 
HIPL_DHTSERVERS_FILE_EX);
 
     hip_create_file_unless_exists(HIPL_NSUPDATE_CONF_FILE, 
HIPL_NSUPDATE_CONF_FILE_EX);
@@ -737,10 +734,6 @@
     hip_oppdb_uninit();
 #endif
 
-#ifdef CONFIG_HIP_I3
-    hip_hi3_clean();
-#endif
-
 #ifdef CONFIG_HIP_RVS
     HIP_INFO("Uninitializing RVS / HIP relay database and whitelist.\n");
     hip_relay_uninit();
@@ -1119,12 +1112,6 @@
 
     hip_load_configuration();
 
-#ifdef CONFIG_HIP_HI3
-    if (hip_use_i3) {
-        hip_locator_status = HIP_MSG_SET_LOCATOR_ON;
-    }
-#endif
-
 #ifdef CONFIG_HIP_DHT
     {
         memset(opendht_host_name, 0, sizeof(opendht_host_name));
@@ -1164,12 +1151,6 @@
         HIP_IFEL(hip_set_lowcapability(0), -1, "Failed to set capabilities\n");
     }
 
-#ifdef CONFIG_HIP_HI3
-    if (hip_use_i3) {
-        hip_i3_init();
-    }
-#endif
-
     hip_firewall_sock_lsi_fd = hip_user_sock;
 
     if (hip_get_nsupdate_status()) {

=== modified file 'hipd/init.h'
--- hipd/init.h 2010-05-03 16:43:45 +0000
+++ hipd/init.h 2010-05-12 13:57:56 +0000
@@ -21,7 +21,6 @@
 #include "lib/core/debug.h"
 #include "hiprelay.h"
 #include "hadb.h"
-#include "hi3.h"
 #include "nsupdate.h"
 
 /* startup flags options to be configured via the command line */
@@ -35,7 +34,6 @@
 /*
  * HIP daemon initialization functions.
  */
-extern int hip_use_i3;
 extern hip_ipsec_func_set_t default_ipsec_func_set;
 extern int hip_firewall_sock_fd;
 extern int hip_firewall_sock_lsi_fd;

=== modified file 'hipd/input.c'
--- hipd/input.c        2010-05-11 12:01:55 +0000
+++ hipd/input.c        2010-05-12 13:57:56 +0000
@@ -48,8 +48,6 @@
 #include "esp_prot_hipd_msg.h"
 #include "esp_prot_light_update.h"
 #include "hipd.h"
-
-#include "i3/i3_client/i3_client_api.h"
 #include "oppipdb.h"
 #include "pisa.h"
 
@@ -1306,59 +1304,6 @@
              -1, "Malloc for entry->locators failed\n");
     memcpy(entry->locator, locator, loc_size);
 
-#ifdef CONFIG_HIP_I3
-    {
-        int ii                                   = 0, use_ip4 = 1;
-        hip_list_t *item                         = NULL, *tmp = NULL;
-        struct netdev_address *n                 = NULL;
-        struct hip_locator_info_addr_item *first = NULL;
-
-        if (entry && entry->hip_is_hi3_on) {
-            if (r1_info->hi3_in_use && n_addrs > 0) {
-                first = (struct hip_locator_info_addr_item *) locator + 
sizeof(struct hip_locator);
-                memcpy(r1_saddr, &first->address, sizeof(struct in6_addr));
-
-                list_for_each_safe(item, tmp, addresses, ii) {
-                    n = list_entry(item);
-                    if (ipv6_addr_is_hit(hip_cast_sa_addr((struct sockaddr *) 
&n->addr))) {
-                        continue;
-                    }
-                    if (!hip_sockaddr_is_v6_mapped(hip_cast_sa_addr((struct 
sockaddr *) &n->addr))) {
-                        memcpy(r1_daddr, hip_cast_sa_addr((struct sockaddr *) 
&n->addr),
-                               hip_sa_addr_len(&n->addr));
-                        ii      = -1;
-                        use_ip4 = 0;
-                        break;
-                    }
-                }
-                if (use_ip4) {
-                    list_for_each_safe(item, tmp, addresses, ii) {
-                        n = list_entry(item);
-                        if (ipv6_addr_is_hit(hip_cast_sa_addr((struct sockaddr 
*) &n->addr))) {
-                            continue;
-                        }
-                        if (hip_sockaddr_is_v6_mapped(hip_cast_sa_addr((struct 
sockaddr *) &n->addr))) {
-                            memcpy(r1_daddr, hip_cast_sa_addr((struct sockaddr 
*) &n->addr),
-                                   hip_sa_addr_len(&n->addr));
-                            ii = -1;
-                            break;
-                        }
-                    }
-                }
-
-                struct in6_addr daddr;
-
-                memcpy(&entry->our_addr, r1_daddr, sizeof(struct in6_addr));
-
-                hip_hadb_get_peer_addr(entry, &daddr);
-                hip_hadb_delete_peer_addrlist_one_old(entry, &daddr);
-                hip_hadb_add_peer_addr(entry, r1_saddr, 0, 0,
-                                       PEER_ADDR_STATE_ACTIVE,
-                                       entry->peer_udp_port);
-            }
-        }
-    }
-#endif
 out_err:
     return err;
 }
@@ -1980,13 +1925,6 @@
     HIP_IFEL(hip_verify_cookie(i2_saddr, i2_daddr, i2, solution), -EPROTO,
              "Cookie solution rejected. Dropping the I2 packet.\n");
 
-#ifdef CONFIG_HIP_I3
-    if (entry && entry->hip_is_hi3_on) {
-        locator = hip_get_param(i2, HIP_PARAM_LOCATOR);
-        hip_do_i3_stuff_for_i2(locator, i2_info, i2_saddr, i2_daddr);
-    }
-#endif
-
     if (entry != NULL) {
         spi_in = entry->spi_inbound_current;
         HIP_DEBUG("inbound IPsec SA, SPI=0x%x (host)\n", spi_in);
@@ -2651,17 +2589,6 @@
     uint32_t spi_recvd            = 0, spi_in = 0;
     struct hip_locator *locator   = NULL;
 
-#ifdef CONFIG_HIP_I3
-    if (entry && entry->hip_is_hi3_on) {
-        if (r2_info->hi3_in_use) {
-            /* In hi3 real addresses should already be in entry, received on
-             * r1 phase. */
-            memcpy(r2_saddr, &entry->peer_addr, sizeof(struct in6_addr));
-            memcpy(r2_daddr, &entry->our_addr, sizeof(struct in6_addr));
-        }
-    }
-#endif
-
     if (entry->state == HIP_STATE_ESTABLISHED) {
         retransmission = 1;
         HIP_DEBUG("Retransmission\n");

=== modified file 'hipd/input.h'
--- hipd/input.h        2010-04-22 10:12:54 +0000
+++ hipd/input.h        2010-05-12 13:57:56 +0000
@@ -22,15 +22,6 @@
 #include "lib/core/debug.h"
 #include "lib/core/protodefs.h"
 
-struct hi3_ipv4_addr {
-    uint8_t             sin_family;
-    struct in_addr sin_addr;
-};
-
-struct hi3_ipv6_addr {
-    uint8_t              sin6_family;
-    struct in6_addr sin6_addr;
-};
 
 /**
  * Checks for illegal controls in a HIP packet Controls field.

=== modified file 'hipd/netdev.c'
--- hipd/netdev.c       2010-05-12 13:55:00 +0000
+++ hipd/netdev.c       2010-05-12 13:57:56 +0000
@@ -866,7 +866,7 @@
  * Create a HIP association (if one does not exist already) and
  * trigger a base exchange with an I1 packet using the given
  * arguments. This function also supports HIP-based loopback
- * connectivity, i3 and hiccups (data packet) extensions.
+ * connectivity and hiccups (data packet) extensions.
  *
  * @param src_hit The source HIT for the I1. Alternatively, NULL if default
  *                HIT is suitable
@@ -994,14 +994,6 @@
     err = 1;
     HIP_DEBUG("No entry found; find first IP matching\n");
 
-#ifdef CONFIG_HIP_I3
-    if (hip_get_hi3_status()) {
-        struct in6_addr lpback = IN6ADDR_LOOPBACK_INIT;
-        memcpy(dst_addr, &lpback, sizeof(struct in6_addr));
-        err = 0;
-    }
-#endif
-
     if (err && !ipv6_addr_any(dst_addr)) {
         /* Destination address given; no need to look up */
         err = 0;

=== modified file 'hipd/output.c'
--- hipd/output.c       2010-04-29 16:08:41 +0000
+++ hipd/output.c       2010-05-12 13:57:56 +0000
@@ -24,7 +24,6 @@
 #include "lib/core/performance.h"
 #include "lib/core/hip_udp.h"
 #include "lib/tool/checksum.h"
-#include "i3/i3_client/i3_client_id.h"
 
 
 enum number_dh_keys_t { ONE, TWO };
@@ -884,15 +883,6 @@
     }
     /* Else R1 is send on raw HIP. */
     else {
-#ifdef CONFIG_HIP_I3
-        if (i1_info->hi3_in_use) {
-            HIP_IFEL(hip_send_i3(r1_src_addr,
-                                 r1_dst_addr, 0, 0,
-                                 r1pkt, NULL, 0),
-                     -ECOMM,
-                     "Sending R1 packet through i3 failed.\n");
-        } else
-#endif
         HIP_IFEL(hip_send_pkt(
                      r1_src_addr,
                      r1_dst_addr, 0, 0,
@@ -1466,77 +1456,3 @@
     }
     return err;
 }
-
-#ifdef CONFIG_HIP_I3
-/**
- * Hi3 outbound traffic processing.
- *
- * @param src_addr  a pointer to our IPv6 or IPv4-in-IPv6 format IPv4 address.
- * @param peer_addr a pointer to peer IPv6 or IPv4-in-IPv6 format IPv4 address.
- * @param not_used  source port number. Not in use.
- * @param not_used2 destination port number. Not in use.
- * @param msg       a pointer to a HIP packet common header with source and
- *                  destination HITs.
- * @param not_used3 a pointer to the current host association database state.
- *                  Not in use.
- * @param not_used4 a boolean value indicating if this is a retransmission
- *                  (@b zero if this is @b not a retransmission). Not in use.
- * @return zero on success or negative on failure
- * @note            There are four parameters not used anywhere. However, these
- *                  parameters must exist in the function parameter list
- *                  because all the send-functions must have a uniform 
parameter
- *                  list as dictated by @c hip_hadb_xmit_func_set.
- * @todo            For now this supports only serialiazation of IPv6 addresses
- *                  to Hi3 header.
- * @todo            This function is outdated. Does not support in6 mapped
- *                  addresses and retransmission queues -mk
- * @todo            Does this support NAT travelsal? Or is it even supposed to
- *                  support it?
- *
- */
-int hip_send_i3(const struct in6_addr *src_addr, const struct in6_addr 
*peer_addr,
-                const in_port_t not_used, const in_port_t not_used2, struct 
hip_common *msg,
-                hip_ha_t *not_used3, const int not_used4)
-{
-    ID id;
-    cl_buf *clb;
-    int err = 0, msg_len;
-    char *buf;
-
-    //check msg length
-    if (!hip_check_network_msg_len(msg)) {
-        err = -EMSGSIZE;
-        HIP_ERROR("bad msg len %d\n", hip_get_msg_total_len(msg));
-        goto out_err;
-    }
-
-    msg_len = hip_get_msg_total_len(msg);
-
-    clb     = cl_alloc_buf(msg_len);
-    if (!clb) {
-        HIP_ERROR("Out of memory\n.");
-        return -1;
-    }
-
-    buf = clb->data;
-
-    hip_zero_msg_checksum(msg);
-
-    clb->data_len = msg_len;
-
-    memcpy(buf, msg, msg_len);
-
-    /* Send over i3 */
-    bzero(&id, ID_LEN);
-    memcpy(&id, &msg->hitr, sizeof(struct in6_addr));
-    cl_set_private_id(&id);
-
-    /* exception when matching trigger not found */
-    cl_send(&id, clb, 0);
-    cl_free_buf(clb);
-
-out_err:
-    return err;
-}
-
-#endif

=== modified file 'hipd/output.h'
--- hipd/output.h       2010-04-22 10:12:54 +0000
+++ hipd/output.h       2010-05-12 13:57:56 +0000
@@ -93,8 +93,4 @@
                       in_port_t src_port, in_port_t dst_port,
                       const void *msg, int length);
 
-int hip_send_i3(const struct in6_addr *, const struct in6_addr *,
-                const in_port_t, const in_port_t,
-                struct hip_common *, hip_ha_t *, int);
-
 #endif /* HIP_HIPD_OUTPUT_H */

=== modified file 'hipd/user.c'
--- hipd/user.c 2010-04-25 19:00:15 +0000
+++ hipd/user.c 2010-05-12 13:57:56 +0000
@@ -213,14 +213,6 @@
         dst_hit = hip_get_param_contents(msg, HIP_PARAM_HIT);
         hip_dec_cookie_difficulty(dst_hit);
         break;
-#ifdef CONFIG_HIP_I3
-    case HIP_MSG_SET_HI3_ON:
-        hip_set_hi3_status(msg);
-        break;
-    case HIP_MSG_SET_HI3_OFF:
-        hip_set_hi3_status(msg);
-        break;
-#endif
 #ifdef CONFIG_HIP_OPPORTUNISTIC
     case HIP_MSG_SET_OPPORTUNISTIC_MODE:
         err = hip_set_opportunistic_mode(msg);

=== removed directory 'i3'
=== removed directory 'i3/aeshash'
=== removed directory 'i3/chord'
=== removed directory 'i3/i3'
=== removed directory 'i3/i3_client'
=== removed directory 'i3/utils'
=== modified file 'lib/conf/conf.c'
--- lib/conf/conf.c     2010-04-29 14:59:33 +0000
+++ lib/conf/conf.c     2010-05-12 13:57:56 +0000
@@ -84,7 +84,7 @@
 /* free slot */
 #define TYPE_HIPPROXY      26
 #define TYPE_HEARTBEAT     27
-#define TYPE_HI3           28
+
 /* free slot (was for TYPE_GET_PEER_LSI  29) */
 #define TYPE_BUDDIES       30
 /* free slot */
@@ -157,7 +157,6 @@
     "hipproxy on|off\n"
 #endif
     "manual-update <interface>\n"
-    "hi3 on|off\n"
     "nsupdate on|off\n"
     "hit-to-ip on|off\n"
     "hit-to-ip-zone <hit-to-ip.zone.>\n"
@@ -510,8 +509,6 @@
         ret = ACTION_RESTART;
     } else if (!strcmp("reinit", argv[1])) {
         ret = ACTION_REINIT;
-    } else if (!strcmp("hi3", argv[1])) {
-        ret = ACTION_HI3;
     }
 #ifdef CONFIG_HIP_HIPPROXY
     else if (!strcmp("hipproxy", argv[1])) {
@@ -703,8 +700,6 @@
 #endif
     else if (strcmp("manual-update", argv[1]) == 0) {
         ret = TYPE_MANUAL_UPDATE;
-    } else if (strcmp("hi3", argv[1]) == 0) {
-        ret = TYPE_HI3;
     } else if (strcmp("hit-to-lsi", argv[1]) == 0) {
         ret = TYPE_HIT_TO_LSI;
     } else if (strcmp("buddies", argv[1]) == 0) {
@@ -769,7 +764,6 @@
 #ifdef CONFIG_HIP_HIPPROXY
     case ACTION_HIPPROXY:
 #endif
-    case ACTION_HI3:
     case ACTION_RESTART:
     case ACTION_NSUPDATE:
     case ACTION_HIT_TO_IP:
@@ -2759,40 +2753,6 @@
 }
 
 /**
- * Handles the hipconf commands where the type is @c locator. Turns on
- * locators for the base exchange. Currently this functionality does not work
- * and is disabled by default.
- *
- * @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_hi3(hip_common_t *msg,
-                               int action,
-                               const char *opt[],
-                               int optc, int send_only)
-{
-    int err = 0, status = 0;
-
-    if (!strcmp("on", opt[0])) {
-        status = HIP_MSG_SET_HI3_ON;
-    } else if (!strcmp("off", opt[0])) {
-        status = HIP_MSG_SET_HI3_OFF;
-    } else {
-        HIP_IFEL(1, -1, "bad args\n");
-    }
-    HIP_IFEL(hip_build_user_hdr(msg, status, 0), -1,
-             "Failed to build user message header.: %s\n", strerror(err));
-
-out_err:
-    return err;
-}
-
-/**
  * Turn nsupdate extension on or off. The nsupdate extension publishes
  * the HIT and IP address of the host on a given DNS server (as an alternative
  * to DHT). Useful especially with mobility.
@@ -3154,7 +3114,7 @@
     NULL,
     hip_conf_handle_hipproxy,           /* 26: TYPE_HIPPROXY */
     hip_conf_handle_heartbeat,          /* 27: TYPE_HEARTBEAT */
-    hip_conf_handle_hi3,                /* 28: TYPE_HI3 */
+    NULL,                               /* 28: unused */
     NULL,                               /* 29: unused */
     hip_conf_handle_buddies_toggle,     /* 30: TYPE_BUDDIES */
     NULL,     /* 31: unused */

=== modified file 'lib/conf/conf.h'
--- lib/conf/conf.h     2010-04-29 14:59:33 +0000
+++ lib/conf/conf.h     2010-05-12 13:57:56 +0000
@@ -166,7 +166,7 @@
 #define ACTION_HIPPROXY 24
 #define ACTION_REINIT 25
 #define ACTION_HEARTBEAT 26
-#define ACTION_HI3 27
+
 #define ACTION_HIT_TO_LSI 28
 #define ACTION_BUDDIES 29
 #define ACTION_NSUPDATE 30

=== modified file 'lib/core/builder.c'
--- lib/core/builder.c  2010-04-20 11:17:15 +0000
+++ lib/core/builder.c  2010-05-12 13:57:56 +0000
@@ -1205,8 +1205,6 @@
     case HIP_MSG_GET_PEER_HIT:       return "HIP_MSG_GET_PEER_HIT";
     case HIP_MSG_NSUPDATE_ON:        return "HIP_MSG_NSUPDATE_ON";
     case HIP_MSG_NSUPDATE_OFF:       return "HIP_MSG_NSUPDATE_OFF";
-    case HIP_MSG_SET_HI3_ON:         return "HIP_MSG_SET_HI3_ON";
-    case HIP_MSG_SET_HI3_OFF:        return "HIP_MSG_SET_HI3_OFF";
     case HIP_MSG_HEARTBEAT:          return "HIP_MSG_HEARTBEAT";
     case HIP_MSG_DHT_SERVING_GW:     return "HIP_MSG_DHT_SERVING_GW";
     case HIP_MSG_SET_NAT_PORT:       return "HIP_MSG_SET_NAT_PORT";

=== modified file 'lib/core/icomm.h'
--- lib/core/icomm.h    2010-04-22 10:12:54 +0000
+++ lib/core/icomm.h    2010-05-12 13:57:56 +0000
@@ -106,8 +106,8 @@
 #define HIP_MSG_DHT_OFF                          93
 #define HIP_MSG_SET_OPPTCP_ON                    94
 #define HIP_MSG_SET_OPPTCP_OFF                   95
-#define HIP_MSG_SET_HI3_ON                       96
-#define HIP_MSG_SET_HI3_OFF                      97
+
+
 #define HIP_MSG_RESET_FIREWALL_DB                98
 
 #define HIP_MSG_OPPTCP_SEND_TCP_PACKET           99

=== modified file 'lib/core/state.h'
--- lib/core/state.h    2010-05-12 10:04:40 +0000
+++ lib/core/state.h    2010-05-12 13:57:56 +0000
@@ -109,10 +109,6 @@
 typedef struct hip_stateless_info {
     in_port_t src_port;     /**< The source port of an incoming packet. */
     in_port_t dst_port;     /**< The destination port of an incoming packet. */
-#ifdef CONFIG_HIP_I3
-    int       hi3_in_use; /**< A boolean to indicate whether this message was
-                         *   sent through I3 or not .*/
-#endif
 } hip_portpair_t;
 
 /**
@@ -445,12 +441,6 @@
     uint8_t                                    
peer_hostname[HIP_HOST_ID_HOSTNAME_LEN_MAX];
     /** True when agent is prompting user and fall back is disabled. */
     int                                        hip_opp_fallback_disable;
-#ifdef CONFIG_HIP_I3
-    /** If the state for hi3, then this flag is 1, otherwise it is zero. */
-    int                                        is_hi3_state;
-    /** Non-zero if hi3 mode is on. */
-    int                                        hip_is_hi3_on;
-#endif
     /** Non-zero if opportunistic TCP mode is on. */
     int                                        hip_is_opptcp_on;
     /** The local port from where the TCP SYN I1 packet will be sent */

=== modified file 'packaging/openwrt/package/Makefile'
--- packaging/openwrt/package/Makefile  2010-05-11 07:02:11 +0000
+++ packaging/openwrt/package/Makefile  2010-05-12 13:57:56 +0000
@@ -89,7 +89,6 @@
             --enable-shared \
             --disable-dht \
             --disable-agent \
-            --disable-i3 \
             --disable-debug \
     );
 endef

=== modified file 'tools/hipl_autobuild.sh'
--- tools/hipl_autobuild.sh     2010-05-12 12:55:53 +0000
+++ tools/hipl_autobuild.sh     2010-05-12 13:57:56 +0000
@@ -109,10 +109,10 @@
 run_program "make -j17 distcheck"
 
 # PISA configuration
-compile --enable-firewall --disable-agent --disable-rvs --disable-hipproxy 
--disable-i3 --disable-opportunistic --disable-dht --disable-blind 
--disable-profiling --enable-debug --enable-midauth --disable-performance 
--disable-demo
+compile --enable-firewall --disable-agent --disable-rvs --disable-hipproxy 
--disable-opportunistic --disable-dht --disable-blind --disable-profiling 
--enable-debug --enable-midauth --disable-performance --disable-demo
 
 # Alternative path to vanilla
-compile --enable-firewall --enable-agent --disable-rvs --disable-hipproxy 
--enable-i3 --disable-opportunistic --disable-dht --enable-blind 
--enable-profiling --disable-debug --enable-midauth --enable-performance 
--enable-demo
+compile --enable-firewall --enable-agent --disable-rvs --disable-hipproxy 
--disable-opportunistic --disable-dht --enable-blind --enable-profiling 
--disable-debug --enable-midauth --enable-performance --enable-demo
 
 # Compile HIPL within an OpenWrt checkout
 CONFIGURATION="OpenWrt ARM crosscompile"

Other related posts:

  • » [hipl-commit] [trunk] Rev 4500: Remove i3 code. - Diego Biurrun