lldp

package
Version: v0.0.0-...-0e9ae86 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2015 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CH_CHASSIS_COMPONENT
	CH_IFACE_ALIAS
	CH_PORT_COMPONENT
	CH_MAC_ADDR
	CH_NET_ADDR
	CH_IFACE_NAME
	CH_LOCAL_ASSGN
)

Chassis ID subtypes

View Source
const (
	PT_IFACE_ALIAS
	PT_PORT_COMPONENT
	PT_MAC_ADDR
	PT_NET_ADDR
	PT_IFACE_NAME
	PT_CIRCUIT_ID
	PT_LOCAL_ASSGN
)

Port ID subtypes

Variables

This section is empty.

Functions

This section is empty.

Types

type ChassisTLV

type ChassisTLV struct {
	Type    uint8
	Length  uint16
	Subtype uint8
	Data    []uint8
}

func (*ChassisTLV) Read

func (t *ChassisTLV) Read(b []byte) (n int, err error)

func (*ChassisTLV) Write

func (t *ChassisTLV) Write(b []byte) (n int, err error)

type LLDP

type LLDP struct {
	Chassis ChassisTLV
	Port    PortTLV
	TTL     TTLTLV
}

func (*LLDP) Len

func (d *LLDP) Len() (n uint16)

func (*LLDP) Read

func (d *LLDP) Read(b []byte) (n int, err error)

func (*LLDP) Write

func (d *LLDP) Write(b []byte) (n int, err error)

type PortTLV

type PortTLV struct {
	Type    uint8  //7bits
	Length  uint16 //9bits
	Subtype uint8
	Data    []uint8
}

func (*PortTLV) Read

func (t *PortTLV) Read(b []byte) (n int, err error)

func (*PortTLV) Write

func (t *PortTLV) Write(b []byte) (n int, err error)

type TTLTLV

type TTLTLV struct {
	Type    uint8  //7 bits
	Length  uint16 //9 bits
	Seconds uint16
}

func (*TTLTLV) Read

func (t *TTLTLV) Read(b []byte) (n int, err error)

func (*TTLTLV) Write

func (t *TTLTLV) Write(b []byte) (n int, err error)

Source Files

Jump to

Keyboard shortcuts

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