utils_other.go 317 B

1234567891011121314151617
  1. //go:build !linux && !windows
  2. // +build !linux,!windows
  3. package probing
  4. // Returns the length of an ICMP message.
  5. func (p *Pinger) getMessageLength() int {
  6. return p.Size + 8
  7. }
  8. // Attempts to match the ID of an ICMP packet.
  9. func (p *Pinger) matchID(ID int) bool {
  10. if ID != p.id {
  11. return false
  12. }
  13. return true
  14. }