|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.protocols.icmp.IcmpSocket
public final class IcmpSocket
This class provides a bridge between the host operating system so that ICMP messages may be sent and received.
| Nested Class Summary | |
|---|---|
static class |
IcmpSocket.Stuff
|
| Constructor Summary | |
|---|---|
IcmpSocket()
Constructs a new socket that is able to send and receive ICMP messages. |
|
| Method Summary | |
|---|---|
void |
close()
This method is used to close and release the resources assocated with the instance. |
static void |
main(java.lang.String[] argv)
|
java.net.DatagramPacket |
receive()
This method is used to receive the next ICMP datagram from the operating system. |
void |
send(java.net.DatagramPacket packet)
This method is used to send the passed datagram using the ICMP transport. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IcmpSocket()
throws java.io.IOException
java.io.IOException - This exception is thrown if the socket fails to be opened
correctly.| Method Detail |
|---|
public final java.net.DatagramPacket receive()
throws java.io.IOException
java.io.IOException - Thrown if an error occurs reading the next ICMP message.
public final void send(java.net.DatagramPacket packet)
throws java.io.IOException
java.io.IOException - Thrown if an error occurs sending the datagram to the
remote host.
java.net.NoRouteToHostException - Thrown if the destination address is a broadcast address.public final void close()
public static void main(java.lang.String[] argv)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||