* libipq and destination IP address
[not found] <mailman.21644.1192545951.25258.netfilter@lists.netfilter.org>
@ 2007-10-16 14:44 ` Khoa Nguyen
2007-10-19 9:39 ` Eric Leblond
0 siblings, 1 reply; 3+ messages in thread
From: Khoa Nguyen @ 2007-10-16 14:44 UTC (permalink / raw)
To: netfilter
Hi,
I am writing a small libipq program to extract packet info. I "queued"
all packets in the OUTPUT chain. It looks like the packet has the same
source and destination packet ( = host interface address). Why is
that? Is there a way in libipq to extract the REAL destination
address?
Thanks,
Khoa
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: libipq and destination IP address
2007-10-16 14:44 ` libipq and destination IP address Khoa Nguyen
@ 2007-10-19 9:39 ` Eric Leblond
2007-10-19 13:29 ` Khoa Nguyen
0 siblings, 1 reply; 3+ messages in thread
From: Eric Leblond @ 2007-10-19 9:39 UTC (permalink / raw)
To: Khoa Nguyen; +Cc: netfilter
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]
Hi,
Le mardi 16 octobre 2007 à 10:44 -0400, Khoa Nguyen a écrit :
> Hi,
>
> I am writing a small libipq program to extract packet info. I "queued"
> all packets in the OUTPUT chain. It looks like the packet has the same
> source and destination packet ( = host interface address). Why is
> that? Is there a way in libipq to extract the REAL destination
> address?
First of all: switch to libnetfilter_queue
For your question, libipq sends to userspace the whole content of the
packet. Thus there is no potential problem of address rewriting. You can
have a look at the following code extract from NuFW:
http://docs.nufw.org/doxygen/trunk/html/packetsrv_8c-source.html#l00292
BR,
--
Éric Leblond, eleblond@inl.fr
Téléphone : 01 44 89 46 40, Fax : 01 44 89 45 01
INL, http://www.inl.fr
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: libipq and destination IP address
2007-10-19 9:39 ` Eric Leblond
@ 2007-10-19 13:29 ` Khoa Nguyen
0 siblings, 0 replies; 3+ messages in thread
From: Khoa Nguyen @ 2007-10-19 13:29 UTC (permalink / raw)
To: Eric Leblond; +Cc: netfilter
Hi,
Thanks for your response. Actually, the problem is inet_ntoa()
function -- I should have printed out the IP address right away before
calling the function again
Thanks,
Khoa
On 10/19/07, Eric Leblond <eric@inl.fr> wrote:
> Hi,
>
> Le mardi 16 octobre 2007 à 10:44 -0400, Khoa Nguyen a écrit :
> > Hi,
> >
> > I am writing a small libipq program to extract packet info. I "queued"
> > all packets in the OUTPUT chain. It looks like the packet has the same
> > source and destination packet ( = host interface address). Why is
> > that? Is there a way in libipq to extract the REAL destination
> > address?
>
> First of all: switch to libnetfilter_queue
>
> For your question, libipq sends to userspace the whole content of the
> packet. Thus there is no potential problem of address rewriting. You can
> have a look at the following code extract from NuFW:
> http://docs.nufw.org/doxygen/trunk/html/packetsrv_8c-source.html#l00292
>
> BR,
> --
> Éric Leblond, eleblond@inl.fr
> Téléphone : 01 44 89 46 40, Fax : 01 44 89 45 01
> INL, http://www.inl.fr
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-19 13:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.21644.1192545951.25258.netfilter@lists.netfilter.org>
2007-10-16 14:44 ` libipq and destination IP address Khoa Nguyen
2007-10-19 9:39 ` Eric Leblond
2007-10-19 13:29 ` Khoa Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox