udp broadcast

I am using the sendto() function to send a message to all devices on a
network. I want to send to the IP 192.168.x.255 rather than maintaining a
list of devices and looping through them. I get “sendto: Permission denied”.
Is there a linking flag that I could use to get by this or is this possible?

“Doug Rixmann” <rixmannd@rdsdata.com> wrote in message
news:ai42c7$gjk$1@inn.qnx.com

I am using the sendto() function to send a message to all devices on a
network. I want to send to the IP 192.168.x.255 rather than maintaining a
list of devices and looping through them. I get “sendto: Permission
denied”.
Is there a linking flag that I could use to get by this or is this
possible?

You’ll need to do a setsockopt() do get “permission” to do a broadcast.
This is a bsd’ism.
Check out Steven’s book “UNIX Network Programming” for a really good
coverage on socket programming.

\

Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>