public class IPDecoder extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
IP_FLAGS |
static int |
IP_FRAGMENT_OFFSET |
static int |
IP_PROTOCOL_VERSION_4 |
static int |
IP_PROTOCOL_VERSION_6 |
static int |
IP_TOTAL_LEN_OFFSET |
| Constructor and Description |
|---|
IPDecoder(Decoder tcpReader,
Decoder udpReader,
ICMPDecoder icmpDecoder) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache(int ipFragmentTTL)
Clear expired cache entries in order to avoid memory problems
|
Packet |
createPacket(byte[] packetData,
int ipStart) |
Packet |
decode(byte[] packetData,
int ipStart,
long packetTimestampSecs,
long packetTimestampMicros) |
com.google.common.collect.Multimap<Datagram,DatagramPayload> |
getDatagrams() |
byte[] |
reassemble(Packet packet,
byte[] packetData)
Reassemble the IP packet is it is fragmented.
|
void |
setDatagrams(com.google.common.collect.Multimap<Datagram,DatagramPayload> datagrams) |
public static final int IP_PROTOCOL_VERSION_4
public static final int IP_PROTOCOL_VERSION_6
public static final int IP_TOTAL_LEN_OFFSET
public static final int IP_FLAGS
public static final int IP_FRAGMENT_OFFSET
public IPDecoder(Decoder tcpReader, Decoder udpReader, ICMPDecoder icmpDecoder)
public Packet decode(byte[] packetData, int ipStart, long packetTimestampSecs, long packetTimestampMicros)
public Packet createPacket(byte[] packetData, int ipStart)
public byte[] reassemble(Packet packet, byte[] packetData)
packet - the current packetpacketData - the payload of the current packetpublic com.google.common.collect.Multimap<Datagram,DatagramPayload> getDatagrams()
public void setDatagrams(com.google.common.collect.Multimap<Datagram,DatagramPayload> datagrams)
public void clearCache(int ipFragmentTTL)
ipFragmentTTL - timeout for IP fragmentsCopyright © 2020. All rights reserved.