structures, is my question.
well i wanted to print out eveything that an icmp packet holds, like checksum, mtu and the id for example.
i included </linux/icmp.h>
Code:
struct icmphdr *icmp;
...
...
printf("checksum is: %d\n", icmp->checksum);
that works fine.
but in the /linux/icmp.h header file there is more than one structure like:
Code:
struct icmphdr {
__u8 checksum;
union {
struct {
__u16 id;
} echo;
} frag;
how would i print out the id of the icmp packet now?
the id code is included in the union frag and the struct echo as seen above.
thank you