the 'packet' which arrives from the kernel, is through a library called 
libipq and it doesnt return the packet as such but some structure which 
contains the harware address, data lenght , payload(optional), in interface, 
out interface, hook type etc. There is no mention of ip header anywhere..the 
most i get out of the original packet is the payload. I was asking if i can 
get the source and destination ip of the packet which arrives through the 
lipipq function: ipq_get_packet(char* buf).


>From: Harald Welte <[EMAIL PROTECTED]>
>To: "Saaid Anwar Khan" <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: (no subject)
>Date: Thu, 30 May 2002 15:21:59 +0200
>
>On Wed, May 29, 2002 at 07:49:18PM +0500, Saaid Anwar Khan wrote:
> >
> > Hello
> >
> > i would like to know if there is any way of getting the source and the
> > destination IP of the packet when it has been sent of to the userspace 
>Queue
> > by iptables. i.e. is there any way of determining the source and 
>destination
> > ip of the packet in userspace, i mean can access it in userspace 
>somehow.
> > Any other way besides the logs.
>

The packet arrives in userspace.  Thus you can easily parse the IP header 
yourself and read out the values from your userspace program.
>

> > Thanks you
> > Saaid Anwar Khan
>
>--
>Live long and prosper
>- Harald Welte / [EMAIL PROTECTED]               
>http://www.gnumonks.org/
>============================================================================
>GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M+
>V-- PS++ PE-- Y++ PGP++ t+ 5-- !X !R tv-- b+++ !DI !D G+ e* h--- r++ y+(*)




Good day..how you doin, i extend this smile to you,
dont waste ur breath and i wont waste my hate on u...


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


Reply via email to