kernel

package
v0.0.0-...-246b716 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IF_TYPE_LOOPBACK     = 1
	IF_TYPE_BROADCAST    = 2
	IF_TYPE_POINTTOPOINT = 3
)

Variables

This section is empty.

Functions

func IfaceExists

func IfaceExists(name string) bool

func Serve

func Serve(status chan<- *KernelStatus)

Types

type IfType

type IfType int

func IfaceType

func IfaceType(name string) IfType

type Interface

type Interface struct {
	IfIndex       int
	Name          string
	IfType        IfType
	HardwareAddr  []byte
	Mtu           int
	Up            bool
	Ipv4Addresses []*Ipv4Address
	Ipv6Addresses []*Ipv6Address
}

func NewInterface

func NewInterface(attrs *netlink.LinkAttrs) *Interface

type Ipv4Address

type Ipv4Address struct {
	Address      uint32
	PrefixLength int
	ScopeHost    bool
}

func NewIpv4Address

func NewIpv4Address(addr *netlink.Addr) *Ipv4Address

type Ipv6Address

type Ipv6Address struct {
	Address      [4]uint32
	PrefixLength int
	ScopeLink    bool
	ScopeHost    bool
}

func NewIpv6Address

func NewIpv6Address(addr *netlink.Addr) *Ipv6Address

type KernelStatus

type KernelStatus struct {
	Interfaces []*Interface
}

func NewKernelStatus

func NewKernelStatus() *KernelStatus

Jump to

Keyboard shortcuts

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