← Back to team overview

hipl-core team mailing list archive

[Branch ~hipl-core/hipl/trunk] Rev 4909: misc prettyprinting cosmetics

 

------------------------------------------------------------
revno: 4909
committer: Diego Biurrun <diego@xxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-08-20 18:38:55 +0200
message:
  misc prettyprinting cosmetics
modified:
  firewall/conntrack.c
  hipd/registration.c
  modules/update/hipd/update.c


--
lp:hipl
https://code.launchpad.net/~hipl-core/hipl/trunk

Your team HIPL core team is subscribed to branch lp:hipl.
To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'firewall/conntrack.c'
--- firewall/conntrack.c	2010-08-19 09:32:20 +0000
+++ firewall/conntrack.c	2010-08-20 16:38:55 +0000
@@ -925,12 +925,10 @@
     // store the public key separately
     // store function pointer for verification
     if (hip_get_host_id_algo(tuple->hip_tuple->data->src_hi) == HIP_HI_RSA) {
-        tuple->hip_tuple->data->src_pub_key = hip_key_rr_to_rsa(
-                                 (const struct hip_host_id_priv *) host_id, 0);
+        tuple->hip_tuple->data->src_pub_key = hip_key_rr_to_rsa((const struct hip_host_id_priv *) host_id, 0);
         tuple->hip_tuple->data->verify      = hip_rsa_verify;
     } else {
-        tuple->hip_tuple->data->src_pub_key = hip_key_rr_to_dsa(
-                                 (const struct hip_host_id_priv *) host_id, 0);
+        tuple->hip_tuple->data->src_pub_key = hip_key_rr_to_dsa((const struct hip_host_id_priv *) host_id, 0);
         tuple->hip_tuple->data->verify      = hip_dsa_verify;
     }
 
@@ -998,12 +996,10 @@
         // store the public key separately
         // store function pointer for verification
         if (hip_get_host_id_algo(tuple->hip_tuple->data->src_hi) == HIP_HI_RSA) {
-            tuple->hip_tuple->data->src_pub_key = hip_key_rr_to_rsa(
-                                 (const struct hip_host_id_priv *) host_id, 0);
+            tuple->hip_tuple->data->src_pub_key = hip_key_rr_to_rsa((const struct hip_host_id_priv *) host_id, 0);
             tuple->hip_tuple->data->verify      = hip_rsa_verify;
         } else {
-            tuple->hip_tuple->data->src_pub_key = hip_key_rr_to_dsa(
-                                 (const struct hip_host_id_priv *) host_id, 0);
+            tuple->hip_tuple->data->src_pub_key = hip_key_rr_to_dsa((const struct hip_host_id_priv *) host_id, 0);
             tuple->hip_tuple->data->verify      = hip_dsa_verify;
         }
 

=== modified file 'hipd/registration.c'
--- hipd/registration.c	2010-08-19 09:32:20 +0000
+++ hipd/registration.c	2010-08-20 16:38:55 +0000
@@ -577,9 +577,12 @@
  */
 static int hip_del_registration_server(hip_ha_t *entry,
                                        const uint8_t *reg_types,
-                                       int type_count, uint8_t accepted_requests[],
-                                       int *accepted_count, uint8_t refused_requests[],
-                                       uint8_t failure_types[], int *refused_count)
+                                       int type_count,
+                                       uint8_t accepted_requests[],
+                                       int *accepted_count,
+                                       uint8_t refused_requests[],
+                                       uint8_t failure_types[],
+                                       int *refused_count)
 {
     int err = 0, i = 0;
     hip_relrec_t dummy, *fetch_record = NULL;

=== modified file 'modules/update/hipd/update.c'
--- modules/update/hipd/update.c	2010-08-19 09:32:20 +0000
+++ modules/update/hipd/update.c	2010-08-20 16:38:55 +0000
@@ -187,9 +187,9 @@
                           &ha->hit_peer);
 
     // Add ESP_INFO
-    if (type == HIP_UPDATE_LOCATOR
-            || type == HIP_UPDATE_ECHO_REQUEST
-            || type == HIP_UPDATE_ESP_ANCHOR_ACK) {
+    if (type == HIP_UPDATE_LOCATOR      ||
+        type == HIP_UPDATE_ECHO_REQUEST ||
+        type == HIP_UPDATE_ESP_ANCHOR_ACK) {
         // Handle SPI numbers
         esp_info_old_spi = ha->spi_inbound_current;
         esp_info_new_spi = ha->spi_inbound_current;
@@ -197,7 +197,8 @@
         HIP_DEBUG("esp_info_old_spi=0x%x esp_info_new_spi=0x%x\n",
                   esp_info_old_spi, esp_info_new_spi);
 
-        HIP_IFEL(hip_build_param_esp_info(update_packet_to_send, ha->current_keymat_index,
+        HIP_IFEL(hip_build_param_esp_info(update_packet_to_send,
+                                          ha->current_keymat_index,
                                           esp_info_old_spi, esp_info_new_spi),
                  -1, "Building of ESP_INFO param failed\n");
     }
@@ -229,9 +230,9 @@
 #endif
 
     // Add SEQ
-    if (type == HIP_UPDATE_LOCATOR
-            || type == HIP_UPDATE_ECHO_REQUEST
-            || type == HIP_UPDATE_ESP_ANCHOR) {
+    if (type == HIP_UPDATE_LOCATOR      ||
+        type == HIP_UPDATE_ECHO_REQUEST ||
+        type == HIP_UPDATE_ESP_ANCHOR) {
 
         localstate = lmod_get_state_item(ha->hip_modular_state, "update");
         localstate->update_id_out++;
@@ -246,14 +247,16 @@
     }
 
     // Add ACK
-    if (type == HIP_UPDATE_ECHO_REQUEST
-            || type == HIP_UPDATE_ECHO_RESPONSE
-            || type == HIP_UPDATE_ESP_ANCHOR_ACK) {
+    if (type == HIP_UPDATE_ECHO_REQUEST  ||
+        type == HIP_UPDATE_ECHO_RESPONSE ||
+        type == HIP_UPDATE_ESP_ANCHOR_ACK) {
         HIP_IFEL(!(seq = hip_get_param(received_update_packet,
-                                       HIP_PARAM_SEQ)), -1, "SEQ not found\n");
+                                       HIP_PARAM_SEQ)),
+                 -1, "SEQ not found\n");
 
         HIP_IFEL(hip_build_param_ack(update_packet_to_send,
-                                     ntohl(seq->update_id)), -1, "Building of ACK failed\n");
+                                     ntohl(seq->update_id)),
+                 -1, "Building of ACK failed\n");
     }
 
     if (type == HIP_UPDATE_ESP_ANCHOR) {
@@ -493,8 +496,8 @@
 
     HIP_IFEL(!(update_packet_to_send = hip_msg_alloc()), -ENOMEM,
              "Out of memory while allocation memory for the update packet\n");
-    err = hip_create_update_msg(received_update_packet, ha, update_packet_to_send,
-                                locators, type);
+    err = hip_create_update_msg(received_update_packet, ha,
+                                update_packet_to_send, locators, type);
     if (err) {
         goto out_err;
     }