[Click] IP Header Option field

Beyers Cronje bcronje at gmail.com
Wed Apr 18 17:31:04 EDT 2007


Hi Haris,

The options field follows the standard 20-byte IP header and has variable
length containing 0, 1 or multiple options. Each of the options can be
either a single byte long, or multiple bytes in length, depending on how
much information the option needs to convey. To gain access to the Options
fields you would first determine if any options are present, i.e. IP header
length > 20-bytes and then access the data from bytes 21 until end of
options. Since the IP header length needs to be in multiples of 32bits there
is a Padding field at the end of the options if the total length of all
options is not a multiple of 32 bits.

I recommend you read the IP rfc or search google on more information on how
to parse the options field.

Beyers

On 4/18/07, Haris Volos <hvolos at cs.wisc.edu> wrote:
>
> Hey -
>
> I am new to Click. I was looking at the <clicknet/ip.h> IP header
> definition, but I couldn't find the Option field. Is that field not
> supported by Click? If not, is there any workaround for this?
>
> -Haris
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list