Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Christian Theil <christiantheilhave@gmail.com>
To: netfilter@lists.netfilter.org
Subject: Re: lib ipq
Date: Wed, 22 Jun 2005 11:28:02 +0000	[thread overview]
Message-ID: <33d4ee94050622042852fa791e@mail.gmail.com> (raw)
In-Reply-To: <a9c045eb0506211307394ee574@mail.gmail.com>

You could probably mark the packet using the nfmark field of the skb. 

If you are doing this with iptables, use the -j MARK target to do
this; something
ala this:
iptables -A OUTPUT -t mangle -i eth0  -j MARK --set-mark 42

Make sure you do this before you queue the packet to userspace.

Regards,
Christian Theil Have.

If you need to do this from userspace with iptables probably
On 6/21/05, Unix User <kerneland@gmail.com> wrote:
> hi all
> I use the lib ipq.  I want to know how one can make the difference
> between an outgoing and incoming packets with the lib ipq .  I queued
> incoming and outgoing packets .
> i use the packet information to look at the tcp/ip headers and check the ip
> addresses to see if it is incoming or outgoing but it doesnt work if
> the localhost send a packet at his self (ex : source adress: 127.0.0.1
> , dest adress: 127.0.0.1).
> 
> how can i make the difference ?
> 
> sorry for my bad english :)
> 
>


      reply	other threads:[~2005-06-22 11:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-23 19:29 lib ipq Unix User
2005-06-21 20:07 ` Unix User
2005-06-22 11:28   ` Christian Theil [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=33d4ee94050622042852fa791e@mail.gmail.com \
    --to=christiantheilhave@gmail.com \
    --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