Fixing build flow (broken because of a missing return statement).
[pingpong.git] / Code / Projects / SmartPlugDetector / src / main / java / edu / uci / iotproject / Main.java
1 package edu.uci.iotproject;
2
3 import java.util.List;
4 import java.util.Map;
5
6 /**
7  * Entry point of the application.
8  *
9  * @author Janus Varmarken
10  */
11 public class Main {
12
13     public static void main(String[] args) throws Exception {
14         System.out.println("it works");
15         String file = "/home/rtrimana/pcap_processing/smart_home_traffic/Code/Projects/SmartPlugDetector/pcap/wlan1.local.dns.pcapdump";
16         
17         try {
18             Pcap data = Pcap.fromFile(file);
19             //data.hdr();
20         } catch (Exception e) {
21             e.printStackTrace();
22         }
23     }
24
25     private String cloudIPAddress(String hostName) {
26         if (hostName.equals("events.tplinkra.com"))
27             return "205.251.203.26";
28         else
29             return null;
30     }
31
32     // TODO move to separate class
33     // Add parameter that is the trace to be analyzed (most like the pcap library's representation of a flow)
34     public String findPattern(Map<String, List<Integer>> hostnameToPacketLengths, String smartPlugIp) {
35
36         // No difference, output "Complete match"
37         // If difference, output <Packet no, deviation from expected> for each packet
38         return null;
39     }
40 }