Temporary fix for router's IP as client for WAN trace and paths for new tests for...
[pingpong.git] / Code / Projects / SmartPlugDetector / src / main / java / edu / uci / iotproject / Conversation.java
index 28515e3ae981fffe6b9b33c4b19c0cc3d73bba78..490dc4f53264ee40f9b3e7c3d995d9482902cbd0 100644 (file)
@@ -1,5 +1,6 @@
 package edu.uci.iotproject;
 
+import edu.uci.iotproject.analysis.TcpConversationUtils;
 import edu.uci.iotproject.util.PcapPacketUtils;
 import org.pcap4j.core.PcapPacket;
 import org.pcap4j.packet.IpV4Packet;
@@ -481,8 +482,9 @@ public class Conversation {
          *   inspect the first 4 bytes of each potential TLS packet to see if they match the SSL record header.
          *
          * 08/31/18: Added unconvetional TLS ports used by WeMo plugs and LiFX bulb.
+         * 09/20/18: Moved hardcoded ports to other class to allow other classes to query the set of TLS ports.
          */
-        return mServerPort == 443 || mServerPort == 8443 || mServerPort == 41143;
+        return TcpConversationUtils.isTlsPort(mServerPort);
     }
 
     /**
@@ -562,17 +564,16 @@ public class Conversation {
         CLIENT_TO_SERVER {
             @Override
             public String toCompactString() {
-                return "C->S";
+                return "*";
             }
         },
         SERVER_TO_CLIENT {
             @Override
             public String toCompactString() {
-                return "S->C";
+                return "";
             }
         };
 
-
         /**
          * Get a compact string representation of this {@code Direction}.
          * @return a compact string representation of this {@code Direction}.