← Back to team overview

hipl-core team mailing list archive

[Branch ~rene-hummen/hipl/ipsec_esp] Rev 4917: merged trunk revision 4924

 

Merge authors:
  Christof Mroz (christof-mroz)
  Christoph Viethen <viethen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
  Miika Komu (miika-iki)
  Mircea Gherzan (mgherzan)
  René Hummen (rene-hummen)
------------------------------------------------------------
revno: 4917 [merge]
committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
branch nick: ipsec_esp
timestamp: Fri 2010-09-03 13:56:17 +0200
message:
  merged trunk revision 4924
added:
  tools/mailer.sh
modified:
  doc/HACKING
  doc/HOWTO.xml
  firewall/firewall.c
  firewall/rule_management.c
  hipd/cert.c
  hipd/close.c
  hipd/hip_socket.c
  hipd/hiprelay.c
  hipd/hit_to_ip.c
  hipd/input.c
  hipd/keymat.c
  hipd/maintenance.c
  hipd/nsupdate.c
  hipd/oppipdb.c
  hipd/pkt_handling.c
  hipd/user.c
  lib/core/builder.c
  lib/core/certtools.c
  lib/core/debug.c
  lib/core/hit.c
  lib/modularization/lmod.c
  lib/tool/nlink.c
  modules/esp_tokens/hipd/esp_prot_light_update.c
  modules/update/hipd/update.c


--
lp:~rene-hummen/hipl/ipsec_esp
https://code.launchpad.net/~rene-hummen/hipl/ipsec_esp

Your team HIPL core team is subscribed to branch lp:~rene-hummen/hipl/ipsec_esp.
To unsubscribe from this branch go to https://code.launchpad.net/~rene-hummen/hipl/ipsec_esp/+edit-subscription
=== modified file 'doc/HACKING'
--- doc/HACKING	2010-05-26 13:09:00 +0000
+++ doc/HACKING	2010-08-29 11:26:22 +0000
@@ -579,9 +579,6 @@
 - Use global variables only with GOOD reason. Ask your adviser
   before introducing a new global variable.
 
-- Kernel code (if any) MUST follow the kernel guidelines:
-  Documentation/CodingStyle
-
 - USE ASCII encoding, no fancy symbols!
 
 - Do not make unreadable code by nesting code too much:
@@ -613,20 +610,6 @@
       }
   }
 
-- In emacs, you can set the Linux kernel indendation as default by adding
-  the following lines to your ".emacs" file located at your home directory:
-
-    (defun my-c-mode-common-hook ()
-      (c-set-style "PLEASE_ADD_RIGHT_STYLE_HERE"))
-    (add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
-    (global-set-key [f5] 'indent-region)
-
-  Now, whenever you wish to indend a region,
-
-    1. Move the cursor to the beginning of the region to be indended and press
-       CTRL & SPACE (first control, hold it down and press space.)
-    2. Move the cursor to the end of the region to be indended, and press F5.
-
 - All functions should return an error value instead of "ok" value. That, is
   zero for success and non-zero for failure.
 

=== modified file 'doc/HOWTO.xml'
--- doc/HOWTO.xml	2010-08-20 14:34:13 +0000
+++ doc/HOWTO.xml	2010-08-31 09:27:03 +0000
@@ -1931,6 +1931,12 @@
       </para></listitem>
     </itemizedlist>
     <para>
+      You can also trigger the handover message exchange without
+      changing IP addresses by running "hipconf manual-update". Note that this
+      only simulates the message exchange that would normally occur on IP
+      address changes and does not test handover detection.
+    </para>
+    <para>
       Do not use link local addresses for the mobility scenarios for the
       hosts, unless you know what you are doing! For example, you are asking
       for trouble if you establish HIP SA between the mobile and

=== modified file 'firewall/firewall.c'
--- firewall/firewall.c	2010-08-25 09:06:43 +0000
+++ firewall/firewall.c	2010-08-30 08:28:41 +0000
@@ -1189,9 +1189,10 @@
  */
 static int hip_fw_handle_other_output(hip_fw_context_t *ctx)
 {
-    int verdict           = accept_normal_traffic_by_default;
+    int verdict = accept_normal_traffic_by_default;
 
-    HIP_DEBUG("\n");
+    HIP_DEBUG("accept_normal_traffic_by_default = %d\n",
+              accept_normal_traffic_by_default);
 
     if (ctx->ip_version == 6 && hip_userspace_ipsec) {
 
@@ -1566,8 +1567,11 @@
             HIP_DEBUG("plain TCP packet\n");
 
             ctx->packet_type       = TCP_PACKET;
-            ctx->transport_hdr.tcp = (struct tcphdr *)
-                    (((char *) iphdr) + ip_hdr_len);
+            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));
 
             goto end_init;
         } else if (iphdr->ip_p != IPPROTO_UDP) {
@@ -1632,8 +1636,11 @@
             HIP_DEBUG("plain TCP packet\n");
 
             ctx->packet_type       = TCP_PACKET;
-            ctx->transport_hdr.tcp = (struct tcphdr *)
-                    (((char *) ip6_hdr) + sizeof(struct ip6_hdr));
+            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) {
@@ -1657,9 +1664,15 @@
 
         // add udp header to context
         ctx->udp_encap_hdr = udphdr;
+    } else {
+        HIP_DEBUG("neither ipv4 nor ipv6\n");
+        goto end_init;
     }
 
-    HIP_DEBUG("UDP header size  is %d\n", sizeof(struct udphdr));
+    HIP_DEBUG("UDP header size is %d (in header: %u) \n",
+              sizeof(struct udphdr), ntohs(udphdr->len));
+    HIP_DEBUG("UDP src port: %u\n", ntohs(udphdr->source));
+    HIP_DEBUG("UDP dst port: %u\n", ntohs(udphdr->dest));
 
     /* only handle IPv4 right now
      * -> however this is the place to handle UDP encapsulated IPv6 */

=== modified file 'firewall/rule_management.c'
--- firewall/rule_management.c	2010-07-16 18:00:53 +0000
+++ firewall/rule_management.c	2010-09-02 19:33:25 +0000
@@ -860,55 +860,11 @@
  */
 
 /**
- * read a rule line in the firewall configuration file
- *
- * @param buf the buffer where the line is read
- * @param buflen the length of the buffer
- * @param file a handle to the firewall configuration file
- *
- * @return the length of the line (excluding trailing 0)
- * @todo check correctness of this function
- */
-static size_t read_line(char *buf, int buflen, FILE *file)
-{
-    int ch     = 0;
-    size_t len = 0;
-
-    HIP_ASSERT(file != 0);
-    HIP_ASSERT(buf != 0);
-    HIP_ASSERT(buflen > 0);
-
-    if (fgets(buf, buflen, file) == NULL) {
-        if (feof(file)) {               /* EOF */
-            len = 0;
-        } else {                        /* error */
-            len = 0;
-        }
-        clearerr(file);
-        return len;
-    }
-
-    len = strlen(buf);
-    if (buf[len - 1] == '\n') {         /* clear any trailing newline */
-        buf[--len] = '\0';
-    } else if ((int)len == buflen - 1) {     /* line too long */
-        while ((ch = getchar()) != '\n' && ch != EOF) {
-            continue;
-        }
-        clearerr(file);
-        return 0;
-    }
-
-    return len;
-}
-
-/**
  * read all rule sets from the specified file and parse into rule
  * lists
  *
  * @param file_name the name of the configuration file to be read
- *
- * @todo fix reading of empty lines (memory problems)
+ *                  (try default config file if NULL)
  */
 void read_rule_file(const char *file_name)
 {
@@ -916,13 +872,6 @@
     DList *output       = NULL;
     DList *forward      = NULL;
     FILE *file          = NULL;
-    struct rule *rule   = NULL;
-    char line[MAX_LINE_LENGTH];
-    char *original_line = NULL;
-    int s               = MAX_LINE_LENGTH;
-    int state           = 0;
-    size_t line_length  = 0;
-    char *tmp_line      = NULL;
 
     if (!file_name) {
         file_name = HIP_FW_DEFAULT_RULE_FILE;
@@ -934,37 +883,35 @@
     file = fopen(file_name, "r");
 
     if (file != NULL) {
-        while ((line_length = read_line(line, s, file)) > 0) {
-            char *comment;
+        char line[MAX_LINE_LENGTH];
 
-            original_line = malloc(line_length + sizeof(char) + 1);
-            original_line = strcpy(original_line, line);
+        while (fgets(line, sizeof(line), file)) {
+            char *p             = NULL;
+            char *original_line = NULL;
+            struct rule *rule   = NULL;
 
             HIP_DEBUG("line read: %s\n", line);
 
-            /* terminate the line to comment sign */
-            comment = index(line, '#');
-            if (comment) {
-                *comment = 0;
+            original_line = strdup(line);
+            HIP_ASSERT(original_line);
+
+            /* terminate at comment sign or strip newline */
+            for (p = line; *p; ++p) {
+                if (*p == '#' || *p == '\n') {
+                    *p = '\0';
+                    break;
+                }
             }
 
-            if (line_length == 0) {
+            /* skip if empty */
+            if (*line == '\0') {
                 free(original_line);
                 continue;
             }
 
-            /* remove trailing new line */
-            tmp_line = strtok(line, "\n");
-
-            if (tmp_line) {
-                rule = parse_rule(tmp_line);
-            }
+            rule = parse_rule(line);
 
             if (rule) {
-                if (rule->state) {
-                    state = 1;
-                }
-
                 if (rule->hook == NF_IP6_LOCAL_IN) {
                     input = append_to_list(input, rule);
                     print_rule((struct rule *) input->data);
@@ -975,15 +922,18 @@
                     forward = append_to_list(forward, rule);
                     print_rule((struct rule *) forward->data);
                 }
-            } else if (tmp_line)   {
+            } else {
                 HIP_DEBUG("unable to parse rule: %s\n", original_line);
             }
             free(original_line);
-            original_line = NULL;
+        }
+
+        if (!feof(file)) {
+            HIP_ERROR("fgets(): %s\n", strerror(errno));
         }
         fclose(file);
     } else {
-        HIP_DEBUG("Can't open file %s \n", file_name );
+        HIP_DEBUG("Can't open file %s: %s\n", file_name, strerror(errno));
     }
 
     input_rules   = input;

=== modified file 'hipd/cert.c'
--- hipd/cert.c	2010-08-20 14:34:13 +0000
+++ hipd/cert.c	2010-08-29 16:24:14 +0000
@@ -63,8 +63,8 @@
  ***************************************************************************/
 
 /**
- * hip_cert_spki_sign - Function that signs the cert sequence and
- * creates the public key sequence and the signature sequence
+ * Function that signs the cert sequence and creates the public key
+ * sequence and the signature sequence
  *
  * @param msg points to the msg gotten from "client" that should
  *            contain HIP_PARAM_CERT_SPKI_INFO

=== modified file 'hipd/close.c'
--- hipd/close.c	2010-08-19 09:32:20 +0000
+++ hipd/close.c	2010-08-29 16:24:14 +0000
@@ -233,8 +233,6 @@
 }
 
 /**
- * hip_close_check_packet
- *
  * Check whether a received control packet is valid or not.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)
@@ -289,8 +287,6 @@
 }
 
 /**
- * hip_close_create_response
- *
  * Create an response (CLOSE_ACK) for a received CLOSE packet.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)
@@ -347,8 +343,6 @@
 }
 
 /**
- * hip_close_create_response
- *
  * Send a before generated CLOSE_ACK packet.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)
@@ -413,8 +407,6 @@
 }
 
 /**
- * hip_close_ack_check_packet
- *
  * Check whether a received CLOSE_ACK packet is valid or not.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)
@@ -483,8 +475,6 @@
 }
 
 /**
- * hip_close_ack_handle_packet
- *
  * Handle a received and checked CLOSE_ACK packet. If a hadb entry exists, the
  * host association state will be set to HIP_STATE_CLOSED.
  *

=== modified file 'hipd/hip_socket.c'
--- hipd/hip_socket.c	2010-08-25 09:06:43 +0000
+++ hipd/hip_socket.c	2010-08-29 16:24:14 +0000
@@ -190,10 +190,6 @@
     hip_register_socket(hip_nl_route.fd,        &hip_handle_nl_route_sock, 10500);
 }
 
-/**
- * hip_register_socket
- *
- */
 int hip_register_socket(int socketfd,
                         int (*func_ptr)(struct hip_packet_context *ctx),
                         const uint16_t priority)
@@ -221,10 +217,6 @@
     return err;
 }
 
-/**
- * hip_get_highest_descriptor
- *
- */
 int hip_get_highest_descriptor(void)
 {
     int highest_descriptor = 0;
@@ -243,10 +235,6 @@
     return highest_descriptor;
 }
 
-/**
- * hip_prepare_fd_set
- *
- */
 void hip_prepare_fd_set(fd_set *read_fdset)
 {
     hip_ll_node_t *iter = NULL;
@@ -262,10 +250,6 @@
     }
 }
 
-/**
- * hip_run_socket_handles
- *
- */
 void hip_run_socket_handles(fd_set *read_fdset, struct hip_packet_context *ctx)
 {
     hip_ll_node_t *iter = NULL;

=== modified file 'hipd/hiprelay.c'
--- hipd/hiprelay.c	2010-08-20 14:34:13 +0000
+++ hipd/hiprelay.c	2010-08-29 16:24:14 +0000
@@ -468,8 +468,6 @@
 }
 
 /**
- * hip_relht_maintenance
- *
  * @brief Clear the expired records from the relay hashtable.
  *
  * Periodic maintenance function of the hip relay. This function should be

=== modified file 'hipd/hit_to_ip.c'
--- hipd/hit_to_ip.c	2010-08-19 09:32:20 +0000
+++ hipd/hit_to_ip.c	2010-08-29 16:24:14 +0000
@@ -50,8 +50,6 @@
 int hip_hit_to_ip_status = 0;
 
 /**
- * hip_set_hit_to_ip_status
- *
  * This function is an interface to turn on/off locators lookup in hit-to-ip domain
  *
  * @param status 0 unless locator lookups in hit-to-ip domain wanted, 1 otherwise
@@ -62,8 +60,6 @@
 }
 
 /**
- * hip_get_hit_to_ip_status
- *
  * This function is an interface to check if locators lookup in hit-to-ip domain if wanted
  *
  * @return 0 unless locator lookups in hit-to-ip domain wanted, 1 otherwise
@@ -80,8 +76,6 @@
 char *hip_hit_to_ip_zone = NULL;
 
 /**
- * hip_hit_to_ip_set
- *
  * Set the zone for hit-to-ip domain lookups
  *
  * @param zone  domain as a string, e.g. "hit-to-ip.infrahip.net"
@@ -103,8 +97,6 @@
 };
 
 /**
- * hip_get_hit_to_ip_hostname
- *
  * returns "5.7.d.1.c.c.8.d.0.6.3.b.a.4.6.2.5.0.5.2.e.4.7.5.e.1.0.0.1.0.0.2.hit-to-ip.infrahip.net" for 2001:1e:574e:2505:264a:b360:d8cc:1d75
  *
  * @param hit               HIT as a string
@@ -138,8 +130,6 @@
 }
 
 /**
- * hip_hit_to_ip
- *
  * checks for ip address for hit preferring IPv4 one
  *
  * @param hit           HIT to look locators for

=== modified file 'hipd/input.c'
--- hipd/input.c	2010-09-03 11:40:19 +0000
+++ hipd/input.c	2010-09-03 11:56:17 +0000
@@ -678,8 +678,6 @@
 }
 
 /**
- * hip_check_r1
- *
  * Check a received R1 control packet.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)
@@ -968,8 +966,6 @@
     return err;
 }
 /**
- * hip_handle_i2_in_i2_sent
- *
  * Checks wether the received I2 packet in state I2-SENT should be droppped, or
  * not. If the packet should be dropped, the error flag is set to 1.
  *
@@ -998,8 +994,6 @@
 }
 
 /**
- * hip_check_r2
- *
  * Check a received R2 control packet.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)
@@ -1072,8 +1066,6 @@
 }
 
 /**
- * hip_handle_r2
- *
  * Handle an incoming R2 packet.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)
@@ -1218,8 +1210,6 @@
 }
 
 /**
- * hip_check_i1
- *
  * Check a received I1 control packet.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)
@@ -1366,8 +1356,6 @@
 }
 
 /**
- * hip_check_i2
- *
  * Check a received I2 control packet.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)
@@ -1857,8 +1845,6 @@
 }
 
 /**
- * hip_check_notify
- *
  * Check an incoming NOTIFY packet.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)

=== modified file 'hipd/keymat.c'
--- hipd/keymat.c	2010-07-07 16:42:17 +0000
+++ hipd/keymat.c	2010-08-29 16:24:14 +0000
@@ -115,7 +115,7 @@
 }
 
 /**
- * hip_make_keymat - generate HIP keying material
+ * generate HIP keying material
  * @param kij Diffie-Hellman Kij (as in the HIP drafts)
  * @param kij_len the length of the Kij material
  * @param keymat pointer to a keymat structure which will be updated according
@@ -215,7 +215,7 @@
 }
 
 /**
- * hip_keymat_draw - draw keying material
+ * draw keying material
  * @param keymat pointer to the keymat structure which contains information
  *          about the actual
  * @param len size of keymat structure
@@ -241,7 +241,7 @@
 }
 
 /**
- * hip_keymat_draw_and_copy - draw keying material and copy it to the given buffer
+ * draw keying material and copy it to the given buffer
  * @param dst destination buffer
  * @param keymat pointer to the keymat structure which contains information
  *          about the actual

=== modified file 'hipd/maintenance.c'
--- hipd/maintenance.c	2010-09-03 11:40:19 +0000
+++ hipd/maintenance.c	2010-09-03 11:56:17 +0000
@@ -185,8 +185,6 @@
 }
 
 /**
- * hip_register_maint_function
- *
  * Register a maintenance function. All maintenance functions are called during
  * the periodic maintenance cycle.
  *
@@ -223,8 +221,6 @@
 }
 
 /**
- * hip_unregister_maint_function
- *
  * Remove a maintenance function from the list.
  *
  * @param *maint_function Pointer to the function which should be unregistered.
@@ -239,8 +235,6 @@
 }
 
 /**
- * hip_run_maint_functions
- *
  * Run all maintenance functions.
  *
  * @return Success =  0
@@ -263,8 +257,6 @@
 }
 
 /**
- * hip_uninit_maint_functions
- *
  * Free the memory used for storage of maintenance functions.
  *
  */

=== modified file 'hipd/nsupdate.c'
--- hipd/nsupdate.c	2010-08-10 07:26:42 +0000
+++ hipd/nsupdate.c	2010-08-29 16:24:14 +0000
@@ -74,8 +74,6 @@
 int hip_nsupdate_status = 0;
 
 /**
- * hip_set_nsupdate_status
- *
  * This function is an interface to turn on/off DNS updates
  *
  * @param status    0 unless DNS updates wanted, 1 otherwise
@@ -87,8 +85,6 @@
 }
 
 /**
- * hip_get_nsupdate_status
- *
  * This function is an interface to check if DNS updates are wanted
  *
  * @return  0 unless DNS updates wanted, 1 otherwise

=== modified file 'hipd/oppipdb.c'
--- hipd/oppipdb.c	2010-07-29 09:07:47 +0000
+++ hipd/oppipdb.c	2010-08-29 16:24:14 +0000
@@ -67,7 +67,6 @@
 }
 
 /**
- * hip_oppipdb_match_ip:
  * Compares two ip addresses using their hashes
  *
  * @param ptr1: pointer to the first ip address to compare

=== modified file 'hipd/pkt_handling.c'
--- hipd/pkt_handling.c	2010-07-07 16:42:17 +0000
+++ hipd/pkt_handling.c	2010-08-29 16:24:14 +0000
@@ -53,8 +53,6 @@
 static hip_ll_t *hip_handle_functions[HIP_MAX_PACKET_TYPE][HIP_MAX_HA_STATE];
 
 /**
- * hip_register_handle_function
- *
  * Register a function for handling of the specified combination from packet
  * type and host association state.
  *
@@ -105,8 +103,6 @@
 }
 
 /**
- * hip_run_handle_functions
- *
  * Run all handle functions for specified combination from packet type and host
  * association state.
  *
@@ -153,8 +149,6 @@
 }
 
 /**
- * hip_uninit_handle_functions
- *
  * Free the memory used for storage of handle functions.
  *
  */

=== modified file 'hipd/user.c'
--- hipd/user.c	2010-09-03 11:40:19 +0000
+++ hipd/user.c	2010-09-03 11:56:17 +0000
@@ -169,8 +169,6 @@
 }
 
 /**
- * hip_uninit_handle_functions
- *
  * Free the memory used for storage of handle functions.
  *
  */

=== modified file 'lib/core/builder.c'
--- lib/core/builder.c	2010-09-03 11:40:19 +0000
+++ lib/core/builder.c	2010-09-03 11:56:17 +0000
@@ -176,7 +176,7 @@
 }
 
 /**
- * hip_msg_alloc - allocate and initialize a HIP packet
+ * Allocate and initialize a HIP packet
  *
  * Return: initialized HIP packet if successful, NULL on error.
  */
@@ -578,7 +578,7 @@
 }
 
 /**
- * hip_check_network_msg_type - check the type of the network message
+ * Check the type of the network message
  *
  * @param msg pointer to the message
  * @return 1 if the message type is valid, or 0 if the message type is

=== modified file 'lib/core/certtools.c'
--- lib/core/certtools.c	2010-08-19 09:32:20 +0000
+++ lib/core/certtools.c	2010-08-29 16:24:14 +0000
@@ -54,7 +54,7 @@
 *******************************************************************************/
 
 /**
- * hip_cert_spki_lib_verify - Function that verifies the signature in
+ * Function that verifies the signature in
  * the given SPKI cert sent by the "client"
  *
  * @param cert points to hip_cert_spki_info that is going to be verified
@@ -369,9 +369,8 @@
 }
 
 /**
- * hip_cert_spki_build_cert - Function to build the basic cert object
- * of SPKI clears public-key object and signature in
- * hip_cert_spki_header
+ * Function to build the basic cert object of SPKI clears public-key
+ * object and signature in hip_cert_spki_header
  *
  * @param minimal_content holds the struct hip_cert_spki_header
  *                        containing the minimal needed information for
@@ -393,7 +392,7 @@
 }
 
 /**
- * hip_cert_spki_inject - Function for injecting objects to cert object
+ * Function for injecting objects to cert object
  *
  * @param to hip_cert_spki_info containing the char table where to insert
  * @param after is a char pointer for the regcomp after which the inject happens
@@ -438,7 +437,7 @@
 }
 
 /**
- * hip_cert_spki_create_cert - Function to build the create minimal SPKI cert
+ * Function to build the create minimal SPKI cert
  *
  * @param content holds the struct hip_cert_spki_info containing
  *                the minimal needed information for cert object,
@@ -589,8 +588,8 @@
 }
 
 /**
- * hip_cert_spki_char2certinfo - Function that takes the cert in single char table
- * and constructs hip_cert_spki_info from it
+ * Function that takes the cert in single char table and constructs
+ * hip_cert_spki_info from it
  *
  * @param from char pointer to the whole certificate
  * @param to hip_cert_spki_info containing the char table where to insert
@@ -641,8 +640,8 @@
 }
 
 /**
- * hip_cert_spki_send_to_verification - Function that sends the given
- * hip_cert_spki_info to the daemon to verification
+ * Function that sends the given hip_cert_spki_info to the daemon to
+ * verification
  *
  * @param to_verification is the cert to be verified
  *
@@ -687,8 +686,7 @@
  ******************************************************************************/
 
 /**
- * hip_cert_x509v3_request_certificate - Function that requests for a
- * certificate from daemon and gives it back
+ * Function that requests for a certificate from daemon and gives it back.
  *
  * @param subject is the subjects HIT
  *
@@ -732,8 +730,8 @@
 }
 
 /**
- * hip_cert_x509v3_request_verification - Function that requests for a
- * verification of a certificate from daemon and tells the result
+ * Function that requests for a verification of a certificate from
+ * daemon and tells the result.
  *
  * @param certificate is pointer to a certificate to be verified
  * @param len is the length of the cert in certificate parameter in bytes
@@ -784,8 +782,7 @@
 *******************************************************************************/
 
 /**
- * hip_cert_read_conf_section - Function that reads configuration
- * section from HIP_CERT_CONF_PATH,
+ * Function that reads configuration section from HIP_CERT_CONF_PATH.
  *
  * @param section_name a char pointer pointing to the name of the section to be retrieved
  * @param conf pointer to CONF struct that will point to the default configuration
@@ -824,7 +821,7 @@
 }
 
 /**
- * hip_cert_open_conf - Function that opens an configuration file from HIP_CERT_CONF_PATH,
+ * Function that opens an configuration file from HIP_CERT_CONF_PATH.
  *
  * @return CONF pointer if ok and NULL if error or unsuccesfull.
  */
@@ -844,7 +841,7 @@
 }
 
 /**
- * hip_cert_free_conf - Function that frees the memory of a allocated configuration
+ * Function that frees the memory of a allocated configuration.
  *
  * @param conf pointer to the to be freed configuration
  *
@@ -858,7 +855,7 @@
 }
 
 /**
- * hip_cert_regex - Function that wraps regular expression stuff and gives the answer :)
+ * Function that wraps regular expression stuff and gives the answer :)
  *
  * @param what is a char pointer to the rule used in the search (POSIX)
  * @param from where are we looking for it char pointer

=== modified file 'lib/core/debug.c'
--- lib/core/debug.c	2010-08-19 09:32:20 +0000
+++ lib/core/debug.c	2010-08-29 16:24:14 +0000
@@ -743,7 +743,7 @@
 }
 
 /**
- * hip_print_locator - print a locator
+ * Print a locator.
  * @param file
  * @param debug_level
  * @param line

=== modified file 'lib/core/hit.c'
--- lib/core/hit.c	2010-07-16 15:26:02 +0000
+++ lib/core/hit.c	2010-08-29 16:24:14 +0000
@@ -94,7 +94,7 @@
 }
 
 /**
- * hip_hash_hit - calculate a hash from a HIT
+ * calculate a hash from a HIT
  *
  * @param ptr pointer to a HIT
  *

=== modified file 'lib/modularization/lmod.c'
--- lib/modularization/lmod.c	2010-07-04 17:54:18 +0000
+++ lib/modularization/lmod.c	2010-08-29 16:24:14 +0000
@@ -83,8 +83,6 @@
 static uint16_t num_disabled_modules = 0;
 
 /**
- * lmod_init_state
- *
  * Initializes a new data structure for storage of references to state items.
  * This data structure consists of a pointer set and can be mentioned as global
  * state.
@@ -112,8 +110,6 @@
 }
 
 /**
- * lmod_register_state_init_function
- *
  * Registers a new state initialization function. These functions are called,
  * when a new host association database entry is created.
  *
@@ -132,8 +128,6 @@
 }
 
 /**
- * lmod_init_state_items
- *
  * Initialize all registered state items. This function is called, when a new
  * host association database entry is created.
  *
@@ -154,8 +148,6 @@
 }
 
 /**
- * lmod_get_state_item_id
- *
  * Retrieve a void pointer to a state variable from the global state set using
  * the state item name.
  *
@@ -179,8 +171,6 @@
 }
 
 /**
- * lmod_get_state_item_by_id
- *
  * Returns a void pointer to a state item from the global state set using
  * the id (index number).
  *
@@ -196,8 +186,6 @@
 }
 
 /**
- * lmod_get_state_item
- *
  * Returns a void pointer to a state item from the global state set using
  * the string identifier.
  *
@@ -217,8 +205,6 @@
 
 
 /**
- * lmod_add_state_item
- *
  * Registers a new state item to the global state. The state item can be of any
  * type. This function stores a reference to the new state item.
  *
@@ -252,8 +238,6 @@
 }
 
 /**
- * lmod_uninit_state
- *
  * Free all allocated memory for storage of the global state set.
  *
  *  @param      state       Pointer to the global state.
@@ -274,8 +258,6 @@
 }
 
 /**
- * lmod_register_function
- *
  * Register a function to the specified list according their priority.
  *
  * @param *list Pointer to the list if already exist, NULL otherwise.
@@ -325,8 +307,6 @@
 }
 
 /**
- * lmod_unregister_function
- *
  * Unregister a function from the specified list.
  *
  * @param *list Pointer to the list from which the function should be removed.
@@ -356,8 +336,6 @@
 }
 
 /**
- * lmod_disable_module
- *
  * Disable the module with the provide name. The initialization functions of
  * disabled modules will not be executed. Therefore the functionality of these
  * modules should be completely disabled.
@@ -384,8 +362,6 @@
 }
 
 /**
- * lmod_module_disabled
- *
  * Check whether a certain module is disabled.
  *
  * @note This function uses string compares. Therefore you should call this
@@ -410,8 +386,6 @@
 }
 
 /**
- * lmod_uninit_disabled_modules
- *
  * Free all allocated memory for storage of disabled modules.
  *
  */
@@ -430,8 +404,6 @@
 }
 
 /**
- * lmod_packet_type_exists
- *
  * Check whether a certain packet type was already registered.
  *
  * @note The return value is not 0 (FALSE), if the packet type not exists.
@@ -460,8 +432,6 @@
 }
 
 /**
- * lmod_register_packet_type
- *
  * Register a new packet type and the corresponding identifier. Each module
  * introducing a new packet type should register it using this function.
  *
@@ -513,8 +483,6 @@
 }
 
 /**
- * lmod_free_packet_entry
- *
  * Free allocated memory for one entry of the packet type list.
  *
  */
@@ -526,8 +494,6 @@
 }
 
 /**
- * lmod_uninit_packet_types
- *
  * Free all allocated memory for storage of the packet type list.
  *
  * @note Call this function, if you have added packet types.

=== modified file 'lib/tool/nlink.c'
--- lib/tool/nlink.c	2010-07-16 18:56:20 +0000
+++ lib/tool/nlink.c	2010-08-29 16:24:14 +0000
@@ -1439,8 +1439,7 @@
 }
 
 /**
- * xfrm_fill_selector - fill in the selector.
- * Selector is bound to HITs
+ * Fill in the selector. Selector is bound to HITs.
  *
  * @param sel pointer to xfrm_selector to be filled in
  * @param id_our Source HIT or LSI, if the last is defined

=== modified file 'modules/esp_tokens/hipd/esp_prot_light_update.c'
--- modules/esp_tokens/hipd/esp_prot_light_update.c	2010-09-03 11:40:19 +0000
+++ modules/esp_tokens/hipd/esp_prot_light_update.c	2010-09-03 11:56:17 +0000
@@ -222,8 +222,6 @@
 }
 
 /**
- * esp_prot_handle_light_update
- *
  * Handles an HHL-based update message
  *
  * @param packet_type the packet type

=== modified file 'modules/update/hipd/update.c'
--- modules/update/hipd/update.c	2010-09-03 11:40:19 +0000
+++ modules/update/hipd/update.c	2010-09-03 11:56:17 +0000
@@ -790,8 +790,6 @@
 }
 
 /**
- * hip_update_manual_update
- *
  * Thin wrapper function around hip_send_locators_to_all_peers. Needed for
  * registration as user message handle function.
  *
@@ -859,8 +857,6 @@
 }
 
 /**
- * hip_update_check_packet
- *
  * Check a received UPDATE packet.
  *
  * @param packet_type The packet type of the control message (RFC 5201, 5.3.)
@@ -933,8 +929,6 @@
 }
 
 /**
- * hip_update_handle_packet
- *
  * Process an received and checked UPDATE packet.
  *
  * @param packet_type the packet type

=== added file 'tools/mailer.sh'
--- tools/mailer.sh	1970-01-01 00:00:00 +0000
+++ tools/mailer.sh	2010-08-26 14:12:39 +0000
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# Mailer script that notifies about commits to a BZR repo
+#
+# Copyright (c) 2010 Mircea Gherzan <mgherzan@xxxxxxxxx>
+
+# path to the BZR repository
+REPO=/home/$USER/src/hipl
+# path to the file containing the last processed revision
+LASTREV=/tmp/mailer_lastrev.txt
+# buffer used to build the body of the e-mail
+MAILBUF=/tmp/mailer_buffer.txt 
+
+# mailing coordinates
+SENDTO=hipl-core@xxxxxxxxxxxxxxxxxxx
+REPLYTO=hipl-core@xxxxxxxxxxxxxxxxxxx
+
+#####################################################################
+
+if [ ! -e $LASTREV ] ; then
+	echo File with the last revno does not exist!
+	echo Please create $LASTREV
+	exit 1
+fi
+
+read lastrev < $LASTREV
+
+# from now on, working in the BZR repo 
+cd $REPO
+
+# update the repo to get the last revision
+bzr up
+
+# get the HEAD revision (the last one)
+head=$(bzr revno)
+
+# lastrev was already processed, so incrementing it
+lastrev=$(($lastrev + 1))
+
+for rev in $(seq $lastrev $head) ; do 
+
+	committer=$(bzr log -r $rev | head -3 | tail -1 | sed -e "s/committer: //g")
+
+	branch=$(bzr log -r $rev | head -4 | tail -1 | sed -e "s/branch nick: //g")
+
+	firstline=$(bzr log -r $rev | head -7 | tail -1 | sed -e "s/^ *//")
+
+	subject="[$branch] $rev: $firstline"
+
+	# create the body of the e-mail
+	> $MAILBUF
+	bzr log -r $rev | tail -n +7 >> $MAILBUF
+	echo "" >> $MAILBUF
+	bzr diff -c $rev >> $MAILBUF
+
+	# send the e-mail
+	mailx -s "$subject" -Sfrom="$committer" -Sreplyto=$REPLYTO $SENDTO < $MAILBUF
+done
+
+echo $head > $LASTREV 
+
+exit 0