On 18/08/2016 21:55, Ryan Stone wrote:
On Thu, Aug 18, 2016 at 4:48 PM, Paul A. Procacci <pproca...@datapipe.com>
wrote:

You should be able to ping the local subnet.
Alternatively you can use net/arping.

~Paul


I'm specifically looking to test the handling of 255.255.255.255, so a
local broadcast address is out.  Unfortunately, arping doesn't seem to do
the right thing on FreeBSD.  It manages to get the kernel to try arp'ing
for 255.255.255.255.

This very likely comes under the heading of "horrible bodges" but when I needed to do this, after much experimenting I added a static route to 255.255.255.0/24 pointing to the local LAN broadcast address.

For example, on a machine with address 192.168.10.10/24 the "fix" would be:
route add 255.255.255.0/24 192.168.10.255

My code could then happily send UDP to 255.255.255.255 without issue, and the packets make it out onto the wire with a broadcast destination MAC address.

This was under 10.1-RELEASE; things may have changed that make it no longer work.

I did warn you that it came under the heading of "horrible bodges" :)

Paul.
_______________________________________________
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to