Allow applications to specify a few other packet-request flow priorities.
Also let Ethernet class recognize EAPOL eth-type when printing.
Change-Id: I52b9d9aec6dfdd07aa49861f8c6b82ed814f638e
(cherry picked from commit 6f58cf1e5aae371cb8c7e0ad69552f3e68672f05)
diff --git a/core/api/src/main/java/org/onosproject/net/packet/PacketPriority.java b/core/api/src/main/java/org/onosproject/net/packet/PacketPriority.java
index 0253423..3633231 100644
--- a/core/api/src/main/java/org/onosproject/net/packet/PacketPriority.java
+++ b/core/api/src/main/java/org/onosproject/net/packet/PacketPriority.java
@@ -30,7 +30,20 @@
* Low priority for reactive applications. Packets are only sent to the
* controller if they fail to match any of the rules installed in the switch.
*/
- REACTIVE(5);
+ REACTIVE(5),
+
+ /**
+ * Other choices for applications.
+ */
+ MAX(65535),
+ HIGH5(65000),
+ HIGH4(64000),
+ HIGH3(63000),
+ HIGH2(62000),
+ HIGH1(61000),
+ HIGH(60000),
+ MEDIUM(30000),
+ LOWEST(1);
private final int priorityValue;
@@ -47,6 +60,7 @@
return priorityValue;
}
+ @Override
public String toString() {
return String.valueOf(priorityValue);
}
diff --git a/utils/misc/src/main/java/org/onlab/packet/Ethernet.java b/utils/misc/src/main/java/org/onlab/packet/Ethernet.java
index 006c32e..5fd07bf 100644
--- a/utils/misc/src/main/java/org/onlab/packet/Ethernet.java
+++ b/utils/misc/src/main/java/org/onlab/packet/Ethernet.java
@@ -700,6 +700,8 @@
sb.append("\ndata packet");
} else if (pkt instanceof LLC) {
sb.append("\nllc packet");
+ } else if (pkt instanceof EAPOL) {
+ sb.append("\neapol");
} else {
sb.append("\nunknown packet");
}