-enum ofp_type {
- /* Immutable messages. */
- OFPT_HELLO, /* Symmetric message */
- OFPT_ERROR, /* Symmetric message */
- OFPT_ECHO_REQUEST, /* Symmetric message */
- OFPT_ECHO_REPLY, /* Symmetric message */
- OFPT_VENDOR, /* Symmetric message */
-
- /* Switch configuration messages. */
- OFPT_FEATURES_REQUEST, /* Controller/switch message */
- OFPT_FEATURES_REPLY, /* Controller/switch message */
- OFPT_GET_CONFIG_REQUEST, /* Controller/switch message */
- OFPT_GET_CONFIG_REPLY, /* Controller/switch message */
- OFPT_SET_CONFIG, /* Controller/switch message */
-
- /* Asynchronous messages. */
- OFPT_PACKET_IN, /* Async message */
- OFPT_FLOW_REMOVED, /* Async message */
- OFPT_PORT_STATUS, /* Async message */
-
- /* Controller command messages. */
- OFPT_PACKET_OUT, /* Controller/switch message */
- OFPT_FLOW_MOD, /* Controller/switch message */
- OFPT_PORT_MOD, /* Controller/switch message */
-
- /* Statistics messages. */
- OFPT_STATS_REQUEST, /* Controller/switch message */
- OFPT_STATS_REPLY, /* Controller/switch message */
-
- /* Barrier messages. */
- OFPT_BARRIER_REQUEST, /* Controller/switch message */
- OFPT_BARRIER_REPLY, /* Controller/switch message */
-
- /* Queue Configuration messages. */
- OFPT_QUEUE_GET_CONFIG_REQUEST, /* Controller/switch message */
- OFPT_QUEUE_GET_CONFIG_REPLY /* Controller/switch message */
-};
-
-/* Header on all OpenFlow packets. */
-struct ofp_header {
- uint8_t version; /* An OpenFlow version number, e.g. OFP10_VERSION. */
- uint8_t type; /* One of the OFPT_ constants. */
- ovs_be16 length; /* Length including this ofp_header. */
- ovs_be32 xid; /* Transaction id associated with this packet.
- Replies use the same id as was in the request
- to facilitate pairing. */
-};
-OFP_ASSERT(sizeof(struct ofp_header) == 8);
-
-/* OFPT_HELLO. This message has an empty body, but implementations must
- * ignore any data included in the body, to allow for future extensions. */
-struct ofp_hello {
- struct ofp_header header;
-};
-
-#define OFP_DEFAULT_MISS_SEND_LEN 128
-
-enum ofp_config_flags {
- /* Handling of IP fragments. */
- 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_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. */