Documentation
¶
Overview ¶
Package discovery finds AmpliFi units on the local network using the Ubiquiti UDP discovery protocol on port 10001.
Index ¶
Constants ¶
View Source
const Port = 10001
Port is the UDP port the Ubiquiti discovery service listens on.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Unit ¶
type Unit struct {
IP netip.Addr
MAC amplifi.MAC
HostName string
Model string
Firmware string
// Strings are the printable string TLVs without a named field.
Strings []string
}
Unit is a unit that answered a discovery probe.
func Probe ¶
Probe sends a probe directly to host and returns its reply, giving up when ctx is done. It is a quick way to learn the name and MAC of a unit whose address is already known. Units answer from an ephemeral port rather than 10001, so any reply from host's address is accepted.
Click to show internal directories.
Click to hide internal directories.