ofproto-dpif: Rate-limit all messages output by facet_check_consistency().
[openvswitch] / include / openflow / openflow.h
index 0dad50d10d4340718d33479ce3af3d5a60e1c84b..cd30d325edf70ceafa9378c0917ac697062c6886 100644 (file)
@@ -41,6 +41,7 @@
  * experimental OpenFlow version.
  */
 #define OFP_VERSION   0x01
+#define OFP10_VERSION 0x01
 
 #define OFP_MAX_TABLE_NAME_LEN 32
 #define OFP_MAX_PORT_NAME_LEN  16
@@ -134,7 +135,12 @@ enum ofp_config_flags {
     OFPC_FRAG_NORMAL   = 0,  /* No special handling for fragments. */
     OFPC_FRAG_DROP     = 1,  /* Drop fragments. */
     OFPC_FRAG_REASM    = 2,  /* Reassemble (only if OFPC_IP_REASM set). */
-    OFPC_FRAG_MASK     = 3
+    OFPC_FRAG_NX_MATCH = 3,  /* Make first fragments available for matching. */
+    OFPC_FRAG_MASK     = 3,
+
+    /* TTL processing - applicable for IP and MPLS packets. */
+    OFPC_INVALID_TTL_TO_CONTROLLER = 1 << 2, /* Send packets with invalid TTL
+                                                to the controller. */
 };
 
 /* Switch configuration. */
@@ -287,7 +293,8 @@ OFP_ASSERT(sizeof(struct ofp_port_mod) == 32);
 /* Why is this packet being sent to the controller? */
 enum ofp_packet_in_reason {
     OFPR_NO_MATCH,          /* No matching flow. */
-    OFPR_ACTION             /* Action explicitly output to controller. */
+    OFPR_ACTION,            /* Action explicitly output to controller. */
+    OFPR_INVALID_TTL        /* Packet has invalid TTL. */
 };
 
 /* Packet received on port (datapath -> controller). */
@@ -536,11 +543,6 @@ struct ofp_match {
 };
 OFP_ASSERT(sizeof(struct ofp_match) == 40);
 
-/* The match fields for ICMP type and code use the transport source and
- * destination port fields, respectively. */
-#define icmp_type tp_src
-#define icmp_code tp_dst
-
 /* Value used in "idle_timeout" and "hard_timeout" to indicate that the entry
  * is permanent. */
 #define OFP_FLOW_PERMANENT 0
@@ -606,83 +608,6 @@ struct ofp_flow_removed {
 };
 OFP_ASSERT(sizeof(struct ofp_flow_removed) == 88);
 
-/* Values for 'type' in ofp_error_message.  These values are immutable: they
- * will not change in future versions of the protocol (although new values may
- * be added). */
-enum ofp_error_type {
-    OFPET_HELLO_FAILED,         /* Hello protocol failed. */
-    OFPET_BAD_REQUEST,          /* Request was not understood. */
-    OFPET_BAD_ACTION,           /* Error in action description. */
-    OFPET_FLOW_MOD_FAILED,      /* Problem modifying flow entry. */
-    OFPET_PORT_MOD_FAILED,      /* OFPT_PORT_MOD failed. */
-    OFPET_QUEUE_OP_FAILED       /* Queue operation failed. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_HELLO_FAILED.  'data' contains an
- * ASCII text string that may give failure details. */
-enum ofp_hello_failed_code {
-    OFPHFC_INCOMPATIBLE,        /* No compatible version. */
-    OFPHFC_EPERM                /* Permissions error. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_BAD_REQUEST.  'data' contains at least
- * the first 64 bytes of the failed request. */
-enum ofp_bad_request_code {
-    OFPBRC_BAD_VERSION,         /* ofp_header.version not supported. */
-    OFPBRC_BAD_TYPE,            /* ofp_header.type not supported. */
-    OFPBRC_BAD_STAT,            /* ofp_stats_msg.type not supported. */
-    OFPBRC_BAD_VENDOR,          /* Vendor not supported (in ofp_vendor_header
-                                 * or ofp_stats_msg). */
-    OFPBRC_BAD_SUBTYPE,         /* Vendor subtype not supported. */
-    OFPBRC_EPERM,               /* Permissions error. */
-    OFPBRC_BAD_LEN,             /* Wrong request length for type. */
-    OFPBRC_BUFFER_EMPTY,        /* Specified buffer has already been used. */
-    OFPBRC_BUFFER_UNKNOWN       /* Specified buffer does not exist. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_BAD_ACTION.  'data' contains at least
- * the first 64 bytes of the failed request. */
-enum ofp_bad_action_code {
-    OFPBAC_BAD_TYPE,           /* Unknown action type. */
-    OFPBAC_BAD_LEN,            /* Length problem in actions. */
-    OFPBAC_BAD_VENDOR,         /* Unknown vendor id specified. */
-    OFPBAC_BAD_VENDOR_TYPE,    /* Unknown action type for vendor id. */
-    OFPBAC_BAD_OUT_PORT,       /* Problem validating output action. */
-    OFPBAC_BAD_ARGUMENT,       /* Bad action argument. */
-    OFPBAC_EPERM,              /* Permissions error. */
-    OFPBAC_TOO_MANY,           /* Can't handle this many actions. */
-    OFPBAC_BAD_QUEUE           /* Problem validating output queue. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_FLOW_MOD_FAILED.  'data' contains
- * at least the first 64 bytes of the failed request. */
-enum ofp_flow_mod_failed_code {
-    OFPFMFC_ALL_TABLES_FULL,    /* Flow not added because of full tables. */
-    OFPFMFC_OVERLAP,            /* Attempted to add overlapping flow with
-                                 * CHECK_OVERLAP flag set. */
-    OFPFMFC_EPERM,              /* Permissions error. */
-    OFPFMFC_BAD_EMERG_TIMEOUT,  /* Flow not added because of non-zero idle/hard
-                                 * timeout. */
-    OFPFMFC_BAD_COMMAND,        /* Unknown command. */
-    OFPFMFC_UNSUPPORTED         /* Unsupported action list - cannot process in
-                                   the order specified. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_PORT_MOD_FAILED.  'data' contains
- * at least the first 64 bytes of the failed request. */
-enum ofp_port_mod_failed_code {
-    OFPPMFC_BAD_PORT,            /* Specified port does not exist. */
-    OFPPMFC_BAD_HW_ADDR,         /* Specified hardware address is wrong. */
-};
-
-/* ofp_error msg 'code' values for OFPET_QUEUE_OP_FAILED. 'data' contains
- * at least the first 64 bytes of the failed request */
-enum ofp_queue_op_failed_code {
-    OFPQOFC_BAD_PORT,           /* Invalid port (or port does not exist). */
-    OFPQOFC_BAD_QUEUE,          /* Queue does not exist. */
-    OFPQOFC_EPERM               /* Permissions error. */
-};
-
 /* OFPT_ERROR: Error message (datapath -> controller). */
 struct ofp_error_msg {
     struct ofp_header header;