From: Ajay Lele <ajay.lele@gmail.com>
To: Mistick Levi <gmistick@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Mark packets/Transfer data from iptables to QUEUE
Date: Sun, 23 May 2010 16:15:04 -0700 [thread overview]
Message-ID: <AANLkTim3A02wX8Ssy4jurH5M6DNVVH1AhZRQrJfaZNNX@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimSsbzA3pBz3QyjHN4-LnEwou7oaNRkEsaZ9QGs@mail.gmail.com>
Hi Levi
On Sun, May 23, 2010 at 12:22 PM, Mistick Levi <gmistick@gmail.com> wrote:
> Hi,
> I'm using libnetfilter_queue, and i would like to treat packets from
> different rules differently, in the same queue.
> Example:
> rulematch: ipsrc: 123.132.123.232 ipdst = 1.2.3.4 udp port-12321 -J
> NFQUEUE --queue-num 2 - "DANPACKET"
> rulematch ipsrc: 123.132.123.232 ipdst = 1.2.3.4 udp port-12221 -J
> NFQUEUE --queue-num 2 - "LaneyPacket"
>
> And when this messages get to userspace application, i want to be able
> to extract the comment and treat each packet by a different method...
> Any idea's?
You can set a different mark on the packets belonging to each stream
using iptables -j MARK --set-mark, and then call different method in
userspace based on the value of mark on the received packet
Regards
Ajay
>
> Kind regards
> Levi Yechiel
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2010-05-23 23:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-23 19:22 Mark packets/Transfer data from iptables to QUEUE Mistick Levi
2010-05-23 23:15 ` Ajay Lele [this message]
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=AANLkTim3A02wX8Ssy4jurH5M6DNVVH1AhZRQrJfaZNNX@mail.gmail.com \
--to=ajay.lele@gmail.com \
--cc=gmistick@gmail.com \
--cc=netfilter@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).