class

ICMP::Packet

Inherits Reference < Object

Constructors

Instance methods

calculate_checksum

Header Checksum The 16 bit one's complement of the one's complement sum of all 16 bit words in the header. For computing the checksum, the checksum field should be zero. This checksum may be replaced in the future. RFC 792, Page 2

Also credit http://netfor2.com/checksum.html (2017-11-07) for an understable walkthrough on how the carry bits are handled

Source
check_checksum
Source
debug(pkt, bit_size = 16)
Source
fmt(n, bit_size = 16)
Source
packet
Source
packet=(packet : Array(UInt16))
Source
pad(n, bit_size = 16)
Source