Documentation ¶
Overview ¶
Package kernel contains funcs that interact with the kernel (sycalls, netlink).
Index ¶
- type Interfaces
- func (k *Interfaces) AddrSubscribe(ch chan<- netlink.AddrUpdate, done <-chan struct{}) error
- func (k *Interfaces) CreateTAP(name string) (int, error)
- func (k *Interfaces) DeleteIP(name string, ip string, prefixLen int) error
- func (k *Interfaces) GetAll() ([]net.Interface, error)
- func (k *Interfaces) GetByName(name string) (*net.Interface, error)
- func (k *Interfaces) LinkSubscribe(ch chan<- netlink.LinkUpdate, done <-chan struct{}) error
- func (k *Interfaces) NeighSubscribe(ch chan<- netlink.NeighUpdate, done <-chan struct{}) error
- func (k *Interfaces) ReplaceIP(name string, ip string, prefixLen int) error
- func (k *Interfaces) SetHWAddr(name string, addr string) error
- func (k *Interfaces) SetState(name string, up bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interfaces ¶ added in v0.2.0
type Interfaces struct{}
Interfaces contains methods for modifying networking interfaces.
func (*Interfaces) AddrSubscribe ¶ added in v0.2.0
func (k *Interfaces) AddrSubscribe(ch chan<- netlink.AddrUpdate, done <-chan struct{}) error
AddrSubscribe subscribes to address changes for all interfaces.
func (*Interfaces) CreateTAP ¶ added in v0.2.0
func (k *Interfaces) CreateTAP(name string) (int, error)
CreateTAP creates kernel TAP interface.
func (*Interfaces) DeleteIP ¶ added in v0.2.0
func (k *Interfaces) DeleteIP(name string, ip string, prefixLen int) error
DeleteIP delete an IP addresses from a network interface.
func (*Interfaces) GetAll ¶ added in v0.2.0
func (k *Interfaces) GetAll() ([]net.Interface, error)
GetAll returns all interfaces.
func (*Interfaces) GetByName ¶ added in v0.2.0
func (k *Interfaces) GetByName(name string) (*net.Interface, error)
GetByName returns all interfaces.
func (*Interfaces) LinkSubscribe ¶ added in v0.2.0
func (k *Interfaces) LinkSubscribe(ch chan<- netlink.LinkUpdate, done <-chan struct{}) error
LinkSubscribe subscribes to link status for all interfaces.
func (*Interfaces) NeighSubscribe ¶ added in v0.2.0
func (k *Interfaces) NeighSubscribe(ch chan<- netlink.NeighUpdate, done <-chan struct{}) error
NeighSubscribe subscribes to neighbor table updates.
func (*Interfaces) ReplaceIP ¶ added in v0.2.0
func (k *Interfaces) ReplaceIP(name string, ip string, prefixLen int) error
ReplaceIP sets the IP addresses of a network interface.
Directories ¶
Path | Synopsis |
---|---|
package kerneltest contains fake implemetation of structs in kernel package
|
package kerneltest contains fake implemetation of structs in kernel package |
Click to show internal directories.
Click to hide internal directories.