------------------------------------------------------------ revno: 5173 committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx> branch nick: mobility-fixes timestamp: Fri 2010-11-19 18:10:37 +0100 message: move hip_get_locator_first_addr_item to the only place it is used modified: lib/core/builder.c lib/core/builder.h modules/update/hipd/update.c -- 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/builder.c' --- lib/core/builder.c 2010-11-19 17:07:10 +0000 +++ lib/core/builder.c 2010-11-19 17:10:37 +0000 @@ -468,17 +468,6 @@ } /** - * Retrieve a pointer to the first locator in a LOCATOR parameter - * - * @param locator a pointer a LOCATOR parameter - * @return a pointer to the first locator in the LOCATOR parameter - */ -struct hip_locator_info_addr_item *hip_get_locator_first_addr_item(struct hip_locator *locator) -{ - return (struct hip_locator_info_addr_item *) (locator + 1); -} - -/** * Translate a service life time from seconds to a 8-bit integer value. The * lifetime value in seconds is translated to a 8-bit integer value using * following formula: <code>lifetime = (8 * (log(seconds) / log(2))) === modified file 'lib/core/builder.h' --- lib/core/builder.h 2010-11-19 17:07:10 +0000 +++ lib/core/builder.h 2010-11-19 17:10:37 +0000 @@ -193,8 +193,6 @@ int hip_get_lifetime_value(time_t seconds, uint8_t *lifetime); int hip_get_lifetime_seconds(uint8_t lifetime, time_t *seconds); int hip_check_network_msg_len(const struct hip_common *msg); -struct hip_locator_info_addr_item - *hip_get_locator_first_addr_item(struct hip_locator *); hip_hdr_err_t hip_get_msg_err(const struct hip_common *); uint16_t hip_get_msg_total_len(const struct hip_common *); hip_hdr_type_t hip_get_msg_type(const struct hip_common *); === modified file 'modules/update/hipd/update.c' --- modules/update/hipd/update.c 2010-11-19 17:07:10 +0000 +++ modules/update/hipd/update.c 2010-11-19 17:10:37 +0000 @@ -96,6 +96,17 @@ static const int update_id_window_size = 50; /** + * Retrieve a pointer to the first locator in a LOCATOR parameter + * + * @param locator a pointer a LOCATOR parameter + * @return a pointer to the first locator in the LOCATOR parameter + */ +static struct hip_locator_info_addr_item *hip_get_locator_first_addr_item(struct hip_locator *locator) +{ + return (struct hip_locator_info_addr_item *) (locator + 1); +} + +/** * build locators in an UPDATE message * * @param locator_msg the message where the LOCATOR should be appended