interfaces
List network interfaces usable for discovery
go-udap interfaces [--format text|json|csv | --json]What it does
Lists every local network interface that's usable for UDAP discovery.
Filter applied: Up + Broadcast + !Loopback + has IPv4 address. The
output gives you the NAME values you can pass to --bind-interface.
Output
The default text format is a fixed-column table:
NAME INDEX ADDRESS BROADCAST
en0 14 192.168.1.118 192.168.1.255
en7 31 192.168.1.226 192.168.1.255The BROADCAST column is the subnet's directed-broadcast address.
It's informational only — UDAP discovery sends to limited broadcast
255.255.255.255 regardless (see
How UDAP discovery works
for the why).
With --json (or -o json), an array with one object per interface.
address and broadcast are null when absent:
[{"name":"en0","index":14,"address":"192.168.1.118","broadcast":"192.168.1.255"}]With -o csv, a header row and one row per interface. A null value
is an empty cell:
name,index,address,broadcast
en0,14,192.168.1.118,192.168.1.255When no interface qualifies, stderr says no usable interfaces found
and stdout is empty for text, [] for json, and the header row
alone for csv.
The JSON keys and CSV columns are a stable contract: none will be removed or renamed without a major version. New ones may be added. See Output formats.
Flags
| Flag | Default | Description |
|---|---|---|
--format FORMAT, -o | text | Output format: text, json or csv |
--json | off | Shorthand for --format json |
Exit codes
0— success (even if zero interfaces qualify)1— OS enumeration error2— unknown or invalid flag (including a format name other thantext,jsonorcsv),--jsonwith--format, or a stray argument