pythonping icon indicating copy to clipboard operation
pythonping copied to clipboard

fix(icmp.py): ICMP header format string

Open dabell-cc opened this issue 2 years ago • 0 comments

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).

dabell-cc avatar Sep 06 '22 15:09 dabell-cc