Package nl.sidnlabs.pcap.decoder
Class UDPDecoder
java.lang.Object
nl.sidnlabs.pcap.decoder.UDPDecoder
- All Implemented Interfaces:
Decoder
Decode UDP packets
-
Field Summary
Fields inherited from interface nl.sidnlabs.pcap.decoder.Decoder
PROTOCOL_HEADER_DST_PORT_OFFSET, PROTOCOL_HEADER_SRC_PORT_OFFSET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decode(byte[] packetData) voidreassemble(Packet packet, byte[] packetData) Decode the udp packet, supports reassembly of fragmented packetsvoidreset()
-
Constructor Details
-
UDPDecoder
-
-
Method Details
-
reassemble
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
-
reset
public void reset()
-