plugin

package
v0.2.5 Latest Latest
Warning

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

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

Documentation

Overview

Package plugin implements CoreRAD plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSSL

type DNSSL struct {
	Lifetime    time.Duration
	DomainNames []string
}

DNSSL configures a NDP DNS Search List option.

func (*DNSSL) Apply

func (d *DNSSL) Apply(ra *ndp.RouterAdvertisement) error

Apply implements Plugin.

func (*DNSSL) Name

func (d *DNSSL) Name() string

Name implements Plugin.

func (*DNSSL) Prepare

func (*DNSSL) Prepare(_ *net.Interface) error

Prepare implements Plugin.

func (*DNSSL) String

func (d *DNSSL) String() string

String implements Plugin.

type LLA added in v0.1.9

type LLA net.HardwareAddr

LLA configures a NDP Source Link Layer Address option.

func (*LLA) Apply added in v0.1.9

func (l *LLA) Apply(ra *ndp.RouterAdvertisement) error

Apply implements Plugin.

func (*LLA) Name added in v0.1.9

func (l *LLA) Name() string

Name implements Plugin.

func (*LLA) Prepare added in v0.1.9

func (l *LLA) Prepare(ifi *net.Interface) error

Prepare implements Plugin.

func (*LLA) String added in v0.1.9

func (l *LLA) String() string

String implements Plugin.

type MTU

type MTU int

MTU configures a NDP MTU option.

func NewMTU added in v0.1.9

func NewMTU(mtu int) *MTU

NewMTU creates a MTU from an integer.

func (*MTU) Apply

func (m *MTU) Apply(ra *ndp.RouterAdvertisement) error

Apply implements Plugin.

func (*MTU) Name

func (m *MTU) Name() string

Name implements Plugin.

func (*MTU) Prepare

func (*MTU) Prepare(_ *net.Interface) error

Prepare implements Plugin.

func (*MTU) String

func (m *MTU) String() string

String implements Plugin.

type Plugin

type Plugin interface {
	// Name is the string name of the plugin.
	Name() string

	// String is the string representation of the plugin's configuration.
	String() string

	// Prepare prepares a Plugin for use with the specified network interface.
	Prepare(ifi *net.Interface) error

	// Apply applies Plugin data to the input RA.
	Apply(ra *ndp.RouterAdvertisement) error
}

A Plugin specifies a CoreRAD plugin's configuration.

type Prefix

type Prefix struct {
	Prefix            netaddr.IPPrefix
	OnLink            bool
	Autonomous        bool
	ValidLifetime     time.Duration
	PreferredLifetime time.Duration
	Addrs             func() ([]net.Addr, error)
}

A Prefix configures a NDP Prefix Information option.

func (*Prefix) Apply

func (p *Prefix) Apply(ra *ndp.RouterAdvertisement) error

Apply implements Plugin.

func (*Prefix) Name

func (p *Prefix) Name() string

Name implements Plugin.

func (*Prefix) Prepare

func (p *Prefix) Prepare(ifi *net.Interface) error

Prepare implements Plugin.

func (*Prefix) String

func (p *Prefix) String() string

String implements Plugin.

type RDNSS

type RDNSS struct {
	Lifetime time.Duration
	Servers  []netaddr.IP
}

RDNSS configures a NDP Recursive DNS Servers option.

func (*RDNSS) Apply

func (r *RDNSS) Apply(ra *ndp.RouterAdvertisement) error

Apply implements Plugin.

func (*RDNSS) Name

func (r *RDNSS) Name() string

Name implements Plugin.

func (*RDNSS) Prepare

func (*RDNSS) Prepare(_ *net.Interface) error

Prepare implements Plugin.

func (*RDNSS) String

func (r *RDNSS) String() string

String implements Plugin.

type Route added in v0.2.1

type Route struct {
	Prefix     netaddr.IPPrefix
	Preference ndp.Preference
	Lifetime   time.Duration
}

A Route configures a NDP Route Information option.

func (*Route) Apply added in v0.2.1

func (r *Route) Apply(ra *ndp.RouterAdvertisement) error

Apply implements Plugin.

func (*Route) Name added in v0.2.1

func (*Route) Name() string

Name implements Plugin.

func (*Route) Prepare added in v0.2.1

func (*Route) Prepare(_ *net.Interface) error

Prepare implements Plugin.

func (*Route) String added in v0.2.1

func (r *Route) String() string

String implements Plugin.

Jump to

Keyboard shortcuts

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