netutil

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2016 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultInterface

func GetDefaultInterface() (string, error)

GetDefaultInterface returns the name of the default network interface

Types

type InterfaceData

type InterfaceData struct {
	ADMIN_STATE     string
	OPER_STATE      string
	NETWORK_FILE    string
	DNS             []string
	NTP             string
	DOMAINS         []string
	WILDCARD_DOMAIN bool
	LLMNR           bool
	DHCP_LEASE      string
	MDNS            bool
	ADDRESSES       string
	ROUTES          string
	DHCP4_ADDRESS   string
}

InterfaceData contains all status data systemd/networkd has regarding an interface

func GetInterfaceStats

func GetInterfaceStats(name string) (InterfaceData, error)

GetInterfaceStats collects information on a network interface from linux netlink and systemd/networkd

Jump to

Keyboard shortcuts

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