X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=Code%2FProjects%2FPacketLevelSignatureExtractor%2Fsrc%2Fmain%2Fjava%2Fedu%2Fuci%2Fiotproject%2Fdetection%2Flayer3%2FLayer3ClusterMatcher.java;h=d4b2a32d1936765eacaa646b99049bf8166a5d2e;hb=b5f2e4fdf476cdf07d649089900c3f7c4c7f0ccb;hp=6d8110046afa16d00f342d48adb48576b96b2e8e;hpb=4beef1e7632e815e9d7a821295e6c3967e5935bd;p=pingpong.git diff --git a/Code/Projects/PacketLevelSignatureExtractor/src/main/java/edu/uci/iotproject/detection/layer3/Layer3ClusterMatcher.java b/Code/Projects/PacketLevelSignatureExtractor/src/main/java/edu/uci/iotproject/detection/layer3/Layer3ClusterMatcher.java index 6d81100..d4b2a32 100644 --- a/Code/Projects/PacketLevelSignatureExtractor/src/main/java/edu/uci/iotproject/detection/layer3/Layer3ClusterMatcher.java +++ b/Code/Projects/PacketLevelSignatureExtractor/src/main/java/edu/uci/iotproject/detection/layer3/Layer3ClusterMatcher.java @@ -131,7 +131,7 @@ public class Layer3ClusterMatcher extends AbstractClusterMatcher implements Pack while ((match = findSubsequenceInSequence(lowerBound, upperBound, cPkts, mClusterMemberDirections, null)). isPresent()) { List matchSeq = match.get(); -// // Notify observers about the match. + // Notify observers about the match. // mObservers.forEach(o -> o.onMatch(Layer3ClusterMatcher.this, matchSeq)); if (!matchSeq.get(matchSeq.size()-1).getTimestamp().isAfter(matchSeq.get(0).getTimestamp(). plusMillis(mInclusionTimeMillis))) { @@ -178,7 +178,7 @@ public class Layer3ClusterMatcher extends AbstractClusterMatcher implements Pack while ((match = findSubsequenceInSequence(signatureSequence, cPkts, mClusterMemberDirections, null)). isPresent()) { List matchSeq = match.get(); -// // Notify observers about the match. + // Notify observers about the match. // mObservers.forEach(o -> o.onMatch(Layer3ClusterMatcher.this, matchSeq)); if (!matchSeq.get(matchSeq.size()-1).getTimestamp().isAfter(matchSeq.get(0).getTimestamp(). plusMillis(mInclusionTimeMillis))) { @@ -359,11 +359,11 @@ public class Layer3ClusterMatcher extends AbstractClusterMatcher implements Pack // We only have a match if packet lengths and directions match. // The packet lengths have to be in the range of [lowerBound - eps, upperBound+eps] // TODO: Maybe we could do better here for the double to integer conversion? -// int epsLowerBound = lowBndPkt.length() - (int) mEps; -// int epsUpperBound = upBndPkt.length() + (int) mEps; + int epsLowerBound = lowBndPkt.length() - (int) mEps; + int epsUpperBound = upBndPkt.length() + (int) mEps; // TODO: TEMPORARILY REMOVE EPS BOUNDS - int epsLowerBound = lowBndPkt.length(); - int epsUpperBound = upBndPkt.length(); +// int epsLowerBound = lowBndPkt.length(); +// int epsUpperBound = upBndPkt.length(); if (epsLowerBound <= seqPkt.getOriginalLength() && seqPkt.getOriginalLength() <= epsUpperBound && subsequenceDirections[subseqIdx] == sequenceDirections[seqIdx]) {