473,804 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Bad Address" error using recvfrom in cygwin



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

Jul 4 '08 #1
3 6115
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. 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.

Jul 4 '08 #2
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
Jul 4 '08 #3
On 4 Jul, 07:29, "jkvbe" <jkvbeNOS...@ya hoo.comwrote:
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

Jul 4 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3376
by: Mange | last post by:
I'm using WebRequest class to access a PHP script, but keep getting a 400 error from the server when calling the GetResponse() method. I have added the url to the script in the bypass list in machine.config to bypass the proxy server for this request, so it should not be a proxy issue. Also, I tried to run the same code in a Windows app, to see if it had to do with user credentials but no luck there. The script can be accessed with IE...
1
2395
by: joemynz | last post by:
Help please with a URLError. Invoking a url that works in Firefox and IE results in a "urlerror 7, no address ..." in python. I need to debug why. Traceback is below. There's a redirect when the url is invoked (it's part of a chain) - you can see it using liveheaders in firefox. What is the best way to debug this? I tried setting debug on HTTPConnection but this doesn't work (from some web posts, setting debug is broken in 2.4). What's...
9
14071
bonski
by: bonski | last post by:
hello everybody.. i just want to know what this error means... Error: mail() : SMTP server response: 501 #5.1.1 bad address the smtp set up was correct.. valid emails... and port. so im just wondering why this error still occurs. looking forward for your suggestions.. thanks!
4
6234
by: floppyzedolfin | last post by:
Hello! I'm actually encoding an encryption / decryption program. The encryption programes takes a file path in parameter, and encrypts the contents of the file and stores that into another file. I'm using AES for it is quick, and RSA to encrypt AES, to transmit AES keys (it'll run on two separate computers). Please notice that - this is my first C# code :)
0
3242
by: =?Utf-8?B?bm9ubmI=?= | last post by:
Hi Have I missed something obvious, or is there no way to use the "BaseAddress" pattern in a WCF (.NET 3.0) client configuration file, similar to that offered on the WCF Server? IMHO this would make the transition from Dev to QA etc versions of WCF servers much simpler.
1
1275
by: maikins | last post by:
I am new to SQL Server 2005. We have a membership managment console using an SQL datatbase and I would like to find out how to write a query or several queries that would bring back instances where "bad data" is achieved from the database when a certain query is submitted. Any guidance would be sincerely appreciated.
16
9242
by: lawrence k | last post by:
I've never before written a PHP script to run on my home Ubuntu machine (though I've written dozens of PHP cron jobs for my web server), so I thought I'd start off with a very simple test: #!/usr/share/php5 <?php echo "hello"; ?>
6
8029
by: James Yang | last post by:
"bad page", especially in table, is a risk for database maintenance. The particular access attempt for corrupt blocks may not occur often, and corrupt DB2 blocks are not recognized during a database backup, corrupt blocks can remain undetected in an UDB system for a long time. The potential solution is: 1) Restore from a GOOD backup and rollforward (Recommended). The problem is backup normally is kept for 30 days so we must find the...
0
1713
tharini
by: tharini | last post by:
Whenever i run my SMS API code,am getting the error " Bad Request HTTP Error 400.The Request is badly formed". When i store a particular mobile number in database and send sms to that mobile no.,the msg is sent successfully only for few times after that am getting the above mentioned error msg. I dont understand why the msg is not sent to the same mobile number few days after storing in databese...I have given my sms code below.Can anyone...
0
9714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10350
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10351
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10096
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6866
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.