broadcasting using UDP

broadcasting using UDP

Post by Saint Joa » Tue, 08 May 2001 08:38:55



hello! i am trying to broadcast using UDP, but get this error:
sendto: Permission denied

If i dont use INADDR_BROADCAST for the ip (ie use a known ip address), it
works fine... is that all u have to change or is there something im missing?
thx!

__SJ

 
 
 

broadcasting using UDP

Post by Barry Margoli » Wed, 09 May 2001 00:20:19




>hello! i am trying to broadcast using UDP, but get this error:
>sendto: Permission denied

>If i dont use INADDR_BROADCAST for the ip (ie use a known ip address), it
>works fine... is that all u have to change or is there something im missing?
>thx!

Did you set the SO_BROADCAST socket option?  You have to do this to inform
the stack that you want to broadcast; otherwise, it doesn't let you send to
the broadcast address.

Have you tried reading the chapter on broadcasting in "Unix Network
Programming, Vol.1"?

--

Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. How do I broadcast using UDP?

I want my server to send the same message to quite a few clients
simultaneously. But since the clients have different addresses?  How can I
do this?  I don't wanna get the address of each of the client and
repeatedly apply sendto for tons of times.  I believe there should be
smarter ways.  How can I handle this, dear guru people?  Thank you very
much.

2. frog3 code -FBI

3. How to receive UDP and ICMP packet using one UDP socket, (Path MTUD)

4. viewing actual available/free diskspace per disk

5. udp broadcast forwarding

6. Xview messages in SunOS 5.4

7. UDP port broadcasting

8. dial on demand

9. UDP broadcast server-client example.

10. code needed for UDP broadcast

11. UDP Broadcasts Doesn't ?????

12. UDP broadcasting & multiple interfaces

13. Socket Programming - Broadcasting with UDP