iface

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Broadcast address
	Broadcast = "broadcast"
	// First usable IP address of the subnet
	First = "first"
	// IP address
	IP = "ip"
	// Last usable IP address of the subnet
	Last = "last"
	// Name of the interface
	Name = "name"
	// NetMask of the subnet
	NetMask = "netmask"
	// Network address
	Network = "network"
	// Prefix in bits
	Prefix = "prefix"
	// Size of the subnet
	Size = "size"
	// UsableSize of the subnet
	UsableSize = "usable"
	// Version of the IP address
	Version = "version"
	// Wildcard mask
	Wildcard = "wildcard"
)

Variables

This section is empty.

Functions

func GetAddr

func GetAddr(name string) (ip net.IP, n iplib.Net, err error)

GetAddr returns the first IPv4 unicast address for the interface specified by name.

func GetParams

func GetParams(name string, ip net.IP, mask net.IPMask) (m map[string]interface{})

GetParams returns the parameters for the specified IP.

Types

This section is empty.

Jump to

Keyboard shortcuts

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