[Click] A new question

Beyers Cronje bcronje at gmail.com
Tue Aug 7 07:35:30 EDT 2007


>
>
> what made me confuse was the fucntions set_ip_header() set_ether_header()
> which now i understand are if u want to insert a full header instead of
> makin changes to teh pointer of the header.


Your assumption is incorrect. set_ip_header() and set_ether_header() does
not insert anything, it only tells the packet structure where your IP and
ether headers are located in the packet data buffer in order to use
p->ip_header() and p->ether_header().

how to remove teh data from the paket such that i have only ether, ip and
> tcp headers and no data. more like an ACK packet.


You have to set the ip len field of the ip header to only include the ip and
tcp headers. See the set tcp checksum element on how to calculate the ip and
tcp header length.

Beyers


More information about the click mailing list