Committer: Diego Biurrun <diego@xxxxxxxxxx> Date: 13/04/2010 at 21:09:11 Revision: 4277 Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: trunk Log: Disable all unused functions via the preprocessor. Modified: M firewall/opptcp.c M firewall/rule_management.c M firewall/user_ipsec_sadb.c M hipd/hadb.c M hipd/netdev.c M i3/i3/i3_config.c M i3/i3/i3_trigger.c M i3/i3_client/i3_client_api.c M i3/i3_client/ping_thread.c M lib/core/builder.c M lib/tool/lutil.c M lib/tool/nlink.c === modified file 'firewall/opptcp.c' --- firewall/opptcp.c 2010-04-09 15:20:38 +0000 +++ firewall/opptcp.c 2010-04-13 18:08:56 +0000 @@ -305,6 +305,7 @@ return foundHipOpp; } +#if 0 /** * Send the necessary data to hipd, so that a tcp packet is sent from there. This was done because it was not possible to send a packet directly from here. * @@ -370,3 +371,4 @@ out_err: return err; } +#endif /* 0 */ === modified file 'firewall/rule_management.c' --- firewall/rule_management.c 2010-04-10 09:12:33 +0000 +++ firewall/rule_management.c 2010-04-13 18:08:56 +0000 @@ -155,6 +155,7 @@ } } +#if 0 /** * accessor function to set the rule list of the given iptables hook * @@ -171,6 +172,7 @@ forward_rules = list; } } +#endif /* 0 */ /*------------- PRINTING -----------------*/ @@ -358,6 +360,7 @@ /*------------- COPYING -----------------*/ +#if 0 /** * Replicate a hit_option structure * @@ -629,6 +632,7 @@ } return 1; } +#endif /* 0 */ /*---------------PARSING---------------*/ @@ -1327,6 +1331,7 @@ forward_rules = (DList *) forward; } +#if 0 /** * Append a rule to an chain's ruleset by copying * @@ -1505,3 +1510,4 @@ free_rule(rule); free_rule(copy); } +#endif /* 0 */ === modified file 'firewall/user_ipsec_sadb.c' --- firewall/user_ipsec_sadb.c 2010-04-13 17:56:34 +0000 +++ firewall/user_ipsec_sadb.c 2010-04-13 18:08:56 +0000 @@ -318,6 +318,7 @@ return err; } +#if 0 /** * prints a single link entry in the linkdb * @@ -361,6 +362,7 @@ HIP_DEBUG("linkdb contains no items\n"); } } +#endif /* 0 */ /** * sets the values of a SA entry === modified file 'hipd/hadb.c' --- hipd/hadb.c 2010-04-13 15:52:03 +0000 +++ hipd/hadb.c 2010-04-13 18:08:56 +0000 @@ -845,6 +845,7 @@ /* END OF PRIMITIVE FUNCTIONS */ +#if 0 /** * Select the preferred address within the addresses of the given SPI. * The selected address is copied to @c addr, if it is non-NULL. @@ -895,6 +896,7 @@ return err; } +#endif /* 0 */ /** * Gets some of the peer's usable IPv6 address. @@ -1338,6 +1340,7 @@ } } +#if 0 /** * receive a pointer to the default network delivery function pointer * set of a host association @@ -1381,6 +1384,7 @@ { return &default_output_filter_func_set; } +#endif /* 0 */ /** * receive a pointer to the default preprocessing function pointer @@ -1445,6 +1449,7 @@ return -1; } +#if 0 /** * Sets function pointer set for an hadb record. Pointer values will not be * copied! @@ -1464,6 +1469,7 @@ //HIP_ERROR("Func pointer set malformed. Func pointer set NOT appied."); return -1; } +#endif /* 0 */ /** * Switches on a local control bit for a host assosiation entry. === modified file 'hipd/netdev.c' --- hipd/netdev.c 2010-04-13 15:52:03 +0000 +++ hipd/netdev.c 2010-04-13 18:08:56 +0000 @@ -1598,6 +1598,7 @@ return err; } +#if 0 /** * Attach the reply to the HIT query from DHT gateway into a HIP user * message (for hipconf). @@ -1763,6 +1764,7 @@ return err; } +#endif /* 0 */ /** * Copy the addresses stored in entry->peer_addr_list_to_be_added === modified file 'i3/i3/i3_config.c' --- i3/i3/i3_config.c 2010-04-13 16:29:54 +0000 +++ i3/i3/i3_config.c 2010-04-13 18:08:56 +0000 @@ -270,6 +270,7 @@ return toret; } +#if 0 int test_main(void) { char fake[200]; @@ -289,3 +290,4 @@ return 0; } +#endif /* 0 */ === modified file 'i3/i3/i3_trigger.c' --- i3/i3/i3_trigger.c 2010-04-13 16:29:54 +0000 +++ i3/i3/i3_trigger.c 2010-04-13 18:08:56 +0000 @@ -455,10 +455,12 @@ aeshash_l(rkey->x, lkey->x); } +#if 0 void generate_r_constraint_addr(Key *lkey, Key *rkey) { aeshash_r(lkey->x, rkey->x); } +#endif /* 0 */ static void generate_l_constraint(i3_trigger *t, Key *key) { === modified file 'i3/i3_client/i3_client_api.c' --- i3/i3_client/i3_client_api.c 2010-03-29 17:50:59 +0000 +++ i3/i3_client/i3_client_api.c 2010-04-13 18:08:56 +0000 @@ -270,6 +270,7 @@ return cl_ctx_remove_trigger(g_ctx, ctr); } +#if 0 /** * This function limits the traffic forwarded by a trigger using * token-bucket constraints. @@ -312,6 +313,7 @@ { return cl_ctx_trigger_ratelimit(g_ctx, ctr, type, depth, r, R); } +#endif /* 0 */ /** * This function is used to register a callback associated with the current context. This === modified file 'i3/i3_client/ping_thread.c' --- i3/i3_client/ping_thread.c 2010-04-13 16:29:54 +0000 +++ i3/i3_client/ping_thread.c 2010-04-13 18:08:56 +0000 @@ -72,6 +72,7 @@ return 0; } +#if 0 char is_valid(char type) { if (PING_STATUS_STEADY == type || PING_STATUS_START == type) { @@ -80,6 +81,7 @@ return 0; } } +#endif /* 0 */ void set_status(uint64_t *ping_start_time, uint64_t curr_time) { @@ -229,6 +231,7 @@ compute_coordinates(num_landmarks, coord_rtt); } +#if 0 /* Update the coordinates of a node using ping information */ void update_coordinate(I3ServerList *list, I3ServerListNode *next_to_ping) { @@ -282,6 +285,7 @@ // repopulate ping list afresh change_ping_list(list, &next_to_ping, 1); } +#endif /* 0 */ /** This function is called to close the ping socket */ === modified file 'lib/core/builder.c' --- lib/core/builder.c 2010-04-13 15:59:48 +0000 +++ lib/core/builder.c 2010-04-13 18:08:56 +0000 @@ -488,6 +488,7 @@ return err; } +#if 0 /** * get suite id from unit test parameter (interprocess only) * @@ -511,6 +512,7 @@ { return ntohs(test->caseid); } +#endif /* 0 */ /** * retrive host id public key algorithm @@ -937,6 +939,7 @@ return ((void *) tlv_common) + sizeof(struct hip_tlv_common); } +#if 0 /** * get nth parameter of given type from the message * @@ -968,6 +971,7 @@ } return NULL; } +#endif /* 0 */ /** * @brief Find the first free parameter position in a message @@ -2224,6 +2228,7 @@ return err; } +#if 0 /** * build a HIP ECHO_M parameter * @@ -2252,8 +2257,8 @@ opaque); return err; } - #endif /* CONFIG_HIP_MIDAUTH */ +#endif /* 0 */ /** * build a HIP R1_COUNTER parameter @@ -3578,6 +3583,7 @@ hip_get_param_total_len(host_id_hdr)); } +#if 0 /** * build and append host id parameter into a message * \addtogroup params @@ -3598,6 +3604,7 @@ err = hip_build_param(msg, host_id_hdr); return err; } +#endif /* 0 */ /** * encapsulate a host name into a parameter (interprocess communications only) @@ -3815,6 +3822,7 @@ return err; } +#if 0 /** * Build a NOTIFICATION parameter. * @@ -3845,6 +3853,7 @@ data); return err; } +#endif /* 0 */ /** * append a blind "nonce" parameter to a message @@ -4278,6 +4287,7 @@ return err; } +#if 0 /** * allocate memory and write the header for host id parameter * @@ -4346,6 +4356,7 @@ return err; } +#endif /* 0 */ /** * Translate a host id into a HIT @@ -4588,6 +4599,7 @@ return (union hip_locator_info_addr *) result; } +#if 0 /** * retrieve a @c LOCATOR ADDRESS ITEM@c from a list. * @@ -4647,6 +4659,7 @@ } return address_pointer; } +#endif /* 0 */ /** * retrieve a IP address from a locator item structure @@ -4669,6 +4682,7 @@ } } +#if 0 /** * retreive a port number from a type 2 locator item structure * @@ -4707,6 +4721,7 @@ return ntohl(((struct hip_locator_info_addr_item2 *) temp)->priority); } } +#endif /* 0 */ /** * Build a @c RELAY_TO parameter to the HIP packet @c msg. === modified file 'lib/tool/lutil.c' --- lib/tool/lutil.c 2010-04-09 16:24:44 +0000 +++ lib/tool/lutil.c 2010-04-13 18:08:56 +0000 @@ -192,6 +192,7 @@ return NULL; } +#if 0 /** * copy the given contents to the Nth element in the linked list * @@ -222,6 +223,7 @@ } return NULL; } +#endif /* 0 */ /** * calculate difference between two timevalues === modified file 'lib/tool/nlink.c' --- lib/tool/nlink.c 2010-04-13 10:59:42 +0000 +++ lib/tool/nlink.c 2010-04-13 18:08:56 +0000 @@ -1426,6 +1426,7 @@ return err; } +#if 0 /** * xfrm_selector_upspec - fill port info in the selector. * Selector is bound to HITs. @@ -1452,6 +1453,7 @@ return 0; } +#endif /* 0 */ /** * fill the port numbers for the UDP tunnel for IPsec