Package nl.sidnlabs.pcap.decoder
Class UDPDecoder
- java.lang.Object
-
- nl.sidnlabs.pcap.decoder.UDPDecoder
-
-
Field Summary
-
Fields inherited from interface nl.sidnlabs.pcap.decoder.Decoder
PROTOCOL_HEADER_DST_PORT_OFFSET, PROTOCOL_HEADER_SRC_PORT_OFFSET
-
-
Constructor Summary
Constructors Constructor Description UDPDecoder(DNSDecoder dnsDecoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decode(byte[] packetData)voidprintStats()Packetreassemble(Packet packet, byte[] packetData)Decode the udp packet, supports reassembly of fragmented packetsvoidreset()
-
-
-
Constructor Detail
-
UDPDecoder
public UDPDecoder(DNSDecoder dnsDecoder)
-
-
Method Detail
-
reassemble
public Packet reassemble(Packet packet, byte[] packetData)
Decode the udp packet, supports reassembly of fragmented packets- Specified by:
reassemblein interfaceDecoder- Parameters:
packet- the packet to reassemblepacketData- bytes to decode- Returns:
- payload bytes or null if not a valid packet
-
decode
public byte[] decode(byte[] packetData)
-
printStats
public void printStats()
- Specified by:
printStatsin interfaceDecoder
-
-