Re: UDP Broadcasts not delivered to IP address
From: Detlef Vollmann
Date: Mon Mar 05 2007 - 16:35:21 EST
Charlie Brady wrote:
> On Mon, 5 Mar 2007, Detlef Vollmann wrote:
> > if I create a UDP socket, use setsockopt(SO_BROADCAST) to
> > allow broadcasts to come in, and bind to the IP address of my
> > interface, I don't receive any UDP broadcasts.
> Broadcasts will be addressed to the broadcast address.
True, which in my case is 255.255.255.255 (local broadcast).
The point is that this broadcast should be delivered to all
IP addresses in the same subnet (in my case e.g. 192.168.100/24).
But my socket only receives it if it is bound to INADDR_ANY
(which is internally 0.0.0.0), but not if bound to 192.168.100.100
(which is a random address in said subnet).
Detlef Vollmann vollmann engineering gmbh
Linux and C++ for Embedded Systems http://www.vollmann.ch/
Linux for PXA270 Colibri module: http://www.vollmann.ch/en/colibri/
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html