I am writing a kernel module which registers a netfilter hook. I am trying to get the ip address of the caller by using the sk_buff->saddr member. Is there a way
sk_buff->saddr
/* Convinience union to __be32 to ip address */ union ip_address { u8 a[4]; __be32 saddr; };
IP Address could be obtained a[0].a[1].a[2].a[3]