ping/utils_windows.go
Marcelo E. Magallon 64d100b308 Goreleaser can no longer be installed using goreleaser.sh
This installation method was deprecated because the associated tool has
been deprecated.

Download "by hand" and run checks before trying to use binary.

Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
2022-04-27 09:11:44 +01:00

26 lines
454 B
Go

//go:build windows
// +build windows
package ping
import (
"golang.org/x/net/ipv4"
"golang.org/x/net/ipv6"
)
// Returns the length of an ICMP message, plus the IP packet header.
func (p *Pinger) getMessageLength() int {
if p.ipv4 {
return p.Size + 8 + ipv4.HeaderLen
}
return p.Size + 8 + ipv6.HeaderLen
}
// Attempts to match the ID of an ICMP packet.
func (p *Pinger) matchID(ID int) bool {
if ID != p.id {
return false
}
return true
}