Changing the mechanism to count and correlate skipped packets.
[pingpong.git] / Code / Projects / PacketLevelSignatureExtractor / src / main / java / edu / uci / iotproject / detection / layer3 / Layer3ClusterMatcher.java
index 398ac1e948cdb1e1da3dce1bc47738683bddea5f..165cdb3e57f68de4319504a3fee4e15cd4efc34e 100644 (file)
@@ -132,12 +132,8 @@ public class Layer3ClusterMatcher extends AbstractClusterMatcher implements Pack
                     isPresent()) {
                 List<PcapPacket> matchSeq = match.get();
                 // Notify observers about the match.
+                // Max number of skipped packets in layer 3 is 0 (no skipped packets)
                 mObservers.forEach(o -> o.onMatch(Layer3ClusterMatcher.this, matchSeq));
-//                if (!matchSeq.get(matchSeq.size()-1).getTimestamp().isAfter(matchSeq.get(0).getTimestamp().
-//                        plusMillis(mInclusionTimeMillis))) {
-//                    // Notify observers about the match.
-//                    mObservers.forEach(o -> o.onMatch(Layer3ClusterMatcher.this, matchSeq));
-//                }
                 /*
                  * Get the index in cPkts of the last packet in the sequence of packets that matches the searched
                  * signature sequence.
@@ -179,12 +175,8 @@ public class Layer3ClusterMatcher extends AbstractClusterMatcher implements Pack
                         isPresent()) {
                     List<PcapPacket> matchSeq = match.get();
                     // Notify observers about the match.
+                    // Max number of skipped packets in layer 3 is 0 (no skipped packets)
                     mObservers.forEach(o -> o.onMatch(Layer3ClusterMatcher.this, matchSeq));
-//                    if (!matchSeq.get(matchSeq.size()-1).getTimestamp().isAfter(matchSeq.get(0).getTimestamp().
-//                           plusMillis(mInclusionTimeMillis))) {
-//                        // Notify observers about the match.
-//                        mObservers.forEach(o -> o.onMatch(Layer3ClusterMatcher.this, matchSeq));
-//                    }
                     /*
                      * Get the index in cPkts of the last packet in the sequence of packets that matches the searched
                      * signature sequence.