ot

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package ot implements operational technology protocol scanners including PROFINET, EtherCAT, and mDNS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	MacAddress string
	Ip         string
	DnsName    string
	OsGuess    string
}

Host represents a host discovered via L2/OT protocols.

func ListenLldp

func ListenLldp(logger utils.Logger, iface string) ([]Host, error)

ListenLldp passively listens for LLDP frames on the given interface.

func ScanEthercat

func ScanEthercat(logger utils.Logger, iface string) ([]Host, error)

ScanEthercat sends an EtherCAT broadcast read and collects responding slaves.

func ScanMdnsSsdp

func ScanMdnsSsdp(logger utils.Logger, iface string) ([]Host, error)

ScanMdnsSsdp queries mDNS and SSDP multicast groups to discover devices on the given interface.

func ScanNdp

func ScanNdp(logger utils.Logger, iface string) ([]Host, error)

ScanNdp sends an ICMPv6 Neighbor Solicitation to ff02::1 and collects Neighbor Advertisements.

func ScanProfinetDcp

func ScanProfinetDcp(logger utils.Logger, iface string) ([]Host, error)

ScanProfinetDcp sends a PROFINET DCP Identify multicast and collects responses.

type Scanner

type Scanner struct {
	NetworkInterface string // The network interface to run the OT scans on, e.g. "eth0"
	// contains filtered or unexported fields
}

Scanner defines the settings required by the OT discovery scan.

func NewScanner

func NewScanner(logger utils.Logger, nwInterface string) (*Scanner, error)

NewScanner creates an OT discovery scanner for the given network interface. Returns an error if the interface name is empty or cannot be found on the host.

func (*Scanner) Run

func (s *Scanner) Run() []Host

Run runs all L2 OT discovery methods and collects results.

Jump to

Keyboard shortcuts

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