|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.protocols.icmp.ICMPHeader
org.opennms.protocols.icmp.AddressMaskReply
This is the implementation of an ICMP Address Mask Reply object. The object can be stored in a buffer to send or loaded from a received buffer. The class is marked final since it is not intended to be extended.
Field Summary | |
private int |
m_mask
The address mask |
Constructor Summary | |
AddressMaskReply()
Creates a new ICMP Address Mask Request object. |
|
AddressMaskReply(byte[] buf,
int offset)
Creates a new ICMP Address mask reply from the spcified data at the specific offset. |
Method Summary | |
void |
computeChecksum()
Computes the ones compliment 16-bit checksum for the ICMP message. |
int |
getAddressMask()
Used to get the IPv4 32-bit address mask. |
int |
loadFromBuffer(byte[] buf,
int offset)
Reads the ICMP Address Mask Reqeust from the specified buffer and sets the internal fields equal to the data. |
void |
setAddressMask(int mask)
Used to set the IPv4 32-bit address mask. |
int |
storeToBuffer(byte[] buf,
int offset)
Writes the ICMP address mask reply out to the specified buffer at the starting offset. |
byte[] |
toBytes()
Converts the object to a stream of bytes. |
Methods inherited from class org.opennms.protocols.icmp.ICMPHeader |
byteToInt, byteToShort, computeChecksum, getChecksum, getCode, getIdentity, getNetworkSize, getSequenceId, getType, isEchoReply, isEchoRequest, nextSequenceId, setChecksum, setCode, setIdentity, setNextSequenceId, setSequenceId, setType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int m_mask
Constructor Detail |
public AddressMaskReply()
public AddressMaskReply(byte[] buf, int offset)
buf
- The buffer containing the data.offset
- The start of the icmp data.
java.lang.IndexOutOfBoundsException
- Thrown if there is not sufficent data in the buffer.
java.lang.IllegalArgumentException
- Thrown if the ICMP type is not an Address Mask reply.Method Detail |
public final void computeChecksum()
computeChecksum
in class ICMPHeader
public final int storeToBuffer(byte[] buf, int offset)
storeToBuffer
in class ICMPHeader
buf
- The storage buffer.offset
- The location to start in buf.
java.lang.IndexOutOfBoundsException
- Thrown if the buffer does not have enough storage space.public final int loadFromBuffer(byte[] buf, int offset)
loadFromBuffer
in class ICMPHeader
buf
- The buffer to read the data from.offset
- The offset to start reading data.
java.lang.IndexOutOfBoundsException
- Thrown if there is not sufficent data in the buffer.
java.lang.IllegalArgumentException
- Thrown if the ICMP type is not an Address Mask reply.public final int getAddressMask()
public final void setAddressMask(int mask)
public final byte[] toBytes()
toBytes
in class ICMPHeader
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |