The IP datagram, TTL and ICMP

Every IPv4 packet starts with a header of at least 20 bytes carrying the source and destination addresses, a protocol number saying what is inside (6 for TCP, 17 for UDP, 1 for ICMP) and a time to live that each router lowers by one, discarding the packet at zero and sending back an ICMP message, which is how traceroute maps a path.

From Computer Networks and Security.