pkg

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package pkg provides ICMP ping utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checksum

func Checksum(data []byte) uint16

Checksum computes the Internet checksum (RFC 1071) for the given data.

func ContextWithSig

func ContextWithSig(ctx context.Context) context.Context

ContextWithSig returns a context that is cancelled when SIGINT or SIGTERM is received.

func Ping

func Ping(ctx context.Context, ipAddr *net.IPAddr) error

Ping sends an ICMP echo request to the given IP address and waits for a reply.

Types

This section is empty.

Jump to

Keyboard shortcuts

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