Versions in this module Expand all Collapse all v1 v1.0.3 Sep 5, 2025 v1.0.2 Sep 5, 2025 Changes in this version + const CDPCapHost + const CDPCapIGMPFilter + const CDPCapPhone + const CDPCapRemote + const CDPCapRepeater + const CDPCapRouter + const CDPCapSRBridge + const CDPCapSwitch + const CDPCapTBBridge + const CDPEtherType + const CDPLLC + const CDPMulticast + const CDPOrganizationCode + const CDPProtocolID + const CDPTLVAddress + const CDPTLVApplianceID + const CDPTLVApplianceVLAN + const CDPTLVCapabilities + const CDPTLVDeviceID + const CDPTLVDuplex + const CDPTLVExtendedTrust + const CDPTLVExternalPortID + const CDPTLVIPPrefix + const CDPTLVLocation + const CDPTLVMTU + const CDPTLVMgmtAddress + const CDPTLVNativeVLAN + const CDPTLVPlatform + const CDPTLVPortID + const CDPTLVPortUnidirectional + const CDPTLVPowerAvailable + const CDPTLVPowerConsumption + const CDPTLVPowerRequested + const CDPTLVSystemName + const CDPTLVSystemOID + const CDPTLVUntrustedCOS + const CDPTLVVTPDomain + const CDPTLVVersion + const IPv6LinkLocalAll + const LLDPChassisIDChassisComponent + const LLDPChassisIDInterfaceAlias + const LLDPChassisIDInterfaceName + const LLDPChassisIDLocallyAssigned + const LLDPChassisIDMACAddress + const LLDPChassisIDNetworkAddress + const LLDPChassisIDPortComponent + const LLDPDefaultTTL + const LLDPEtherType + const LLDPMulticast + const LLDPPortIDAgentCircuitID + const LLDPPortIDInterfaceAlias + const LLDPPortIDInterfaceName + const LLDPPortIDLocallyAssigned + const LLDPPortIDMACAddress + const LLDPPortIDNetworkAddress + const LLDPPortIDPortComponent + const LLDPReinitDelay + const LLDPSysCapBridge + const LLDPSysCapDocsisCable + const LLDPSysCapOther + const LLDPSysCapRepeater + const LLDPSysCapRouter + const LLDPSysCapStationOnly + const LLDPSysCapTelephone + const LLDPSysCapWLANAP + const LLDPTLVChassisID + const LLDPTLVEndOfLLDPDU + const LLDPTLVMgmtAddr + const LLDPTLVOrgSpecific + const LLDPTLVPortDescription + const LLDPTLVPortID + const LLDPTLVSystemCaps + const LLDPTLVSystemDesc + const LLDPTLVSystemName + const LLDPTLVTimeToLive + const LLDPTxDelay + const LLDPTxHoldMulti + const LLDPTxInterval + const MNDPMulticast + const MNDPPort + const MaxPacketSize + type CDPDiscoverer struct + func NewCDPDiscoverer() (*CDPDiscoverer, error) + func (d *CDPDiscoverer) InjectCDPNeighbor(deviceID, platform, version, portID, mgmtAddr string, capabilities uint32, ...) + func (d *CDPDiscoverer) ParseCDPData(data []byte) (*Neighbor, error) + func (d *CDPDiscoverer) SendCDPPacket(deviceID, platform string) error + func (d *CDPDiscoverer) Start(neighborChan chan<- Neighbor) error + func (d *CDPDiscoverer) Stop() + type CDPHeader struct + Checksum uint16 + TTL uint8 + Version uint8 + type CDPTLV struct + Length uint16 + Type uint16 + Value []byte + type DiscoveryProtocol string + const ProtocolCDP + const ProtocolLLDP + const ProtocolMNDP + type DiscoveryResult struct + ByProtocol map[DiscoveryProtocol]int + Duration time.Duration + Neighbors []Neighbor + TotalFound int + WithSSH int + type LLDPDiscoverer struct + func NewLLDPDiscoverer() (*LLDPDiscoverer, error) + func (d *LLDPDiscoverer) ExtractMgmtAddress(tlvValue []byte) string + func (d *LLDPDiscoverer) Start(neighborChan chan<- Neighbor) error + func (d *LLDPDiscoverer) Stop() + type LLDPFrame struct + ChassisID *LLDPTLV + MgmtAddr *LLDPTLV + OrgTLVs []*LLDPTLV + PortDescription *LLDPTLV + PortID *LLDPTLV + SystemCaps *LLDPTLV + SystemDesc *LLDPTLV + SystemName *LLDPTLV + TTL *LLDPTLV + type LLDPTLV struct + Length uint16 + Type uint8 + Value []byte + type MNDPDiscoverer struct + func NewMNDPDiscoverer() (*MNDPDiscoverer, error) + func (d *MNDPDiscoverer) SendMNDPDiscovery() error + func (d *MNDPDiscoverer) Start(neighborChan chan<- Neighbor) error + func (d *MNDPDiscoverer) Stop() + type MNDPPacket struct + Fields map[TLVTag]TLV + SeqNo uint16 + TypeTag uint16 + type MikroTikNeighbor = Neighbor + type Neighbor struct + Board string + Capabilities uint32 + DeviceID string + DiscoveredAt time.Time + HasSSH bool + HasTelnet bool + IPAddress string + IPv6Address string + Identity string + InterfaceName string + MACAddress string + MgmtAddr string + NativeVLAN uint16 + Platform string + PortDesc string + PortID string + PowerAvailable uint32 + PowerRequested uint32 + Protocol DiscoveryProtocol + SSHPort int + SoftwareID string + SystemDesc string + SystemName string + TTL uint16 + UnpackedData string + Uptime time.Duration + VLANs []uint16 + Version string + type NeighborScanner struct + func NewNeighborScanner() *NeighborScanner + func (ns *NeighborScanner) GetNeighbors() []Neighbor + func (ns *NeighborScanner) GetNeighborsWithSSH() []Neighbor + func (ns *NeighborScanner) GetUpdateChannel() <-chan Neighbor + func (ns *NeighborScanner) StartDiscovery(duration time.Duration) (*DiscoveryResult, error) + func (ns *NeighborScanner) StartDiscoveryWithoutSSHCheck(duration time.Duration) (*DiscoveryResult, error) + func (ns *NeighborScanner) Stop() + type TLV struct + Length uint16 + Tag TLVTag + Value []byte + type TLVTag uint16 + const TagBoard + const TagIPv4Addr + const TagIPv6Addr + const TagIdentity + const TagInterfaceName + const TagMACAddr + const TagMAX + const TagMNDP + const TagPlatform + const TagSoftwareID + const TagUnpack + const TagUptime + const TagVersion