ValentinBELYN / icmplib

Easily forge ICMP packets and make your own ping and traceroute.
GNU Lesser General Public License v3.0
266 stars 46 forks source link

Add `min_ttl` and `max_ttl` to the `Host` class and `ttl` to the `ICMPReply` class #55

Open joente opened 2 years ago

joente commented 2 years ago

The TTL properties are missing when preforming a ping (or async_ping)

Added a min_ttl and max_ttl property to the Host class which is filled from a new ttl property on the ICMPReply class.

In this version it only works for IPv4 which is enough most of the time although we could search for an implementation for IPv6 as well. (this version would return 0 for both min- and max_ttl when using an IPv6 address.

ValentinBELYN commented 2 years ago

Hi @joente,

Thanks for this PR. Although I find the interest of the TTL limited (there have already been several requests on this subject), I will however think about it for future versions. With icmplib, I try to have a parity between the features available between IPv4 and IPv6.