icmp

package
v0.0.0-...-70bc933 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolICMP     = 1  // Internet Control Message
	ProtocolIPv6ICMP = 58 // ICMP for IPv6
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ICMPReturn

type ICMPReturn struct {
	Success bool
	Addr    string
	Elapsed time.Duration
}

ICMPReturn contains the info for a returned ICMP

func SendDiscoverICMP

func SendDiscoverICMP(localAddr string, dst net.Addr, ttl, id int, timeout time.Duration, seq int) (hop ICMPReturn, err error)

SendDiscoverICMP sends a ICMP to a given destination with a TTL to discover hops

func SendDiscoverICMPv6

func SendDiscoverICMPv6(localAddr string, dst net.Addr, ttl, id int, timeout time.Duration, seq int) (hop ICMPReturn, err error)

SendDiscoverICMPv6 sends a ICMP to a given destination with a TTL to discover hops

func SendICMP

func SendICMP(localAddr string, dst net.Addr, target string, ttl, id int, timeout time.Duration, seq int) (hop ICMPReturn, err error)

SendICMP sends a ICMP to a given destination which requires a reply from that specific destination

func SendICMPv6

func SendICMPv6(localAddr string, dst net.Addr, target string, ttl, id int, timeout time.Duration, seq int) (hop ICMPReturn, err error)

SendICMPv6 sends a ICMP to a given destination which requires a reply from that specific destination

Jump to

Keyboard shortcuts

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