[ale] sendto: Invalid Argument
Bob's ALE Mail
transam at cavu.com
Fri Jan 19 10:41:40 EST 2001
Chris,
I did take a careful look at your code since I've a lot of experience with
this kind of thing. I did not see any obvious errors. You seem to be
correctly converting the address and port to network order (big endian as I
recall).
If you still haven't solved the problem, I suggest that you use either
printf() commands or a debugger to see what values all of your arguments
to sendto() are just before the sendto. You should look into the DDD
debugger. It is, IMHO, the best debugger around and the best use of
GUI I've ever seen.
Also, try putting a sleep(60) in the program just before the sendto() and
after any printf() commands and at that point use netstat to verify that
the program does have that port open and with expected values.
While it does not matter for this situation, I find that often networking
code has timing sensitivities that preclude the use of debuggers. In other
words, by the time you react to the breakpoint the other side already has
timed out and that connection is broken.
For this reason, I find using printf() with the entire session captured by
script(I), with the results printed to paper, is the way to go.
Bob Toxen
transam at cavu.com [Bob's ALE Bulk email]
bob at cavu.com
http://www.cavu.com
http://www.realworldlinuxsecurity.com/ [My new book: Real World Linux Security]
http://www.cavu.com/sunset.html [Sunset Computer]
Fly-By-Day Consulting, Inc. "Don't go with a fly-by-night outfit!"
Quality Linux & UNIX security and software consulting since 1990.
GPG Public key available at http://www.cavu.com/pubkey.txt (book at cavu.com)
pub 1024D/E3A1C540 2000-06-21 Bob Toxen <book at cavu.com>
Key fingerprint = 30BA AA0A 31DD B68B 47C9 601E 96D3 533D E3A1 C540
sub 2048g/03FFCCB9 2000-06-21
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list