Question about programming with ip_queue

Brad Chapman kakadu_croc@yahoo.com
Sat, 18 Aug 2001 17:11:37 -0700 (PDT)


--- Brad Chapman <kakadu_croc@yahoo.com> wrote:
> --- Allen <aef@prismnet.com> wrote:
> > 
> > 
> > Would you send me some cut-n-paste's of your code ?
> > 
> > I am interested in retrieving ipq_get_packet and breaking out
> > what is in there.
> > 
> > I do not know what is in there.
> > 
> > I need a quick example of code that plays with the Payload[].
> > 
> > ???
> > 
> > If you help me now, I'll be good at this in a week and can probably
> > help you out with something....
> > 
> > THX
> > -AEF
> > 
 
Mr. Allen,
 
 	This is from /usr/src/linux/include/linux/netfilter_ipv4/ip_queue.h:
 
typedef struct ipq_packet_msg {
 	........
 	unsigned char payload[0];	/* Optional packet data */
} ipq_packet_msg_t;
 
 	FWICS, this is basically a zeroed character pointer.
 
 	And this is from /usr/src/linux/net/ipv4/netfilter/ip_queue.c:
 
 	........
  	memcpy(pm->payload, e->skb->data, data_len);
 	........
 
 	Apparently the payload pointer contains whatever was in skb->data.
For most packets that's probably the layer-5 payload, like the TCP/UDP
payload and the reversed ICMP header (AFAIK).
 
 	I suppose you could ask James Morris for help. He wrote this
stuff and could probably tell you how to deal with the payload pointer.
 
Brad


=====
Brad Chapman

Permanent e-mail: kakadu_croc@yahoo.com
Current e-mail: kakadu@adelphia.net

Reply to the address I used in the message to you,
please!

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/