ofp-util: Add version bitmap support to hello messages.
[sliver-openvswitch.git] / include / openflow / openflow-1.0.h
index b2077f0..9af7740 100644 (file)
 
 #include "openflow/openflow-common.h"
 
-/* Port numbering.  Physical ports are numbered starting from 1. */
+/* Port number(s)   meaning
+ * ---------------  --------------------------------------
+ * 0x0000           not assigned a meaning by OpenFlow 1.0
+ * 0x0001...0xfeff  "physical" ports
+ * 0xff00...0xfff7  "reserved" but not assigned a meaning by OpenFlow 1.0
+ * 0xfff8...0xffff  "reserved" OFPP_* ports with assigned meanings
+ */
 enum ofp_port {
-    /* Maximum number of physical switch ports. */
-    OFPP_MAX = 0xff00,
+    /* Ranges. */
+    OFPP_MAX        = 0xff00,   /* Maximum number of physical switch ports. */
+    OFPP_FIRST_RESV = 0xfff8,   /* First assigned reserved port number. */
+    OFPP_LAST_RESV  = 0xffff,   /* Last assigned reserved port number. */
 
-    /* Fake output "ports". */
+    /* Reserved output "ports". */
     OFPP_IN_PORT    = 0xfff8,  /* Send the packet out the input port.  This
                                   virtual port must be explicitly used
                                   in order to send back out of the input
@@ -271,14 +279,6 @@ struct ofp_packet_out {
 };
 OFP_ASSERT(sizeof(struct ofp_packet_out) == 8);
 
-enum ofp_flow_mod_command {
-    OFPFC_ADD,              /* New flow. */
-    OFPFC_MODIFY,           /* Modify all matching flows. */
-    OFPFC_MODIFY_STRICT,    /* Modify entry strictly matching wildcards */
-    OFPFC_DELETE,           /* Delete all matching flows. */
-    OFPFC_DELETE_STRICT     /* Strictly match wildcards and priority. */
-};
-
 /* Flow wildcards. */
 enum ofp_flow_wildcards {
     OFPFW10_IN_PORT    = 1 << 0,  /* Switch input port. */
@@ -331,7 +331,7 @@ enum ofp_flow_wildcards {
 #define OFP_DL_TYPE_NOT_ETH_TYPE  0x05ff
 
 /* The VLAN id is 12-bits, so we can use the entire 16 bits to indicate
- * special conditions.  All ones indicates that no VLAN id was set.
+ * special conditions.  All ones indicates that 802.1Q header is not present.
  */
 #define OFP10_VLAN_NONE      0xffff
 
@@ -363,15 +363,12 @@ OFP_ASSERT(sizeof(struct ofp10_match) == 40);
 /* By default, choose a priority in the middle. */
 #define OFP_DEFAULT_PRIORITY 0x8000
 
-enum ofp_flow_mod_flags {
-    OFPFF_SEND_FLOW_REM = 1 << 0,  /* Send flow removed message when flow
-                                    * expires or is deleted. */
-    OFPFF_CHECK_OVERLAP = 1 << 1,  /* Check for overlapping entries first. */
-    OFPFF_EMERG         = 1 << 2   /* Ramark this is for emergency. */
+enum ofp10_flow_mod_flags {
+    OFPFF10_EMERG       = 1 << 2   /* Ramark this is for emergency. */
 };
 
 /* Flow setup and teardown (controller -> datapath). */
-struct ofp_flow_mod {
+struct ofp10_flow_mod {
     struct ofp10_match match;    /* Fields to match */
     ovs_be64 cookie;             /* Opaque controller-issued identifier. */
 
@@ -391,7 +388,7 @@ struct ofp_flow_mod {
                                             from the length field in the
                                             header. */
 };
-OFP_ASSERT(sizeof(struct ofp_flow_mod) == 64);
+OFP_ASSERT(sizeof(struct ofp10_flow_mod) == 64);
 
 /* Flow removed (datapath -> controller). */
 struct ofp_flow_removed {