pythonping
pythonping copied to clipboard
fix(icmp.py): ICMP header format string
All values in the struct should be unsigned.
Refering to the docs it appears the large count limitation was caused by incorrectly using signed formats for the ICMP header packing/unpacking.
This now allows for count
to be set to numbers greater than 16-bits when calling ping()
. The effect on the sequence number in the ICMP header is that it will wrap around after 0xFFFFFFFF (65536), and continue to increment. (Confirmed in Wireshark on Windows 10, python3.10.5).