When trying to determine which network interface is active in macOS can be information overload.
MacOS
unable to determine which network interface to run wireshark to troubleshoot EDPA issues.
the following for loop will list all active network interfaces
for interface in $(networksetup -listallhardwareports | awk '/^Device:/ {print $2}'); do
ip=$(ipconfig getifaddr $interface)
if [ -n "$ip" ]; then
echo "$interface: $ip"
fi
done
this will return <NIC> <IPAddress>
for example
en0: 192.168.1.55