I wrote: > Your pointer arithmetic works in units of struct iphdr. > You should cast the iph pointer to a char pointer first, like this: > > struct tcphdr *th = (struct tcphdr *)(char *)iph+iph->ihl*4; Argh! I blew it myself... Blush! It should read: struct tcphdr *th = (struct tcphdr *)((char *)iph+iph->ihl*4); Svenning