[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Regarding UDP sockets



On Wed, Apr 12, 2000 at 09:35:02AM +0530, RK Patil wrote:
>     I want to know how to receive the packet sent by this at the client
> running on another machine. I will not know the server address, but i
> have set the server and client port numbers as 2000 and 2001
> respectively.

open a socket, bind it to client;2001 and then do a recvfrom.

>     Right now, At the server side i am getting an error "Send to:
> permission denied"

FreeBSD man pages say:

The option SO_BROADCAST requests permission to send broadcast datagrams
on the socket.  Broadcast was a privileged operation in earlier versions
of the system.

Looking into Linux 2.3.x code, I don't see any access checks. Try your
program as root to see if it works.

	-Arun