#ifndef OPENFLOW_14_H
#define OPENFLOW_14_H 1
-#include "openflow/openflow-1.3.h"
+#include <openflow/openflow-1.3.h>
/* ## ---------- ## */
ovs_be32 port_no;
ovs_be16 length;
uint8_t pad[2];
- uint8_t hw_addr[OFP_ETH_ALEN];
+ struct eth_addr hw_addr;
uint8_t pad2[2]; /* Align to 64 bits. */
char name[OFP_MAX_PORT_NAME_LEN]; /* Null-terminated */
OFPPMPT14_EXPERIMENTER = 0xFFFF, /* Experimenter property. */
};
-/* Ethernet port mod property. */
-struct ofp14_port_mod_prop_ethernet {
- ovs_be16 type; /* OFPPMPT14_ETHERNET. */
- ovs_be16 length; /* Length in bytes of this property. */
- ovs_be32 advertise; /* Bitmap of OFPPF_*. Zero all bits to prevent
- any action taking place. */
-};
-OFP_ASSERT(sizeof(struct ofp14_port_mod_prop_ethernet) == 8);
-
struct ofp14_port_mod {
ovs_be32 port_no;
uint8_t pad[4];
- uint8_t hw_addr[OFP_ETH_ALEN];
+ struct eth_addr hw_addr;
uint8_t pad2[2];
ovs_be32 config; /* Bitmap of OFPPC_* flags. */
ovs_be32 mask; /* Bitmap of OFPPC_* flags to be changed. */
OFPTMPEF14_LIFETIME = 1 << 2, /* Using flow entry lifetime. */
};
-struct ofp14_table_mod_prop_eviction {
- ovs_be16 type; /* OFPTMPT14_EVICTION. */
- ovs_be16 length; /* Length in bytes of this property. */
- ovs_be32 flags; /* Bitmap of OFPTMPEF14_* flags */
+/* What changed about the table */
+enum ofp14_table_reason {
+ OFPTR_VACANCY_DOWN = 3, /* Vacancy down threshold event. */
+ OFPTR_VACANCY_UP = 4, /* Vacancy up threshold event. */
+ OFPTR_N_REASONS /* Denotes number of reasons. */
};
-OFP_ASSERT(sizeof(struct ofp14_table_mod_prop_eviction) == 8);
struct ofp14_table_mod_prop_vacancy {
ovs_be16 type; /* OFPTMPT14_VACANCY. */
};
OFP_ASSERT(sizeof(struct ofp14_table_mod) == 8);
+/* Body of reply to OFPMP_TABLE_DESC request. */
+struct ofp14_table_desc {
+ ovs_be16 length; /* Length is padded to 64 bits. */
+ uint8_t table_id; /* Identifier of table. Lower numbered tables
+ are consulted first. */
+ uint8_t pad[1]; /* Align to 32-bits. */
+ ovs_be32 config; /* Bitmap of OFPTC_* values. */
+ /* Followed by 0 or more OFPTMPT14_* properties. */
+};
+OFP_ASSERT(sizeof(struct ofp14_table_desc) == 8);
/* ## ---------------- ## */
/* ## ofp14_port_stats ## */
OFP_ASSERT(sizeof(struct ofp14_queue_stats) == 48);
+/* ## ---------------- ## */
+/* ## ofp14_queue_desc ## */
+/* ## ---------------- ## */
+
+struct ofp14_queue_desc_request {
+ ovs_be32 port; /* All ports if OFPP_ANY. */
+ ovs_be32 queue; /* All queues if OFPQ_ALL. */
+};
+OFP_ASSERT(sizeof(struct ofp14_queue_desc_request) == 8);
+
+/* Body of reply to OFPMP_QUEUE_DESC request. */
+struct ofp14_queue_desc {
+ ovs_be32 port_no; /* Port this queue is attached to. */
+ ovs_be32 queue_id; /* ID for the specific queue. */
+ ovs_be16 len; /* Length in bytes of this queue desc. */
+ uint8_t pad[6]; /* 64-bit alignment. */
+};
+OFP_ASSERT(sizeof(struct ofp14_queue_desc) == 16);
+
+enum ofp14_queue_desc_prop_type {
+ OFPQDPT14_MIN_RATE = 1,
+ OFPQDPT14_MAX_RATE = 2,
+ OFPQDPT14_EXPERIMENTER = 0xffff
+};
+
/* ## -------------- ## */
/* ## Miscellaneous. ## */
/* ## -------------- ## */
-/* Common header for all async config Properties */
-struct ofp14_async_config_prop_header {
- ovs_be16 type; /* One of OFPACPT_*. */
- ovs_be16 length; /* Length in bytes of this property. */
-};
-OFP_ASSERT(sizeof(struct ofp14_async_config_prop_header) == 4);
-
-/* Asynchronous message configuration.
- * OFPT_GET_ASYNC_REPLY or OFPT_SET_ASYNC.
- */
-struct ofp14_async_config {
- struct ofp_header header;
- /* Async config Property list - 0 or more */
- struct ofp14_async_config_prop_header properties[0];
+/* Request forward reason */
+enum ofp14_requestforward_reason {
+ OFPRFR_GROUP_MOD = 0, /* Forward group mod requests. */
+ OFPRFR_METER_MOD = 1, /* Forward meter mod requests. */
+ OFPRFR_N_REASONS /* Denotes number of reasons. */
};
-OFP_ASSERT(sizeof(struct ofp14_async_config) == 8);
/* Async Config property types.
* Low order bit cleared indicates a property for the slave role.
OFPTFPT_EXPERIMENTER_MASTER = 0xFFFF, /* Experimenter for master. */
};
-/* Various reason based properties */
-struct ofp14_async_config_prop_reasons {
- /* 'type' is one of OFPACPT_PACKET_IN_*, OFPACPT_PORT_STATUS_*,
- * OFPACPT_FLOW_REMOVED_*, OFPACPT_ROLE_STATUS_*,
- * OFPACPT_TABLE_STATUS_*, OFPACPT_REQUESTFORWARD_*. */
- ovs_be16 type;
- ovs_be16 length; /* Length in bytes of this property. */
- ovs_be32 mask; /* Bitmasks of reason values. */
-};
-OFP_ASSERT(sizeof(struct ofp14_async_config_prop_reasons) == 8);
-
-/* Experimenter async config property */
-struct ofp14_async_config_prop_experimenter {
- ovs_be16 type; /* One of OFPTFPT_EXPERIMENTER_SLAVE,
- OFPTFPT_EXPERIMENTER_MASTER. */
- ovs_be16 length; /* Length in bytes of this property. */
- ovs_be32 experimenter; /* Experimenter ID which takes the same
- form as in struct
- ofp_experimenter_header. */
- ovs_be32 exp_type; /* Experimenter defined. */
- /* Followed by:
- * - Exactly (length - 12) bytes containing the experimenter data, then
- * - Exactly (length + 7)/8*8 - (length) (between 0 and 7)
- * bytes of all-zero bytes */
-};
-OFP_ASSERT(sizeof(struct ofp14_async_config_prop_experimenter) == 12);
-
-/* Common header for all Role Properties */
-struct ofp14_role_prop_header {
- ovs_be16 type; /* One of OFPRPT_*. */
- ovs_be16 length; /* Length in bytes of this property. */
-};
-OFP_ASSERT(sizeof(struct ofp14_role_prop_header) == 4);
-
/* Role status event message. */
struct ofp14_role_status {
ovs_be32 role; /* One of OFPCR_ROLE_*. */
OFPCRR_MASTER_REQUEST = 0, /* Another controller asked to be master. */
OFPCRR_CONFIG = 1, /* Configuration changed on the switch. */
OFPCRR_EXPERIMENTER = 2, /* Experimenter data changed. */
+ OFPCRR_N_REASONS /* Denotes number of reasons. */
};
/* Role property types.
OFPRPT_EXPERIMENTER = 0xFFFF, /* Experimenter property. */
};
-/* Experimenter role property */
-struct ofp14_role_prop_experimenter {
- ovs_be16 type; /* One of OFPRPT_EXPERIMENTER. */
- ovs_be16 length; /* Length in bytes of this property. */
- ovs_be32 experimenter; /* Experimenter ID which takes the same
- form as in struct
- ofp_experimenter_header. */
- ovs_be32 exp_type; /* Experimenter defined. */
- /* Followed by:
- * - Exactly (length - 12) bytes containing the experimenter data, then
- * - Exactly (length + 7)/8*8 - (length) (between 0 and 7)
- * bytes of all-zero bytes */
+/* Group/Meter request forwarding. */
+struct ofp14_requestforward {
+ struct ofp_header request; /* Request being forwarded. */
};
-OFP_ASSERT(sizeof(struct ofp14_role_prop_experimenter) == 12);
+OFP_ASSERT(sizeof(struct ofp14_requestforward) == 8);
/* Bundle control message types */
enum ofp14_bundle_ctrl_type {