Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gcc -c -o icmp.o icmp.c -I. -O3 -Wall
- icmp.c:23:47: warning: declaration of 'struct icmphdr' will not be visible outside of this
- function [-Wvisibility]
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp);
- ^
- icmp.c:104:40: error: invalid application of 'sizeof' to an incomplete type
- 'struct icmphdr'
- packet_size = sizeof(struct iphdr) + sizeof(struct icmphdr) + packet_details->pa...
- ^ ~~~~~~~~~~~~~~~~
- icmp.c:93:10: note: forward declaration of 'struct icmphdr'
- struct icmphdr *icmp;
- ^
- icmp.c:115:59: error: invalid application of 'sizeof' to an incomplete type
- 'struct icmphdr'
- icmp_payload = (char *)(packet + sizeof(struct iphdr) + sizeof(struct icmphdr));
- ^ ~~~~~~~~~~~~~~~~
- icmp.c:93:10: note: forward declaration of 'struct icmphdr'
- struct icmphdr *icmp;
- ^
- icmp.c:117:23: warning: incompatible pointer types passing 'struct icmphdr *' to parameter
- of type 'struct icmphdr *' [-Wincompatible-pointer-types]
- prepare_headers(ip, icmp);
- ^~~~
- icmp.c:23:56: note: passing argument to parameter 'icmp' here
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp);
- ^
- icmp.c:125:7: error: incomplete definition of type 'struct icmphdr'
- icmp->type = packet_details->type;
- ~~~~^
- icmp.c:93:10: note: forward declaration of 'struct icmphdr'
- struct icmphdr *icmp;
- ^
- icmp.c:126:7: error: incomplete definition of type 'struct icmphdr'
- icmp->checksum = 0;
- ~~~~^
- icmp.c:93:10: note: forward declaration of 'struct icmphdr'
- struct icmphdr *icmp;
- ^
- icmp.c:127:7: error: incomplete definition of type 'struct icmphdr'
- icmp->checksum = in_cksum((unsigned short *)icmp, sizeof(struct icmphdr) + packe...
- ~~~~^
- icmp.c:93:10: note: forward declaration of 'struct icmphdr'
- struct icmphdr *icmp;
- ^
- icmp.c:127:53: error: invalid application of 'sizeof' to an incomplete type
- 'struct icmphdr'
- icmp->checksum = in_cksum((unsigned short *)icmp, sizeof(struct icmphdr) + packe...
- ^ ~~~~~~~~~~~~~~~~
- icmp.c:93:10: note: forward declaration of 'struct icmphdr'
- struct icmphdr *icmp;
- ^
- icmp.c:157:42: error: invalid application of 'sizeof' to an incomplete type
- 'struct icmphdr'
- enc_MTU = MTU + sizeof(struct iphdr) + sizeof(struct icmphdr);
- ^ ~~~~~~~~~~~~~~~~
- icmp.c:148:10: note: forward declaration of 'struct icmphdr'
- struct icmphdr *icmp;
- ^
- icmp.c:173:59: error: invalid application of 'sizeof' to an incomplete type
- 'struct icmphdr'
- icmp_payload = (char *)(packet + sizeof(struct iphdr) + sizeof(struct icmphdr));
- ^ ~~~~~~~~~~~~~~~~
- icmp.c:148:10: note: forward declaration of 'struct icmphdr'
- struct icmphdr *icmp;
- ^
- icmp.c:178:30: error: incomplete definition of type 'struct icmphdr'
- packet_details->type = icmp->type;
- ~~~~^
- icmp.c:148:10: note: forward declaration of 'struct icmphdr'
- struct icmphdr *icmp;
- ^
- icmp.c:179:71: error: invalid application of 'sizeof' to an incomplete type
- 'struct icmphdr'
- ...= packet_size - sizeof(struct iphdr) - sizeof(struct icmphdr);
- ^ ~~~~~~~~~~~~~~~~
- icmp.c:148:10: note: forward declaration of 'struct icmphdr'
- struct icmphdr *icmp;
- ^
- icmp.c:233:47: warning: declaration of 'struct icmphdr' will not be visible outside of
- this function [-Wvisibility]
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp)
- ^
- icmp.c:233:6: error: conflicting types for 'prepare_headers'
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp)
- ^
- icmp.c:23:6: note: previous declaration is here
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp);
- ^
- icmp.c:243:7: error: incomplete definition of type 'struct icmphdr'
- icmp->code = 0;
- icmp.c:233:47: warning: declaration of 'struct icmphdr' will not be visible outside of
- this function [-Wvisibility]
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp)
- ^
- icmp.c:233:6: error: conflicting types for 'prepare_headers'
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp)
- ^
- icmp.c:23:6: note: previous declaration is here
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp);
- ^
- icmp.c:243:7: error: incomplete definition of type 'struct icmphdr'
- icmp->code = 0;
- ~~~~^
- icmp.c:233:47: note: forward declaration of 'struct icmphdr'
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp)
- ^
- icmp.c:244:7: error: incomplete definition of type 'struct icmphdr'
- icmp->un.echo.sequence = rand();
- ~~~~^
- icmp.c:233:47: note: forward declaration of 'struct icmphdr'
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp)
- ^
- icmp.c:245:7: error: incomplete definition of type 'struct icmphdr'
- icmp->un.echo.id = rand();
- ~~~~^
- icmp.c:233:47: note: forward declaration of 'struct icmphdr'
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp)
- ^
- icmp.c:246:7: error: incomplete definition of type 'struct icmphdr'
- icmp->checksum = 0;
- ~~~~^
- icmp.c:233:47: note: forward declaration of 'struct icmphdr'
- void prepare_headers(struct iphdr *ip, struct icmphdr *icmp)
- ^
- 3 warnings and 15 errors generated.
- make: *** [Makefile:6: icmp.o] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement