Class DNSDecoder

java.lang.Object
nl.sidnlabs.pcap.decoder.DNSDecoder

public class DNSDecoder extends Object
Decode the dns payload of an UDP or TCP message
  • Constructor Details

    • DNSDecoder

      public DNSDecoder(boolean allowFail)
    • DNSDecoder

      public DNSDecoder(boolean allowFail, boolean partial)
  • Method Details

    • decode

      public Packet decode(Packet packet, byte[] payload, int offset, int length)
      Decode byte[] into a DNS packet
      Parameters:
      packet - the packet that contains all decoded data
      payload - byte[] with raw data to decode
      offset - the offset in the payload to start decoding
      length - the number of bytes to decode
      Returns:
    • reset

      public void reset()
    • printStats

      public void printStats()