[Click] Modification(handling) of an ip packet data field ?

Eddie Kohler kohler at cs.ucla.edu
Tue Oct 19 10:23:35 EDT 2004


yacine.djemaiel wrote:
> Hi all,
> 
> i am trying to manipulate (display or modify) ip packet
> fields. Did anyone know how to access data field in IP packet
> for modification or displaying. I am able to access ip/tcp
> header fields by using click_ip/click_tcp structures, but how
> modify them (by using WriteablePacket for example)?. 
> 
> Thanks for any help.
> Yacine


Hi Yacine,

The general pattern is to "uniqueify" the packet, making sure that it is not 
shared.  Then the "ip_header()" and "tcp_header()" return values will become 
writable.  See IPMirror (elements/ip/ipmirror.cc) for an example.

Eddie


> 
> Accédez au courrier électronique de La Poste : www.laposte.net ; 
> 3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)
> 
> 
> 
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click




More information about the click mailing list