1 package edu.uci.iotproject;
3 import java.util.Objects;
6 * Represents a network packet.
8 * @author Janus Varmarken
13 * The packet's length.
15 private final int length;
17 // TODO should we use hostname for src/dst such that we can map packets pertaining to the same host as similar even if they are sent to different IPs (due to load balancing)?
20 * The packet's source (IP).
22 private final String source;
25 * The packet's destination (IP).
27 private final String destionation;
29 public Packet(String src, String dst, int length) {
30 this.source = Objects.requireNonNull(src);
31 this.destionation = Objects.requireNonNull(dst);