mirror of
https://github.com/TwiN/gatus.git
synced 2024-12-03 21:35:41 +01:00
17 lines
284 B
Go
17 lines
284 B
Go
|
// +build !linux,!windows
|
||
|
|
||
|
package ping
|
||
|
|
||
|
// Returns the length of an ICMP message.
|
||
|
func (p *Pinger) getMessageLength() int {
|
||
|
return p.Size + 8
|
||
|
}
|
||
|
|
||
|
// Attempts to match the ID of an ICMP packet.
|
||
|
func (p *Pinger) matchID(ID int) bool {
|
||
|
if ID != p.id {
|
||
|
return false
|
||
|
}
|
||
|
return true
|
||
|
}
|