public class IPPacket extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IPPacket.Protocol |
Constructor and Description |
---|
IPPacket(byte[] data,
int offset,
int length) |
IPPacket(ByteBuffer buffer) |
IPPacket(IPPacket p) |
IPPacket(NativeDatagramPacket datagram) |
Modifier and Type | Method and Description |
---|---|
InetAddress |
getDestinationAddress() |
int |
getHeaderLength()
Returns the length of the header in bytes
|
ByteBuffer |
getPayload() |
int |
getPayloadLength() |
IPPacket.Protocol |
getProtocol() |
InetAddress |
getSourceAddress() |
int |
getTimeToLive() |
int |
getVersion()
Returns the version of the IP Packet which must be '4'
|
public IPPacket(IPPacket p)
public IPPacket(ByteBuffer buffer)
public IPPacket(byte[] data, int offset, int length)
public IPPacket(NativeDatagramPacket datagram)
public int getVersion()
public int getHeaderLength()
public int getTimeToLive()
public IPPacket.Protocol getProtocol()
public InetAddress getSourceAddress()
public InetAddress getDestinationAddress()
public ByteBuffer getPayload()
public int getPayloadLength()
Copyright © 2021. All rights reserved.