1 package edu.uci.iotproject;
7 * Entry point of the application.
9 * @author Janus Varmarken
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/gre-sample.pcap";
16 String file = "/home/rtrimana/pcap_processing/smart_home_traffic/Code/Projects/SmartPlugDetector/pcap/wlan1.local.dns.pcap";
19 Pcap data = Pcap.fromFile(file);
21 } catch (Exception e) {
26 private String cloudIPAddress(String hostName) {
27 if (hostName.equals("events.tplinkra.com"))
28 return "205.251.203.26";
33 // TODO move to separate class
34 // Add parameter that is the trace to be analyzed (most like the pcap library's representation of a flow)
35 public String findPattern(Map<String, List<Integer>> hostnameToPacketLengths, String smartPlugIp) {
37 // No difference, output "Complete match"
38 // If difference, output <Packet no, deviation from expected> for each packet