Thomas Angst wrote:
> I try to send a broadcast UDP packet from a linux C program.
> I can send to every address where I want, but not to the broadcast address.
> What's wrong?
You need to use:
int one = 1;
setsockopt(sock_fd, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one));
to enable broadcasts (they are disabled by default).
--
Glynn Clements <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]
- sending Broadcasts Thomas Angst
- Glynn Clements
