We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to solve this?
Shadow@F ~/src/ip2trace/ip2location-traceroute-master $ make gcc -c -o src/trace.o src/trace.c In file included from src/trace.c:1: src/trace.h:29:31: warning: ‘struct icmphdr’ declared inside parameter list will not be visible outside of this definition or declaration 29 | void construct_icmphdr(struct icmphdr *header, uint8_t type, uint8_t code, uint16_t id, uint16_t sequence); | ^~~~~~~ src/trace.c:40:31: warning: ‘struct icmphdr’ declared inside parameter list will not be visible outside of this definition or declaration 40 | void construct_icmphdr(struct icmphdr *header, uint8_t type, uint8_t code, uint16_t id, uint16_t sequence) | ^~~~~~~ src/trace.c:40:6: error: conflicting types for ‘construct_icmphdr’; have ‘void(struct icmphdr *, uint8_t, uint8_t, uint16_t, uint16_t)’ {aka ‘void(struct icmphdr *, unsigned char, unsigned char, short unsigned int, short unsigned int)’} 40 | void construct_icmphdr(struct icmphdr *header, uint8_t type, uint8_t code, uint16_t id, uint16_t sequence) | ^~~~~~~~~~~~~~~~~ In file included from src/trace.c:1: src/trace.h:29:6: note: previous declaration of ‘construct_icmphdr’ with type ‘void(struct icmphdr *, uint8_t, uint8_t, uint16_t, uint16_t)’ {aka ‘void(struct icmphdr *, unsigned char, unsigned char, short unsigned int, short unsigned int)’} 29 | void construct_icmphdr(struct icmphdr *header, uint8_t type, uint8_t code, uint16_t id, uint16_t sequence); | ^~~~~~~~~~~~~~~~~ src/trace.c: In function ‘construct_icmphdr’: src/trace.c:42:15: error: invalid use of undefined type ‘struct icmphdr’ 42 | header->type = type; | ^~ src/trace.c:43:15: error: invalid use of undefined type ‘struct icmphdr’ 43 | header->code = code; | ^~ src/trace.c:44:15: error: invalid use of undefined type ‘struct icmphdr’ 44 | header->un.echo.id = id; | ^~ src/trace.c:45:15: error: invalid use of undefined type ‘struct icmphdr’ 45 | header->un.echo.sequence = sequence; | ^~ src/trace.c:46:15: error: invalid use of undefined type ‘struct icmphdr’ 46 | header->checksum = 0; | ^~ src/trace.c:47:15: error: invalid use of undefined type ‘struct icmphdr’ 47 | header->checksum = compute_icmp_checksum((u_int16_t *)header, sizeof(*header)); | ^~ src/trace.c:47:77: error: invalid application of ‘sizeof’ to incomplete type ‘struct icmphdr’ 47 | header->checksum = compute_icmp_checksum((u_int16_t *)header, sizeof(*header)); | ^ src/trace.c: In function ‘send_probes’: src/trace.c:60:24: error: storage size of ‘header’ isn’t known 60 | struct icmphdr header; | ^~~~~~ src/trace.c:63:44: error: ‘ICMP_ECHO’ undeclared (first use in this function) 63 | construct_icmphdr(&header, ICMP_ECHO, 0, id, *seq_ptr); | ^~~~~~~~~ src/trace.c:63:44: note: each undeclared identifier is reported only once for each function it appears in src/trace.c: In function ‘send_probes6’: src/trace.c:82:24: error: storage size of ‘header’ isn’t known 82 | struct icmphdr header; | ^~~~~~ src/trace.c:85:44: error: ‘ICMP_ECHO’ undeclared (first use in this function) 85 | construct_icmphdr(&header, ICMP_ECHO, 0, id, *seq_ptr); | ^~~~~~~~~ src/trace.c: In function ‘analize_packet’: src/trace.c:148:40: error: invalid use of undefined type ‘struct icmphdr’ 148 | returned_type = returned_icmp_p->type; | ^~ src/trace.c:150:30: error: ‘ICMP_TIME_EXCEEDED’ undeclared (first use in this function) 150 | if (returned_type == ICMP_TIME_EXCEEDED) { | ^~~~~~~~~~~~~~~~~~ src/trace.c:152:41: error: invalid use of undefined type ‘struct icmphdr’ 152 | returned_id = old_icmp_p->un.echo.id; | ^~ src/trace.c:153:42: error: invalid use of undefined type ‘struct icmphdr’ 153 | returned_seq = old_icmp_p->un.echo.sequence; | ^~ src/trace.c:155:46: error: invalid use of undefined type ‘struct icmphdr’ 155 | returned_id = returned_icmp_p->un.echo.id; | ^~ src/trace.c:156:47: error: invalid use of undefined type ‘struct icmphdr’ 156 | returned_seq = returned_icmp_p->un.echo.sequence; | ^~ src/trace.c: In function ‘receive_packets’: src/trace.c:185:87: error: ‘ICMP_ECHOREPLY’ undeclared (first use in this function) 185 | if (returned_seq / probes_per_turn == ttl || returned_type == ICMP_ECHOREPLY) { | ^~~~~~~~~~~~~~ src/trace.c: In function ‘trace’: src/trace.c:389:24: error: storage size of ‘header’ isn’t known 389 | struct icmphdr header; | ^~~~~~ src/trace.c:390:36: error: ‘ICMP_ECHO’ undeclared (first use in this function) 390 | construct_icmphdr(&header, ICMP_ECHO, 0, mypid, 0); | ^~~~~~~~~ src/trace.c: In function ‘trace6’: src/trace.c:433:24: error: storage size of ‘header’ isn’t known 433 | struct icmphdr header; | ^~~~~~ src/trace.c:434:36: error: ‘ICMP_ECHO’ undeclared (first use in this function) 434 | construct_icmphdr(&header, ICMP_ECHO, 0, mypid, 0); | ^~~~~~~~~ make: *** [<builtin>: src/trace.o] Error 1 Shadow@F ~/src/ip2trace/ip2location-traceroute-master
The text was updated successfully, but these errors were encountered:
No branches or pull requests
how to solve this?
The text was updated successfully, but these errors were encountered: