All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.sidnlabs.pcap.decoder.Decoder Maven / Gradle / Ivy

There is a newer version: 0.2.24
Show newest version
package nl.sidnlabs.pcap.decoder;

import nl.sidnlabs.pcap.PcapReader;
import nl.sidnlabs.pcap.packet.Packet;

public interface Decoder {

  int PROTOCOL_HEADER_SRC_PORT_OFFSET = 0;
  int PROTOCOL_HEADER_DST_PORT_OFFSET = 2;

  Packet reassemble(Packet packet, byte[] packetData);

  default boolean isDNS(Packet packet) {
    return packet.getSrcPort() == PcapReader.DNS_PORT || packet.getDstPort() == PcapReader.DNS_PORT;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy