Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ping

ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams (''pings'') have an IP and ICMP header, followed by a struct timeval and then an arbitrary number of ''pad'' bytes used to fill out the packet.

usage

Usage: ping [OPTION...] HOST ...
Send ICMP ECHO_REQUEST packets to network hosts.

Options:
  -v            verbose output
  -?            give this help list
  -q            quiet output
  -c<number>    stop after sending <number> packets
  --ttl<number>  specify <number> as time-to-live
  -W<number>    wait <number> seconds for response
  -i<number>    wait <number> seconds between sending each packet
# show leak bug
sudo valgrind --leak-check=full  --show-leak-kinds=all ./ft_ping google.com
# suppression of leak bug
sudo valgrind  --suppressions=dlopen.supp ./ft_ping google.com

Shema

Crafting ICMP packet :

icmppacket

Manage error

Identify error icmp packet:

icmp error

Docu

https://www.geeksforgeeks.org/ping-in-c/

About

Recode my own ping

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages