vyos

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidNUDs = []string{
	"PERMANENT",
	"NOARP",
	"REACHABLE",
	"STALE",
	"NONE",
	"INCOMPLETE",
	"DELAY",
	"PROBE",
	"FAILED",
}

Functions

func NewVyOSSSHSource

func NewVyOSSSHSource(sourceConfig VyOSSSHSourceConfig) (source.Source, error)

func TabulateParse added in v0.7.2

func TabulateParse(b []byte) ([]map[string]string, error)

Types

type ConnectionClient added in v0.4.0

type ConnectionClient interface {
	Disconnect() error
	Output(string) ([]byte, error)
}

type ConnectionClientConnect added in v0.4.0

type ConnectionClientConnect func(host, username, password string) (ConnectionClient, error)

type Lease

type Lease struct {
	Pool            string   `json:"pool"`
	IP              string   `json:"ip"`
	Hostname        string   `json:"hostname"`
	HardwareAddress string   `json:"hardware_address"`
	IPv6s           []string `json:"ipv6s"`
}

func LeasesFromJSON

func LeasesFromJSON(b []byte) ([]*Lease, error)

func LeasesFromShowOutput added in v0.7.2

func LeasesFromShowOutput(b []byte) ([]*Lease, error)

func (*Lease) AssociatePotentialIPv6s

func (l *Lease) AssociatePotentialIPv6s(neighbors []*Neighbor)

type Neighbor

type Neighbor struct {
	To     string
	Dev    string
	LLAddr string
	NUD    string
}

func ParseNeighborLine

func ParseNeighborLine(line string) (*Neighbor, error)

func ParseNeighborLines

func ParseNeighborLines(lines string) ([]*Neighbor, error)

type VyOSSSHSourceConfig added in v0.4.0

type VyOSSSHSourceConfig struct {
	Host                 string
	Username             string
	Password             string
	CollectIPv6Neighbors bool
	RecordTTL            int64
}

Jump to

Keyboard shortcuts

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