From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Moshe Ashkenazi" Subject: FW: libipq question Date: Thu, 22 Apr 2004 12:40:36 +0200 Sender: netfilter-admin@lists.netfilter.org Message-ID: <004301c42856$3f54ff50$9b281dc2@luli> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0044_01C42867.02DDCF50" Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.netfilter.org This is a multi-part message in MIME format. ------=_NextPart_000_0044_01C42867.02DDCF50 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, List - I'm using QUEUE target in order to send TCP packets to user space, using "IPQ_COPY_PACKET" I'm telling the kernel that I want the entire packet. I know that the kernel send to user space the following structure "ipq_packet_msg_t", and this structure include the payload member which include the optional packet data. When I'm examining the content of the payload array I see that it include the following: 20 bytes IP header -> 20 bytes TCP header, and 20 bytes???? My questions are: 1. What should the payload include? 2. What are the last 20 bytes in the payload? Example of payload array: ----- Optional packet data ----- 45 10 0 3c f8 f8 40 0 3f 6 6f 64 c2 1d 28 90 c0 a8 27 f9 82 e7 4 d2 cf 1f 40 f5 0 0 0 0 a0 2 16 d0 f7 eb 0 0 2 4 5 b4 4 2 8 a 16 20 b8 d 0 0 0 0 1 3 3 0 ------=_NextPart_000_0044_01C42867.02DDCF50 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi, List –

 

I’m using QUEUE target in order to send TCP packets to = user space, using “IPQ_COPY_PACKET” I’m telling the kernel = that I want the entire packet.

 

I know that the kernel send to user space the following = structure “ipq_packet_msg_t”, and this structure include the payload = member which include the optional packet data.

 

When I’m examining the content of the payload array I see = that it include the following:

20 bytes IP header -> 20 bytes TCP header, and 20 = bytes????

 

My questions are:

  1. What should the payload include?
  2. What are the last 20 bytes in the payload?

 

Example of payload array:

----- Optional packet data -----

45 10  0 3c f8 f8 = 40  0 3f  6 6f 64 c2 1d 28 = 90

c0 a8 27 f9 82 e7  = 4 d2 cf 1f 40 f5  0  0  0  = 0

a0  2 16 d0 f7 = eb  0  0  2  4  5 b4  4  2  8  = a

16 20 b8  d  0  0  0  0  1  3  3  0

------=_NextPart_000_0044_01C42867.02DDCF50--