Resolving merge conflict in Main.java
authorrtrimana <rtrimana@uci.edu>
Wed, 25 Apr 2018 00:51:26 +0000 (17:51 -0700)
committerrtrimana <rtrimana@uci.edu>
Wed, 25 Apr 2018 00:51:26 +0000 (17:51 -0700)
1  2 
Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/Main.java

index c66d94ec17110138dfecc5348f46bbab64878bdc,30136654646efd312282930de4cd343797bc6511..5d387d0ff6cdef92849f353552f8de7742fe8cc9
@@@ -7,15 -10,22 +10,29 @@@ import java.util.Map
   */
  public class Main {
  
 -    public static void main(String[] args) {
 +    public static void main(String[] args) throws Exception {
          System.out.println("it works");
 +        String file = "/home/rtrimana/pcap_processing/smart_home_traffic/Code/Projects/SmartPlugDetector/pcap/wlan1.local.dns.pcap";
 +        
 +        try {
 +            Pcap data = Pcap.fromFile(file);
 +            //data.hdr();
 +        } catch (Exception e) {
 +            e.printStackTrace();
 +        }
      }
 -            return 205.251.203.26;
+     private String cloudIPAddress(String hostName) {
+         if (hostName.equals("events.tplinkra.com"))
 -
++            return "205.251.203.26";
+     }
+     // TODO move to separate class
+     // Add parameter that is the trace to be analyzed (most like the pcap library's representation of a flow)
+     public String findPattern(Map<String, List<Integer>> hostnameToPacketLengths, String smartPlugIp) {
+         // No difference, output "Complete match"
+         // If difference, output <Packet no, deviation from expected> for each packet
+         return null;
+     }
  }