mirror of
https://github.com/go-ping/ping.git
synced 2026-02-21 15:43:12 +00:00
48 lines
1.3 KiB
Go
48 lines
1.3 KiB
Go
//go:build !linux && !windows
|
|
// +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 {
|
|
return ID == p.id
|
|
}
|
|
|
|
// SetMark sets the SO_MARK socket option on outgoing ICMP packets.
|
|
// Setting this option requires CAP_NET_ADMIN.
|
|
func (c *icmpConn) SetMark(mark uint) error {
|
|
return ErrMarkNotSupported
|
|
}
|
|
|
|
// SetMark sets the SO_MARK socket option on outgoing ICMP packets.
|
|
// Setting this option requires CAP_NET_ADMIN.
|
|
func (c *icmpv4Conn) SetMark(mark uint) error {
|
|
return ErrMarkNotSupported
|
|
}
|
|
|
|
// SetMark sets the SO_MARK socket option on outgoing ICMP packets.
|
|
// Setting this option requires CAP_NET_ADMIN.
|
|
func (c *icmpV6Conn) SetMark(mark uint) error {
|
|
return ErrMarkNotSupported
|
|
}
|
|
|
|
// SetDoNotFragment sets the do-not-fragment bit in the IP header of outgoing ICMP packets.
|
|
func (c *icmpConn) SetDoNotFragment() error {
|
|
return ErrDFNotSupported
|
|
}
|
|
|
|
// SetDoNotFragment sets the do-not-fragment bit in the IP header of outgoing ICMP packets.
|
|
func (c *icmpv4Conn) SetDoNotFragment() error {
|
|
return ErrDFNotSupported
|
|
}
|
|
|
|
// SetDoNotFragment sets the do-not-fragment bit in the IPv6 header of outgoing ICMPv6 packets.
|
|
func (c *icmpV6Conn) SetDoNotFragment() error {
|
|
return ErrDFNotSupported
|
|
}
|