ofp-util: Use correct cookie value in "packet_in"s when no flow involved.
[sliver-openvswitch.git] / include / openflow / openflow-common.h
index ee79136..45d03ef 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2011, 2012 The Board of Trustees of The Leland Stanford
+/* Copyright (c) 2008, 2011, 2012, 2013 The Board of Trustees of The Leland Stanford
  * Junior University
  *
  * We are making the OpenFlow specification and associated documentation
@@ -78,11 +78,34 @@ enum ofp_version {
     OFP13_VERSION = 0x04
 };
 
+/* Vendor (aka experimenter) IDs.
+ *
+ * These are used in various places in OpenFlow to identify an extension
+ * defined by some vendor, as opposed to a standardized part of the core
+ * OpenFlow protocol.
+ *
+ * Vendor IDs whose top 8 bits are 0 hold an Ethernet OUI in their low 24 bits.
+ * The Open Networking Foundation assigns vendor IDs whose top 8 bits are
+ * nonzero.
+ *
+ * A few vendor IDs are special:
+ *
+ *    - OF_VENDOR_ID is not a real vendor ID and does not appear in the
+ *      OpenFlow protocol itself.  It can occasionally be useful within Open
+ *      vSwitch to identify a standardized part of OpenFlow.
+ *
+ *    - ONF_VENDOR_ID is being used within the ONF "extensibility" working
+ *      group to identify extensions being proposed for standardization.
+ */
+#define OF_VENDOR_ID    0
+#define NX_VENDOR_ID    0x00002320 /* Nicira. */
+#define ONF_VENDOR_ID   0x4f4e4600 /* Open Networking Foundation. */
+
 #define OFP_MAX_TABLE_NAME_LEN 32
 #define OFP_MAX_PORT_NAME_LEN  16
 
-#define OFP_TCP_PORT  6633
-#define OFP_SSL_PORT  6633
+#define OFP_OLD_PORT  6633
+#define OFP_PORT  6653
 
 #define OFP_ETH_ALEN 6          /* Bytes in an Ethernet address. */
 
@@ -283,7 +306,7 @@ OFP_ASSERT(sizeof(struct ofp_action_vendor_header) == 8);
  * header and any padding used to make the action 64-bit aligned.
  * NB: The length of an action *must* always be a multiple of eight. */
 struct ofp_action_header {
-    ovs_be16 type;                  /* One of OFPAT10_*. */
+    ovs_be16 type;                  /* One of OFPAT*. */
     ovs_be16 len;                   /* Length of action, including this
                                        header.  This is the length of action,
                                        including any padding to make it
@@ -351,8 +374,8 @@ enum ofp_flow_removed_reason {
     OFPRR_HARD_TIMEOUT,         /* Time exceeded hard_timeout. */
     OFPRR_DELETE,               /* Evicted by a DELETE flow mod. */
     OFPRR_GROUP_DELETE,         /* Group was removed. */
-    OFPRR_EVICTION,             /* Switch eviction to free resources. */
     OFPRR_METER_DELETE,         /* Meter was removed. */
+    OFPRR_EVICTION,             /* Switch eviction to free resources. */
 };
 
 /* What changed about the physical port */