Hi,
I was doing a research looking for Java solutions that are able to do
"ping".
I found old messages (and not so old ones), telling that Java was not
able to do that, because the API provided do not support raw sockets.
The only solution that I found was a "simulation " of a ping program
doing a UDP request to a server on port 7.
So I decided to read the API (1.4.2) and I found that the package
"java.net" is able to send ICMP packets.
Actually, and this is my question, I only found an exception that:
"Signals that an ICMP Port Unreachable message has been received on a
connected datagram."
(http://java.sun.com/j2se/1.4.2/docs/...xception.html).
Well, if the package has a exception for ICMP, I can supose that now I
am able to talk ICMP using Java
(http://java.sun.com/j2se/1.4.2/docs/...amSocket.html).
Am I right?
And finally: does someone did something related to this, using the new
api? Is it possible to post an example?
Thanks,
Bob Rivers
Sao Paulo - Brazil
I was doing a research looking for Java solutions that are able to do
"ping".
I found old messages (and not so old ones), telling that Java was not
able to do that, because the API provided do not support raw sockets.
The only solution that I found was a "simulation " of a ping program
doing a UDP request to a server on port 7.
So I decided to read the API (1.4.2) and I found that the package
"java.net" is able to send ICMP packets.
Actually, and this is my question, I only found an exception that:
"Signals that an ICMP Port Unreachable message has been received on a
connected datagram."
(http://java.sun.com/j2se/1.4.2/docs/...xception.html).
Well, if the package has a exception for ICMP, I can supose that now I
am able to talk ICMP using Java
(http://java.sun.com/j2se/1.4.2/docs/...amSocket.html).
Am I right?
And finally: does someone did something related to this, using the new
api? Is it possible to post an example?
Thanks,
Bob Rivers
Sao Paulo - Brazil
Comment