network

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: MIT Imports: 8 Imported by: 2

Documentation

Overview

Package network provides utility functions to extract some data about network

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayInterfaces

func DisplayInterfaces() error

func GetDefaultGatewayIPv4

func GetDefaultGatewayIPv4() (netip.Addr, error)

func GetDefaultInterface

func GetDefaultInterface() (*net.Interface, error)

func GetGatewayIPv4FromInterface

func GetGatewayIPv4FromInterface(iface string) (netip.Addr, error)

func GetIPv4PrefixFromInterface

func GetIPv4PrefixFromInterface(iface *net.Interface) (netip.Prefix, error)

func InterfaceByName

func InterfaceByName(name string) (*net.Interface, error)

InterfaceByName returns the interface specified by name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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