On Fri, 2006-03-31 at 16:45 +0800, qi lim wrote:
> Hi,
>  
>   I would like to add an option to the mobility header. However, when
> I came to function mh_try_pad in mh.c, I do not know what to add to
> it. May I know how did the values '2' and '0' in optpad(2,0,len) or
> '8' and '4' in optpad(8,4,len) came about? How did you determine the
> values?

Options must be correctly aligned.  If the option does not align by
itself, padding must be added.  Look at the RFC3775, and read about
option alignment.  Previously, alignment requirements were written as
e.g. "8n+2".  The optpad() function takes the requirement and the length
of the message, and returns how many pads must be added to meet that
requirement.

Regards,

Antti



_______________________________________________
mipl mailing list
[email protected]
http://www.mobile-ipv6.org/cgi-bin/mailman/listinfo/mipl

Reply via email to