Hello,
In linux kernel there is a struct skbuff that used to store packets. It
has many fields defined in it. thers a union
union
{
struct iphdr *iph;
struct ipv6hdr *ipv6h;
struct arphdr *arph;
struct ipxhdr *ipxh;
unsigned char *raw;
} nh;
I want to ask once IP header is added to skbuff structure all pointers
in union carry same information. We know IP header is 20 bytes long.
Then i try to send raw variable to my function in kernel module.
processip(sb->nh.raw) where sb is of typr struct skbuff
Then why strlen on (sb->nh.raw) doesnot give 20 bytes as result instead
its giving 1.
I want my function to take ip header as unsigned char and print its
strlen as 20 and want to process on it further.