Connecting Tech Pros Worldwide Forums | Help | Site Map

"Bad Address" error using recvfrom in cygwin

jkvbe
Guest
 
Posts: n/a
#1: Jul 4 '08


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




Antoninus Twink
Guest
 
Posts: n/a
#2: Jul 4 '08

re: "Bad Address" error using recvfrom in cygwin


On 4 Jul 2008 at 6:29, jkvbe wrote:
Quote:
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.

Willem
Guest
 
Posts: n/a
#3: Jul 4 '08

re: "Bad Address" error using recvfrom in cygwin


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
Nick Keighley
Guest
 
Posts: n/a
#4: Jul 4 '08

re: "Bad Address" error using recvfrom in cygwin


On 4 Jul, 07:29, "jkvbe" <jkvbeNOS...@yahoo.comwrote:
Quote:
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).

--
Nick Keighley

Closed Thread