Last active
December 23, 2015 19:18
-
-
Save hkwi/6681194 to your computer and use it in GitHub Desktop.
openflow 1.3.2 -> 1.4 struct, enum diffs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- hoge132__s.c 2013-09-27 16:58:14.221425200 +0900 | |
+++ hoge14__2s.c 2013-09-24 15:33:20.416477600 +0900 | |
@@ -2,9 +2,13 @@ | |
struct ofp_action_experimenter_header { | |
uint16_t type; /* OFPAT_EXPERIMENTER. */ | |
uint16_t len; /* Length is a multiple of 8. */ | |
- uint32_t experimenter; /* Experimenter ID which takes the same | |
- form as in struct | |
- ofp_experimenter_header. */ | |
+ uint32_t experimenter; /* Experimenter ID. */ | |
+}; | |
+ | |
+struct ofp_action_generic { | |
+ uint16_t type; /* One of OFPAT_*. */ | |
+ uint16_t len; /* Length is 8. */ | |
+ uint8_t pad[4]; /* Pad to 64 bits. */ | |
}; | |
struct ofp_action_group { | |
@@ -19,7 +23,12 @@ | |
header. This is the length of action, | |
including any padding to make it | |
64-bit aligned. */ | |
- uint8_t pad[4]; | |
+}; | |
+ | |
+struct ofp_action_id { | |
+ uint16_t type; /* One of OFPAT_*. */ | |
+ uint16_t len; /* Length is 4 or experimenter defined. */ | |
+ uint8_t exp_data[0]; /* Optional experimenter id + data. */ | |
}; | |
struct ofp_action_mpls_ttl { | |
@@ -103,9 +112,39 @@ | |
struct ofp_async_config { | |
struct ofp_header header; /* OFPT_GET_ASYNC_REPLY or OFPT_SET_ASYNC. */ | |
- uint32_t packet_in_mask[2]; /* Bitmasks of OFPR_* values. */ | |
- uint32_t port_status_mask[2]; /* Bitmasks of OFPPR_* values. */ | |
- uint32_t flow_removed_mask[2];/* Bitmasks of OFPRR_* values. */ | |
+ /* Async config Property list - 0 or more */ | |
+ struct ofp_async_config_prop_header properties[0]; | |
+}; | |
+ | |
+struct ofp_async_config_prop_experimenter { | |
+ uint16_t type; /* One of OFPTFPT_EXPERIMENTER_SLAVE, | |
+ OFPTFPT_EXPERIMENTER_MASTER. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t experimenter; /* Experimenter ID which takes the same | |
+ form as in struct | |
+ ofp_experimenter_header. */ | |
+ uint32_t 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 */ | |
+ uint32_t experimenter_data[0]; | |
+}; | |
+ | |
+struct ofp_async_config_prop_header { | |
+ uint16_t type; /* One of OFPACPT_*. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+}; | |
+ | |
+struct ofp_async_config_prop_reasons { | |
+ uint16_t type; /* One of OFPACPT_PACKET_IN_*, | |
+ OFPACPT_PORT_STATUS_*, | |
+ OFPACPT_FLOW_REMOVED_*, | |
+ OFPACPT_ROLE_STATUS_*, | |
+ OFPACPT_TABLE_STATUS_*, | |
+ OFPACPT_REQUESTFORWARD_*. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t mask; /* Bitmasks of reason values. */ | |
}; | |
struct ofp_bucket { | |
@@ -132,6 +171,47 @@ | |
uint64_t byte_count; /* Number of bytes processed by bucket. */ | |
}; | |
+struct ofp_bundle_add_msg { | |
+ struct ofp_header header; | |
+ uint32_t bundle_id; /* Identify the bundle. */ | |
+ uint16_t pad; /* Align to 64 bits. */ | |
+ uint16_t flags; /* Bitmap of OFPBF_* flags. */ | |
+ struct ofp_header message; /* Message added to the bundle. */ | |
+ /* If there is one property or more, 'message' is followed by: | |
+ * - Exactly (message.length + 7)/8*8 - (message.length) (between 0 and 7) | |
+ * bytes of all-zero bytes */ | |
+ /* Bundle Property list. */ | |
+ //struct ofp_bundle_prop_header properties[0]; /* Zero or more properties. */ | |
+}; | |
+ | |
+struct ofp_bundle_ctrl_msg { | |
+ struct ofp_header header; | |
+ uint32_t bundle_id; /* Identify the bundle. */ | |
+ uint16_t type; /* OFPBCT_*. */ | |
+ uint16_t flags; /* Bitmap of OFPBF_* flags. */ | |
+ /* Bundle Property list. */ | |
+ struct ofp_bundle_prop_header properties[0]; /* Zero or more properties. */ | |
+}; | |
+ | |
+struct ofp_bundle_prop_experimenter { | |
+ uint16_t type; /* OFPBPT_EXPERIMENTER. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t experimenter; /* Experimenter ID which takes the same | |
+ form as in struct | |
+ ofp_experimenter_header. */ | |
+ uint32_t 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 */ | |
+ uint32_t experimenter_data[0]; | |
+}; | |
+ | |
+struct ofp_bundle_prop_header { | |
+ uint16_t type; /* One of OFPBPT_*. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+}; | |
+ | |
struct ofp_desc { | |
char mfr_desc[DESC_STR_LEN]; /* Manufacturer description. */ | |
char hw_desc[DESC_STR_LEN]; /* Hardware description. */ | |
@@ -143,11 +223,10 @@ | |
struct ofp_error_experimenter_msg { | |
struct ofp_header header; | |
uint16_t type; /* OFPET_EXPERIMENTER. */ | |
- uint16_t exp_type; /* Experimenter defined. */ | |
- uint32_t experimenter; /* Experimenter ID which takes the same form | |
- as in struct ofp_experimenter_header. */ | |
+ uint16_t exp_code; /* Experimenter defined. */ | |
+ uint32_t experimenter; /* Experimenter ID. */ | |
uint8_t data[0]; /* Variable-length data. Interpreted based | |
- on the type and code. No padding. */ | |
+ on the type and experimenter. No padding. */ | |
}; | |
struct ofp_error_msg { | |
@@ -158,22 +237,30 @@ | |
on the type and code. No padding. */ | |
}; | |
-struct ofp_experimenter_header { | |
+struct ofp_experimenter_msg { | |
struct ofp_header header; /* Type OFPT_EXPERIMENTER. */ | |
uint32_t experimenter; /* Experimenter ID: | |
* - MSB 0: low-order bytes are IEEE OUI. | |
* - MSB != 0: defined by ONF. */ | |
uint32_t exp_type; /* Experimenter defined. */ | |
/* Experimenter-defined arbitrary additional data. */ | |
+ uint8_t experimenter_data[0]; | |
}; | |
struct ofp_experimenter_multipart_header { | |
- uint32_t experimenter; /* Experimenter ID which takes the same form | |
- as in struct ofp_experimenter_header. */ | |
+ uint32_t experimenter; /* Experimenter ID. */ | |
uint32_t exp_type; /* Experimenter defined. */ | |
/* Experimenter-defined arbitrary additional data. */ | |
}; | |
+struct ofp_experimenter_structure { | |
+ uint32_t experimenter; /* Experimenter ID: | |
+ * - MSB 0: low-order bytes are IEEE OUI. | |
+ * - MSB != 0: defined by ONF. */ | |
+ uint32_t exp_type; /* Experimenter defined. */ | |
+ uint8_t experimenter_data[0]; | |
+}; | |
+ | |
struct ofp_flow_mod { | |
struct ofp_header header; | |
uint64_t cookie; /* Opaque controller-issued identifier. */ | |
@@ -202,13 +289,23 @@ | |
output group. A value of OFPG_ANY | |
indicates no restriction. */ | |
uint16_t flags; /* Bitmap of OFPFF_* flags. */ | |
- uint8_t pad[2]; | |
+ uint16_t importance; /* Eviction precedence (optional). */ | |
struct ofp_match match; /* Fields to match. Variable size. */ | |
/* The variable size and padded match is always followed by instructions. */ | |
- //struct ofp_instruction instructions[0]; /* Instruction set - 0 or more. | |
- The length of the instruction | |
- set is inferred from the | |
- length field in the header. */ | |
+ //struct ofp_instruction_header instructions[0]; | |
+ /* Instruction set - 0 or more. The length | |
+ of the instruction set is inferred from | |
+ the length field in the header. */ | |
+}; | |
+ | |
+struct ofp_flow_monitor_request { | |
+ uint32_t monitor_id; /* Controller-assigned ID for this monitor. */ | |
+ uint32_t out_port; /* Required output port, if not OFPP_ANY. */ | |
+ uint32_t out_group; /* Required output port, if not OFPG_ANY. */ | |
+ uint16_t flags; /* OFFMF_*. */ | |
+ uint8_t table_id; /* One table's ID or OFPTT_ALL (all tables). */ | |
+ uint8_t command; /* One of OFPFMC_*. */ | |
+ struct ofp_match match; /* Fields to match. Variable size. */ | |
}; | |
struct ofp_flow_removed { | |
@@ -238,13 +335,14 @@ | |
uint16_t idle_timeout; /* Number of seconds idle before expiration. */ | |
uint16_t hard_timeout; /* Number of seconds before expiration. */ | |
uint16_t flags; /* Bitmap of OFPFF_* flags. */ | |
- uint8_t pad2[4]; /* Align to 64-bits. */ | |
+ uint16_t importance; /* Eviction precedence. */ | |
+ uint8_t pad2[2]; /* Align to 64-bits. */ | |
uint64_t cookie; /* Opaque controller-issued identifier. */ | |
uint64_t packet_count; /* Number of packets in flow. */ | |
uint64_t byte_count; /* Number of bytes in flow. */ | |
struct ofp_match match; /* Description of fields. Variable size. */ | |
- /* The variable size and padded match is always followed by instructions. */ | |
- //struct ofp_instruction instructions[0]; /* Instruction set - 0 or more. */ | |
+ //struct ofp_instruction_header instructions[0]; | |
+ /* Instruction set - 0 or more. */ | |
}; | |
struct ofp_flow_stats_request { | |
@@ -266,6 +364,42 @@ | |
struct ofp_match match; /* Fields to match. Variable size. */ | |
}; | |
+struct ofp_flow_update_abbrev { | |
+ uint16_t length; /* Length is 8. */ | |
+ uint16_t event; /* OFPFME_ABBREV. */ | |
+ uint32_t xid; /* Controller-specified xid from flow_mod. */ | |
+}; | |
+ | |
+struct ofp_flow_update_full { | |
+ uint16_t length; /* Length is 32 + match + instructions. */ | |
+ uint16_t event; /* One of OFPFME_*. */ | |
+ uint8_t table_id; /* ID of flow's table. */ | |
+ uint8_t reason; /* OFPRR_* for OFPFME_REMOVED, else zero. */ | |
+ uint16_t idle_timeout; /* Number of seconds idle before expiration. */ | |
+ uint16_t hard_timeout; /* Number of seconds before expiration. */ | |
+ uint16_t priority; /* Priority of the entry. */ | |
+ uint8_t zeros[4]; /* Reserved, currently zeroed. */ | |
+ uint64_t cookie; /* Opaque controller-issued identifier. */ | |
+ struct ofp_match match; /* Fields to match. Variable size. */ | |
+ /* Instruction set. | |
+ * If OFPFMF_INSTRUCTIONS was not specified, or 'event' is | |
+ * OFPFME_REMOVED, no instructions are included. | |
+ */ | |
+ //struct ofp_instruction instructions[0]; | |
+}; | |
+ | |
+struct ofp_flow_update_header { | |
+ uint16_t length; /* Length of this entry. */ | |
+ uint16_t event; /* One of OFPFME_*. */ | |
+ /* ...other data depending on 'event'... */ | |
+}; | |
+ | |
+struct ofp_flow_update_paused { | |
+ uint16_t length; /* Length is 8. */ | |
+ uint16_t event; /* One of OFPFME_*. */ | |
+ uint8_t zeros[4]; /* Reserved, currently zeroed. */ | |
+}; | |
+ | |
struct ofp_group_desc { | |
uint16_t length; /* Length of this entry. */ | |
uint8_t type; /* One of OFPGT_*. */ | |
@@ -341,35 +475,40 @@ | |
uint32_t bitmaps[0]; /* List of bitmaps - supported versions */ | |
}; | |
-struct ofp_instruction { | |
- uint16_t type; /* Instruction type */ | |
- uint16_t len; /* Length of this struct in bytes. */ | |
-}; | |
- | |
struct ofp_instruction_actions { | |
uint16_t type; /* One of OFPIT_*_ACTIONS */ | |
- uint16_t len; /* Length of this struct in bytes. */ | |
+ uint16_t len; /* Length is padded to 64 bits. */ | |
uint8_t pad[4]; /* Align to 64-bits */ | |
struct ofp_action_header actions[0]; /* 0 or more actions associated with | |
OFPIT_WRITE_ACTIONS and | |
OFPIT_APPLY_ACTIONS */ | |
}; | |
-struct ofp_instruction_experimenter { | |
- uint16_t type; /* OFPIT_EXPERIMENTER */ | |
- uint16_t len; /* Length of this struct in bytes */ | |
- uint32_t experimenter; /* Experimenter ID which takes the same form | |
- as in struct ofp_experimenter_header. */ | |
+struct ofp_instruction_experimenter_header { | |
+ uint16_t type; /* OFPIT_EXPERIMENTER. */ | |
+ uint16_t len; /* Length is padded to 64 bits. */ | |
+ uint32_t experimenter; /* Experimenter ID. */ | |
/* Experimenter-defined arbitrary additional data. */ | |
}; | |
struct ofp_instruction_goto_table { | |
uint16_t type; /* OFPIT_GOTO_TABLE */ | |
- uint16_t len; /* Length of this struct in bytes. */ | |
+ uint16_t len; /* Length is 8. */ | |
uint8_t table_id; /* Set next table in the lookup pipeline */ | |
uint8_t pad[3]; /* Pad to 64 bits. */ | |
}; | |
+struct ofp_instruction_header { | |
+ uint16_t type; /* One of OFPIT_*. */ | |
+ uint16_t len; /* Length of this struct in bytes. */ | |
+}; | |
+ | |
+struct ofp_instruction_id { | |
+ uint16_t type; /* One of OFPIT_*. */ | |
+ uint16_t len; /* Length is 4 or experimenter defined. */ | |
+ uint8_t exp_data[0]; /* Optional experimenter id + data. */ | |
+}; | |
+ | |
struct ofp_instruction_meter { | |
uint16_t type; /* OFPIT_METER */ | |
uint16_t len; /* Length is 8. */ | |
@@ -378,7 +517,7 @@ | |
struct ofp_instruction_write_metadata { | |
uint16_t type; /* OFPIT_WRITE_METADATA */ | |
- uint16_t len; /* Length of this struct in bytes. */ | |
+ uint16_t len; /* Length is 24. */ | |
uint8_t pad[4]; /* Align to 64-bits */ | |
uint64_t metadata; /* Metadata value to write */ | |
uint64_t metadata_mask; /* Metadata write bitmask */ | |
@@ -400,7 +539,7 @@ | |
struct ofp_meter_band_drop { | |
uint16_t type; /* OFPMBT_DROP. */ | |
- uint16_t len; /* Length in bytes of this band. */ | |
+ uint16_t len; /* Length is 16. */ | |
uint32_t rate; /* Rate for dropping packets. */ | |
uint32_t burst_size; /* Size of bursts. */ | |
uint8_t pad[4]; | |
@@ -408,7 +547,7 @@ | |
struct ofp_meter_band_dscp_remark { | |
uint16_t type; /* OFPMBT_DSCP_REMARK. */ | |
- uint16_t len; /* Length in bytes of this band. */ | |
+ uint16_t len; /* Length is 16. */ | |
uint32_t rate; /* Rate for remarking packets. */ | |
uint32_t burst_size; /* Size of bursts. */ | |
uint8_t prec_level; /* Number of drop precedence level to add. */ | |
@@ -420,9 +559,7 @@ | |
uint16_t len; /* Length in bytes of this band. */ | |
uint32_t rate; /* Rate for this band. */ | |
uint32_t burst_size; /* Size of bursts. */ | |
- uint32_t experimenter; /* Experimenter ID which takes the same | |
- form as in struct | |
- ofp_experimenter_header. */ | |
+ uint32_t experimenter; /* Experimenter ID. */ | |
}; | |
struct ofp_meter_band_header { | |
@@ -501,8 +638,7 @@ | |
struct ofp_oxm_experimenter_header { | |
uint32_t oxm_header; /* oxm_class = OFPXMC_EXPERIMENTER */ | |
- uint32_t experimenter; /* Experimenter ID which takes the same | |
- form as in struct ofp_experimenter_header. */ | |
+ uint32_t experimenter; /* Experimenter ID. */ | |
}; | |
struct ofp_packet_in { | |
@@ -532,27 +668,28 @@ | |
uint8_t pad[6]; | |
struct ofp_action_header actions[0]; /* Action list - 0 or more. */ | |
/* The variable size action list is optionally followed by packet data. | |
- * This data is only present and meaningful if buffer_id == -1. | |
+ * This data is only present and meaningful if buffer_id == -1. */ | |
/* uint8_t data[0]; */ /* Packet data. The length is inferred | |
from the length field in the header. */ | |
}; | |
-struct ofp_packet_queue { | |
- uint32_t queue_id; /* id for the specific queue. */ | |
- uint32_t port; /* Port this queue is attached to. */ | |
- uint16_t len; /* Length in bytes of this queue desc. */ | |
- uint8_t pad[6]; /* 64-bit alignment. */ | |
- struct ofp_queue_prop_header properties[0]; /* List of properties. */ | |
-}; | |
- | |
struct ofp_port { | |
uint32_t port_no; | |
- uint8_t pad[4]; | |
+ uint16_t length; | |
+ uint8_t pad[2]; | |
uint8_t hw_addr[OFP_ETH_ALEN]; | |
uint8_t pad2[2]; /* Align to 64 bits. */ | |
char name[OFP_MAX_PORT_NAME_LEN]; /* Null-terminated */ | |
uint32_t config; /* Bitmap of OFPPC_* flags. */ | |
uint32_t state; /* Bitmap of OFPPS_* flags. */ | |
+ /* Port description property list - 0 or more properties */ | |
+ struct ofp_port_desc_prop_header properties[0]; | |
+}; | |
+ | |
+struct ofp_port_desc_prop_ethernet { | |
+ uint16_t type; /* OFPPDPT_ETHERNET. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint8_t pad[4]; /* Align to 64 bits. */ | |
/* Bitmaps of OFPPF_* that describe features. All bits zeroed if | |
* unsupported or unavailable. */ | |
uint32_t curr; /* Current features. */ | |
@@ -563,6 +700,40 @@ | |
uint32_t max_speed; /* Max port bitrate in kbps */ | |
}; | |
+struct ofp_port_desc_prop_experimenter { | |
+ uint16_t type; /* OFPPDPT_EXPERIMENTER. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t experimenter; /* Experimenter ID which takes the same | |
+ form as in struct | |
+ ofp_experimenter_header. */ | |
+ uint32_t 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 */ | |
+ uint32_t experimenter_data[0]; | |
+}; | |
+ | |
+struct ofp_port_desc_prop_header { | |
+ uint16_t type; /* One of OFPPDPT_*. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+}; | |
+ | |
+struct ofp_port_desc_prop_optical { | |
+ uint16_t type; /* OFPPDPT_3OPTICAL. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint8_t pad[4]; /* Align to 64 bits. */ | |
+ uint32_t supported; /* Features supported by the port. */ | |
+ uint32_t tx_min_freq_lmda; /* Minimum TX Frequency/Wavelength */ | |
+ uint32_t tx_max_freq_lmda; /* Maximum TX Frequency/Wavelength */ | |
+ uint32_t tx_grid_freq_lmda; /* TX Grid Spacing Frequency/Wavelength */ | |
+ uint32_t rx_min_freq_lmda; /* Minimum RX Frequency/Wavelength */ | |
+ uint32_t rx_max_freq_lmda; /* Maximum RX Frequency/Wavelength */ | |
+ uint32_t rx_grid_freq_lmda; /* RX Grid Spacing Frequency/Wavelength */ | |
+ uint16_t tx_pwr_min; /* Minimum TX power */ | |
+ uint16_t tx_pwr_max; /* Maximum TX power */ | |
+}; | |
+ | |
struct ofp_port_mod { | |
struct ofp_header header; | |
uint32_t port_no; | |
@@ -575,14 +746,53 @@ | |
uint8_t pad2[2]; /* Pad to 64 bits. */ | |
uint32_t config; /* Bitmap of OFPPC_* flags. */ | |
uint32_t mask; /* Bitmap of OFPPC_* flags to be changed. */ | |
+ /* Port mod property list - 0 or more properties */ | |
+ struct ofp_port_mod_prop_header properties[0]; | |
+}; | |
+ | |
+struct ofp_port_mod_prop_ethernet { | |
+ uint16_t type; /* OFPPMPT_ETHERNET. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
uint32_t advertise; /* Bitmap of OFPPF_*. Zero all bits to prevent | |
any action taking place. */ | |
- uint8_t pad3[4]; /* Pad to 64 bits. */ | |
+}; | |
+ | |
+struct ofp_port_mod_prop_experimenter { | |
+ uint16_t type; /* OFPPMPT_EXPERIMENTER. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t experimenter; /* Experimenter ID which takes the same | |
+ form as in struct | |
+ ofp_experimenter_header. */ | |
+ uint32_t 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 */ | |
+ uint32_t experimenter_data[0]; | |
+}; | |
+ | |
+struct ofp_port_mod_prop_header { | |
+ uint16_t type; /* One of OFPPMPT_*. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+}; | |
+ | |
+struct ofp_port_mod_prop_optical { | |
+ uint16_t type; /* OFPPMPT_OPTICAL. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t configure; /* Bitmap of OFPOPF_*. */ | |
+ uint32_t freq_lmda; /* The "center" frequency */ | |
+ int32_t fl_offset; /* signed frequency offset */ | |
+ uint32_t grid_span; /* The size of the grid for this port */ | |
+ uint32_t tx_pwr; /* tx power setting */ | |
}; | |
struct ofp_port_stats { | |
+ uint16_t length; /* Length of this entry. */ | |
+ uint8_t pad[2]; /* Align to 64 bits. */ | |
uint32_t port_no; | |
- uint8_t pad[4]; /* Align to 64-bits. */ | |
+ uint32_t duration_sec; /* Time port has been alive in seconds. */ | |
+ uint32_t duration_nsec; /* Time port has been alive in nanoseconds beyond | |
+ duration_sec. */ | |
uint64_t rx_packets; /* Number of received packets. */ | |
uint64_t tx_packets; /* Number of transmitted packets. */ | |
uint64_t rx_bytes; /* Number of received bytes. */ | |
@@ -592,18 +802,59 @@ | |
uint64_t rx_errors; /* Number of receive errors. This is a super-set | |
of more specific receive errors and should be | |
greater than or equal to the sum of all | |
- rx_*_err values. */ | |
+ rx_*_err values in properties. */ | |
uint64_t tx_errors; /* Number of transmit errors. This is a super-set | |
of more specific transmit errors and should be | |
greater than or equal to the sum of all | |
tx_*_err values (none currently defined.) */ | |
+ /* Port description property list - 0 or more properties */ | |
+ struct ofp_port_desc_prop_header properties[0]; | |
+}; | |
+ | |
+struct ofp_port_stats_prop_ethernet { | |
+ uint16_t type; /* OFPPSPT_ETHERNET. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint8_t pad[4]; /* Align to 64 bits. */ | |
uint64_t rx_frame_err; /* Number of frame alignment errors. */ | |
uint64_t rx_over_err; /* Number of packets with RX overrun. */ | |
uint64_t rx_crc_err; /* Number of CRC errors. */ | |
uint64_t collisions; /* Number of collisions. */ | |
- uint32_t duration_sec; /* Time port has been alive in seconds. */ | |
- uint32_t duration_nsec; /* Time port has been alive in nanoseconds beyond | |
- duration_sec. */ | |
+}; | |
+ | |
+struct ofp_port_stats_prop_experimenter { | |
+ uint16_t type; /* OFPPSPT_EXPERIMENTER. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t experimenter; /* Experimenter ID which takes the same | |
+ form as in struct | |
+ ofp_experimenter_header. */ | |
+ uint32_t 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 */ | |
+ uint32_t experimenter_data[0]; | |
+}; | |
+ | |
+struct ofp_port_stats_prop_header { | |
+ uint16_t type; /* One of OFPPSPT_*. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+}; | |
+ | |
+struct ofp_port_stats_prop_optical { | |
+ uint16_t type; /* OFPPSPT_OPTICAL. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint8_t pad[4]; /* Align to 64 bits. */ | |
+ uint32_t flags; /* Features enabled by the port. */ | |
+ uint32_t tx_freq_lmda; /* Current TX Frequency/Wavelength */ | |
+ uint32_t tx_offset; /* TX Offset */ | |
+ uint32_t tx_grid_span; /* TX Grid Spacing */ | |
+ uint32_t rx_freq_lmda; /* Current RX Frequency/Wavelength */ | |
+ uint32_t rx_offset; /* RX Offset */ | |
+ uint32_t rx_grid_span; /* RX Grid Spacing */ | |
+ uint16_t tx_pwr; /* Current TX power */ | |
+ uint16_t rx_pwr; /* Current RX power */ | |
+ uint16_t bias_current; /* TX Bias Current */ | |
+ uint16_t temperature; /* TX Laser Temperature */ | |
}; | |
struct ofp_port_stats_request { | |
@@ -621,51 +872,56 @@ | |
struct ofp_port desc; | |
}; | |
-struct ofp_queue_get_config_reply { | |
- struct ofp_header header; | |
- uint32_t port; | |
- uint8_t pad[4]; | |
- struct ofp_packet_queue queues[0]; /* List of configured queues. */ | |
-}; | |
- | |
-struct ofp_queue_get_config_request { | |
- struct ofp_header header; | |
- uint32_t port; /* Port to be queried. Should refer | |
- to a valid physical port (i.e. < OFPP_MAX), | |
- or OFPP_ANY to request all configured | |
- queues.*/ | |
- uint8_t pad[4]; | |
+struct ofp_queue_desc { | |
+ uint32_t port_no; /* Port this queue is attached to. */ | |
+ uint32_t queue_id; /* id for the specific queue. */ | |
+ uint16_t len; /* Length in bytes of this queue desc. */ | |
+ uint8_t pad[6]; /* 64-bit alignment. */ | |
+ struct ofp_queue_desc_prop_header properties[0]; /* List of properties. */ | |
}; | |
-struct ofp_queue_prop_experimenter { | |
- struct ofp_queue_prop_header prop_header; /* prop: OFPQT_EXPERIMENTER, len: 16. */ | |
+struct ofp_queue_desc_prop_experimenter { | |
+ uint16_t type; /* OFPQDPT_EXPERIMENTER. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
uint32_t experimenter; /* Experimenter ID which takes the same | |
form as in struct | |
ofp_experimenter_header. */ | |
- uint8_t pad[4]; /* 64-bit alignment */ | |
- uint8_t data[0]; /* Experimenter defined data. */ | |
+ uint32_t 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 */ | |
+ uint32_t experimenter_data[0]; | |
}; | |
-struct ofp_queue_prop_header { | |
- uint16_t property; /* One of OFPQT_. */ | |
- uint16_t len; /* Length of property, including this header. */ | |
- uint8_t pad[4]; /* 64-bit alignemnt. */ | |
+struct ofp_queue_desc_prop_header { | |
+ uint16_t type; /* One of OFPQDPT_*. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
}; | |
-struct ofp_queue_prop_max_rate { | |
- struct ofp_queue_prop_header prop_header; /* prop: OFPQT_MAX, len: 16. */ | |
+struct ofp_queue_desc_prop_max_rate { | |
+ uint16_t type; /* OFPQDPT_MAX_RATE. */ | |
+ uint16_t length; /* Length is 8. */ | |
uint16_t rate; /* In 1/10 of a percent; >1000 -> disabled. */ | |
- uint8_t pad[6]; /* 64-bit alignment */ | |
+ uint8_t pad[2]; /* 64-bit alignment */ | |
}; | |
-struct ofp_queue_prop_min_rate { | |
- struct ofp_queue_prop_header prop_header; /* prop: OFPQT_MIN, len: 16. */ | |
+struct ofp_queue_desc_prop_min_rate { | |
+ uint16_t type; /* OFPQDPT_MIN_RATE. */ | |
+ uint16_t length; /* Length is 8. */ | |
uint16_t rate; /* In 1/10 of a percent; >1000 -> disabled. */ | |
- uint8_t pad[6]; /* 64-bit alignment */ | |
+ uint8_t pad[2]; /* 64-bit alignment */ | |
+}; | |
+ | |
+struct ofp_queue_desc_request { | |
+ uint32_t port_no; /* All ports if OFPP_ANY. */ | |
+ uint32_t queue_id; /* All queues if OFPQ_ALL. */ | |
}; | |
struct ofp_queue_stats { | |
- uint32_t port_no; | |
+ uint16_t length; /* Length of this entry. */ | |
+ uint8_t pad[6]; /* Align to 64 bits. */ | |
+ uint32_t port_no; /* Port the queue is attached to. */ | |
uint32_t queue_id; /* Queue i.d */ | |
uint64_t tx_bytes; /* Number of transmitted bytes. */ | |
uint64_t tx_packets; /* Number of transmitted packets. */ | |
@@ -673,6 +929,26 @@ | |
uint32_t duration_sec; /* Time queue has been alive in seconds. */ | |
uint32_t duration_nsec; /* Time queue has been alive in nanoseconds beyond | |
duration_sec. */ | |
+ struct ofp_queue_stats_prop_header properties[0]; /* List of properties. */ | |
+}; | |
+ | |
+struct ofp_queue_stats_prop_experimenter { | |
+ uint16_t type; /* OFPQSPT_EXPERIMENTER. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t experimenter; /* Experimenter ID which takes the same | |
+ form as in struct | |
+ ofp_experimenter_header. */ | |
+ uint32_t 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 */ | |
+ uint32_t experimenter_data[0]; | |
+}; | |
+ | |
+struct ofp_queue_stats_prop_header { | |
+ uint16_t type; /* One of OFPQSPT_*. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
}; | |
struct ofp_queue_stats_request { | |
@@ -680,6 +956,30 @@ | |
uint32_t queue_id; /* All queues if OFPQ_ALL. */ | |
}; | |
+struct ofp_requestforward_header { | |
+ struct ofp_header header; /* Type OFPT_REQUESTFORWARD. */ | |
+ struct ofp_header request; /* Request being forwarded. */ | |
+}; | |
+ | |
+struct ofp_role_prop_experimenter { | |
+ uint16_t type; /* One of OFPRPT_EXPERIMENTER. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t experimenter; /* Experimenter ID which takes the same | |
+ form as in struct | |
+ ofp_experimenter_header. */ | |
+ uint32_t 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 */ | |
+ uint32_t experimenter_data[0]; | |
+}; | |
+ | |
+struct ofp_role_prop_header { | |
+ uint16_t type; /* One of OFPRPT_*. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+}; | |
+ | |
struct ofp_role_request { | |
struct ofp_header header; /* Type OFPT_ROLE_REQUEST/OFPT_ROLE_REPLY. */ | |
uint32_t role; /* One of OFPCR_ROLE_*. */ | |
@@ -687,6 +987,16 @@ | |
uint64_t generation_id; /* Master Election Generation Id */ | |
}; | |
+struct ofp_role_status { | |
+ struct ofp_header header; /* Type OFPT_ROLE_REQUEST/OFPT_ROLE_REPLY. */ | |
+ uint32_t role; /* One of OFPCR_ROLE_*. */ | |
+ uint8_t reason; /* One of OFPCRR_*. */ | |
+ uint8_t pad[3]; /* Align to 64 bits. */ | |
+ uint64_t generation_id; /* Master Election Generation Id */ | |
+ /* Role Property list */ | |
+ struct ofp_role_prop_header properties[0]; | |
+}; | |
+ | |
struct ofp_switch_config { | |
struct ofp_header header; | |
uint16_t flags; /* Bitmap of OFPC_* flags. */ | |
@@ -710,6 +1020,16 @@ | |
uint32_t reserved; | |
}; | |
+struct ofp_table_desc { | |
+ uint16_t 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. */ | |
+ uint32_t config; /* Bitmap of OFPTC_* values. */ | |
+ /* Table Mod Property list - 0 or more. */ | |
+ struct ofp_table_mod_prop_header properties[0]; | |
+}; | |
+ | |
struct ofp_table_feature_prop_actions { | |
uint16_t type; /* One of OFPTFPT_WRITE_ACTIONS, | |
OFPTFPT_WRITE_ACTIONS_MISS, | |
@@ -720,7 +1040,7 @@ | |
* - Exactly (length - 4) bytes containing the action_ids, then | |
* - Exactly (length + 7)/8*8 - (length) (between 0 and 7) | |
* bytes of all-zero bytes */ | |
- struct ofp_action_header action_ids[0]; /* List of actions */ | |
+ struct ofp_action_id action_ids[0]; /* List of actions */ | |
}; | |
struct ofp_table_feature_prop_experimenter { | |
@@ -751,18 +1071,7 @@ | |
* - Exactly (length - 4) bytes containing the instruction ids, then | |
* - Exactly (length + 7)/8*8 - (length) (between 0 and 7) | |
* bytes of all-zero bytes */ | |
- struct ofp_instruction instruction_ids[0]; /* List of instructions */ | |
-}; | |
- | |
-struct ofp_table_feature_prop_next_tables { | |
- uint16_t type; /* One of OFPTFPT_NEXT_TABLES, | |
- OFPTFPT_NEXT_TABLES_MISS. */ | |
- uint16_t length; /* Length in bytes of this property. */ | |
- /* Followed by: | |
- * - Exactly (length - 4) bytes containing the table_ids, then | |
- * - Exactly (length + 7)/8*8 - (length) (between 0 and 7) | |
- * bytes of all-zero bytes */ | |
- uint8_t next_table_ids[0]; /* List of table ids. */ | |
+ struct ofp_instruction_id instruction_ids[0]; /* List of instructions */ | |
}; | |
struct ofp_table_feature_prop_oxm { | |
@@ -780,6 +1089,18 @@ | |
uint32_t oxm_ids[0]; /* Array of OXM headers */ | |
}; | |
+struct ofp_table_feature_prop_tables { | |
+ uint16_t type; /* One of OFPTFPT_NEXT_TABLES, | |
+ OFPTFPT_NEXT_TABLES_MISS, | |
+ OFPTFPT_TABLE_SYNC_FROM. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ /* Followed by: | |
+ * - Exactly (length - 4) bytes containing the table_ids, then | |
+ * - Exactly (length + 7)/8*8 - (length) (between 0 and 7) | |
+ * bytes of all-zero bytes */ | |
+ uint8_t table_ids[0]; /* List of table ids. */ | |
+}; | |
+ | |
struct ofp_table_features { | |
uint16_t length; /* Length is padded to 64 bits. */ | |
uint8_t table_id; /* Identifier of table. Lower numbered tables | |
@@ -788,7 +1109,7 @@ | |
char name[OFP_MAX_TABLE_NAME_LEN]; | |
uint64_t metadata_match; /* Bits of metadata table can match. */ | |
uint64_t metadata_write; /* Bits of metadata table can write. */ | |
- uint32_t config; /* Bitmap of OFPTC_* values */ | |
+ uint32_t capabilities; /* Bitmap of OFPTC_* values. */ | |
uint32_t max_entries; /* Max number of entries supported. */ | |
/* Table Feature Property list */ | |
struct ofp_table_feature_prop_header properties[0]; /* List of properties */ | |
@@ -799,6 +1120,42 @@ | |
uint8_t table_id; /* ID of the table, OFPTT_ALL indicates all tables */ | |
uint8_t pad[3]; /* Pad to 32 bits */ | |
uint32_t config; /* Bitmap of OFPTC_* flags */ | |
+ /* Table Mod Property list */ | |
+ struct ofp_table_mod_prop_header properties[0]; | |
+}; | |
+ | |
+struct ofp_table_mod_prop_eviction { | |
+ uint16_t type; /* OFPTMPT_EVICTION. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t flags; /* Bitmap of OFPTMPEF_* flags */ | |
+}; | |
+ | |
+struct ofp_table_mod_prop_experimenter { | |
+ uint16_t type; /* OFPTMPT_EXPERIMENTER. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint32_t experimenter; /* Experimenter ID which takes the same | |
+ form as in struct | |
+ ofp_experimenter_header. */ | |
+ uint32_t 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 */ | |
+ uint32_t experimenter_data[0]; | |
+}; | |
+ | |
+struct ofp_table_mod_prop_header { | |
+ uint16_t type; /* One of OFPTMPT_*. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+}; | |
+ | |
+struct ofp_table_mod_prop_vacancy { | |
+ uint16_t type; /* OFPTMPT_VACANCY. */ | |
+ uint16_t length; /* Length in bytes of this property. */ | |
+ uint8_t vacancy_down; /* Vacancy threshold when space decreases (%). */ | |
+ uint8_t vacancy_up; /* Vacancy threshold when space increases (%). */ | |
+ uint8_t vacancy; /* Current vacancy (%) - only in ofp_table_desc. */ | |
+ uint8_t pad[1]; /* Align to 64 bits. */ | |
}; | |
struct ofp_table_stats { | |
@@ -809,3 +1166,10 @@ | |
uint64_t lookup_count; /* Number of packets looked up in table. */ | |
uint64_t matched_count; /* Number of packets that hit table. */ | |
}; | |
+ | |
+struct ofp_table_status { | |
+ struct ofp_header header; | |
+ uint8_t reason; /* One of OFPTR_*. */ | |
+ uint8_t pad[7]; /* Pad to 64 bits */ | |
+ struct ofp_table_desc table; /* New table config. */ | |
+}; | |
--- enum132s.c 2013-09-24 15:50:26.831863900 +0900 | |
+++ enum14s.c 2013-09-24 15:50:42.086955700 +0900 | |
@@ -21,6 +21,29 @@ | |
OFPAT_EXPERIMENTER = 0xffff | |
}; | |
+enum ofp_async_config_failed_code { | |
+ OFPACFC_INVALID = 0, /* One mask is invalid. */ | |
+ OFPACFC_UNSUPPORTED = 1, /* Requested configuration not supported. */ | |
+ OFPACFC_EPERM = 2, /* Permissions error. */ | |
+}; | |
+ | |
+enum ofp_async_config_prop_type { | |
+ OFPACPT_PACKET_IN_SLAVE = 0, /* Packet-in mask for slave. */ | |
+ OFPACPT_PACKET_IN_MASTER = 1, /* Packet-in mask for master. */ | |
+ OFPACPT_PORT_STATUS_SLAVE = 2, /* Port-status mask for slave. */ | |
+ OFPACPT_PORT_STATUS_MASTER = 3, /* Port-status mask for master. */ | |
+ OFPACPT_FLOW_REMOVED_SLAVE = 4, /* Flow removed mask for slave. */ | |
+ OFPACPT_FLOW_REMOVED_MASTER = 5, /* Flow removed mask for master. */ | |
+ OFPACPT_ROLE_STATUS_SLAVE = 6, /* Role status mask for slave. */ | |
+ OFPACPT_ROLE_STATUS_MASTER = 7, /* Role status mask for master. */ | |
+ OFPACPT_TABLE_STATUS_SLAVE = 8, /* Table status mask for slave. */ | |
+ OFPACPT_TABLE_STATUS_MASTER = 9, /* Table status mask for master. */ | |
+ OFPACPT_REQUESTFORWARD_SLAVE = 10, /* RequestForward mask for slave. */ | |
+ OFPACPT_REQUESTFORWARD_MASTER = 11, /* RequestForward mask for master. */ | |
+ OFPTFPT_EXPERIMENTER_SLAVE = 0xFFFE, /* Experimenter for slave. */ | |
+ OFPTFPT_EXPERIMENTER_MASTER = 0xFFFF, /* Experimenter for master. */ | |
+}; | |
+ | |
enum ofp_bad_action_code { | |
OFPBAC_BAD_TYPE = 0, /* Unknown action type. */ | |
OFPBAC_BAD_LEN = 1, /* Length problem in actions. */ | |
@@ -55,6 +78,7 @@ | |
OFPBIC_BAD_EXP_TYPE = 6, /* Unknown instruction for experimenter id. */ | |
OFPBIC_BAD_LEN = 7, /* Length problem in instructions. */ | |
OFPBIC_EPERM = 8, /* Permissions error. */ | |
+ OFPBIC_DUP_INST = 9, /* Duplicate instruction. */ | |
}; | |
enum ofp_bad_match_code { | |
@@ -79,6 +103,18 @@ | |
OFPBMC_EPERM = 11, /* Permissions error. */ | |
}; | |
+enum ofp_bad_property_code { | |
+ OFPBPC_BAD_TYPE = 0, /* Unknown property type. */ | |
+ OFPBPC_BAD_LEN = 1, /* Length problem in property. */ | |
+ OFPBPC_BAD_VALUE = 2, /* Unsupported property value. */ | |
+ OFPBPC_TOO_MANY = 3, /* Can't handle this many properties. */ | |
+ OFPBPC_DUP_TYPE = 4, /* A property type was duplicated. */ | |
+ OFPBPC_BAD_EXPERIMENTER = 5, /* Unknown experimenter id specified. */ | |
+ OFPBPC_BAD_EXP_TYPE = 6, /* Unknown exp_type for experimenter id. */ | |
+ OFPBPC_BAD_EXP_VALUE = 7, /* Unknown value for experimenter id. */ | |
+ OFPBPC_EPERM = 8, /* Permissions error. */ | |
+}; | |
+ | |
enum ofp_bad_request_code { | |
OFPBRC_BAD_VERSION = 0, /* ofp_header.version not supported. */ | |
OFPBRC_BAD_TYPE = 1, /* ofp_header.type not supported. */ | |
@@ -99,6 +135,47 @@ | |
OFPBRC_BAD_PACKET = 12, /* Invalid packet in packet-out. */ | |
OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13, /* ofp_multipart_request | |
overflowed the assigned buffer. */ | |
+ OFPBRC_MULTIPART_REQUEST_TIMEOUT = 14, /* Timeout during multipart request. */ | |
+ OFPBRC_MULTIPART_REPLY_TIMEOUT = 15, /* Timeout during multipart reply. */ | |
+}; | |
+ | |
+enum ofp_bundle_ctrl_type { | |
+ OFPBCT_OPEN_REQUEST = 0, | |
+ OFPBCT_OPEN_REPLY = 1, | |
+ OFPBCT_CLOSE_REQUEST = 2, | |
+ OFPBCT_CLOSE_REPLY = 3, | |
+ OFPBCT_COMMIT_REQUEST = 4, | |
+ OFPBCT_COMMIT_REPLY = 5, | |
+ OFPBCT_DISCARD_REQUEST = 6, | |
+ OFPBCT_DISCARD_REPLY = 7, | |
+}; | |
+ | |
+enum ofp_bundle_failed_code { | |
+ OFPBFC_UNKNOWN = 0, /* Unspecified error. */ | |
+ OFPBFC_EPERM = 1, /* Permissions error. */ | |
+ OFPBFC_BAD_ID = 2, /* Bundle ID doesn't exist. */ | |
+ OFPBFC_BUNDLE_EXIST = 3, /* Bundle ID already exist. */ | |
+ OFPBFC_BUNDLE_CLOSED = 4, /* Bundle ID is closed. */ | |
+ OFPBFC_OUT_OF_BUNDLES = 5, /* Too many bundles IDs. */ | |
+ OFPBFC_BAD_TYPE = 6, /* Unsupported or unknown message control type. */ | |
+ OFPBFC_BAD_FLAGS = 7, /* Unsupported, unknown, or inconsistent flags. */ | |
+ OFPBFC_MSG_BAD_LEN = 8, /* Length problem in included message. */ | |
+ OFPBFC_MSG_BAD_XID = 9, /* Inconsistent or duplicate XID. */ | |
+ OFPBFC_MSG_UNSUP = 10, /* Unsupported message in this bundle. */ | |
+ OFPBFC_MSG_CONFLICT = 11, /* Unsupported message combination in this bundle. */ | |
+ OFPBFC_MSG_TOO_MANY = 12, /* Cant handle this many messages in bundle. */ | |
+ OFPBFC_MSG_FAILED = 13, /* One message in bundle failed. */ | |
+ OFPBFC_TIMEOUT = 14, /* Bundle is taking too long. */ | |
+ OFPBFC_BUNDLE_IN_PROGRESS = 15, /* Bundle is locking the resource. */ | |
+}; | |
+ | |
+enum ofp_bundle_flags { | |
+ OFPBF_ATOMIC = 1 << 0, /* Execute atomically. */ | |
+ OFPBF_ORDERED = 1 << 1, /* Execute in specified order. */ | |
+}; | |
+ | |
+enum ofp_bundle_prop_type { | |
+ OFPBPT_EXPERIMENTER = 0xFFFF, /* Experimenter property. */ | |
}; | |
enum ofp_capabilities { | |
@@ -134,6 +211,12 @@ | |
OFPCR_ROLE_SLAVE = 3, /* Read-only access. */ | |
}; | |
+enum ofp_controller_role_reason { | |
+ OFPCRR_MASTER_REQUEST = 0, /* Another controller asked to be master. */ | |
+ OFPCRR_CONFIG = 1, /* Configuration changed on the switch. */ | |
+ OFPCRR_EXPERIMENTER = 2, /* Experimenter data changed. */ | |
+}; | |
+ | |
enum ofp_error_type { | |
OFPET_HELLO_FAILED = 0, /* Hello protocol failed. */ | |
OFPET_BAD_REQUEST = 1, /* Request was not understood. */ | |
@@ -149,6 +232,10 @@ | |
OFPET_ROLE_REQUEST_FAILED = 11, /* Controller Role request failed. */ | |
OFPET_METER_MOD_FAILED = 12, /* Error in meter. */ | |
OFPET_TABLE_FEATURES_FAILED = 13, /* Setting table features failed. */ | |
+ OFPET_BAD_PROPERTY = 14, /* Some property is invalid. */ | |
+ OFPET_ASYNC_CONFIG_FAILED = 15, /* Asynchronous config request failed. */ | |
+ OFPET_FLOW_MONITOR_FAILED = 16, /* Setting flow monitor failed. */ | |
+ OFPET_BUNDLE_FAILED = 17, /* Bundle operation failed. */ | |
OFPET_EXPERIMENTER = 0xffff /* Experimenter error messages. */ | |
}; | |
@@ -183,6 +270,8 @@ | |
idle/hard timeout. */ | |
OFPFMFC_BAD_COMMAND = 6, /* Unsupported or unknown command. */ | |
OFPFMFC_BAD_FLAGS = 7, /* Unsupported or unknown flags. */ | |
+ OFPFMFC_CANT_SYNC = 8, /* Problem in table synchronisation. */ | |
+ OFPFMFC_BAD_PRIORITY = 9, /* Unsupported priority value. */ | |
}; | |
enum ofp_flow_mod_flags { | |
@@ -194,11 +283,59 @@ | |
OFPFF_NO_BYT_COUNTS = 1 << 4, /* Don't keep track of byte count. */ | |
}; | |
+enum ofp_flow_monitor_command { | |
+ OFPFMC_ADD = 0, /* New flow monitor. */ | |
+ OFPFMC_MODIFY = 1, /* Modify existing flow monitor. */ | |
+ OFPFMC_DELETE = 2, /* Delete/cancel existing flow monitor. */ | |
+}; | |
+ | |
+enum ofp_flow_monitor_failed_code { | |
+ OFPMOFC_UNKNOWN = 0, /* Unspecified error. */ | |
+ OFPMOFC_MONITOR_EXISTS = 1, /* Monitor not added because a Monitor ADD | |
+ * attempted to replace an existing Monitor. */ | |
+ OFPMOFC_INVALID_MONITOR = 2, /* Monitor not added because Monitor specified | |
+ * is invalid. */ | |
+ OFPMOFC_UNKNOWN_MONITOR = 3, /* Monitor not modified because a Monitor | |
+ MODIFY attempted to modify a non-existent | |
+ Monitor. */ | |
+ OFPMOFC_BAD_COMMAND = 4, /* Unsupported or unknown command. */ | |
+ OFPMOFC_BAD_FLAGS = 5, /* Flag configuration unsupported. */ | |
+ OFPMOFC_BAD_TABLE_ID = 6, /* Specified table does not exist. */ | |
+ OFPMOFC_BAD_OUT = 7, /* Error in output port/group. */ | |
+}; | |
+ | |
+enum ofp_flow_monitor_flags { | |
+ /* When to send updates. */ | |
+ OFPFMF_INITIAL = 1 << 0, /* Initially matching flows. */ | |
+ OFPFMF_ADD = 1 << 1, /* New matching flows as they are added. */ | |
+ OFPFMF_REMOVED = 1 << 2, /* Old matching flows as they are removed. */ | |
+ OFPFMF_MODIFY = 1 << 3, /* Matching flows as they are changed. */ | |
+ /* What to include in updates. */ | |
+ OFPFMF_INSTRUCTIONS = 1 << 4,/* If set, instructions are included. */ | |
+ OFPFMF_NO_ABBREV = 1 << 5, /* If set, include own changes in full. */ | |
+ OFPFMF_ONLY_OWN = 1 << 6, /* If set, don't include other controllers. */ | |
+}; | |
+ | |
enum ofp_flow_removed_reason { | |
OFPRR_IDLE_TIMEOUT = 0, /* Flow idle time exceeded idle_timeout. */ | |
OFPRR_HARD_TIMEOUT = 1, /* Time exceeded hard_timeout. */ | |
OFPRR_DELETE = 2, /* Evicted by a DELETE flow mod. */ | |
OFPRR_GROUP_DELETE = 3, /* Group was removed. */ | |
+ OFPRR_METER_DELETE = 4, /* Meter was removed. */ | |
+ OFPRR_EVICTION = 5, /* Switch eviction to free resources. */ | |
+}; | |
+ | |
+enum ofp_flow_update_event { | |
+ /* struct ofp_flow_update_full. */ | |
+ OFPFME_INITIAL = 0, /* Flow present when flow monitor created. */ | |
+ OFPFME_ADDED = 1, /* Flow was added. */ | |
+ OFPFME_REMOVED = 2, /* Flow was removed. */ | |
+ OFPFME_MODIFIED = 3, /* Flow instructions were changed. */ | |
+ /* struct ofp_flow_update_abbrev. */ | |
+ OFPFME_ABBREV = 4, /* Abbreviated reply. */ | |
+ /* struct ofp_flow_update_header. */ | |
+ OFPFME_PAUSED = 5, /* Monitoring paused (out of buffer space). */ | |
+ OFPFME_RESUMED = 6, /* Monitoring resumed. */ | |
}; | |
enum ofp_group { | |
@@ -394,7 +531,7 @@ | |
/* Queue statistics for a port | |
* The request body is struct ofp_queue_stats_request. | |
* The reply body is an array of struct ofp_queue_stats */ | |
- OFPMP_QUEUE = 5, | |
+ OFPMP_QUEUE_STATS = 5, | |
/* Group counter statistics. | |
* The request body is struct ofp_group_stats_request. | |
* The reply is an array of struct ofp_group_stats. */ | |
@@ -430,6 +567,18 @@ | |
* The request body is empty. | |
* The reply body is an array of struct ofp_port. */ | |
OFPMP_PORT_DESC = 13, | |
+ /* Table description. | |
+ * The request body is empty. | |
+ * The reply body is an array of struct ofp_table_desc. */ | |
+ OFPMP_TABLE_DESC = 14, | |
+ /* Queue description. | |
+ * The request body is struct ofp_queue_desc_request. | |
+ * The reply body is an array of struct ofp_queue_desc. */ | |
+ OFPMP_QUEUE_DESC = 15, | |
+ /* Flow monitors. | |
+ * The request body is struct ofp_flow_monitor_request. | |
+ * The reply body is an array of struct ofp_flow_update_header. */ | |
+ OFPMP_FLOW_MONITOR = 16, | |
/* Experimenter extension. | |
* The request and reply bodies begin with | |
* struct ofp_experimenter_multipart_header. | |
@@ -437,6 +586,13 @@ | |
OFPMP_EXPERIMENTER = 0xffff | |
}; | |
+enum ofp_optical_port_features { | |
+ OFPOPF_RX_TUNE = 1 << 0, /* Receiver is tunable */ | |
+ OFPOPF_TX_TUNE = 1 << 1, /* Transmit is tunable */ | |
+ OFPOPF_TX_PWR = 1 << 2, /* Power is configurable */ | |
+ OFPOPF_USE_FREQ = 1 << 3, /* Use Frequency, not wavelength */ | |
+}; | |
+ | |
enum ofp_oxm_class { | |
OFPXMC_NXM_0 = 0x0000, /* Backward compatibility with NXM */ | |
OFPXMC_NXM_1 = 0x0001, /* Backward compatibility with NXM */ | |
@@ -445,9 +601,12 @@ | |
}; | |
enum ofp_packet_in_reason { | |
- OFPR_NO_MATCH = 0, /* No matching flow (table-miss flow entry). */ | |
- OFPR_ACTION = 1, /* Action explicitly output to controller. */ | |
+ OFPR_TABLE_MISS = 0, /* No matching flow (table-miss flow entry). */ | |
+ OFPR_APPLY_ACTION = 1, /* Output to controller in apply-actions. */ | |
OFPR_INVALID_TTL = 2, /* Packet has invalid TTL */ | |
+ OFPR_ACTION_SET = 3, /* Output to controller in action set. */ | |
+ OFPR_GROUP = 4, /* Output to controller in group bucket. */ | |
+ OFPR_PACKET_OUT = 5, /* Output to controller in packet-out. */ | |
}; | |
enum ofp_port_config { | |
@@ -457,6 +616,12 @@ | |
OFPPC_NO_PACKET_IN = 1 << 6 /* Do not send packet-in msgs for port. */ | |
}; | |
+enum ofp_port_desc_prop_type { | |
+ OFPPDPT_ETHERNET = 0, /* Ethernet property. */ | |
+ OFPPDPT_OPTICAL = 1, /* Optical property. */ | |
+ OFPPDPT_EXPERIMENTER = 0xFFFF, /* Experimenter property. */ | |
+}; | |
+ | |
enum ofp_port_features { | |
OFPPF_10MB_HD = 1 << 0, /* 10 Mb half-duplex rate support. */ | |
OFPPF_10MB_FD = 1 << 1, /* 10 Mb full-duplex rate support. */ | |
@@ -485,6 +650,12 @@ | |
OFPPMFC_EPERM = 4, /* Permissions error. */ | |
}; | |
+enum ofp_port_mod_prop_type { | |
+ OFPPMPT_ETHERNET = 0, /* Ethernet property. */ | |
+ OFPPMPT_OPTICAL = 1, /* Optical property. */ | |
+ OFPPMPT_EXPERIMENTER = 0xFFFF, /* Experimenter property. */ | |
+}; | |
+ | |
enum ofp_port_no { | |
/* Maximum number of physical and logical switch ports. */ | |
OFPP_MAX = 0xffffff00, | |
@@ -520,16 +691,44 @@ | |
OFPPS_LIVE = 1 << 2, /* Live for Fast Failover Group. */ | |
}; | |
+enum ofp_port_stats_optical_flags { | |
+ OFPOSF_RX_TUNE = 1 << 0, /* Receiver tune info valid */ | |
+ OFPOSF_TX_TUNE = 1 << 1, /* Transmit tune info valid */ | |
+ OFPOSF_TX_PWR = 1 << 2, /* TX Power is valid */ | |
+ OFPOSF_RX_PWR = 1 << 4, /* RX power is valid */ | |
+ OFPOSF_TX_BIAS = 1 << 5, /* Transmit bias is valid */ | |
+ OFPOSF_TX_TEMP = 1 << 6, /* TX Temp is valid */ | |
+}; | |
+ | |
+enum ofp_port_stats_prop_type { | |
+ OFPPSPT_ETHERNET = 0, /* Ethernet property. */ | |
+ OFPPSPT_OPTICAL = 1, /* Optical property. */ | |
+ OFPPSPT_EXPERIMENTER = 0xFFFF, /* Experimenter property. */ | |
+}; | |
+ | |
+enum ofp_queue_desc_prop_type { | |
+ OFPQDPT_MIN_RATE = 1, /* Minimum datarate guaranteed. */ | |
+ OFPQDPT_MAX_RATE = 2, /* Maximum datarate. */ | |
+ OFPQDPT_EXPERIMENTER = 0xffff /* Experimenter defined property. */ | |
+}; | |
+ | |
enum ofp_queue_op_failed_code { | |
OFPQOFC_BAD_PORT = 0, /* Invalid port (or port does not exist). */ | |
OFPQOFC_BAD_QUEUE = 1, /* Queue does not exist. */ | |
OFPQOFC_EPERM = 2, /* Permissions error. */ | |
}; | |
-enum ofp_queue_properties { | |
- OFPQT_MIN_RATE = 1, /* Minimum datarate guaranteed. */ | |
- OFPQT_MAX_RATE = 2, /* Maximum datarate. */ | |
- OFPQT_EXPERIMENTER = 0xffff /* Experimenter defined property. */ | |
+enum ofp_queue_stats_prop_type { | |
+ OFPQSPT_EXPERIMENTER = 0xffff /* Experimenter defined property. */ | |
+}; | |
+ | |
+enum ofp_requestforward_reason { | |
+ OFPRFR_GROUP_MOD = 0, /* Forward group mod requests. */ | |
+ OFPRFR_METER_MOD = 1, /* Forward meter mod requests. */ | |
+}; | |
+ | |
+enum ofp_role_prop_type { | |
+ OFPRPT_EXPERIMENTER = 0xFFFF, /* Experimenter property. */ | |
}; | |
enum ofp_role_request_failed_code { | |
@@ -554,6 +753,8 @@ | |
enum ofp_table_config { | |
OFPTC_DEPRECATED_MASK = 3, /* Deprecated bits */ | |
+ OFPTC_EVICTION = 1 << 2, /* Authorise table to evict flows. */ | |
+ OFPTC_VACANCY_EVENTS = 1 << 3, /* Enable vacancy events. */ | |
}; | |
enum ofp_table_feature_prop_type { | |
@@ -571,6 +772,7 @@ | |
OFPTFPT_WRITE_SETFIELD_MISS = 13, /* Write Set-Field for table-miss. */ | |
OFPTFPT_APPLY_SETFIELD = 14, /* Apply Set-Field property. */ | |
OFPTFPT_APPLY_SETFIELD_MISS = 15, /* Apply Set-Field for table-miss. */ | |
+ OFPTFPT_TABLE_SYNC_FROM = 16, /* Table synchronisation property. */ | |
OFPTFPT_EXPERIMENTER = 0xFFFE, /* Experimenter property. */ | |
OFPTFPT_EXPERIMENTER_MISS = 0xFFFF, /* Experimenter for table-miss. */ | |
}; | |
@@ -578,9 +780,6 @@ | |
enum ofp_table_features_failed_code { | |
OFPTFFC_BAD_TABLE = 0, /* Specified table does not exist. */ | |
OFPTFFC_BAD_METADATA = 1, /* Invalid metadata mask. */ | |
- OFPTFFC_BAD_TYPE = 2, /* Unknown property type. */ | |
- OFPTFFC_BAD_LEN = 3, /* Length problem in properties. */ | |
- OFPTFFC_BAD_ARGUMENT = 4, /* Unsupported property value. */ | |
OFPTFFC_EPERM = 5, /* Permissions error. */ | |
}; | |
@@ -590,6 +789,23 @@ | |
OFPTMFC_EPERM = 2, /* Permissions error. */ | |
}; | |
+enum ofp_table_mod_prop_eviction_flag { | |
+ OFPTMPEF_OTHER = 1 << 0, /* Using other factors. */ | |
+ OFPTMPEF_IMPORTANCE = 1 << 1, /* Using flow entry importance. */ | |
+ OFPTMPEF_LIFETIME = 1 << 2, /* Using flow entry lifetime. */ | |
+}; | |
+ | |
+enum ofp_table_mod_prop_type { | |
+ OFPTMPT_EVICTION = 0x2, /* Eviction property. */ | |
+ OFPTMPT_VACANCY = 0x3, /* Vacancy property. */ | |
+ OFPTMPT_EXPERIMENTER = 0xFFFF, /* Experimenter property. */ | |
+}; | |
+ | |
+enum ofp_table_reason { | |
+ OFPTR_VACANCY_DOWN = 3, /* Vacancy down threshold event. */ | |
+ OFPTR_VACANCY_UP = 4, /* Vacancy up threshold event. */ | |
+}; | |
+ | |
enum ofp_type { | |
/* Immutable messages. */ | |
OFPT_HELLO = 0, /* Symmetric message */ | |
@@ -619,9 +835,6 @@ | |
/* Barrier messages. */ | |
OFPT_BARRIER_REQUEST = 20, /* Controller/switch message */ | |
OFPT_BARRIER_REPLY = 21, /* Controller/switch message */ | |
- /* Queue Configuration messages. */ | |
- OFPT_QUEUE_GET_CONFIG_REQUEST = 22, /* Controller/switch message */ | |
- OFPT_QUEUE_GET_CONFIG_REPLY = 23, /* Controller/switch message */ | |
/* Controller role change request messages. */ | |
OFPT_ROLE_REQUEST = 24, /* Controller/switch message */ | |
OFPT_ROLE_REPLY = 25, /* Controller/switch message */ | |
@@ -631,6 +844,15 @@ | |
OFPT_SET_ASYNC = 28, /* Controller/switch message */ | |
/* Meters and rate limiters configuration messages. */ | |
OFPT_METER_MOD = 29, /* Controller/switch message */ | |
+ /* Controller role change event messages. */ | |
+ OFPT_ROLE_STATUS = 30, /* Async message */ | |
+ /* Asynchronous messages. */ | |
+ OFPT_TABLE_STATUS = 31, /* Async message */ | |
+ /* Request forwarding by the switch. */ | |
+ OFPT_REQUESTFORWARD = 32, /* Async message */ | |
+ /* Bundle operations (multiple messages as a single operation). */ | |
+ OFPT_BUNDLE_CONTROL = 33, | |
+ OFPT_BUNDLE_ADD_MESSAGE = 34, | |
}; | |
enum ofp_vlan_id { | |
@@ -679,4 +901,5 @@ | |
OFPXMT_OFB_PBB_ISID = 37, /* PBB I-SID. */ | |
OFPXMT_OFB_TUNNEL_ID = 38, /* Logical Port Metadata. */ | |
OFPXMT_OFB_IPV6_EXTHDR = 39, /* IPv6 Extension Header pseudo-field */ | |
+ OFPXMT_OFB_PBB_UCA = 41, /* PBB UCA header field. */ | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment