|
@@ -1,26 +1,26 @@
|
|
-package de.tu_darmstadt.tk.SmartHomeNetworkSim.core;
|
|
|
|
-
|
|
|
|
-import java.util.Collection;
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * Interface for collection/capturing of packets
|
|
|
|
- *
|
|
|
|
- * @author Andreas T. Meyer-Berg
|
|
|
|
- */
|
|
|
|
-public interface PacketSniffer {
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Add packets, that were sent
|
|
|
|
- *
|
|
|
|
- * @param received
|
|
|
|
- * the packets which were received
|
|
|
|
- */
|
|
|
|
- public void addPackets(Collection<Packet> received);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Returns the Packets, that were sent.
|
|
|
|
- *
|
|
|
|
- * @return the packets the sniffer collected
|
|
|
|
- */
|
|
|
|
- public Collection<Packet> getPackets();
|
|
|
|
-}
|
|
|
|
|
|
+package de.tu_darmstadt.tk.SmartHomeNetworkSim.core;
|
|
|
|
+
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.LinkedList;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Interface for processing of captured packets. If registered in the program,
|
|
|
|
+ * the {@link #processPackets(HashMap)} method will be called after each
|
|
|
|
+ * simulation step, and the captured packets during the last step, will be the argument.
|
|
|
|
+ *
|
|
|
|
+ * @author Andreas T. Meyer-Berg
|
|
|
|
+ */
|
|
|
|
+public interface PacketSniffer {
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Process the packages. This method will be called after every simulation
|
|
|
|
+ * step, if and object implementing this Interface, is registered in the
|
|
|
|
+ * framework.
|
|
|
|
+ *
|
|
|
|
+ * @param packets
|
|
|
|
+ * the packets captured during the last simulation step. They are
|
|
|
|
+ * grouped by each link.
|
|
|
|
+ */
|
|
|
|
+ public void processPackets(HashMap<Link, LinkedList<Packet>> packets);
|
|
|
|
+
|
|
|
|
+}
|