Documentation ¶
Overview ¶
Package lldp provide lldp data structre and endpoint data collection implementations
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // OIDChassisID is exact OID to get switch ChassisId OIDChassisID = "1.0.8802.1.1.2.1.3.2.0" // OIDName is exact OID to get switch Name OIDName = "1.0.8802.1.1.2.1.3.3.0" // OIDDescription is exact OID to get switch Description OIDDescription = "1.0.8802.1.1.2.1.3.4.0" // OIDLocalPortTableNumber is root OID to get a subtree of port number OIDLocalPortTableNumber = "1.0.8802.1.1.2.1.3.7.1.1" // OIDLocalPortTableID is root OID to get a subtree of port id OIDLocalPortTableID = "1.0.8802.1.1.2.1.3.7.1.3" // OIDLocalPortTableDesc is root OID to get a subtree of port description OIDLocalPortTableDesc = "1.0.8802.1.1.2.1.3.7.1.4" )
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
Endpoint is the abtraction of a LLDP endpoint Typically it is a SNMP agent
func NewDefaultSNMPEndpoint ¶
NewDefaultSNMPEndpoint create SNMPEndpiont with default configurations
func NewSNMPEndpoint ¶
func NewSNMPEndpoint(ep *SNMPEndpoint) Endpoint
NewSNMPEndpoint create SNMPEndpiont with provided configurations
type LocalSystemData ¶
type LocalSystemData struct { ChassisID string Name string Description string PortTable []PortTableEntry }
LocalSystemData is the local lldp data structure
type PortTableEntry ¶
PortTableEntry is the porttable entry data structure
type SNMPEndpoint ¶
type SNMPEndpoint struct { Address string Port uint16 // sleep time interval after collecting data from endpoint Interval time.Duration Community string // SNMP version used, import "github.com/soniah/gosnmp" type SnmpVersion // default v2c Version gosnmp.SnmpVersion Timeout time.Duration Retries int MaxOids int // contains filtered or unexported fields }
SNMPEndpoint is an LLDP endpoint using SNMP
func (*SNMPEndpoint) Start ¶
func (s *SNMPEndpoint) Start() (chan *Snapshot, chan error)
Start SNMPEndpoint collecting data snapshots
type Snapshot ¶
type Snapshot struct {
Local LocalSystemData
}
Snapshot represents the data snapshot gatherred from a LLDP endpoint
Click to show internal directories.
Click to hide internal directories.