Skip to content

Finds the path to a destination (ip or domain name), trace the route and check its round trip time.

Notifications You must be signed in to change notification settings

elcolin/ft_traceroute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FT_TRACEROUTE

Find the path to your destination (ip or domain name), trace your route and check its round trip time. Don't forget to make !

make

Then

sudo ./ft_traceroute 8.8.8.8

or

sudo ./ft_traceroute google.com

Packet

              0      7 8     15 16    23 24    31
             +--------+--------+--------+--------+
             |     Source      |   Destination   |
             |      Port       |      Port       |
             +--------+--------+--------+--------+
             |                 |                 |
             |     Length      |    Checksum     |
             +--------+--------+--------+--------+
             |
             |          data octets ...
             +---------------- ...

                  User Datagram Header Format

Pseudo Header

              0      7 8     15 16    23 24    31
             +--------+--------+--------+--------+
             |          source address           |
             +--------+--------+--------+--------+
             |        destination address        |
             +--------+--------+--------+--------+
             |  zero  |protocol|   UDP length    |
             +--------+--------+--------+--------+

Checksum

Checksum is the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header, the UDP header, and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets.

Notes

  • Make sure all structure are set to zero before sending new infos
  • Add id verification to avoid multiple instances of the program
  • Add correct timeout for appropriate packet -> smarter based on start and current time
  • only reset part of iphdr instead of the whole structure

About

Finds the path to a destination (ip or domain name), trace the route and check its round trip time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published