[Tutor] Python ICMP

Modulok modulok at gmail.com
Fri Nov 6 21:56:15 CET 2009


[snip]
...
(code from OP)
...
[/snip]

> However, there is one small problem. It works on Windows, but not on Linux.
> When I run this on Linux, the host sends the requests but never gets a
> response. Not one. I've compared the output from both hosts in Wireshark and
> the only difference I see is the identification field in the IP header.
> Packets frmo Linux show 0 but packets from Windows have an incrementing
> number.
>
> I'd like to have this working on both. I prefer this code since it's pure
> Python, doesn't shell out (popen) and I can call/import it into another
> program.
>
> Any ideas?

I haven't read through the code, but something you might try if you
haven't already just to rule out other potential problems:

- Try to use the system command ping(8) from a command shell like bash
or tcsh, as the the same userID as your program will be running at:

   (tcsh shell prompt)> ping -c 3 www.google.com

If that doesn't get a response, you likely have a firewall issue.

Just a thought.
-Modulok-


More information about the Tutor mailing list