Edit: I see that this was intentionally removed... The doc is not updated though. Removed in commit: e66bd32
const socket = rawSocket.createSocket({
protocol: rawSocket.Protocol.ICMP,
generateChecksums: true, // this doesn't write anything
checksumOffset: 2
})
// this one works though
rawSocket.writeChecksum(packet, 2, rawSocket.createChecksum(packet))
If more info needed then let me know.