[hipl-dev] [Merge] lp:~hipl-core/hipl/opp-removal into lp:hipl

  • From: René Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
  • To: mp+45696@xxxxxxxxxxxxxxxxxx
  • Date: Mon, 10 Jan 2011 13:50:05 -0000

René Hummen has proposed merging lp:~hipl-core/hipl/opp-removal into lp:hipl.

Requested reviews:
  HIPL core team (hipl-core)

For more details, see:
https://code.launchpad.net/~hipl-core/hipl/opp-removal/+merge/45696

This branch aims at decreasing the code size of the project by removing 
(mostly) unused opportunistic BEX functionality (handshake, where IPs are 
known, but HITs are unkown). Specifically, it removes the oppdb and oppipdb 
from hipd. Both databases were designed to minimize the delay introduced by 
implementations of the opportunistic BEX mode of HIP. Furthermore, this branch 
removes the opportunistic mode implementation in the firewall. As a result, 
HIPL no longer supports triggering opportunistic HIP connections by 
applications.

After applying this branch to trunk, HIPL should still support responding to an 
opportunistic I1 (this has not been touched) as well as opportunistic 
registration with a HIP server.

NOTE: Needs testing.
-- 
https://code.launchpad.net/~hipl-core/hipl/opp-removal/+merge/45696
Your team HIPL core team is requested to review the proposed merge of 
lp:~hipl-core/hipl/opp-removal into lp:hipl.
=== modified file 'Makefile.am'
--- Makefile.am 2010-12-28 18:47:10 +0000
+++ Makefile.am 2011-01-10 13:49:34 +0000
@@ -124,11 +124,6 @@
 hipd_hipd_SOURCES +=  hipd/pisa.c
 endif
 
-if HIP_OPPORTUNISTIC
-hipd_hipd_SOURCES += hipd/oppdb.c                \
-                     hipd/oppipdb.c
-endif
-
 firewall_hipfw_SOURCES = firewall/cache.c               \
                          firewall/conntrack.c           \
                          firewall/dlist.c               \
@@ -146,7 +141,6 @@
                          firewall/port_bindings.c       \
                          firewall/reinject.c            \
                          firewall/rule_management.c     \
-                         firewall/sysopp.c              \
                          firewall/user_ipsec_api.c      \
                          firewall/user_ipsec_esp.c      \
                          firewall/user_ipsec_fw_msg.c   \

=== modified file 'firewall/cache.c'
--- firewall/cache.c    2011-01-07 14:46:07 +0000
+++ firewall/cache.c    2011-01-10 13:49:34 +0000
@@ -63,7 +63,11 @@
  *
  * @return the allocated cache entry
  */
+<<<<<<< TREE
 struct hip_hadb_user_info_state *hip_cache_create_hl_entry(void)
+=======
+static fw_cache_hl_t *hip_cache_create_hl_entry(void)
+>>>>>>> MERGE-SOURCE
 {
     struct hip_hadb_user_info_state *entry = NULL;
     int err = 0;
@@ -233,6 +237,7 @@
 }
 
 /**
+<<<<<<< TREE
  * Delete a database entry identified by HITs, LSIs or IPs
  *
  * @param local local identifier or locator (optional)
@@ -252,6 +257,8 @@
 }
 
 /**
+=======
+>>>>>>> MERGE-SOURCE
  * Generate the hash information that is used to index the cache table
  *
  * @param ptr pointer to the hit used to make the hash
@@ -354,6 +361,7 @@
 out_err:
     return err;
 }
+<<<<<<< TREE
 
 /**
  * Update the HIT and state information of an entry identified by a pair
@@ -395,3 +403,5 @@
 out_err:
     return err;
 }
+=======
+>>>>>>> MERGE-SOURCE

=== modified file 'firewall/cache.h'
--- firewall/cache.h    2011-01-04 13:57:31 +0000
+++ firewall/cache.h    2011-01-10 13:49:34 +0000
@@ -38,23 +38,23 @@
                                                              enum 
fw_cache_query_type type,
                                                              int query_daemon);
 
+<<<<<<< TREE
 void hip_firewall_cache_db_del_entry(const void *local, const void *peer,
                                      enum fw_cache_query_type type);
 
+=======
+>>>>>>> MERGE-SOURCE
 void hip_firewall_cache_init_hldb(void);
 
+<<<<<<< TREE
 struct hip_hadb_user_info_state *hip_cache_create_hl_entry(void);
 
+=======
+>>>>>>> MERGE-SOURCE
 void hip_firewall_cache_delete_hldb(int);
 
 int hip_firewall_cache_set_bex_state(const struct in6_addr *hit_s,
                                      const struct in6_addr *hit_r,
                                      int state);
 
-int hip_firewall_cache_update_entry(const struct in6_addr *ip_our,
-                                    const struct in6_addr *ip_peer,
-                                    const struct in6_addr *hit_our,
-                                    const struct in6_addr *hit_peer,
-                                    int state);
-
 #endif /* HIP_FIREWALL_CACHE_H */

=== modified file 'firewall/firewall.c'
--- firewall/firewall.c 2011-01-10 10:14:22 +0000
+++ firewall/firewall.c 2011-01-10 13:49:34 +0000
@@ -98,15 +98,13 @@
 #include "rule_management.h"
 #include "user_ipsec_api.h"
 #include "firewall.h"
-#include "sysopp.h"
 
 
 /* packet types handled by the firewall */
 #define OTHER_PACKET          0
 #define HIP_PACKET            1
 #define ESP_PACKET            2
-#define TCP_PACKET            3
-#define FW_PROTO_NUM          4 /* number of packet types */
+#define FW_PROTO_NUM          3 /* number of packet types */
 
 /* location of the lock file */
 #define HIP_FIREWALL_LOCK_FILE HIPL_LOCKDIR "/hip_firewall.lock"
@@ -145,7 +143,6 @@
 int filter_traffic                        = HIP_FW_FILTER_TRAFFIC_BY_DEFAULT;
 int hip_kernel_ipsec_fallback             = 0;
 int hip_lsi_support                       = 0;
-int system_based_opp_mode                 = 0;
 int esp_relay                             = 0;
 int hip_esp_protection                    = 0;
 #ifdef CONFIG_HIP_MIDAUTH
@@ -194,7 +191,6 @@
     printf("      -I = as -i, also allow fallback to kernel ipsec when exiting 
hipfw\n");
     printf("      -e = use esp protection extension (also sets -i)\n");
     printf("      -l = activate lsi support\n");
-    printf("      -o = system-based opportunistic mode\n\n");
     printf("      -p = run with lowered priviledges. iptables rules will not 
be flushed on exit\n");
     printf("      -h = print this help\n");
 #ifdef CONFIG_HIP_MIDAUTH
@@ -413,6 +409,7 @@
 }
 
 /**
+<<<<<<< TREE
  * Initialize packet capture rules for system-based opportunistic mode
  *
  * @return zero on success and non-zero on failure
@@ -438,6 +435,11 @@
 
 /*
  * Initialize rules for filtering traffic
+=======
+ * Initialize all basic and extended packet capture rules
+ *
+ * @return zero on success and non-zero on failure
+>>>>>>> MERGE-SOURCE
  *
  */
 static void firewall_init_filter_traffic(void)
@@ -477,6 +479,7 @@
         system_print("ip6tables -I HIPFW-OUTPUT -p 17 --dport 10500 -j QUEUE");
         system_print("ip6tables -I HIPFW-OUTPUT -p 17 --sport 10500 -j QUEUE");
     }
+<<<<<<< TREE
 }
 
 /**
@@ -513,6 +516,9 @@
 
     firewall_init_filter_traffic();
     HIP_IFEL(hip_fw_init_system_based_opp_mode(), -1, "failed to load 
extension\n");
+=======
+
+>>>>>>> MERGE-SOURCE
     HIP_IFEL(hip_fw_init_lsi_support(), -1, "failed to load extension\n");
     HIP_IFEL(hip_fw_init_userspace_ipsec(), -1, "failed to load extension\n");
     HIP_IFEL(hip_fw_init_esp_prot(), -1, "failed to load extension\n");
@@ -533,6 +539,7 @@
     return err;
 }
 
+<<<<<<< TREE
 /**
  * Initialize ESP relay extensions
  *
@@ -595,6 +602,8 @@
     return err;
 }
 
+=======
+>>>>>>> MERGE-SOURCE
 /*-------------------HELPER FUNCTIONS---------------------*/
 
 /**
@@ -686,7 +695,6 @@
 
     hip_firewall_cache_delete_hldb(1);
     hip_port_bindings_uninit();
-    hip_fw_uninit_system_based_opp_mode();
     hip_fw_flush_iptables();
     /* rules have to be removed first, otherwise HIP packets won't pass through
      * at this time any more */
@@ -1080,61 +1088,9 @@
 }
 
 /*
- * Handle packet capture for outbound HIP packets. The rules are as follows:
- *
- * Output:
- *
- * - HIP:
- *   1. default rule checks for hip
- *   1. filter_hip
- *
- * - ESP:
- *   1. default rule checks for esp
- *   2. filter_esp
- *
- * - TCP:
- *   1. default rule checks for non-hip
- *   2.
- *   - destination is hit (userspace ipsec output)
- *   - destination is lsi (lsi output)
- *   - destination not hit or lsi
- *     1. opp tcp filtering (TBD)
- *
- * - Other
- *   - Same as with TCP except no opp tcp filtering
- *
- * Input:
- *
- * - HIP:
- *   1. default rule checks for hip
- *   2. filter_hip
- *
- * - ESP:
- *   1. default rule checks for hip
- *   2. filter_esp
- *   3. userspace_ipsec input
- *   4. lsi input
- *
- * - Other:
- *   - Same as with TCP except no opp tcp input
- *
- * - TCP:
- *   1. default rule checks for non-hip
- *   2. opp tcp input
- *
- * Forward:
- *
- * - HIP:
- *   1. None
- *
- * - ESP:
- *   1. None
- *
- * - TCP:
- *   1. Proxy input
- *
- * - Other:
- *   2. Proxy input
+ * Handle packet capture for outbound HIP packets.
+ *
+ * @note hooks HIP message filtering.
  *
  * @param ctx packet context
  *
@@ -1143,7 +1099,7 @@
 static int hip_fw_handle_hip_output(struct hip_fw_context *ctx){
     int verdict = accept_hip_esp_traffic_by_default;
 
-    HIP_DEBUG("hip_fw_handle_hip_output \n");
+    HIP_DEBUG("\n");
 
     if (filter_traffic) {
         verdict = filter_hip(&ctx->src,
@@ -1162,7 +1118,9 @@
 }
 
 /**
- * Process an ESP packet from the outbound packet queue
+ * Process an ESP packet from the outbound packet queue.
+ *
+ * @note hooks ESP filtering
  *
  * @param ctx the packet context
  *
@@ -1184,7 +1142,9 @@
 }
 
 /**
- * Process an ESP packet from the outbound packet capture queue
+ * Process any other packet from the outbound packet capture queue
+ *
+ * @note hooks userspace IPsec and LSI
  *
  * @param ctx the packet context
  *
@@ -1205,14 +1165,11 @@
         // check if this is a reinjected packet
         if (def_hit && IN6_ARE_ADDR_EQUAL(&ctx->dst, def_hit)) {
             // let the packet pass through directly
-            verdict = 1;
+            verdict = ACCEPT;
         } else {
-            // distinguish ipsec and data mode here
-            if (hip_userspace_ipsec) {
-                verdict = !hip_fw_userspace_ipsec_output(ctx);
-            }
+            verdict = !hip_fw_userspace_ipsec_output(ctx);
         }
-    } else if (ctx->ip_version == 4) {
+    } else if (ctx->ip_version == 4 && hip_lsi_support) {
         hip_lsi_t src_lsi, dst_lsi;
 
         IPV6_TO_IPV4_MAP(&(ctx->src), &src_lsi);
@@ -1221,15 +1178,12 @@
         /* LSI HOOKS */
         if (IS_LSI32(dst_lsi.s_addr) && hip_lsi_support) {
             if (hip_is_packet_lsi_reinjection(&dst_lsi)) {
-                verdict = 1;
+                verdict = ACCEPT;
             } else {
                 hip_fw_handle_outgoing_lsi(ctx->ipq_packet,
                                            &src_lsi, &dst_lsi);
-                verdict = 0;                 /* Reject the packet */
+                verdict = DROP;     /* Reject the packet */
             }
-        } else if (system_based_opp_mode) {
-            verdict = hip_fw_handle_outgoing_system_based_opp(ctx,
-                                             accept_normal_traffic_by_default);
         }
     }
 
@@ -1239,6 +1193,7 @@
 }
 
 /**
+<<<<<<< TREE
  * Process a TCP packet from the outbound packet capture queue
  *
  * @param ctx the packet context
@@ -1253,8 +1208,12 @@
 }
 
 /**
+=======
+>>>>>>> MERGE-SOURCE
  * Process a HIP packet from the forward packet capture queue
  *
+ * @note hooks middlebox authentication
+ *
  * @param ctx the packet context
  *
  * @return the verdict (1 for pass and 0 for drop)
@@ -1274,6 +1233,7 @@
     return hip_fw_handle_hip_output(ctx);
 }
 
+<<<<<<< TREE
 /**
  * Process an ESP packet from the forward packet capture queue
  *
@@ -1357,10 +1317,19 @@
 
     return verdict;
 }
+=======
+/* hip_fw_handle_esp_forward is the same as hip_fw_handle_esp_output */
+
+/* no need for hip_fw_handle_other_forward */
+
+/* hip_fw_handle_hip_input is the same as hip_fw_handle_hip_output */
+>>>>>>> MERGE-SOURCE
 
 /**
  * Process an ESP packet from the inbound packet capture queue
  *
+ * @note hooks ESP filtering and userspace IPsec
+ *
  * @param ctx the packet context
  *
  * @return the verdict (1 for pass and 0 for drop)
@@ -1379,8 +1348,6 @@
     }
 
     if (verdict && hip_userspace_ipsec) {
-        HIP_DEBUG("userspace ipsec input\n");
-        // added by Tao Wan
         verdict = !hip_fw_userspace_ipsec_input(ctx);
     }
 
@@ -1388,26 +1355,36 @@
 }
 
 /**
- * Process a TCP packet from the inbound packet capture queue
+ * Process any other packet from the inbound packet capture queue.
+ *
+ * @note hooks LSI
  *
  * @param ctx the packet context
  *
  * @return the verdict (1 for pass and 0 for drop)
  */
+<<<<<<< TREE
 static int hip_fw_handle_tcp_input(struct hip_fw_context *ctx)
+=======
+static int hip_fw_handle_other_input(hip_fw_context_t *ctx)
+>>>>>>> MERGE-SOURCE
 {
     int verdict = accept_normal_traffic_by_default;
 
     HIP_DEBUG("\n");
 
-    // any incoming plain TCP packet might be an opportunistic I1
-    HIP_DEBUG_HIT("hit src", &ctx->src);
-    HIP_DEBUG_HIT("hit dst", &ctx->dst);
-
-    // as we should never receive TCP with HITs, this will only apply
-    // to IPv4 TCP
-    verdict = hip_fw_handle_other_input(ctx);
-
+    if (ipv6_addr_is_hit(&ctx->src) &&
+        ipv6_addr_is_hit(&ctx->dst) &&
+        hip_lsi_support) {
+
+        verdict = hip_fw_handle_incoming_hit(ctx->ipq_packet,
+                                             &ctx->src,
+                                             &ctx->dst,
+                                             hip_lsi_support);
+    }
+
+    /* No need to check default rules as it is handled by the
+     * iptables rules */
     return verdict;
 }
 
@@ -1428,21 +1405,38 @@
               NF_IP_FORWARD);
 
     // funtion pointers for the respective packet handlers
+<<<<<<< TREE
     fw_handlers[NF_IP_LOCAL_IN][OTHER_PACKET]  = hip_fw_handle_other_input;
     fw_handlers[NF_IP_LOCAL_IN][HIP_PACKET]    = hip_fw_handle_hip_input;
     fw_handlers[NF_IP_LOCAL_IN][ESP_PACKET]    = hip_fw_handle_esp_input;
     fw_handlers[NF_IP_LOCAL_IN][TCP_PACKET]    = hip_fw_handle_tcp_input;
+=======
+    hip_fw_handler[NF_IP_LOCAL_IN][OTHER_PACKET]  = hip_fw_handle_other_input;
+    hip_fw_handler[NF_IP_LOCAL_IN][HIP_PACKET]    = hip_fw_handle_hip_output;
+    hip_fw_handler[NF_IP_LOCAL_IN][ESP_PACKET]    = hip_fw_handle_esp_input;
+>>>>>>> MERGE-SOURCE
 
+<<<<<<< TREE
     fw_handlers[NF_IP_LOCAL_OUT][OTHER_PACKET] = hip_fw_handle_other_output;
     fw_handlers[NF_IP_LOCAL_OUT][HIP_PACKET]   = hip_fw_handle_hip_output;
     fw_handlers[NF_IP_LOCAL_OUT][ESP_PACKET]   = hip_fw_handle_esp_output;
     fw_handlers[NF_IP_LOCAL_OUT][TCP_PACKET]   = hip_fw_handle_tcp_output;
+=======
+    hip_fw_handler[NF_IP_LOCAL_OUT][OTHER_PACKET] = hip_fw_handle_other_output;
+    hip_fw_handler[NF_IP_LOCAL_OUT][HIP_PACKET]   = hip_fw_handle_hip_output;
+    hip_fw_handler[NF_IP_LOCAL_OUT][ESP_PACKET]   = hip_fw_handle_esp_output;
+>>>>>>> MERGE-SOURCE
 
     //apply rules for forwarded hip and esp traffic
+<<<<<<< TREE
     fw_handlers[NF_IP_FORWARD][HIP_PACKET]     = hip_fw_handle_hip_forward;
     fw_handlers[NF_IP_FORWARD][ESP_PACKET]     = hip_fw_handle_esp_forward;
     //do not drop those files by default
     fw_handlers[NF_IP_FORWARD][TCP_PACKET]     = hip_fw_handle_tcp_forward;
+=======
+    hip_fw_handler[NF_IP_FORWARD][HIP_PACKET]     = hip_fw_handle_hip_forward;
+    hip_fw_handler[NF_IP_FORWARD][ESP_PACKET]     = hip_fw_handle_esp_output;
+>>>>>>> MERGE-SOURCE
 
     HIP_DEBUG("Enabling forwarding for IPv4 and IPv6\n");
     system_print("echo 1 >/proc/sys/net/ipv4/conf/all/forwarding");
@@ -1483,7 +1477,6 @@
  * Currently supported types:   type
  * - plain HIP control packet      1
  * - ESP packet                    2
- * - TCP packet                    3 (for opportunistic TCP handshake)
  *
  * Unsupported types -> type 0
  *
@@ -1496,7 +1489,7 @@
                                const unsigned char *buf,
                                const int ip_version)
 {
-    int ip_hdr_len, err = 0;
+    int err = 0;
     // length of packet starting at udp header
     uint16_t udp_len         = 0;
     struct udphdr *udphdr    = NULL;
@@ -1529,10 +1522,9 @@
         /* ip_hl is given in multiple of 4 bytes
          *
          * NOTE: not sizeof(struct ip) as we might have options */
-        ip_hdr_len       = (iphdr->ip_hl * 4);
-        // needed for opportunistic TCP
-        ctx->ip_hdr_len  = ip_hdr_len;
-        HIP_DEBUG("ip_hdr_len is: %d\n", ip_hdr_len);
+        ctx->ip_hdr_len = (iphdr->ip_hl * 4);
+
+        HIP_DEBUG("ip_hdr_len is: %d\n", ctx->ip_hdr_len);
         HIP_DEBUG("total length: %u\n", ntohs(iphdr->ip_len));
         HIP_DEBUG("ttl: %u\n", iphdr->ip_ttl);
         HIP_DEBUG("packet length (ipq): %u\n", ctx->ipq_packet->data_len);
@@ -1553,7 +1545,7 @@
 
             ctx->packet_type       = HIP_PACKET;
             ctx->transport_hdr.hip = (struct hip_common *)
-                    (((char *) iphdr) + ip_hdr_len);
+                    (((char *) iphdr) + ctx->ip_hdr_len);
 
             goto end_init;
         } else if (iphdr->ip_p == IPPROTO_ESP) {
@@ -1562,19 +1554,7 @@
 
             ctx->packet_type       = ESP_PACKET;
             ctx->transport_hdr.esp = (struct hip_esp *)
-                    (((char *) iphdr) + ip_hdr_len);
-
-            goto end_init;
-        } else if (iphdr->ip_p == IPPROTO_TCP) {
-            // this might be a TCP packet for opportunistic mode
-            HIP_DEBUG("plain TCP packet\n");
-
-            ctx->packet_type       = TCP_PACKET;
-            ctx->transport_hdr.tcp = (struct tcphdr*)
-                                     (((char *) iphdr) + ip_hdr_len);
-
-            HIP_DEBUG("src port: %u\n", ntohs(ctx->transport_hdr.tcp->source));
-            HIP_DEBUG("dst port: %u\n", ntohs(ctx->transport_hdr.tcp->dest));
+                    (((char *) iphdr) + ctx->ip_hdr_len);
 
             goto end_init;
         } else if (iphdr->ip_p != IPPROTO_UDP) {
@@ -1587,7 +1567,7 @@
         // need UDP header to look for encapsulated ESP
         udp_len            = ntohs(iphdr->ip_len);
         udphdr             = ((struct udphdr *)
-                (((char *) iphdr) + ip_hdr_len));
+                (((char *) iphdr) + ctx->ip_hdr_len));
 
         // add UDP header to context
         ctx->udp_encap_hdr = udphdr;
@@ -1597,10 +1577,8 @@
         ctx->ip_hdr.ipv6 = ip6_hdr;
 
         // Ipv6 has fixed header length
-        ip_hdr_len       = sizeof(struct ip6_hdr);
-        // needed for opportunistic TCP
-        ctx->ip_hdr_len  = ip_hdr_len;
-        HIP_DEBUG("ip_hdr_len is: %d\n", ip_hdr_len);
+        ctx->ip_hdr_len = sizeof(struct ip6_hdr);
+        HIP_DEBUG("ip_hdr_len is: %d\n", ctx->ip_hdr_len);
         HIP_DEBUG("payload length: %u\n", ntohs(ip6_hdr->ip6_plen));
         HIP_DEBUG("ttl: %u\n", ip6_hdr->ip6_hlim);
         HIP_DEBUG("packet length (ipq): %u\n", ctx->ipq_packet->data_len);
@@ -1634,18 +1612,6 @@
                     (((char *) ip6_hdr) + sizeof(struct ip6_hdr));
 
             goto end_init;
-        } else if (ip6_hdr->ip6_nxt == IPPROTO_TCP) {
-            // this might be a TCP packet for opportunistic mode
-            HIP_DEBUG("plain TCP packet\n");
-
-            ctx->packet_type       = TCP_PACKET;
-            ctx->transport_hdr.tcp = (struct tcphdr*)
-                                     (((char *) ip6_hdr) + sizeof(struct 
ip6_hdr));
-
-            HIP_DEBUG("src port: %u\n", ntohs(ctx->transport_hdr.tcp->source));
-            HIP_DEBUG("dst port: %u\n", ntohs(ctx->transport_hdr.tcp->dest));
-
-            goto end_init;
         } else if (ip6_hdr->ip6_nxt != IPPROTO_UDP) {
             // if it's not UDP either, it's unsupported
             HIP_DEBUG("some other packet\n");
@@ -1663,7 +1629,7 @@
          * -> handle this */
         udp_len            = ntohs(ip6_hdr->ip6_plen);
         udphdr             = ((struct udphdr *)
-                (((char *) ip6_hdr) + ip_hdr_len));
+                (((char *) ip6_hdr) + ctx->ip_hdr_len));
 
         // add udp header to context
         ctx->udp_encap_hdr = udphdr;
@@ -1988,7 +1954,7 @@
 
     hip_set_logdebug(LOGDEBUG_ALL);
 
-    while ((ch = getopt(argc, argv, "aAbcdef:FhHiIklmopvV")) != -1) {
+    while ((ch = getopt(argc, argv, "aAbcdef:FhHiIklmpvV")) != -1) {
         switch (ch) {
         case 'A':
             accept_hip_esp_traffic_by_default = 1;
@@ -2037,9 +2003,6 @@
             use_midauth = 1;
             break;
 #endif
-        case 'o':
-            system_based_opp_mode = 1;
-            break;
         case 'p':
             limit_capabilities = 1;
             break;
@@ -2111,7 +2074,7 @@
              "connecting socket failed\n");
 
     /* Starting hipfw does not always work when hipfw starts first -miika */
-    if (hip_userspace_ipsec || hip_lsi_support || system_based_opp_mode) {
+    if (hip_userspace_ipsec || hip_lsi_support) {
         hip_fw_wait_for_hipd();
     }
 

=== modified file 'firewall/firewall_control.c'
--- firewall/firewall_control.c 2010-11-30 14:50:30 +0000
+++ firewall/firewall_control.c 2011-01-10 13:49:34 +0000
@@ -49,7 +49,6 @@
 #include "firewall.h"
 #include "user_ipsec_fw_msg.h"
 #include "firewall_control.h"
-#include "sysopp.h"
 
 /**
  * Change the state of hadb state cache in the firewall
@@ -131,11 +130,6 @@
         HIP_IFEL(handle_sa_flush_all_request(), -1,
                  "hip userspace sadb flush all did NOT succeed\n");
         break;
-    case HIP_MSG_GET_PEER_HIT:
-        if (system_based_opp_mode) {
-            err = hip_fw_sys_opp_set_peer_hit(msg);
-        }
-        break;
     case HIP_MSG_TURN_INFO:
         break;
     case HIP_MSG_RESET_FIREWALL_DB:

=== renamed file 'firewall/sysopp.c' => 'firewall/sysopp.c.THIS'
=== renamed file 'firewall/sysopp.h' => 'firewall/sysopp.h.THIS'
=== modified file 'hipd/close.c'
--- hipd/close.c        2011-01-04 17:07:21 +0000
+++ hipd/close.c        2011-01-10 13:49:34 +0000
@@ -54,7 +54,6 @@
 #include "hiprelay.h"
 #include "input.h"
 #include "maintenance.h"
-#include "oppipdb.h"
 #include "output.h"
 #include "user.h"
 #include "close.h"
@@ -90,11 +89,6 @@
         goto out_err;
     }
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    /* Check and remove the IP of the peer from the opp non-HIP database */
-    hip_oppipdb_delentry(&(entry->peer_addr));
-#endif
-
     if (!(entry->state == HIP_STATE_ESTABLISHED) && delete_ha_info) {
         HIP_DEBUG("Not sending CLOSE message, invalid hip state " \
                   "in current host association. State is %s.\n",
@@ -491,11 +485,6 @@
 
     HIP_DEBUG("CLOSED\n");
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    /* Check and remove the IP of the peer from the opp non-HIP database */
-    hip_oppipdb_delentry(&ctx->hadb_entry->peer_addr);
-#endif
-
     HIP_IFEL(hip_del_peer_info(&ctx->hadb_entry->hit_our,
                                &ctx->hadb_entry->hit_peer),
              -1, "Deleting peer info failed\n");

=== modified file 'hipd/hadb.c'
--- hipd/hadb.c 2011-01-07 16:15:14 +0000
+++ hipd/hadb.c 2011-01-10 13:49:34 +0000
@@ -94,7 +94,6 @@
 #include "input.h"
 #include "keymat.h"
 #include "netdev.h"
-#include "oppdb.h"
 #include "output.h"
 #include "hadb.h"
 
@@ -914,10 +913,13 @@
  */
 int hip_del_peer_info_entry(struct hip_hadb_state *ha)
 {
+<<<<<<< TREE
 #ifdef CONFIG_HIP_OPPORTUNISTIC
     struct hip_opp_blocking_request *opp_entry = NULL;
 #endif
 
+=======
+>>>>>>> MERGE-SOURCE
     HIP_LOCK_HA(ha);
 
     /* by now, if everything is according to plans, the refcnt
@@ -926,19 +928,8 @@
     HIP_DEBUG_HIT("peer HIT", &ha->hit_peer);
     hip_delete_hit_sp_pair(&ha->hit_peer, &ha->hit_our, 1);
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    opp_entry = hip_oppdb_find_by_ip(&ha->peer_addr);
-#endif
-
-    /* Delete hadb entry before oppdb entry to avoid a loop */
     hip_hadb_delete_state(ha);
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    if (opp_entry) {
-        hip_oppdb_entry_clean_up(opp_entry);
-    }
-#endif
-
     HIP_UNLOCK_HA(ha);
 
     return 0;

=== modified file 'hipd/hipd.h'
--- hipd/hipd.h 2011-01-07 16:15:14 +0000
+++ hipd/hipd.h 2011-01-10 13:49:34 +0000
@@ -41,10 +41,6 @@
 #define HIP_SELECT_TIMEOUT        1
 #define HIP_RETRANSMIT_MAX        5
 #define HIP_RETRANSMIT_INTERVAL   1 /* seconds */
-#define HIP_OPP_WAIT              5 /* seconds */
-#define HIP_OPP_FALLBACK_INTERVAL 1 /* seconds */
-#define HIP_OPP_FALLBACK_INIT \
-    (HIP_OPP_FALLBACK_INTERVAL / HIP_SELECT_TIMEOUT)
 /* the interval with which the hadb entries are checked for retransmissions */
 #define HIP_RETRANSMIT_INIT \
     (HIP_RETRANSMIT_INTERVAL / HIP_SELECT_TIMEOUT)

=== modified file 'hipd/init.c'
--- hipd/init.c 2011-01-07 14:46:07 +0000
+++ hipd/init.c 2011-01-10 13:49:34 +0000
@@ -83,8 +83,6 @@
 #include "nat.h"
 #include "netdev.h"
 #include "nsupdate.h"
-#include "oppdb.h"
-#include "oppipdb.h"
 #include "output.h"
 #include "pkt_handling.h"
 #include "registration.h"
@@ -895,10 +893,6 @@
 
     lmod_uninit_packet_types();
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    hip_oppdb_uninit();
-#endif
-
 #ifdef CONFIG_HIP_RVS
     HIP_INFO("Uninitializing RVS / HIP relay database and whitelist.\n");
     hip_relay_uninit();
@@ -1056,22 +1050,12 @@
     signal(SIGTERM, hip_close);
     signal(SIGCHLD, hip_sig_chld);
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    HIP_IFEL(hip_init_oppip_db(), -1,
-             "Cannot initialize opportunistic mode IP database for " \
-             "non HIP capable hosts!\n");
-#endif
     HIP_IFEL((hip_init_cipher() < 0), 1, "Unable to init ciphers.\n");
 
     HIP_IFE(init_random_seed(), -1);
 
     hip_init_hadb();
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    hip_init_opp_db();
-#endif
-
-
     /* Resolve our current addresses, afterwards the events from kernel
      * will maintain the list This needs to be done before opening
      * NETLINK_ROUTE! See the comment about address_count global var. */

=== modified file 'hipd/input.c'
--- hipd/input.c        2011-01-07 16:15:14 +0000
+++ hipd/input.c        2011-01-10 13:49:34 +0000
@@ -83,8 +83,6 @@
 #include "keymat.h"
 #include "maintenance.h"
 #include "netdev.h"
-#include "oppdb.h"
-#include "oppipdb.h"
 #include "output.h"
 #include "pisa.h"
 #include "pkt_handling.h"
@@ -558,15 +556,6 @@
         goto out_err;
     }
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    if (!ctx->hadb_entry &&
-        (type == HIP_I1 || type == HIP_R1)) {
-        ctx->hadb_entry =
-                hip_oppdb_get_hadb_entry_i1_r1(ctx->input_msg,
-                                               &ctx->src_addr);
-    }
-#endif
-
     if (ctx->hadb_entry) {
         state = ctx->hadb_entry->state;
     } else {
@@ -710,16 +699,6 @@
              "No entry in host association database when receiving R1." \
              "Dropping.\n");
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    /* Check and remove the IP of the peer from the opp non-HIP database */
-    hip_oppipdb_delentry(&ctx->hadb_entry->peer_addr);
-    /* Replace the opportunistic entry with one using the peer HIT
-     * before further operations */
-    if (hit_is_opportunistic_hit(&ctx->hadb_entry->hit_peer)) {
-        hip_handle_opp_r1(ctx);
-    }
-#endif
-
     if (ipv6_addr_any(&ctx->input_msg->hitr)) {
         HIP_DEBUG("Received NULL receiver HIT in R1. Not dropping\n");
     }
@@ -1206,10 +1185,6 @@
     ctx->hadb_entry->state = HIP_STATE_ESTABLISHED;
     hip_hadb_insert_state(ctx->hadb_entry);
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    /* Check and remove the IP of the peer from the opp non-HIP database */
-    hip_oppipdb_delentry(&(ctx->hadb_entry->peer_addr));
-#endif
     HIP_INFO("Reached ESTABLISHED state\n");
     HIP_INFO("Handshake completed\n");
 

=== modified file 'hipd/maintenance.c'
--- hipd/maintenance.c  2011-01-03 19:36:44 +0000
+++ hipd/maintenance.c  2011-01-10 13:49:34 +0000
@@ -60,7 +60,6 @@
 #include "hidb.h"
 #include "hipd.h"
 #include "init.h"
-#include "oppdb.h"
 #include "output.h"
 #include "maintenance.h"
 
@@ -74,7 +73,6 @@
 int hip_firewall_sock_lsi_fd = -1;
 
 float retrans_counter        = HIP_RETRANSMIT_INIT;
-float opp_fallback_counter   = HIP_OPP_FALLBACK_INIT;
 float precreate_counter      = HIP_R1_PRECREATE_INIT;
 float queue_counter          = QUEUE_CHECK_INIT;
 int force_exit_counter       = FORCE_EXIT_COUNTER_START;
@@ -152,26 +150,6 @@
     return err;
 }
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-/**
- * scan for opportunistic connections that should time out
- * and give up (fall back to normal TCP/IP)
- *
- * @return zero on success or negative on failure
- */
-static int hip_scan_opp_fallback(void)
-{
-    int err = 0;
-    time_t current_time;
-    time(&current_time);
-
-    HIP_IFEL(hip_for_each_opp(hip_handle_opp_fallback, &current_time), 0,
-             "for_each_ha err.\n");
-out_err:
-    return err;
-}
-#endif
-
 /**
  * deliver pending retransmissions for all host associations
  *
@@ -306,17 +284,6 @@
         retrans_counter--;
     }
 
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-
-    if (opp_fallback_counter < 0) {
-        HIP_IFEL(hip_scan_opp_fallback(), -1,
-                 "retransmission scan failed\n");
-        opp_fallback_counter = HIP_OPP_FALLBACK_INIT;
-    } else {
-        opp_fallback_counter--;
-    }
-#endif
-
     if (precreate_counter < 0) {
         HIP_IFEL(hip_recreate_all_precreated_r1_packets(), -1,
                  "Failed to recreate puzzles\n");
@@ -366,7 +333,7 @@
 
 /**
  * Update firewall on host association state. Currently used by the
- * LSI and system-based opportunistic mode in the firewall.
+ * LSI mode in the firewall.
  *
  * @param action HIP_MSG_FW_UPDATE_DB or HIP_MSG_FW_BEX_DONE
  * @param hit_s optional source HIT

=== renamed file 'hipd/oppdb.c' => 'hipd/oppdb.c.THIS'
=== renamed file 'hipd/oppdb.h' => 'hipd/oppdb.h.THIS'
=== renamed file 'hipd/oppipdb.c' => 'hipd/oppipdb.c.THIS'
=== removed file 'hipd/oppipdb.h'
--- hipd/oppipdb.h      2010-10-15 15:29:14 +0000
+++ hipd/oppipdb.h      1970-01-01 00:00:00 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2010 Aalto University and RWTH Aachen University.
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * @file
- * @author  Antti Partanen
- * @author  Alberto Garcia
- */
-
-#ifndef HIP_HIPD_OPPIPDB_H
-#define HIP_HIPD_OPPIPDB_H
-
-#include <netinet/in.h>
-
-
-typedef struct in6_addr hip_oppip_t;
-
-int hip_for_each_oppip(void (*func)(hip_oppip_t *entry, void *opaq), void 
*opaque);
-void hip_oppipdb_del_entry_by_entry(hip_oppip_t *entry, void *arg);
-int hip_oppipdb_add_entry(const struct in6_addr *ip_peer);
-int hip_init_oppip_db(void);
-hip_oppip_t *hip_oppipdb_find_byip(const struct in6_addr *ip_peer);
-void hip_oppipdb_delentry(const struct in6_addr *ip_peer);
-void hip_oppipdb_uninit(void);
-
-#endif /* HIP_HIPD_OPPIPDB_H */

=== modified file 'hipd/output.c'
--- hipd/output.c       2011-01-09 14:59:33 +0000
+++ hipd/output.c       2011-01-10 13:49:34 +0000
@@ -85,7 +85,6 @@
  *
  * @param i1         a pointer to a i1 packet common header with source and
  *                   destination HITs.
- * @param dst_hit    destination HIT (used only for the opportunistic TCP 
extension)
  * @param local_addr a pointer to our IPv6 or IPv4-in-IPv6 format IPv4 address.
  *                   If local_addr is NULL, the packet is sent from all 
addresses.
  * @param peer_addr  a pointer to peer IPv6 or IPv4-in-IPv6 format IPv4 
address.
@@ -93,10 +92,8 @@
  * @param dst_port   not used.
  * @param entry      a pointer to the current host association database state.
  * @return           zero on success, or negative error value on error.
- * @todo remove the dst_hit parameter? test with the opportunistic TCP 
extension
  */
 static int hip_send_i1_pkt(struct hip_common *i1,
-                           UNUSED const hip_hit_t *dst_hit,
                            struct in6_addr *local_addr,
                            struct in6_addr *peer_addr,
                            in_port_t src_port,
@@ -204,7 +201,6 @@
 
         local_addr = &entry->our_addr;
         err        = hip_send_i1_pkt(i1,
-                                     dst_hit,
                                      local_addr,
                                      &peer_addr,
                                      entry->local_udp_port,
@@ -219,7 +215,6 @@
             ipv6_addr_copy(&peer_addr, &addr->address);
 
             err  = hip_send_i1_pkt(i1,
-                                   dst_hit,
                                    NULL,
                                    &peer_addr,
                                    entry->local_udp_port,

=== modified file 'hipd/user.c'
--- hipd/user.c 2011-01-04 19:22:24 +0000
+++ hipd/user.c 2011-01-10 13:49:34 +0000
@@ -86,7 +86,6 @@
 #include "nat.h"
 #include "netdev.h"
 #include "nsupdate.h"
-#include "oppdb.h"
 #include "output.h"
 #include "registration.h"
 #include "user.h"
@@ -253,6 +252,10 @@
     int err                            = 0, msg_type = 0, reti = 0;
     int access_ok                      = 0, is_root = 0;
     const struct hip_tlv_common *param = NULL;
+#ifdef CONFIG_HIP_OPPORTUNISTIC
+    struct in6_addr opp_hit, src_ip;
+    struct in6_addr hit_local;
+#endif
 
     HIP_ASSERT(src->sin6_family == AF_INET6);
     HIP_DEBUG("User message from port %d\n", htons(src->sin6_port));
@@ -366,11 +369,6 @@
         dst_hit = hip_get_param_contents(msg, HIP_PARAM_HIT);
         hip_dec_cookie_difficulty();
         break;
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    case HIP_MSG_GET_PEER_HIT:
-        err     = hip_opp_get_peer_hit(msg, src);
-        break;
-#endif
     case HIP_MSG_CERT_SPKI_VERIFY:
     {
         HIP_DEBUG("Got an request to verify SPKI cert\n");
@@ -434,9 +432,6 @@
         struct sockaddr_in6 sock_addr6;
         struct sockaddr_in sock_addr;
         struct in6_addr server_addr, hitr;
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-        struct in6_addr *hit_local;
-#endif
 
         /* Get RVS IP address, HIT and requested lifetime given as
          * commandline parameters to hipconf. */
@@ -490,7 +485,7 @@
             HIP_IFEL(hip_hadb_add_peer_info(dst_hit, dst_ip,
                                             NULL, NULL),
                      -1, "Error on adding server "  \
-                         "HIT to IP address mapping to the hadb.\n");
+                     "HIT to IP address mapping to the hadb.\n");
 
             /* Fetch the hadb entry just created. */
             entry = hip_hadb_try_to_find_by_peer_hit(dst_hit);
@@ -504,12 +499,39 @@
         }
 #ifdef CONFIG_HIP_OPPORTUNISTIC
         else {
-            hit_local = malloc(sizeof(struct in6_addr));
-            HIP_IFEL(hip_get_default_hit(hit_local), -1,
+            HIP_IFEL(hip_get_default_hit(&hit_local), -1,
                      "Error retrieving default HIT \n");
-            entry     = hip_opp_add_map(dst_ip, hit_local, src);
+
+            HIP_IFEL(hip_opportunistic_ipv6_to_hit(dst_ip,
+                                                   &opp_hit,
+                                                   HIP_HIT_TYPE_HASH100),
+                     -1,
+                     "Opportunistic HIT conversion failed\n");
+
+            HIP_ASSERT(hit_is_opportunistic_hit(&opp_hit));
+
+            HIP_DEBUG_HIT("Opportunistic HIT", &opp_hit);
+
+            HIP_IFEL(hip_select_source_address(&src_ip,
+                                               dst_ip),
+                     -1,
+                     "Cannot find source address\n");
+
+            HIP_IFEL(hip_hadb_add_peer_info_complete(&hit_local,
+                                                     &opp_hit,
+                                                     NULL,
+                                                     &src_ip,
+                                                     dst_ip,
+                                                     NULL),
+                     -1,
+                     "failed to add peer information to hadb\n");
+
+            HIP_IFEL(!(entry = hip_hadb_find_byhits(&hit_local, &opp_hit)),
+                     -1,
+                     "Did not find entry\n");
         }
 #endif
+
         reg_types  = reg_req->reg_type;
         type_count = hip_get_param_contents_len(reg_req) -
                      sizeof(reg_req->lifetime);

=== modified file 'lib/core/builder.c'
--- lib/core/builder.c  2011-01-07 16:15:14 +0000
+++ lib/core/builder.c  2011-01-10 13:49:34 +0000
@@ -1120,7 +1120,6 @@
     case HIP_MSG_CONF_PUZZLE_SET:    return "HIP_MSG_CONF_PUZZLE_SET";
     case HIP_MSG_CONF_PUZZLE_INC:    return "HIP_MSG_CONF_PUZZLE_INC";
     case HIP_MSG_CONF_PUZZLE_DEC:    return "HIP_MSG_CONF_PUZZLE_DEC";
-    case HIP_MSG_SET_OPPORTUNISTIC_MODE: return 
"HIP_MSG_SET_OPPORTUNISTIC_MODE";
     case HIP_MSG_SET_DEBUG_ALL:      return "HIP_MSG_SET_DEBUG_ALL";
     case HIP_MSG_SET_DEBUG_MEDIUM:   return "HIP_MSG_SET_DEBUG_MEDIUM";
     case HIP_MSG_SET_DEBUG_NONE:     return "HIP_MSG_SET_DEBUG_NONE";
@@ -1132,9 +1131,6 @@
     case HIP_MSG_HIT_TO_IP_ON:       return "HIP_MSG_HIT_TO_IP_ON";
     case HIP_MSG_HIT_TO_IP_OFF:      return "HIP_MSG_HIT_TO_IP_OFF";
     case HIP_MSG_HIT_TO_IP_SET:      return "HIP_MSG_HIT_TO_IP_SET";
-    case HIP_MSG_SET_OPPTCP_ON:      return "HIP_MSG_SET_OPPTCP_ON";
-    case HIP_MSG_SET_OPPTCP_OFF:     return "HIP_MSG_SET_OPPTCP_OFF";
-    case HIP_MSG_OPPTCP_SEND_TCP_PACKET: return 
"HIP_MSG_OPPTCP_SEND_TCP_PACKET";
     case HIP_MSG_TRANSFORM_ORDER:    return "HIP_MSG_TRANSFORM_ORDER";
     case HIP_MSG_OFFER_RVS:          return "HIP_MSG_OFFER_RVS";
     case HIP_MSG_CANCEL_RVS:         return "HIP_MSG_CANCEL_RVS";

=== modified file 'lib/core/conf.c'
--- lib/core/conf.c     2011-01-07 16:09:23 +0000
+++ lib/core/conf.c     2011-01-10 13:49:34 +0000
@@ -155,7 +155,7 @@
 /* free slot */
 #define TYPE_PUZZLE        6
 #define TYPE_NAT           7
-#define TYPE_OPP           EXEC_LOADLIB_OPP /* Should be 8 */
+/* unused, was TYPE_OPP 8 */
 /* unused, was TYPE_BLIND 9 */
 #define TYPE_SERVICE       10
 #define TYPE_CONFIG        11
@@ -168,7 +168,7 @@
 #define TYPE_DAEMON        19
 #define TYPE_LOCATOR       20
 /* free slots */
-#define TYPE_OPPTCP        23
+/* unused, was TYPE_OPPTCP 23 */
 #define TYPE_ORDER         24
 /* free slots */
 #define TYPE_HEARTBEAT     27
@@ -219,9 +219,6 @@
     "Client side:\n"
     "\tadd server rvs|relay|full-relay [HIT] <IP|hostname> <lifetime in 
seconds>\n"
     "\tdel server rvs|relay|full-relay [HIT] <IP|hostname>\n"
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    "set opp normal|advanced|none\n"
-#endif
     "heartbeat <seconds> (0 seconds means off)\n"
     "get ha all|HIT\n"
     "locator on|off|get\n"
@@ -700,11 +697,6 @@
     } else if ((!strcmp("mode", text)) && (strcmp("handover", argv[1]) == 0)) {
         ret = TYPE_HANDOVER;
     }
-#ifdef CONFIG_HIP_OPPORTUNISTIC
-    else if (!strcmp("opp", text)) {
-        ret = TYPE_OPP;
-    }
-#endif
     else if (!strcmp("order", text)) {
         ret = TYPE_ORDER;
     } else if (strcmp("heartbeat", argv[1]) == 0) {
@@ -867,7 +859,7 @@
     hip_hit_t hit;
     struct in6_addr ipv6;
     int err = 0, seconds = 0, i = 0, number_of_regtypes = 0, reg_type = 0;
-    int index_of_hit = 0, index_of_ip = 0, opp_mode = 0;;
+    int index_of_hit = 0, index_of_ip = 0, opp_mode = 0;
     uint8_t lifetime             = 0, *reg_types = NULL;
     time_t seconds_from_lifetime = 0;
 
@@ -1747,6 +1739,7 @@
 }
 
 /**
+<<<<<<< TREE
  * Handles the hipconf commands where the type is @c opp.
  *
  * @param msg    a pointer to the buffer where the message for kernel will
@@ -1807,6 +1800,8 @@
 }
 
 /**
+=======
+>>>>>>> MERGE-SOURCE
  * Translate a HIT to an LSI
  *
  * @param msg input/output message for the query/response for hipd
@@ -2166,8 +2161,7 @@
  * @note In order to this function to work properly, "make install"
  *       must be executed to install libraries to right paths. Also library
  *       paths must be set right.
- * @see exec_app_types EXEC_LOADLIB_OPP, EXEC_LOADLIB_HIP and
- *      EXEC_LOADLIB_NONE
+ * @see exec_app_types EXEC_LOADLIB_HIP and EXEC_LOADLIB_NONE
  *
  */
 int hip_handle_exec_app(int do_fork, int type, int argc,
@@ -2204,9 +2198,6 @@
     HIP_DEBUG("Executing %s.\n", argv[0]);
     if (type == EXEC_LOADLIB_HIP) {
         libs[0] = strdup("libhiptool.so");
-    } else if (type == EXEC_LOADLIB_OPP)   {
-        libs[0] = strdup("libopphip.so");
-        libs[1] = strdup("libhiptool.so");
     }
 
     hip_append_pathtolib(libs, lib_all, LIB_LENGTH);
@@ -2588,7 +2579,7 @@
     NULL,                               /* 5: unused, was TYPE_BOS */
     hip_conf_handle_puzzle,             /* 6: TYPE_PUZZLE */
     hip_conf_handle_nat,                /* 7: TYPE_NAT */
-    hip_conf_handle_opp,                /* 8: TYPE_OPP */
+    NULL,                               /* 8: unused, was TYPE_OPP */
     NULL,                               /* 9: unused, was TYPE_BLIND */
     hip_conf_handle_service,            /* 10: TYPE_SERVICE */
     /* Any server side registration action. */

=== modified file 'lib/core/conf.h'
--- lib/core/conf.h     2011-01-03 19:36:44 +0000
+++ lib/core/conf.h     2011-01-10 13:49:34 +0000
@@ -49,13 +49,6 @@
  * These values are used for TYPE_xxx macros.
  */
 
-/** @defgroup exec_app_types Execute application types
- * @{
- * Execute application with opportunistic library preloaded.
- * @see handle_exec_application()
- */
-#define EXEC_LOADLIB_OPP        8
-
 /**
  * Execute application with hip-libraries preloaded.
  * Overides example getaddrinfo().

=== modified file 'lib/core/hashtable.c'
--- lib/core/hashtable.c        2010-10-19 02:38:50 +0000
+++ lib/core/hashtable.c        2011-01-10 13:49:34 +0000
@@ -41,8 +41,6 @@
  * @brief Hashtable wrappers for OpenSSL lhash implementation
  *
  * @author Miika Komu <miika@xxxxxx>
- * @see lib/opphip/wrap_db.c for a minimal hash table implementation
- *      example
  */
 
 #include <limits.h>

=== modified file 'lib/core/icomm.h'
--- lib/core/icomm.h    2010-12-28 18:21:49 +0000
+++ lib/core/icomm.h    2011-01-10 13:49:34 +0000
@@ -93,8 +93,6 @@
 #define HIP_MSG_CONF_PUZZLE_SET                  74
 #define HIP_MSG_CONF_PUZZLE_INC                  75
 #define HIP_MSG_CONF_PUZZLE_DEC                  76
-/* free slot */
-#define HIP_MSG_SET_OPPORTUNISTIC_MODE           78
 /* Free slots here */
 #define HIP_MSG_SET_DEBUG_ALL                    82
 #define HIP_MSG_SET_DEBUG_MEDIUM                 83
@@ -107,13 +105,12 @@
 #define HIP_MSG_SET_LOCATOR_ON                   89
 #define HIP_MSG_SET_LOCATOR_OFF                  90
 /* Free slots here */
-#define HIP_MSG_SET_OPPTCP_ON                    94
-#define HIP_MSG_SET_OPPTCP_OFF                   95
 
 
 #define HIP_MSG_RESET_FIREWALL_DB                98
 
-#define HIP_MSG_OPPTCP_SEND_TCP_PACKET           99
+/* Free slots here */
+
 #define HIP_MSG_TRANSFORM_ORDER                  100
 
 /** Socket option for the server to offer the RVS service. (server side) */

=== modified file 'modules/update/hipd/update.c'
=== modified file 'modules/update/hipd/update_legacy.c'
--- modules/update/hipd/update_legacy.c 2011-01-07 14:46:07 +0000
+++ modules/update/hipd/update_legacy.c 2011-01-10 13:49:34 +0000
@@ -39,7 +39,6 @@
 #include "config.h"
 #include "hipd/hipd.h"
 #include "hipd/maintenance.h"
-#include "hipd/oppipdb.h"
 #include "lib/core/builder.h"
 #include "lib/core/debug.h"
 #include "lib/core/ife.h"

Other related posts: