Results 1 to 1 of 1
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 *))
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-06-2007 #1Just Joined!
- Join Date
- Sep 2007
- Posts
- 1
parse sk_buff
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!


Reply With Quote
