Package org.opennms.jicmp.ip
Class IPPacket
- java.lang.Object
-
- org.opennms.jicmp.ip.IPPacket
-
public class IPPacket extends Object
IPPacket- Author:
- brozow
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIPPacket.Protocol
-
Constructor Summary
Constructors Constructor Description IPPacket(byte[] data, int offset, int length)IPPacket(ByteBuffer buffer)IPPacket(IPPacket p)IPPacket(NativeDatagramPacket datagram)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InetAddressgetDestinationAddress()intgetHeaderLength()Returns the length of the header in bytesByteBuffergetPayload()intgetPayloadLength()IPPacket.ProtocolgetProtocol()InetAddressgetSourceAddress()intgetTimeToLive()intgetVersion()Returns the version of the IP Packet which must be '4'
-
-
-
Constructor Detail
-
IPPacket
public IPPacket(IPPacket p)
-
IPPacket
public IPPacket(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 InetAddress getSourceAddress()
-
getDestinationAddress
public InetAddress getDestinationAddress()
-
getPayload
public ByteBuffer getPayload()
-
getPayloadLength
public int getPayloadLength()
-
-