Implemented global packet-out functionality in the PacketModule.
Updated with javadoc for the interfaces, and fixes to bugs pointed out by
Pavlin and Yuta regarding the implementation of calculateOutPorts in
BroadcastPacketOutNotification.
Change-Id: I6174d27877972cf437955ef8d82e9a02b36d0b5f
diff --git a/src/main/java/net/onrc/onos/core/util/SwitchPort.java b/src/main/java/net/onrc/onos/core/util/SwitchPort.java
index 9178267..edb9f77 100644
--- a/src/main/java/net/onrc/onos/core/util/SwitchPort.java
+++ b/src/main/java/net/onrc/onos/core/util/SwitchPort.java
@@ -30,6 +30,17 @@
}
/**
+ * Constructor for the specified primitive values of a DPID and port.
+ *
+ * @param dpid the long DPID to use
+ * @param port the short port number to use
+ */
+ public SwitchPort(long dpid, short port) {
+ this.dpid = new Dpid(dpid);
+ this.port = new Port(port);
+ }
+
+ /**
* Get the DPID value of the Switch-Port.
*
* @return the DPID value of the Switch-Port.