I am trying to broadcast a small message on my lan using a udp broadcast
message and everytime I try the sendto method returns and errno of (13) ie.
permission denied.
anybody got any ideas on why I would get this error message.
I am trying to broadcast a small message on my lan using a udp broadcast
message and everytime I try the sendto method returns and errno of (13) ie.
permission denied.
anybody got any ideas on why I would get this error message.
Hi Freddy,
Did you set the SO_BROADCAST option on the socket? See
getsockopt()/setsockopt()
for details.
Regards,
Barry F.
freddy <lmccambley@excalibur.com> wrote in message
news:b2b1vm$4qq$1@inn.qnx.com…
I am trying to broadcast a small message on my lan using a udp broadcast
message and everytime I try the sendto method returns and errno of (13)
ie.
permission denied.anybody got any ideas on why I would get this error message.
\
yes I did.
but thanks for the hint.
“OS Support” <os@qnx.com> wrote in message news:b2b4af$5tj$1@nntp.qnx.com…
Hi Freddy,
Did you set the SO_BROADCAST option on the socket? See
getsockopt()/setsockopt()
for details.Regards,
Barry F.freddy <> lmccambley@excalibur.com> > wrote in message
news:b2b1vm$4qq$> 1@inn.qnx.com> …
I am trying to broadcast a small message on my lan using a udp broadcast
message and everytime I try the sendto method returns and errno of (13)
ie.
permission denied.anybody got any ideas on why I would get this error message.
\
shooting in blind Did you tell setsockopt() the forth argument is one
before calling it?
{
int one=1; ← set it 1 before calling setsockopt()
if( setsockopt(socket-fd, so-level, so-broadcast, &one, sizeof(one))
failed …
…
}
A few snip of code may be helpful, …
Weijie
“freddy” <lmccambley@excalibur.com> wrote in message
news:b2b4fv$7rn$1@inn.qnx.com…
yes I did.
but thanks for the hint.“OS Support” <> os@qnx.com> > wrote in message
news:b2b4af$5tj$> 1@nntp.qnx.com> …
Hi Freddy,Did you set the SO_BROADCAST option on the socket? See
getsockopt()/setsockopt()
for details.Regards,
Barry F.freddy <> lmccambley@excalibur.com> > wrote in message
news:b2b1vm$4qq$> 1@inn.qnx.com> …
I am trying to broadcast a small message on my lan using a udp
broadcast
message and everytime I try the sendto method returns and errno of
(13)
ie.
permission denied.anybody got any ideas on why I would get this error message.
\
No, I was using a zero.
I changed it to a one and now it works beautifully !!
thank you very much !!
nice shot in the blind by the way…
Freddy…
“Weijie Zhang” <wzhang@qnx.com> wrote in message
news:b2b9p7$9en$1@nntp.qnx.com…
shooting in blind > > Did you tell setsockopt() the forth argument is one
before calling it?{
int one=1; ← set it 1 before calling setsockopt()
if( setsockopt(socket-fd, so-level, so-broadcast, &one, sizeof(one))
failed …
…
}A few snip of code may be helpful, …
Weijie
“freddy” <> lmccambley@excalibur.com> > wrote in message
news:b2b4fv$7rn$> 1@inn.qnx.com> …
yes I did.
but thanks for the hint.“OS Support” <> os@qnx.com> > wrote in message
news:b2b4af$5tj$> 1@nntp.qnx.com> …
Hi Freddy,Did you set the SO_BROADCAST option on the socket? See
getsockopt()/setsockopt()
for details.Regards,
Barry F.freddy <> lmccambley@excalibur.com> > wrote in message
news:b2b1vm$4qq$> 1@inn.qnx.com> …
I am trying to broadcast a small message on my lan using a udp
broadcast
message and everytime I try the sendto method returns and errno of
(13)
ie.
permission denied.anybody got any ideas on why I would get this error message.
\