lldp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	InterfaceName string
	InterfaceMac  []byte
	// contains filtered or unexported fields
}

Client consumes lldp messages.

func NewClient

func NewClient(ctx context.Context, ifacename string, hwAddr []byte) *Client

NewClient creates a new lldp client.

func (*Client) Close

func (l *Client) Close()

Close the LLDP client

func (*Client) Start

func (l *Client) Start(resultChan chan<- DiscoveryResult) error

Start searches on the configured interface for lldp packages and pushes the optional TLV SysName and SysDescription fields of each found lldp package into the given channel.

type DiscoveryResult

type DiscoveryResult struct {
	InterfaceName   string
	SysName         string
	SysDescription  string
	PortDescription string
	PeerMAC         []byte
}

DiscoveryResult holds optional TLV SysName and SysDescription fields of a real lldp frame.

Jump to

Keyboard shortcuts

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