From: "Jee J.Z." <jz105@york.ac.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Modify packets using netfilter
Date: Sat, 13 Dec 2003 23:11:04 -0000 [thread overview]
Message-ID: <025c01c3c1ce$61f202e0$68892090@grouse> (raw)
In-Reply-To: 1071346885.1309.3.camel@porky
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@regit.org>
To: "Jee J.Z." <jz105@york.ac.uk>
Cc: <netfilter@lists.netfilter.org>
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)
next prev parent reply other threads:[~2003-12-13 23:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-13 15:44 Modify packets using netfilter Jee J.Z.
2003-12-13 15:49 ` Antony Stone
2003-12-13 16:45 ` Jee J.Z.
2003-12-13 16:53 ` Antony Stone
2003-12-13 20:21 ` Eric Leblond
2003-12-13 23:11 ` Jee J.Z. [this message]
2003-12-15 1:14 ` Josh Berry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='025c01c3c1ce$61f202e0$68892090@grouse' \
--to=jz105@york.ac.uk \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox