Re: Modify packets using netfilter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le sam 13/12/2003 Ã 17:45, Jee J.Z. a Ãcrit :
> Hi Antony and all,
> 
> Thanks for your reply. What I am trying to do is to get the whole packets including their payloads and store them into a self defined queue, and randomly modify some bits in each packet. 
> I am using iptables userspace programming. Does anybody have some good idea how to achieve this? Thank you.

with libipq you can modify the payload of the packet :

Take from man page :
int ipq_set_verdict(const struct ipq_handle *h, ipq_id_t  id,  unsigned
       int verdict, size_t data_len, unsigned char *buf);

if data_len is not 0 and buf is not NULL, the header and payload of the
packet get replaced by the datas pointed by buf.

BR,
-- 
Eric Leblond
Nufw, Now User Filtering Works (http://www.nufw.org)

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux