On Mon, Nov 29, 2010 at 05:21:35PM +0000, noreply@xxxxxxxxxxxxx wrote: > ------------------------------------------------------------ > revno: 5208 > committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx> > branch nick: hipl > timestamp: Mon 2010-11-29 18:19:59 +0100 > message: > major re-work of mobility handling > > I have split up functions into smaller blocks and regrouped > functionality to better reflect handling operations in case of mobility. > This also required rewriting parts of the existing code. > > Note that this commit does only focus on receiving updates, but does not > make changes to outbound packets. It neither changes locator handling. > These will be worked on in subsequent commits. > modified: > lib/core/state.h > modules/update/hipd/update.c > > --- modules/update/hipd/update.c 2010-11-29 08:58:13 +0000 > +++ modules/update/hipd/update.c 2010-11-29 17:19:59 +0000 > @@ -36,8 +36,8 @@ > #include <errno.h> > #include <stdint.h> > #include <string.h> > -#include <arpa/inet.h> > #include <netinet/in.h> > +#include <openssl/rand.h> arpa/inet.h was added for ntohl, which is still used in the file, so removing this header is incorrect. > @@ -781,46 +789,77 @@ > > +static enum update_types hip_classify_update_type(const struct hip_esp_info > *esp_info, > + const struct hip_locator > *locator, > + const struct hip_seq *seq, > + const struct hip_ack *ack, > + const struct > hip_echo_request *echo_request, > + const struct > hip_echo_response *echo_response) { > + K&R style places the { on the next line for function declarations. > @@ -946,7 +1002,85 @@ > > +static int hip_check_update_freshness(UNUSED const uint8_t packet_type, > + UNUSED const uint32_t ha_state, > + struct hip_packet_context *ctx) { ditto > @@ -963,62 +1097,30 @@ > -out_err: > + out_err: goto labels should remain on the first column. > @@ -1030,180 +1132,97 @@ > + > + out_err: ditto > +static int hip_update_change_state(UNUSED const uint8_t packet_type, > + UNUSED const uint32_t ha_state, > + struct hip_packet_context *ctx) { See above, and indentation is messed up. > @@ -1270,6 +1305,6 @@ > > -out_err: > + out_err: see above Diego