"Bad Address" error using recvfrom in cygwin

J

jkvbe

Hi,

I get a "Bad address" error message when trying to receive an ICMP timestamp
packet using recvfrom in cygwin. The packet is OK as I see it arriving when
sniffing the network.

Any ideas what can be wrong?

Thanks,

Jan
 
A

Antoninus Twink

I get a "Bad address" error message when trying to receive an ICMP timestamp
packet using recvfrom in cygwin. The packet is OK as I see it arriving when
sniffing the network.

Any ideas what can be wrong?

Bad address means you've passed the function memory you don't own. How
that's happened is impossible to guess without seeing your code - why
not post a short snippet showing how you're calling the function? Or,
double-check that the buffer and from address really exist somewhere in
memory, and that you've passed their sizes correctly.
 
W

Willem

Antoninus Twink wrote:
) On 4 Jul 2008 at 6:29, jkvbe wrote:
)> I get a "Bad address" error message when trying to receive an ICMP timestamp
)> packet using recvfrom in cygwin. The packet is OK as I see it arriving when
)> sniffing the network.
)>
)> Any ideas what can be wrong?
)
) Bad address means you've passed the function memory you don't own.

Or a pointer that isn't aligned properly, perhaps ?

) How
) that's happened is impossible to guess without seeing your code - why
) not post a short snippet showing how you're calling the function? Or,
) double-check that the buffer and from address really exist somewhere in
) memory, and that you've passed their sizes correctly.

Agreed.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
N

Nick Keighley

I get a "Bad address" error message when trying to receive an ICMP timestamp
packet using recvfrom in cygwin. The packet is OK as I see it arriving when
sniffing the network.

Any ideas what can be wrong?

you posted to the wrong news group. recvfrom() is not a standard C
function
(that is is it does not appear in the C standard). Please repost in a
group
wher eit is more relevent. maybe a unix group or a cygwin group (the
answers
will be better as well).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top