Results 1 to 1 of 1
Thread: parse sk_buff
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Sep 2007
static unsigned int
my_filter(unsigned int hooknum,
struct sk_buff **pskb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
I want to get the TCP data from pskb parameter but failed:
char *data = (*pskb)->data + (*pskb)->nh.iph->ihl*4 + sizeof(struct tcphdr);
When http packet was hooked by it, the data is not correct, why? How to get http packet from pskb?
Thanks a lot!