пишет
Error:(73, 16) error: member access into incomplete type 'struct icmphdr'
Error:(84, 41) error: invalid application of 'sizeof' to an incomplete type 'struct icmphdr'
struct icmphdr *icmp_packet;
char *buffer = ( char * ) calloc ( 128, 1 );
icmp_packet = ( struct icmphdr * ) &buffer[0];
int icmp_len = 8 + 56;
icmp_packet->type = ICMP_ECHO;
icmp_packet->code = 0;
icmp_packet->checksum = 0;
icmp_packet->un.echo.sequence = seq++;
icmp_packet->un.echo.id = getpid ( );
icmp_packet->checksum = get_checksum ( ( unsigned short *) icmp_packet, icmp_len );