org.opennms.jicmp.ip
Class ICMPPacket
java.lang.Object
org.opennms.jicmp.ip.ICMPPacket
- Direct Known Subclasses:
- ICMPEchoPacket
public class ICMPPacket
- extends Object
ICMPPacket
- Author:
- brozow
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CHECKSUM_INDEX
public static final int CHECKSUM_INDEX
- See Also:
- Constant Field Values
ICMPPacket
public ICMPPacket(ByteBuffer ipPayload)
ICMPPacket
public ICMPPacket(ICMPPacket icmpPacket)
ICMPPacket
public ICMPPacket(int size)
getType
public ICMPPacket.Type getType()
setType
public void setType(ICMPPacket.Type t)
getCode
public int getCode()
setCode
public void setCode(int code)
getChecksum
public int getChecksum()
setChecksum
public void setChecksum()
computeChecksum
public int computeChecksum()
setBytes
public void setBytes(int index,
byte[] b)
- Parameters:
index - The byte offset into the packet where the bytes will
be inserted
makeUnsignedShort
public int makeUnsignedShort(byte b1,
byte b0)
getUnsignedShort
public int getUnsignedShort(int index)
- Parameters:
index - The byte offset into the packet where the value
can be found
setUnsignedShort
public void setUnsignedShort(int index,
int us)
- Parameters:
index - The byte offset into the packet where the value
can be foundus - Unsigned short value to insert into the buffer
toDatagramPacket
public NativeDatagramPacket toDatagramPacket(InetAddress destinationAddress)
Copyright © 2011. All Rights Reserved.