Documentation ¶
Index ¶
- type NeighborDetails
- type Neighbors
- func (n *Neighbors) GetInterfaceDetails(ctx context.Context, in *lldp.Interface) (*lldp.Interface, error)
- func (n *Neighbors) ListInterfaceNeighbors(in *lldp.Interface, stream lldp.Lldp_ListInterfaceNeighborsServer) error
- func (n *Neighbors) ListInterfaces(in *lldp.EmptyMessage, stream lldp.Lldp_ListInterfacesServer) error
- func (n *Neighbors) ListNeighbors(in *lldp.EmptyMessage, stream lldp.Lldp_ListNeighborsServer) error
- func (n *Neighbors) ProcessPacket(wg *sync.WaitGroup, in Packet)
- type Packet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NeighborDetails ¶
type NeighborDetails struct { PortID string `json:"portid,omitempty"` PortDescription string `json:"portdesc,omitempty"` SysName string `json:"hostname,omitempty"` SysDesc string `json:"description,omitempty"` Address string `json:"address,omitempty"` Vlan string `json:"vlan,omitempty"` Type string `json:"type,omitempty"` TTL *time.Timer `json:"-"` }
NeighborDetails stores relevent information to identify a neighboring node
type Neighbors ¶
type Neighbors struct { Rw sync.RWMutex `json:"-"` NetDevList []net.Interface `json:"-"` Interfaces map[string]map[string]NeighborDetails `json:"connections,omitempty"` ChassisID string `json:"host,omitempty"` SysName string `json:"hostname,omitempty"` SysDesc string `json:"description,omitempty"` Address string `json:"address,omitempty"` Type string `json:"type,omitempty"` }
Neighbors stores the local neighbors topology
func NewNeighbors ¶
NewNeighbors creates the Neighbors data storage object and returns it to the LLDP Plugin
func (*Neighbors) GetInterfaceDetails ¶
func (n *Neighbors) GetInterfaceDetails(ctx context.Context, in *lldp.Interface) (*lldp.Interface, error)
GetInterfaceDetails provides details indofmration about each interface
func (*Neighbors) ListInterfaceNeighbors ¶
func (n *Neighbors) ListInterfaceNeighbors(in *lldp.Interface, stream lldp.Lldp_ListInterfaceNeighborsServer) error
ListInterfaceNeighbors shows the neighbors attached to a specific interface
func (*Neighbors) ListInterfaces ¶
func (n *Neighbors) ListInterfaces(in *lldp.EmptyMessage, stream lldp.Lldp_ListInterfacesServer) error
ListInterfaces provides a list of all active interfaces
func (*Neighbors) ListNeighbors ¶
func (n *Neighbors) ListNeighbors(in *lldp.EmptyMessage, stream lldp.Lldp_ListNeighborsServer) error
ListNeighbors shows all neighbors attached to all active interfaces on the host
Click to show internal directories.
Click to hide internal directories.