Categorygithub.com/geberl/go-ping-vrf
modulepackage
0.1.4
Repository: https://github.com/geberl/go-ping-vrf.git
Documentation: pkg.go.dev

# README

go-ping-vrf

The popular ICMP Ping library for Go, modified to work when using vrf (Virtual Routing and Forwarding) in Linux

Original: https://github.com/go-ping/ping

Only Linux, only ICMP (meaning no UDP). Should work for IPv4 and IPv6.

# build
go build cmd/ping/ping.go

# ping 10.0.0.2 using the interface vrf-priv1 with the ip 10.0.0.2 continuously
ping -src 10.0.0.3 -if vrf-priv1 --privileged 10.0.0.2

# Packages

No description provided by the author

# Functions

ListenPacket listens for incoming ICMP packets addressed to address.
New returns a new Pinger struct pointer.
NewPinger returns a new Pinger and resolves the address.

# Constants

Internet Control Message.
ICMP for IPv6.

# Structs

Packet represents a received and processed ICMP echo packet.
A PacketConn represents a packet network endpoint that uses either ICMPv4 or ICMPv6.
Pinger represents a packet sender/receiver.
Statistics represent the stats of a currently running or finished pinger operation.