Re: libipq and destination IP address

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

 



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@xxxxxx> 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@xxxxxx
> Téléphone : 01 44 89 46 40, Fax : 01 44 89 45 01
> INL, http://www.inl.fr
>
>
-
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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