これを書く意味がよくわからない
struct iphdr *ip;
struct icmphdr *icmp;
char *packet;
packet = malloc(sizeof(struct iphdr) + sizeof(struct icmphdr));
ip = (struct iphdr *)packet;
なぜ をとpacket
見なすのですか?char
packet = malloc(sizeof(struct iphdr));
ip = malloc(sizeof(struct iphdr));