How to ping a machine in a simple way?
Lexy Zhitenev
zhitenev at cs.vsu.ru
Wed May 14 02:01:05 EDT 2003
Hello, Graham!
You wrote on 13 May 2003 19:53:10 -0700:
<snip>
GF> I wonder what you mean by "available?" Perhaps a ping is the wrong
GF> test, depending on what you're planning to do based on the results of
GF> the test.
I'll use one of the shares on this machine (reading and writing) after
'pinging'.
GF> Are the hosts all machines that you manage, or are you looking for a
GF> generic solution for any Internet host?
These are the machines I manage, they are in our domain.
GF> Just out of curiosity, why can't you use raw sockets?
Dunno, perhaps this is something with my domain permissions, I am not an
administrator
??>> My friend in Java just creates a socket on 139 port, and if it fails -
??>> the machine is not available.
GF> Port 139 (netbios-ssn) is certainly not guaranteed to be open on any
GF> given host, nor can any ping-like test to that (or any!) port be
GF> considered reliable when firewalls are brought into play.
This port is guaranteed to be open on the hosts I need to ping in my domain.
With best regards, Lexy Zhitenev. E-mail: zhitenev at cs.vsu.ru
More information about the Python-list
mailing list