------------------------------------------------------------ revno: 5172 committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx> branch nick: mobility-fixes timestamp: Fri 2010-11-19 18:08:06 +0100 message: removed unused locator printing function modified: lib/core/debug.c lib/core/debug.h -- lp:~hipl-core/hipl/mobility-fixes https://code.launchpad.net/~hipl-core/hipl/mobility-fixes Your team HIPL core team is subscribed to branch lp:~hipl-core/hipl/mobility-fixes. To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/mobility-fixes/+edit-subscription
=== modified file 'lib/core/debug.c' --- lib/core/debug.c 2010-10-18 17:44:31 +0000 +++ lib/core/debug.c 2010-11-19 17:08:06 +0000 @@ -813,54 +813,3 @@ HIP_DEBUG_HIT("Peer address", &addr->address); } } - -/** - * Print a locator. - * @param file - * @param debug_level - * @param line - * @param function - * @param str string to be printed before the HIT - * @param locator the locator to be printed - */ -void hip_print_locator(UNUSED int debug_level, UNUSED const char *file, - UNUSED int line, UNUSED const char *function, - DBG const char *str, struct hip_locator *locator) -{ -/* XXTRASHXX Totally useless does anything but what it is supposed to do -SAMU */ - - int n_addrs = 0, i = 0; - struct hip_locator_info_addr_item *first_address_item = NULL, - *locator_address_item = NULL; - struct hip_locator_info_addr_item2 *locator_address_item2 = NULL; - /* locator = hip_get_param((struct hip_common *)in_msg, - * HIP_PARAM_LOCATOR);*/ - if (locator) { - HIP_DEBUG("%s: \n", str); - - n_addrs = hip_get_locator_addr_item_count(locator); - HIP_DEBUG("there are %d locator items \n", n_addrs); - first_address_item = hip_get_locator_first_addr_item(locator); - - for (i = 0; i < n_addrs; i++) { - locator_address_item = (struct hip_locator_info_addr_item *) - hip_get_locator_item(first_address_item, i); - HIP_DEBUG("locator items index %d, type is %d \n", i, - locator_address_item->locator_type ); - if (locator_address_item->locator_type == HIP_LOCATOR_LOCATOR_TYPE_IPV6) { - HIP_INFO_HIT("locator", - (struct in6_addr *) &locator_address_item->address); - } - if (locator_address_item->locator_type == HIP_LOCATOR_LOCATOR_TYPE_ESP_SPI) { - HIP_INFO_HIT("LOCATOR from ESP SPI(type 1)", - (struct in6_addr *) &locator_address_item->address); - } - if (locator_address_item->locator_type == HIP_LOCATOR_LOCATOR_TYPE_UDP) { - locator_address_item2 = (struct hip_locator_info_addr_item2 *) locator_address_item; - HIP_INFO_HIT("LOCATOR from UDP", - (struct in6_addr *) &locator_address_item2->address); - HIP_DEBUG("LOCATOR port for UDP: %d\n", ntohs(locator_address_item2->port)); - } - } - } -} === modified file 'lib/core/debug.h' --- lib/core/debug.h 2010-11-12 15:50:17 +0000 +++ lib/core/debug.h 2010-11-19 17:08:06 +0000 @@ -406,12 +406,6 @@ void hip_print_locator_addresses(const struct hip_common *); void hip_print_peer_addresses_to_be_added(hip_ha_t *); void hip_print_peer_addresses(hip_ha_t *); -void hip_print_locator(int debug_level, - const char *file, - int line, - const char *function, - const char *str, - struct hip_locator *locator); #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))