route

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Route

type Route struct {
	Destination netip.Addr
	Gateway     netip.Addr
	Source      netip.Addr
	Interface   *net.Interface
}

Route represents a network route with its destination, gateway, source address, and the associated network interface.

func Get

func Get(ip netip.Addr) (Route, error)

Get retrieves the most specific route for a given IP address and returns it as a Route struct. The function handles both IPv4 and IPv6 addresses.

Jump to

Keyboard shortcuts

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