my own ping
- more simple code
- no norminette
- add flag 't'
- delete flag '6' : don't work IP6 in this network
-
sudo ./ft_ping [options]
-
add options:
- -c stop after replies
- -D print timestamps
- -h print help and exit
- -i seconds between sending each packet
- -n no dns name resolution
- -q quiet output
- -v verbose output
- -V print version and exit
- -w reply wait in seconds
- -t define time to live
- W.R. Stevens - UNIX Network Programming Volume 1
All ICMP packets have an 8-byte header and variable-sized data section. The first 4 bytes of the header have fixed format, while the last 4 bytes depend on the type/code of that ICMP packe
- blocks outgoing ICMP packets : sudo iptables -A OUTPUT -p icmp -j DROP
- allow sending ICMP packets : sudo iptables -D OUTPUT -p icmp -j DROP