Committer: Diego Biurrun <diego@xxxxxxxxxx> Date: 13/04/2010 at 13:45:06 Revision: 4238 Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: trunk Log: whitespace cosmetics Modified: M firewall/conntrack.c M firewall/firewall.c M firewall/proxyconndb.c M hipd/blind.c M hipd/hiprelay.c M hipd/init.c M hipd/input.c M hipd/maintenance.c M hipd/netdev.c M hipd/nsupdate.c M hipd/oppipdb.c M hipd/output.c M hipd/update.c === modified file 'firewall/conntrack.c' --- firewall/conntrack.c 2010-04-13 09:52:59 +0000 +++ firewall/conntrack.c 2010-04-13 10:36:12 +0000 @@ -1230,7 +1230,7 @@ if (esp_relay && ctx->udp_encap_hdr) { HIP_IFEL(hipfw_handle_relay_to_r2(common, ctx), - -1, "handling of relay_to failed\n"); + -1, "handling of relay_to failed\n"); } out_err: === modified file 'firewall/firewall.c' --- firewall/firewall.c 2010-04-09 18:50:26 +0000 +++ firewall/firewall.c 2010-04-13 10:36:12 +0000 @@ -2012,7 +2012,6 @@ // assume DROP int verdict = 0; - /* waits for queue messages to arrive from ip_queue and * copies them into a supplied buffer */ if (ipq_read(hndl, buf, HIP_MAX_PACKET, 0) < 0) { === modified file 'firewall/proxyconndb.c' --- firewall/proxyconndb.c 2010-04-09 16:24:44 +0000 +++ firewall/proxyconndb.c 2010-04-13 10:36:12 +0000 @@ -139,8 +139,8 @@ new_item->key.protocol = protocol; new_item->key.port_client = port_client; new_item->key.port_peer = port_peer; - //new_item->key.hit_proxy = *hit_proxy; - //new_item->key.hit_peer = *hit_peer; + //new_item->key.hit_proxy = *hit_proxy; + //new_item->key.hit_peer = *hit_peer; new_item->state = state; err = hip_ht_add(hip_proxy_conn_db, new_item); HIP_DEBUG("conn adds connection state successfully!\n"); === modified file 'hipd/blind.c' --- hipd/blind.c 2010-04-09 15:20:38 +0000 +++ hipd/blind.c 2010-04-13 10:36:12 +0000 @@ -211,7 +211,7 @@ set_hit_prefix(blind_hit); HIP_DEBUG_HIT("HIT after prefix: ", blind_hit); - /*memcpy(blind_hit, digest, sizeof(struct in6_addr));*/ + //memcpy(blind_hit, digest, sizeof(struct in6_addr)); out_err: return err; @@ -707,8 +707,8 @@ return msg; out_err: - // if (host_id_pub) - // HIP_FREE(host_id_pub); + //if (host_id_pub) + // HIP_FREE(host_id_pub); if (msg) { HIP_FREE(msg); } === modified file 'hipd/hiprelay.c' --- hipd/hiprelay.c 2010-04-09 15:20:38 +0000 +++ hipd/hiprelay.c 2010-04-13 10:36:12 +0000 @@ -30,10 +30,10 @@ * <pre> * hip_relrec_t rr = hip_relrec_alloc(...); * hip_relht_put(rr); - * if(hip_relht_get(rr) == NULL) // The put was unsuccessful. - * { - * if(rr != NULL) - * free(rr); + * if (hip_relht_get(rr) == NULL) { // The put was unsuccessful. + * if (rr != NULL) { + * free(rr); + * } * } * </pre> * </li> @@ -48,16 +48,15 @@ * hip_relrec_t dummy, *fetch_record = NULL; * memcpy((char *)&(dummy.hit_r), hit, sizeof(hit)); * fetch_record = hip_relht_get(&dummy); - * if(fetch_record != NULL) - * { - * // Do something with the record. + * if (fetch_record != NULL) { + * // Do something with the record. * } * </pre> * </li> * <li>Deleting a relay record. A dummy record can be used: * <pre> * hip_relrec_t dummy; - * memcpy((char *)&(dummy.hit_r), hit, sizeof(hit)); + * memcpy((char *) &(dummy.hit_r), hit, sizeof(hit)); * hip_relht_rec_free(&dummy); * </pre> * </li> === modified file 'hipd/init.c' --- hipd/init.c 2010-04-09 17:56:34 +0000 +++ hipd/init.c 2010-04-13 10:36:12 +0000 @@ -566,7 +566,7 @@ /* Create default keys if necessary. */ if (stat(DEFAULT_CONFIG_DIR "/" DEFAULT_HOST_RSA_KEY_FILE_BASE DEFAULT_PUB_HI_FILE_NAME_SUFFIX, &status) && errno == ENOENT) { - //hip_msg_init(user_msg); already called by hip_msg_alloc() + //hip_msg_init(user_msg); //already called by hip_msg_alloc() HIP_IFEL(hip_serialize_host_id_action(user_msg, ACTION_NEW, 0, 1, NULL, NULL, RSA_KEY_DEFAULT_BITS, DSA_KEY_DEFAULT_BITS), === modified file 'hipd/input.c' --- hipd/input.c 2010-04-09 17:56:34 +0000 +++ hipd/input.c 2010-04-13 10:36:12 +0000 @@ -3208,8 +3208,8 @@ HIP_IFEL(!hip_controls_sane(ntohs(hip_common->control), mask), -1, "Received illegal controls in R2: 0x%x. Dropping\n", ntohs(hip_common->control)); //HIP_IFEL(!(entry = hip_hadb_find_byhits(&hip_common->hits, - // &hip_common->hitr)), -EFAULT, - // "Received R2 by unknown sender\n"); + // &hip_common->hitr)), -EFAULT, + // "Received R2 by unknown sender\n"); HIP_IFEL(!entry, -EFAULT, "Received R2 by unknown sender\n"); === modified file 'hipd/maintenance.c' --- hipd/maintenance.c 2010-04-13 09:52:59 +0000 +++ hipd/maintenance.c 2010-04-13 10:36:12 +0000 @@ -139,7 +139,6 @@ out_err: return err; } - #endif /** @@ -179,7 +178,6 @@ out_err: return err; } - #endif /* CONFIG_HIP_AGENT */ === modified file 'hipd/netdev.c' --- hipd/netdev.c 2010-04-09 16:24:44 +0000 +++ hipd/netdev.c 2010-04-13 10:36:12 +0000 @@ -692,8 +692,8 @@ == HIP_LOCATOR_LOCATOR_TYPE_UDP) { item2 = (struct hip_locator_info_addr_item2 *) address_pointer; - ////hip_build_param_contents(msg, &item2->address, - //// HIP_PARAM_SRC_ADDR, sizeof(struct in6_addr)); + //hip_build_param_contents(in_msg, &item2->address, + // HIP_PARAM_SRC_ADDR, sizeof(struct in6_addr)); HIP_DEBUG_HIT("LOCATOR", (struct in6_addr *) &item2->address); memcpy(addr, (struct in6_addr *) &item2->address, sizeof(struct in6_addr)); address_pointer += sizeof(struct hip_locator_info_addr_item2); @@ -701,8 +701,8 @@ == HIP_LOCATOR_LOCATOR_TYPE_ESP_SPI) { item = (struct hip_locator_info_addr_item *) address_pointer; - ////hip_build_param_contents(msg, &item->address, - //// HIP_PARAM_SRC_ADDR, sizeof(struct in6_addr)); + //hip_build_param_contents(in_msg, &item->address, + // HIP_PARAM_SRC_ADDR, sizeof(struct in6_addr)); HIP_DEBUG_HIT("LOCATOR", (struct in6_addr *) &item->address); memcpy(addr, (struct in6_addr *) &item->address, sizeof(struct in6_addr)); address_pointer += sizeof(struct hip_locator_info_addr_item); @@ -710,8 +710,8 @@ == HIP_LOCATOR_LOCATOR_TYPE_IPV6) { item = (struct hip_locator_info_addr_item *) address_pointer; - ////hip_build_param_contents(msg, &item->address, - //// HIP_PARAM_SRC_ADDR, sizeof(struct in6_addr)); + //hip_build_param_contents(in_msg, &item->address, + // HIP_PARAM_SRC_ADDR, sizeof(struct in6_addr)); HIP_DEBUG_HIT("LOCATOR", (struct in6_addr *) &item->address); memcpy(addr, (struct in6_addr *) &item->address, sizeof(struct in6_addr)); address_pointer += sizeof(struct hip_locator_info_addr_item); @@ -723,13 +723,12 @@ memcpy(&((&reply6)->s6_addr), in_msg, sizeof(reply6.s6_addr)); //HIP_DEBUG_HIT("LOCATOR", &reply6); if (ipv6_addr_cmp(&all_zero_ipv6, &reply6)) { - ////hip_build_param_contents(msg, &reply6, - //// HIP_PARAM_SRC_ADDR, - //// sizeof(struct in6_addr)); + //hip_build_param_contents(in_msg, &reply6, HIP_PARAM_SRC_ADDR, + // sizeof(struct in6_addr)); } else { err_value = 3; //Entry not found at DHT gateway - ////hip_build_param_contents(msg, &err_value, - //// HIP_PARAM_INT, sizeof(int)); + //hip_build_param_contents(in_msg, &err_value, + // HIP_PARAM_INT, sizeof(int)); } } === modified file 'hipd/nsupdate.c' --- hipd/nsupdate.c 2010-04-09 15:20:38 +0000 +++ hipd/nsupdate.c 2010-04-13 10:36:12 +0000 @@ -142,7 +142,6 @@ return OK; } - #endif /** === modified file 'hipd/oppipdb.c' --- hipd/oppipdb.c 2010-04-09 16:24:44 +0000 +++ hipd/oppipdb.c 2010-04-13 10:36:12 +0000 @@ -211,7 +211,6 @@ HIP_UNLOCK_HT(&oppipdb); HIP_DEBUG("end oppipdb dump\n"); } - #endif /** === modified file 'hipd/output.c' --- hipd/output.c 2010-04-09 17:56:34 +0000 +++ hipd/output.c 2010-04-13 10:36:12 +0000 @@ -297,7 +297,7 @@ tcphdr->ack_seq = 0; //is not important in the SYN packet tcphdr->doff = 5; tcphdr->syn = 1; - //tcphdr->rst = 1; + //tcphdr->rst = 1; tcphdr->window = 34; //random tcphdr->check = 0; //will be set right when sent, no need to calculate it here //tcphdr->urg_ptr = ???????? TO BE FIXED === modified file 'hipd/update.c' --- hipd/update.c 2010-04-13 09:52:59 +0000 +++ hipd/update.c 2010-04-13 10:36:12 +0000 @@ -355,11 +355,11 @@ * @todo locators should be sent to the whole verified addresses? */ int hip_send_update_to_one_peer(hip_common_t *received_update_packet, - struct hip_hadb_state *ha, - struct in6_addr *src_addr, - struct in6_addr *dst_addr, - struct hip_locator_info_addr_item *locators, - int type) + struct hip_hadb_state *ha, + struct in6_addr *src_addr, + struct in6_addr *dst_addr, + struct hip_locator_info_addr_item *locators, + int type) { int err = 0, i = 0; hip_list_t *item = NULL, *tmp = NULL;