Instead on broadcasting on all interfaces, zbeacon need to choose the best interface to use and only broadcast on it:
if source is any (INADDR_ANY) then it choose broadcast to INADDR_BROADCAST ie 255.255.255.255 on port, address == broadcast
from a list of broadcast address, pick one from it.
for all interfaces:
get interfaces that are running
ignore loopback
test if accept broadcast
ignore point to point interfaces
ignore bounding slaves
if source is given and == interface name:
return it
if no source interface:
if not found interfaces:
use latest address
broadcast to AF_INET INADDR_BROADCAST on port
else:
address = broadcast interface address
Instead on broadcasting on all interfaces, zbeacon need to choose the best interface to use and only broadcast on it:
any
(INADDR_ANY
) then it choose broadcast toINADDR_BROADCAST
ie255.255.255.255
on port, address == broadcastfrom a list of broadcast address, pick one from it.
for all interfaces:
if source is given and == interface name: return it
if no source interface: if not found interfaces: use latest address broadcast to AF_INET INADDR_BROADCAST on port else: address = broadcast interface address