Discussion:
receiving and sending packets to 255.255.255.255
(too old to reply)
Edgar Fuß
2011-12-13 20:10:14 UTC
Permalink
Two questions regarding the all-ones aka limited-broadcast aka INADDR_BROADCAST address:

1. Is ist true/documented that I only receive broadcasts directed to that address if I listen on INADDR_ANY aka 0.0.0.0?

2. When I want to send to that address, how do I specify the interface to send on (or network to send to)? I thought that was determined by address the sending socket was bound to, but that seems not to be true.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Dennis Ferguson
2011-12-18 05:53:45 UTC
Permalink
Post by Edgar Fuß
1. Is ist true/documented that I only receive broadcasts directed to that address if I listen on INADDR_ANY aka 0.0.0.0?
2. When I want to send to that address, how do I specify the interface to send on (or network to send to)? I thought that was determined by address the sending socket was bound to, but that seems not to be true.
For 2. try the IP_MULTICAST_IF socket option. I think sending to 255.255.255.255
works the same as sending to 224.0.0.1 (or, at least, it should work the same
way because it is the same problem).

Dennis Ferguson
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...