in reply to UDP broadcast using IO::Socket under Linux
Are you sure that 192.168.0.255 is your broadcast address? Under some OSes, you need to send your packet to 255.255.255.255 in order to send a broadcast packet. An easy way to test this is:
bash# ping 192.168.0.255 ... bash# arp -a | egrep 192.168.0.255 ? (192.168.0.255) ff:ff:ff:ff:ff:ff
You can easily see which broadcast address to use with:
bash$ ifconfig eth0 | egrep -i broadcast
However, I think there's no absolutely portable way to get to this information... All this said, you should really look into using multicast packets. Broadcasts have proven not scalable many times.
Best regards
-lem, but some call me fokat
|
|---|