|
Home > Archive > Unix Programming > April 2006 > sendto : permission denied.. in linux systems
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
sendto : permission denied.. in linux systems
|
|
| xoinki 2006-04-27, 7:55 am |
| hi all,
we are gettin this error when we try to broadcast a datagram over a
subnet.
we have 3 systems in the subnet addressed 192.168.15.1,
192.168.15.2,192.168.15.3
and when we try to send datagrams over the broadcast address
"192.168.15.0" it is giving this permission denied error. but the same
address is working fine for ping command.
pleeze help,
waiting for u r reply,
Xoinki
| |
| Nils O. Selåsdal 2006-04-27, 7:55 am |
| xoinki wrote:
> hi all,
> we are gettin this error when we try to broadcast a datagram over a
> subnet.
> we have 3 systems in the subnet addressed 192.168.15.1,
> 192.168.15.2,192.168.15.3
> and when we try to send datagrams over the broadcast address
> "192.168.15.0" it is giving this permission denied error. but the same
> address is working fine for ping command.
> pleeze help,
> waiting for u r reply,
> Xoinki
>
You need to atleast set the SO_BROADCAST socket option.
| |
| Barry Margolin 2006-04-27, 7:55 am |
| In article <4443b43e$1@news.wineasy.se>,
"Nils O. Selåsdal" <noselasd@asgaard.homelinux.org> wrote:
> xoinki wrote:
> You need to atleast set the SO_BROADCAST socket option.
And the correct broadcast address is 192.168.15.255 (assuming a
255.255.255.0 subnet mask). Many systems allow .0 for compatibility
with a mistake in early TCP/IP RFC's, but .255 is the standard.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
| |
| Rick Jones 2006-04-27, 7:55 am |
| > And the correct broadcast address is 192.168.15.255 (assuming a >
> 255.255.255.0 subnet mask). Many systems allow .0 for compatibility
> with a mistake in early TCP/IP RFC's, but .255 is the standard.
And those that do allow .0 may only accept it as an _inbound_
broadcast, and are not (should not IMO) be willing to source a
broadcast to .0.
rick jones
--
oxymoron n, commuter in a gas-guzzling luxury SUV with an American flag
these opinions are mine, all mine; HP might not want them anyway... 
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
| |
| purple_stars 2006-04-27, 7:55 am |
| and if you're opening a protected port you need to be suid 0 (root) to
do it, ping works because it's set suid 0
Rick Jones wrote:
>
> And those that do allow .0 may only accept it as an _inbound_
> broadcast, and are not (should not IMO) be willing to source a
> broadcast to .0.
>
> rick jones
> --
> oxymoron n, commuter in a gas-guzzling luxury SUV with an American flag
> these opinions are mine, all mine; HP might not want them anyway... 
> feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
|
|
|
|
|