Re: Modify packets using netfilter

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

 



Hi Eric and all,

Thank you again. I have a few further questions:
1. How many packets can ip_queue queue for userspace? How can we change the
size of QUEUE?
2. Can we use ipq_read() and ipq_set_verdict() to access and process queued
packets in any order?
    More specifically, for example, I wish to ipq_read() a number of packets
from QUEUE before ipq_set_verdict() any of them, and then ipq_set_verdict()
in whichever order I want. It is possible?

Cheers,
Jee


----- Original Message ----- 
From: "Eric Leblond" <eric@xxxxxxxxx>
To: "Jee J.Z." <jz105@xxxxxxxxxx>
Cc: <netfilter@xxxxxxxxxxxxxxxxxxx>
Sent: Saturday, December 13, 2003 8:21 PM
Subject: Re: Modify packets using netfilter

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)




[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