|
OpenNMS API 1.1.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.protocols.icmp.IcmpSocket
This class provides a bridge between the host operating system so that ICMP messages may be sent and received.
| Field Summary | |
private java.io.FileDescriptor |
m_rawFd
This instance is used by the native code to save and store file descriptor information about the icmp socket. |
| 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. |
private void |
initSocket()
This method is used to open the initial operating system icmp socket. |
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 |
| Field Detail |
private java.io.FileDescriptor m_rawFd
| 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 |
private void initSocket()
throws java.io.IOException
java.io.IOException - This is thrown if an
error occurs opening the ICMP socket.
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()
|
OpenNMS API 1.1.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||