I register a hook to netfilter using nf_register_hook() function.
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!