local host does not see broadcast on OS X

Dar Scott dsc at swcp.com
Thu Aug 28 18:16:01 EDT 2003


On Wednesday, August 27, 2003, at 02:50 PM, Dar Scott wrote:

> I have a small sockets stack that listens on a UDP port (accept) and 
> sends datagrams to that port on an IP address.  If the address is 
> broadcast, the behavior is not consistent among platforms tested.  
> This applies whether the broadcast is general (255.255.255.255) or 
> subnet specific (for example, 10.99.255.255)
>
> If the local computer is included in the broadcast specification 
> (which it always is in the general broadcast), the datagram is 
> received on Windows XP and on Mac OS 9.2.  But it is not on OS X.
>
> To my thinking the OS X behavior is goofy.

After looking at 'route get' and netstat and ifconfig, I suspect this 
may be a routing problem (and perhaps involves politics, philosophy, 
pragmatics and literacy).

If I do a 'route get' on the general broadcast IP address or my local 
subnet broadcast address, only the ethernet adaptor shows up (en0), the 
local host does not (lo0).

In the host file 255.255.255.255 is routed to broadcasthost whatever 
that is.  I did notice that a device can have a BROADCAST flag set in 
ifconfig, so broadcasthost might forward to all devices with that flag 
set.  Device lo0 does not have it set.

The subnet broadcast is handled elsewhere.  A netstat -r shows the 
subnet broadcast routed to en0 and does not include an entry for lo0.

The consistency seems to indicate policy.  (A policy that is in 
violation of the meaning of broadcast addresses.)

So...

I'm still not sure.  Can anyone confirm that this is a routing problem?

If so, my strategy is to find a workaround rather than bother RunRev.  
If I have users fiddle with routing I might break something.

Does this also happen on Linux?

Dar Scott






More information about the use-livecode mailing list