[Click] Adding IP Options

Eddie Kohler kohler at cs.ucla.edu
Mon Mar 14 16:43:52 EST 2005


Hi Rafael,

I don't believe we have such an element now.  Basically, you'll need to 
write your own.  How you write it will depend on whether you're trying 
to add an IP option to an existing IP packet, or to prepend a new IP 
header with option onto some packet.  Either way shouldn't be too hard: 
you'll push() extra space onto the packet to make room, memmove() the 
existing IP header if any, drop the option into the created space, and 
recalculate the checksum.

Eddie


On Mar 7, 2005, at 8:02 AM, Rafael Paoliello Guimaraes wrote:

> Hello,
>
> I am trying to write an element that appends a certain IP Option to a 
> packet, but I am a little lost. How can I do that? Is there any 
> element that does something similar so that I can use it as a basis?
>
> I have looked into IPGWOptions and I could understand how to read and 
> change pre-existing IP Options, but how about to add new ones in a 
> packet?
>
> Thanks in advance!
>
> Cheers,
>
> -- 
>
> ===========================================
>  Rafael Paoliello Guimaraes
>  PhD Student - Computer Networking Group
>  Department of Computer Architecture (DAC)
>  Polytechnic University of Catalonia (UPC)
>  Phone: +34-934017187   Fax: +34-934017055
>  URL: http://people.ac.upc.es/rpaoliel
> ===========================================
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click



More information about the click mailing list