Adding PacketLevelSignatureExtractor.
[pingpong.git] / Code / Projects / PacketLevelSignatureExtractor / src / main / java / edu / uci / iotproject / detection / SignatureDetectorObserver.java
diff --git a/Code/Projects/PacketLevelSignatureExtractor/src/main/java/edu/uci/iotproject/detection/SignatureDetectorObserver.java b/Code/Projects/PacketLevelSignatureExtractor/src/main/java/edu/uci/iotproject/detection/SignatureDetectorObserver.java
new file mode 100644 (file)
index 0000000..c2d8e09
--- /dev/null
@@ -0,0 +1,22 @@
+package edu.uci.iotproject.detection;
+
+import org.pcap4j.core.PcapPacket;
+
+import java.util.List;
+
+/**
+ * Used for registering for notifications from a signature detector.
+ *
+ * @author Janus Varmarken {@literal <jvarmark@uci.edu>}
+ * @author Rahmadi Trimananda {@literal <rtrimana@uci.edu>}
+ */
+public interface SignatureDetectorObserver {
+
+    /**
+     * Invoked when the signature detector has detected the presence of a signature in the traffic that it's examining.
+     * @param searchedSignature The signature that the signature detector reporting the match is searching for.
+     * @param matchingTraffic The actual traffic trace that matches the searched signature.
+     */
+    void onSignatureDetected(List<List<List<PcapPacket>>> searchedSignature, List<List<PcapPacket>> matchingTraffic);
+
+}