iface

package
v0.0.0-...-3264e59 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterfaceToPublicIPString

func InterfaceToPublicIPString(iface net.Interface, filter int, terse bool) string

Types

type Config

type Config struct {
	V4Iface string `gcKey:"interfaces.ipv4"`
	V6Iface string `gcKey:"interfaces.ipv6"`

	V4ID int
	V6ID int
	// contains filtered or unexported fields
}

func ReadConfig

func ReadConfig(file string) (*Config, error)

func (*Config) Configure

func (self *Config) Configure(list *InterfaceList) error

func (*Config) ConfigureV4

func (self *Config) ConfigureV4(list *InterfaceList) error

func (*Config) ConfigureV6

func (self *Config) ConfigureV6(list *InterfaceList) error

type InterfaceList

type InterfaceList struct {
	List   []net.Interface
	Filter int
}

func NewList

func NewList(want int) (*InterfaceList, error)

func (*InterfaceList) GetFilteredList

func (self *InterfaceList) GetFilteredList(filter int) ([]traceroute.IPAddrMap, error)

func (*InterfaceList) GetInterfaceNumber

func (self *InterfaceList) GetInterfaceNumber(name string) int

func (*InterfaceList) GetPublicIP

func (self *InterfaceList) GetPublicIP(ifaceNum, filter int) (*traceroute.IPAddrMap, error)

func (*InterfaceList) Show

func (self *InterfaceList) Show(w io.Writer)

Jump to

Keyboard shortcuts

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