Package org.opennms.jicmp.ip
Class IPPacket
- java.lang.Object
-
- org.opennms.jicmp.ip.IPPacket
-
public class IPPacket extends java.lang.Object
IPPacket- Author:
- brozow
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IPPacket.Protocol
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.InetAddress
getDestinationAddress()
int
getHeaderLength()
Returns the length of the header in bytesjava.nio.ByteBuffer
getPayload()
int
getPayloadLength()
IPPacket.Protocol
getProtocol()
java.net.InetAddress
getSourceAddress()
int
getTimeToLive()
int
getVersion()
Returns the version of the IP Packet which must be '4'
-
-
-
Constructor Detail
-
IPPacket
public IPPacket(IPPacket p)
-
IPPacket
public IPPacket(java.nio.ByteBuffer buffer)
-
IPPacket
public IPPacket(byte[] data, int offset, int length)
-
IPPacket
public IPPacket(NativeDatagramPacket datagram)
-
-
Method Detail
-
getVersion
public int getVersion()
Returns the version of the IP Packet which must be '4'
-
getHeaderLength
public int getHeaderLength()
Returns the length of the header in bytes
-
getTimeToLive
public int getTimeToLive()
-
getProtocol
public IPPacket.Protocol getProtocol()
-
getSourceAddress
public java.net.InetAddress getSourceAddress()
-
getDestinationAddress
public java.net.InetAddress getDestinationAddress()
-
getPayload
public java.nio.ByteBuffer getPayload()
-
getPayloadLength
public int getPayloadLength()
-
-