Re: Do UDP broadcasts work in FreeBSD?

2009-01-08 Thread Pieter de Goeje
On Tuesday 06 January 2009 17:49:49 Peter Steele wrote: Our efforts so far indicate the answer is no, which baffles us. We want to send a limited broadcast to 255.255.255.255 but the message never arrives. The same code works fine under Linux. Is there a trick for doing this kind of thing

RE: Do UDP broadcasts work in FreeBSD?

2009-01-08 Thread Peter Steele
Did you enable SO_BROADCAST and IP_ONESBCAST on the socket? I remember needing this on FreeBSD but not on Linux. Yes we did, but... I know UDP broadcasting works fine, but is somewhat more involved: addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr(130.89.191.255); addr.sin_port =

RE: Do UDP broadcasts work in FreeBSD?

2009-01-08 Thread Peter Steele
why 255.255.255.255 not your net broadcast address? Because the systems we are using do not have IPs assigned and you to know your subnet before you can use subnet broadcasting. We're developing our own DHCP-like service to distribute IPs to all of the systems, and we need limited broadcast to

Do UDP broadcasts work in FreeBSD?

2009-01-06 Thread Peter Steele
Our efforts so far indicate the answer is no, which baffles us. We want to send a limited broadcast to 255.255.255.255 but the message never arrives. The same code works fine under Linux. Is there a trick for doing this kind of thing under FreeBSD?

Re: Do UDP broadcasts work in FreeBSD?

2009-01-06 Thread Wojciech Puchar
why 255.255.255.255 not your net broadcast address? On Tue, 6 Jan 2009, Peter Steele wrote: Our efforts so far indicate the answer is no, which baffles us. We want to send a limited broadcast to 255.255.255.255 but the message never arrives. The same code works fine under Linux. Is there a

Re: Do UDP broadcasts work in FreeBSD?

2009-01-06 Thread Chuck Swiger
On Jan 6, 2009, at 8:49 AM, Peter Steele wrote: Our efforts so far indicate the answer is no, which baffles us. We want to send a limited broadcast to 255.255.255.255 but the message never arrives. The same code works fine under Linux. Is there a trick for doing this kind of thing under

RE: Do UDP broadcasts work in FreeBSD?

2009-01-06 Thread Peter Steele
What you're trying to do with sending to the all-ones broadcast address is known as sending a link-local packet. On some systems, sending a UDP packet to 255.255.255.255 will actually cause a packet with that destination to be generated from all network interfaces which are UP. That

RE: Do UDP broadcasts work in FreeBSD?

2009-01-06 Thread Peter Steele
I've already looked at the ISC DHCP source code. They use raw sockets to send their broadcasts, which seems to us to be a convoluted way of sending a simple broadcast. I've seen examples of DHCP client/server code written in Java using standard UDP. Unfortunately, our own system is already