[hipl-commit] [trunk] Rev 4321: Remove disabled code from lib/core/ directory.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 16 Apr 2010 04:36:39 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 16/04/2010 at 04:36:39
Revision: 4321
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Remove disabled code from lib/core/ directory.

Modified:
  M  lib/core/certtools.c
  M  lib/core/hashchain_store.c
  M  lib/core/message.c
  M  lib/core/performance.c
  M  lib/core/protodefs.h
  M  lib/core/solve.c
  M  lib/core/state.h

=== modified file 'lib/core/certtools.c'
--- lib/core/certtools.c        2010-04-15 15:45:33 +0000
+++ lib/core/certtools.c        2010-04-16 01:36:19 +0000
@@ -983,12 +983,6 @@
     *start = answer[0].rm_so;
     *stop  = answer[0].rm_eo;
 
-    /* Just for debugging do NOT leave these 2 lines uncommented */
-    /*
-     * int i = 0;
-     * for (i = answer[0].rm_so; i < answer[0].rm_eo; i++) HIP_DEBUG("%c", 
from[i]);
-     * HIP_DEBUG("\n");
-     */
 out_err:
     regfree(&re);
     return err;

=== modified file 'lib/core/hashchain_store.c'
--- lib/core/hashchain_store.c  2010-03-18 21:15:21 +0000
+++ lib/core/hashchain_store.c  2010-04-16 01:36:19 +0000
@@ -458,22 +458,6 @@
                                 hchains[hchain_length_id][hierarchy_level], 
hchain), -1,
                         "failed to store new hchain\n");
             }
-
-// useful for testing
-#if 0
-            if (hchain->link_tree) {
-                /* if the next_hchain has got a link_tree, we need its root for
-                 * the verification of the next_hchain's elements */
-                root = htree_get_root(hchain->link_tree, &root_length);
-            }
-
-            if (!hchain_verify(hchain->source_element->hash,
-                               hchain->anchor_element->hash, hash_function,
-                               hash_length, hchain->hchain_length,
-                               root, root_length)) {
-                HIP_DEBUG("failed to verify next_hchain\n");
-            }
-#endif
         }
 
         err += create_hchains;
@@ -570,10 +554,6 @@
 
 out_err:
     if (err) {
-        // TODO modify this to support htrees
-        //if (stored_hchain)
-        //  hchain_free(stored_hchain);
-
         stored_item = NULL;
     }
 
@@ -640,7 +620,6 @@
                                    NULL);
 
                     HIP_DEBUG("hash-tree matching the anchor found\n");
-                    //hchain_print(stored_hchain);
 
                     goto out_err;
                 }
@@ -653,7 +632,6 @@
                                              hchains[i][hierarchy_level], j, 
NULL);
 
                     HIP_DEBUG("hash-chain matching the anchor found\n");
-                    //hchain_print(stored_hchain);
 
                     goto out_err;
                 }
@@ -667,10 +645,6 @@
 
 out_err:
     if (err) {
-        // TODO modify this to support htrees
-        //if (stored_item)
-        //  hchain_free(stored_hchain);
-
         stored_item = NULL;
     }
 

=== modified file 'lib/core/message.c'
--- lib/core/message.c  2010-04-15 16:57:50 +0000
+++ lib/core/message.c  2010-04-16 01:36:19 +0000
@@ -291,7 +291,7 @@
     HIP_DEBUG("Sending user message %d to HIPD on socket %d\n",
               hip_get_msg_type(msg), socket);
 
-    n = sendto(socket, msg, /*hip_get_msg_total_len(msg)*/ len, MSG_NOSIGNAL,
+    n = sendto(socket, msg, len, MSG_NOSIGNAL,
                (struct sockaddr *) &sock_addr, alen);
     HIP_DEBUG("Sent %d bytes\n", n);
 

=== modified file 'lib/core/performance.c'
--- lib/core/performance.c      2010-04-09 17:56:34 +0000
+++ lib/core/performance.c      2010-04-16 01:36:19 +0000
@@ -207,7 +207,6 @@
             err = 1;
         }
     }
-    //HIP_DEBUG("Performance written: %4d\t%8.8lf\n", 
perf_set->linecount[slot], perf_set->result[slot]);
 out_err:
     return err;
 }

=== modified file 'lib/core/protodefs.h'
--- lib/core/protodefs.h        2010-04-14 18:51:38 +0000
+++ lib/core/protodefs.h        2010-04-16 01:36:19 +0000
@@ -689,13 +689,6 @@
     uint8_t         reserved; /**< last bit is P (prefered) */
     uint32_t        lifetime;
     struct in6_addr address;
-
-    /** Removed the state because it is against the nat-draft and mobility rfc
-     * Same in the type 2 locator below --SAMU**/
-    /* end of fixed part - locator of arbitrary length follows but
-     * currently support only IPv6 */
-    //int state; /**<State of our addresses, possible states are:
-    //        WAITING_ECHO_REQUEST, ACTIVE */
 }  __attribute__ ((packed));
 //add by santtu
 /**
@@ -713,9 +706,6 @@
     uint32_t        priority;
     uint32_t        spi;
     struct in6_addr address;
-
-    // int state; /**<State of our addresses, possible states are:
-    //      WAITING_ECHO_REQUEST, ACTIVE */
 }  __attribute__ ((packed));
 
 

=== modified file 'lib/core/solve.c'
--- lib/core/solve.c    2010-03-09 08:57:46 +0000
+++ lib/core/solve.c    2010-04-16 01:36:19 +0000
@@ -59,7 +59,6 @@
     if (mode == HIP_VERIFY_PUZZLE) {
         ipv6_addr_copy((hip_hit_t *) (cookie + 8), &hdr->hits);
         ipv6_addr_copy((hip_hit_t *) (cookie + 24), &hdr->hitr);
-        //randval = ntoh64(u->sl.J);
         randval  = u->sl.J;
         _HIP_DEBUG("u->sl.J: 0x%llx\n", randval);
         maxtries = 1;

=== modified file 'lib/core/state.h'
--- lib/core/state.h    2010-04-14 18:51:38 +0000
+++ lib/core/state.h    2010-04-16 01:36:19 +0000
@@ -249,7 +249,6 @@
 struct hip_host_id_entry {
     struct hip_lhi      lhi;
     hip_lsi_t           lsi;
-    /* struct in6_addr ipv6_addr[MAXIP]; */
     struct hip_host_id *host_id;     /* allocated dynamically */
     void *              private_key; /* RSA or DSA */
     struct hip_r1entry *r1;     /* precreated R1s */
@@ -658,44 +657,6 @@
                                 hip_ha_t *entry);
 };
 
-#if 0
-struct hip_hadb_update_func_set {
-    int (*hip_handle_update_plain_locator)(hip_ha_t *entry,
-                                           struct hip_common *msg,
-                                           struct in6_addr *src_ip,
-                                           struct in6_addr *dst_ip,
-                                           struct hip_esp_info *esp_info,
-                                           struct hip_seq *seq);
-
-    int (*hip_handle_update_addr_verify)(hip_ha_t *entry,
-                                         struct hip_common *msg,
-                                         struct in6_addr *src_ip,
-                                         struct in6_addr *dst_ip);
-
-    void (*hip_update_handle_ack)(hip_ha_t *entry,
-                                  struct hip_ack *ack,
-                                  int have_nes);
-
-    int (*hip_handle_update_established)(hip_ha_t *entry,
-                                         struct hip_common *msg,
-                                         struct in6_addr *src_ip,
-                                         struct in6_addr *dst_ip,
-                                         hip_portpair_t *);
-    int (*hip_handle_update_rekeying)(hip_ha_t *entry,
-                                      struct hip_common *msg,
-                                      struct in6_addr *src_ip);
-
-    int (*hip_update_send_addr_verify)(hip_ha_t *entry,
-                                       struct hip_common *msg,
-                                       struct in6_addr *src_ip,
-                                       uint32_t spi);
-
-    int (*hip_update_send_echo)(hip_ha_t *entry,
-                                uint32_t spi_out,
-                                struct hip_peer_addr_list_item *addr);
-};
-#endif
-
 struct hip_hadb_misc_func_set {
     uint64_t (*hip_solve_puzzle)(void *puzzle,
                                  struct hip_common *hdr,

Other related posts:

  • » [hipl-commit] [trunk] Rev 4321: Remove disabled code from lib/core/ directory. - Diego Biurrun