On Mon, Nov 09, 2009 at 01:34:16PM +0100, Diego Biurrun wrote: > > + * Initialize a new packet. This has to be the first function called after > > + * hip_msg_alloc as we reset the packet size to indicate that no parameter > > has > > + * been added yet. > > .. which makes me wonder why hip_msg_alloc does not take care of this .. hip_msg_alloc just allocates a buffer and memsets it to 0. hip_build_user_hdr takes such a generic buffer and initializes the HIP packet within. It's not necessary with our current use of those functions to separate both steps. However the separation is quite useful if you want to receive such a message and just need a buffer. As you read the packet from the socket the basic HIP packet layout created by hip_build_user_hdr would be overwritten. If the implementation of the HIPL interface remains this specialized we can merge these functions, if someone were to pick it up from here and extend this stub to be a complete library the separation might come in handy. -- Thomas Jansen, "Mithi" --- mithi@xxxxxxxxx GPG 9D5C682B, feel free to sign or encrypt your mail