In article <480de79d.0307030820.7b959e89posting.google.com >,
Chris Ritchey <rethnor> wrote:It looks like you didn't post the correct code, I don't see any calls to>I'll post the code at the bottom of the post. Whenever I try to
recvfrom() in the excerpt.
Sounds like you passed an uninitialized pointer as the buffer argument>retreive a udp packet sent via broadcast I get the errorcode
>EFAULT(bad address). The same program sends out the packets without
If it returns the number of bytes, then how can it also be reporting an>any complaints but it fails when retreiving, I'm lost as to why it
>would report this error. It returns the number of bytes correctly but
error code? Errno is only meaningful if recvfrom() returns -1.
I don't understand this at all. Buffer is an input parameter, not an>returns the char* buffer as NULL. Any help would be appriciated and I
output parameter. You have to pass in the pointer to the place where you
want the data written.
Have you looked at the sample code in Unix Network Programming, Vol.1?>wouldn't be supprised if I was just missing something simple with
>broacasting as I am still learning some aspects of socket
>programiing.Thanks in advance to all whom reply and here is the code:
Barry Margolin, [email]barry.margolinlevel3.com[/email]
Level(3), Woburn, 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.