Skip to content
mmmharius42Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

ft_ping

Reimplementation of the ping command in C, using raw ICMP sockets.

Goal

Recode a ping capable of sending ICMP Echo Request packets and displaying the Echo Replies received, with output formatted similarly to the inetutils-2.0 implementation.

Build

make
sudo ./ft_ping <ip>

!!! Requires root privileges (or the CAP_NET_RAW capability), since SOCK_RAW is a privileged socket type.

Technical notes

  • Raw socket: socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)
  • Structures used: struct icmphdr (<netinet/ip_icmp.h>), struct sockaddr_in (<netinet/in.h>).

Sources

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages