Further cleaning up.
[pingpong.git] / Code / Projects / PacketLevelSignatureExtractor / src / main / java / edu / uci / iotproject / detection / layer2 / Layer2SignatureDetector.java
index 1984e7b..57685f3 100644 (file)
@@ -121,15 +121,12 @@ public class Layer2SignatureDetector implements PacketListener, ClusterMatcherOb
                 int id = Integer.parseInt(stringTokenizerOff.nextToken());
                 packetSet.add(id);
             }
-        } else {
-            System.out.println(errMsg);
-            System.out.println(optParamsExplained);
-            return;
         }
-
         // Parse optional parameters.
         List<Function<Layer2Flow, Boolean>> onSignatureMacFilters = null, offSignatureMacFilters = null;
         String vpnClientMacAddress = null;
+        // TODO: Currently the skipped packets implementation is not activated.
+        // TODO: We looked into limiting the number of skipped packets to declare a signature match at layer-2.
         int onMaxSkippedPackets = -1;
         int offMaxSkippedPackets = -1;
         final int optParamsStartIdx = 8;
@@ -183,10 +180,6 @@ public class Layer2SignatureDetector implements PacketListener, ClusterMatcherOb
         // Check if we should use range-based matching
         boolean isRangeBasedForOn = PcapPacketUtils.isRangeBasedMatching(onSignature, eps, offSignature);
         boolean isRangeBasedForOff = PcapPacketUtils.isRangeBasedMatching(offSignature, eps, onSignature);
-        // TODO: WE DON'T DO RANGE-BASED FOR NOW BECAUSE THE RESULTS ARE TERRIBLE FOR LAYER 2 MATCHING
-        // TODO: THIS WOULD ONLY WORK FOR SIGNATURES LONGER THAN 2 PACKETS
-//        boolean isRangeBasedForOn = false;
-//        boolean isRangeBasedForOff = false;
         // Update the signature with ranges if it is range-based
         if (isRangeBasedForOn) {
             onSignature = PcapPacketUtils.useRangeBasedMatching(onSignature, onClusterAnalysis);