ping

package
v1.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IPType4 = IPType{
		Type:               "4",
		ListenAddr:         "0.0.0.0",
		Network:            "ip4",
		ICMPNetwork:        "ip4:icmp",
		ProtocolNumber:     1,
		RequestMessageType: ipv4.ICMPTypeEcho,
		ReplyMessageType:   ipv4.ICMPTypeEchoReply,
	}
	IPType6 = IPType{
		Type:               "6",
		ListenAddr:         "::",
		Network:            "ip6",
		ICMPNetwork:        "ip6:ipv6-icmp",
		ProtocolNumber:     58,
		RequestMessageType: ipv6.ICMPTypeEchoRequest,
		ReplyMessageType:   ipv6.ICMPTypeEchoReply,
	}
)

Functions

func New

func New(address string) (*net.IPAddr, time.Duration, error)

Types

type IPType

type IPType struct {
	Type               string
	ListenAddr         string
	Network            string
	ICMPNetwork        string
	ProtocolNumber     int
	RequestMessageType icmp.Type
	ReplyMessageType   icmp.Type
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL