Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 1 | # Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University |
| 2 | # Copyright (c) 2011, 2012 Open Networking Foundation |
| 3 | # Copyright (c) 2012, 2013 Big Switch Networks, Inc. |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4 | # See the file LICENSE.pyloxi which should have been included in the source distribution |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5 | |
| 6 | # Automatically generated by LOXI from template const.py |
| 7 | # Do not modify |
| 8 | |
| 9 | OFP_VERSION = 4 |
| 10 | |
| 11 | # Identifiers from group macro_definitions |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 12 | OFP_MAX_TABLE_NAME_LEN = 32 |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 13 | OFP_MAX_PORT_NAME_LEN = 16 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 14 | OFP_TCP_PORT = 6653 |
| 15 | OFP_SSL_PORT = 6653 |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 16 | OFP_ETH_ALEN = 6 |
| 17 | OFP_DEFAULT_MISS_SEND_LEN = 128 |
| 18 | OFP_VLAN_NONE = 0 |
| 19 | OFP_FLOW_PERMANENT = 0 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 20 | OFP_DEFAULT_PRIORITY = 32768 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 21 | OFP_NO_BUFFER = 4294967295 |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 22 | DESC_STR_LEN = 256 |
| 23 | SERIAL_NUM_LEN = 32 |
| 24 | OFPQ_ALL = 4294967295 |
| 25 | OFPQ_MAX_RATE_UNCFG = 65535 |
| 26 | OFPQ_MIN_RATE_UNCFG = 65535 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 27 | |
Rich Lane | 7b0f201 | 2013-11-22 14:15:26 -0800 | [diff] [blame] | 28 | # Identifiers from group of_bsn_lacp_convergence_status_t |
| 29 | LACP_SUCCESS = 0 |
| 30 | LACP_TIMEDOUT = 1 |
| 31 | LACP_OUT_OF_SYNC = 2 |
| 32 | |
| 33 | of_bsn_lacp_convergence_status_t_map = { |
| 34 | 0: 'LACP_SUCCESS', |
| 35 | 1: 'LACP_TIMEDOUT', |
| 36 | 2: 'LACP_OUT_OF_SYNC', |
| 37 | } |
| 38 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 39 | # Identifiers from group of_bsn_pdu_slot_num_t |
| 40 | BSN_PDU_SLOT_NUM_ANY = 255 |
| 41 | |
| 42 | of_bsn_pdu_slot_num_t_map = { |
| 43 | 255: 'BSN_PDU_SLOT_NUM_ANY', |
| 44 | } |
| 45 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 46 | # Identifiers from group of_bsn_vlan_counter_t |
| 47 | OFP_BSN_VLAN_COUNTER_RX_BYTES = 0 |
| 48 | OFP_BSN_VLAN_COUNTER_RX_PACKETS = 1 |
| 49 | OFP_BSN_VLAN_COUNTER_TX_BYTES = 2 |
| 50 | OFP_BSN_VLAN_COUNTER_TX_PACKETS = 3 |
| 51 | |
| 52 | of_bsn_vlan_counter_t_map = { |
| 53 | 0: 'OFP_BSN_VLAN_COUNTER_RX_BYTES', |
| 54 | 1: 'OFP_BSN_VLAN_COUNTER_RX_PACKETS', |
| 55 | 2: 'OFP_BSN_VLAN_COUNTER_TX_BYTES', |
| 56 | 3: 'OFP_BSN_VLAN_COUNTER_TX_PACKETS', |
| 57 | } |
| 58 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 59 | # Identifiers from group ofp_action_type |
| 60 | OFPAT_OUTPUT = 0 |
| 61 | OFPAT_COPY_TTL_OUT = 11 |
| 62 | OFPAT_COPY_TTL_IN = 12 |
| 63 | OFPAT_SET_MPLS_TTL = 15 |
| 64 | OFPAT_DEC_MPLS_TTL = 16 |
| 65 | OFPAT_PUSH_VLAN = 17 |
| 66 | OFPAT_POP_VLAN = 18 |
| 67 | OFPAT_PUSH_MPLS = 19 |
| 68 | OFPAT_POP_MPLS = 20 |
| 69 | OFPAT_SET_QUEUE = 21 |
| 70 | OFPAT_GROUP = 22 |
| 71 | OFPAT_SET_NW_TTL = 23 |
| 72 | OFPAT_DEC_NW_TTL = 24 |
| 73 | OFPAT_SET_FIELD = 25 |
| 74 | OFPAT_PUSH_PBB = 26 |
| 75 | OFPAT_POP_PBB = 27 |
| 76 | OFPAT_EXPERIMENTER = 65535 |
| 77 | |
| 78 | ofp_action_type_map = { |
| 79 | 0: 'OFPAT_OUTPUT', |
| 80 | 11: 'OFPAT_COPY_TTL_OUT', |
| 81 | 12: 'OFPAT_COPY_TTL_IN', |
| 82 | 15: 'OFPAT_SET_MPLS_TTL', |
| 83 | 16: 'OFPAT_DEC_MPLS_TTL', |
| 84 | 17: 'OFPAT_PUSH_VLAN', |
| 85 | 18: 'OFPAT_POP_VLAN', |
| 86 | 19: 'OFPAT_PUSH_MPLS', |
| 87 | 20: 'OFPAT_POP_MPLS', |
| 88 | 21: 'OFPAT_SET_QUEUE', |
| 89 | 22: 'OFPAT_GROUP', |
| 90 | 23: 'OFPAT_SET_NW_TTL', |
| 91 | 24: 'OFPAT_DEC_NW_TTL', |
| 92 | 25: 'OFPAT_SET_FIELD', |
| 93 | 26: 'OFPAT_PUSH_PBB', |
| 94 | 27: 'OFPAT_POP_PBB', |
| 95 | 65535: 'OFPAT_EXPERIMENTER', |
| 96 | } |
| 97 | |
| 98 | # Identifiers from group ofp_bad_action_code |
| 99 | OFPBAC_BAD_TYPE = 0 |
| 100 | OFPBAC_BAD_LEN = 1 |
| 101 | OFPBAC_BAD_EXPERIMENTER = 2 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 102 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 103 | OFPBAC_BAD_OUT_PORT = 4 |
| 104 | OFPBAC_BAD_ARGUMENT = 5 |
| 105 | OFPBAC_EPERM = 6 |
| 106 | OFPBAC_TOO_MANY = 7 |
| 107 | OFPBAC_BAD_QUEUE = 8 |
| 108 | OFPBAC_BAD_OUT_GROUP = 9 |
| 109 | OFPBAC_MATCH_INCONSISTENT = 10 |
| 110 | OFPBAC_UNSUPPORTED_ORDER = 11 |
| 111 | OFPBAC_BAD_TAG = 12 |
| 112 | OFPBAC_BAD_SET_TYPE = 13 |
| 113 | OFPBAC_BAD_SET_LEN = 14 |
| 114 | OFPBAC_BAD_SET_ARGUMENT = 15 |
| 115 | |
| 116 | ofp_bad_action_code_map = { |
| 117 | 0: 'OFPBAC_BAD_TYPE', |
| 118 | 1: 'OFPBAC_BAD_LEN', |
| 119 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 120 | 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 121 | 4: 'OFPBAC_BAD_OUT_PORT', |
| 122 | 5: 'OFPBAC_BAD_ARGUMENT', |
| 123 | 6: 'OFPBAC_EPERM', |
| 124 | 7: 'OFPBAC_TOO_MANY', |
| 125 | 8: 'OFPBAC_BAD_QUEUE', |
| 126 | 9: 'OFPBAC_BAD_OUT_GROUP', |
| 127 | 10: 'OFPBAC_MATCH_INCONSISTENT', |
| 128 | 11: 'OFPBAC_UNSUPPORTED_ORDER', |
| 129 | 12: 'OFPBAC_BAD_TAG', |
| 130 | 13: 'OFPBAC_BAD_SET_TYPE', |
| 131 | 14: 'OFPBAC_BAD_SET_LEN', |
| 132 | 15: 'OFPBAC_BAD_SET_ARGUMENT', |
| 133 | } |
| 134 | |
| 135 | # Identifiers from group ofp_bad_instruction_code |
| 136 | OFPBIC_UNKNOWN_INST = 0 |
| 137 | OFPBIC_UNSUP_INST = 1 |
| 138 | OFPBIC_BAD_TABLE_ID = 2 |
| 139 | OFPBIC_UNSUP_METADATA = 3 |
| 140 | OFPBIC_UNSUP_METADATA_MASK = 4 |
| 141 | OFPBIC_BAD_EXPERIMENTER = 5 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 142 | OFPBIC_BAD_EXPERIMENTER_TYPE = 6 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 143 | OFPBIC_BAD_LEN = 7 |
| 144 | OFPBIC_EPERM = 8 |
| 145 | |
| 146 | ofp_bad_instruction_code_map = { |
| 147 | 0: 'OFPBIC_UNKNOWN_INST', |
| 148 | 1: 'OFPBIC_UNSUP_INST', |
| 149 | 2: 'OFPBIC_BAD_TABLE_ID', |
| 150 | 3: 'OFPBIC_UNSUP_METADATA', |
| 151 | 4: 'OFPBIC_UNSUP_METADATA_MASK', |
| 152 | 5: 'OFPBIC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 153 | 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 154 | 7: 'OFPBIC_BAD_LEN', |
| 155 | 8: 'OFPBIC_EPERM', |
| 156 | } |
| 157 | |
| 158 | # Identifiers from group ofp_bad_match_code |
| 159 | OFPBMC_BAD_TYPE = 0 |
| 160 | OFPBMC_BAD_LEN = 1 |
| 161 | OFPBMC_BAD_TAG = 2 |
| 162 | OFPBMC_BAD_DL_ADDR_MASK = 3 |
| 163 | OFPBMC_BAD_NW_ADDR_MASK = 4 |
| 164 | OFPBMC_BAD_WILDCARDS = 5 |
| 165 | OFPBMC_BAD_FIELD = 6 |
| 166 | OFPBMC_BAD_VALUE = 7 |
| 167 | OFPBMC_BAD_MASK = 8 |
| 168 | OFPBMC_BAD_PREREQ = 9 |
| 169 | OFPBMC_DUP_FIELD = 10 |
| 170 | OFPBMC_EPERM = 11 |
| 171 | |
| 172 | ofp_bad_match_code_map = { |
| 173 | 0: 'OFPBMC_BAD_TYPE', |
| 174 | 1: 'OFPBMC_BAD_LEN', |
| 175 | 2: 'OFPBMC_BAD_TAG', |
| 176 | 3: 'OFPBMC_BAD_DL_ADDR_MASK', |
| 177 | 4: 'OFPBMC_BAD_NW_ADDR_MASK', |
| 178 | 5: 'OFPBMC_BAD_WILDCARDS', |
| 179 | 6: 'OFPBMC_BAD_FIELD', |
| 180 | 7: 'OFPBMC_BAD_VALUE', |
| 181 | 8: 'OFPBMC_BAD_MASK', |
| 182 | 9: 'OFPBMC_BAD_PREREQ', |
| 183 | 10: 'OFPBMC_DUP_FIELD', |
| 184 | 11: 'OFPBMC_EPERM', |
| 185 | } |
| 186 | |
| 187 | # Identifiers from group ofp_bad_request_code |
| 188 | OFPBRC_BAD_VERSION = 0 |
| 189 | OFPBRC_BAD_TYPE = 1 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 190 | OFPBRC_BAD_STAT = 2 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 191 | OFPBRC_BAD_EXPERIMENTER = 3 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 192 | OFPBRC_BAD_EXPERIMENTER_TYPE = 4 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 193 | OFPBRC_EPERM = 5 |
| 194 | OFPBRC_BAD_LEN = 6 |
| 195 | OFPBRC_BUFFER_EMPTY = 7 |
| 196 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 197 | OFPBRC_BAD_TABLE_ID = 9 |
| 198 | OFPBRC_IS_SLAVE = 10 |
| 199 | OFPBRC_BAD_PORT = 11 |
| 200 | OFPBRC_BAD_PACKET = 12 |
| 201 | OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13 |
| 202 | |
| 203 | ofp_bad_request_code_map = { |
| 204 | 0: 'OFPBRC_BAD_VERSION', |
| 205 | 1: 'OFPBRC_BAD_TYPE', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 206 | 2: 'OFPBRC_BAD_STAT', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 207 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 208 | 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 209 | 5: 'OFPBRC_EPERM', |
| 210 | 6: 'OFPBRC_BAD_LEN', |
| 211 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 212 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 213 | 9: 'OFPBRC_BAD_TABLE_ID', |
| 214 | 10: 'OFPBRC_IS_SLAVE', |
| 215 | 11: 'OFPBRC_BAD_PORT', |
| 216 | 12: 'OFPBRC_BAD_PACKET', |
| 217 | 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW', |
| 218 | } |
| 219 | |
Rich Lane | 1a82041 | 2014-01-06 14:15:07 -0800 | [diff] [blame^] | 220 | # Identifiers from group ofp_bsn_controller_connection_state |
| 221 | OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED = 0 |
| 222 | OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED = 1 |
| 223 | |
| 224 | ofp_bsn_controller_connection_state_map = { |
| 225 | 0: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED', |
| 226 | 1: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED', |
| 227 | } |
| 228 | |
| 229 | # Identifiers from group ofp_bsn_controller_role_reason |
| 230 | OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST = 0 |
| 231 | OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG = 1 |
| 232 | OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER = 2 |
| 233 | |
| 234 | ofp_bsn_controller_role_reason_map = { |
| 235 | 0: 'OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST', |
| 236 | 1: 'OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG', |
| 237 | 2: 'OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER', |
| 238 | } |
| 239 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 240 | # Identifiers from group ofp_bsn_port_counter |
| 241 | OFP_BSN_PORT_COUNTER_RX_BYTES = 0 |
| 242 | OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST = 1 |
| 243 | OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST = 2 |
| 244 | OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST = 3 |
| 245 | OFP_BSN_PORT_COUNTER_RX_DROPPED = 4 |
| 246 | OFP_BSN_PORT_COUNTER_RX_ERRORS = 5 |
| 247 | OFP_BSN_PORT_COUNTER_TX_BYTES = 6 |
| 248 | OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST = 7 |
| 249 | OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST = 8 |
| 250 | OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST = 9 |
| 251 | OFP_BSN_PORT_COUNTER_TX_DROPPED = 10 |
| 252 | OFP_BSN_PORT_COUNTER_TX_ERRORS = 11 |
| 253 | |
| 254 | ofp_bsn_port_counter_map = { |
| 255 | 0: 'OFP_BSN_PORT_COUNTER_RX_BYTES', |
| 256 | 1: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST', |
| 257 | 2: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST', |
| 258 | 3: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST', |
| 259 | 4: 'OFP_BSN_PORT_COUNTER_RX_DROPPED', |
| 260 | 5: 'OFP_BSN_PORT_COUNTER_RX_ERRORS', |
| 261 | 6: 'OFP_BSN_PORT_COUNTER_TX_BYTES', |
| 262 | 7: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST', |
| 263 | 8: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST', |
| 264 | 9: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST', |
| 265 | 10: 'OFP_BSN_PORT_COUNTER_TX_DROPPED', |
| 266 | 11: 'OFP_BSN_PORT_COUNTER_TX_ERRORS', |
| 267 | } |
| 268 | |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 269 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 270 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 271 | |
| 272 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 273 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 274 | } |
| 275 | |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 276 | # Identifiers from group ofp_bsn_vport_status |
| 277 | OF_BSN_VPORT_STATUS_OK = 0 |
| 278 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 279 | |
| 280 | ofp_bsn_vport_status_map = { |
| 281 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 282 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 283 | } |
| 284 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 285 | # Identifiers from group ofp_capabilities |
| 286 | OFPC_FLOW_STATS = 1 |
| 287 | OFPC_TABLE_STATS = 2 |
| 288 | OFPC_PORT_STATS = 4 |
| 289 | OFPC_GROUP_STATS = 8 |
| 290 | OFPC_IP_REASM = 32 |
| 291 | OFPC_QUEUE_STATS = 64 |
| 292 | OFPC_PORT_BLOCKED = 256 |
| 293 | |
| 294 | ofp_capabilities_map = { |
| 295 | 1: 'OFPC_FLOW_STATS', |
| 296 | 2: 'OFPC_TABLE_STATS', |
| 297 | 4: 'OFPC_PORT_STATS', |
| 298 | 8: 'OFPC_GROUP_STATS', |
| 299 | 32: 'OFPC_IP_REASM', |
| 300 | 64: 'OFPC_QUEUE_STATS', |
| 301 | 256: 'OFPC_PORT_BLOCKED', |
| 302 | } |
| 303 | |
| 304 | # Identifiers from group ofp_config_flags |
| 305 | OFPC_FRAG_NORMAL = 0 |
| 306 | OFPC_FRAG_DROP = 1 |
| 307 | OFPC_FRAG_REASM = 2 |
| 308 | OFPC_FRAG_MASK = 3 |
| 309 | |
| 310 | ofp_config_flags_map = { |
| 311 | 0: 'OFPC_FRAG_NORMAL', |
| 312 | 1: 'OFPC_FRAG_DROP', |
| 313 | 2: 'OFPC_FRAG_REASM', |
| 314 | 3: 'OFPC_FRAG_MASK', |
| 315 | } |
| 316 | |
| 317 | # Identifiers from group ofp_controller_max_len |
| 318 | OFPCML_MAX = 65509 |
| 319 | OFPCML_NO_BUFFER = 65535 |
| 320 | |
| 321 | ofp_controller_max_len_map = { |
| 322 | 65509: 'OFPCML_MAX', |
| 323 | 65535: 'OFPCML_NO_BUFFER', |
| 324 | } |
| 325 | |
| 326 | # Identifiers from group ofp_controller_role |
| 327 | OFPCR_ROLE_NOCHANGE = 0 |
| 328 | OFPCR_ROLE_EQUAL = 1 |
| 329 | OFPCR_ROLE_MASTER = 2 |
| 330 | OFPCR_ROLE_SLAVE = 3 |
| 331 | |
| 332 | ofp_controller_role_map = { |
| 333 | 0: 'OFPCR_ROLE_NOCHANGE', |
| 334 | 1: 'OFPCR_ROLE_EQUAL', |
| 335 | 2: 'OFPCR_ROLE_MASTER', |
| 336 | 3: 'OFPCR_ROLE_SLAVE', |
| 337 | } |
| 338 | |
| 339 | # Identifiers from group ofp_error_type |
| 340 | OFPET_HELLO_FAILED = 0 |
| 341 | OFPET_BAD_REQUEST = 1 |
| 342 | OFPET_BAD_ACTION = 2 |
| 343 | OFPET_BAD_INSTRUCTION = 3 |
| 344 | OFPET_BAD_MATCH = 4 |
| 345 | OFPET_FLOW_MOD_FAILED = 5 |
| 346 | OFPET_GROUP_MOD_FAILED = 6 |
| 347 | OFPET_PORT_MOD_FAILED = 7 |
| 348 | OFPET_TABLE_MOD_FAILED = 8 |
| 349 | OFPET_QUEUE_OP_FAILED = 9 |
| 350 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 351 | OFPET_ROLE_REQUEST_FAILED = 11 |
| 352 | OFPET_METER_MOD_FAILED = 12 |
| 353 | OFPET_TABLE_FEATURES_FAILED = 13 |
| 354 | OFPET_EXPERIMENTER = 65535 |
| 355 | |
| 356 | ofp_error_type_map = { |
| 357 | 0: 'OFPET_HELLO_FAILED', |
| 358 | 1: 'OFPET_BAD_REQUEST', |
| 359 | 2: 'OFPET_BAD_ACTION', |
| 360 | 3: 'OFPET_BAD_INSTRUCTION', |
| 361 | 4: 'OFPET_BAD_MATCH', |
| 362 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 363 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 364 | 7: 'OFPET_PORT_MOD_FAILED', |
| 365 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 366 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 367 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 368 | 11: 'OFPET_ROLE_REQUEST_FAILED', |
| 369 | 12: 'OFPET_METER_MOD_FAILED', |
| 370 | 13: 'OFPET_TABLE_FEATURES_FAILED', |
| 371 | 65535: 'OFPET_EXPERIMENTER', |
| 372 | } |
| 373 | |
| 374 | # Identifiers from group ofp_flow_mod_command |
| 375 | OFPFC_ADD = 0 |
| 376 | OFPFC_MODIFY = 1 |
| 377 | OFPFC_MODIFY_STRICT = 2 |
| 378 | OFPFC_DELETE = 3 |
| 379 | OFPFC_DELETE_STRICT = 4 |
| 380 | |
| 381 | ofp_flow_mod_command_map = { |
| 382 | 0: 'OFPFC_ADD', |
| 383 | 1: 'OFPFC_MODIFY', |
| 384 | 2: 'OFPFC_MODIFY_STRICT', |
| 385 | 3: 'OFPFC_DELETE', |
| 386 | 4: 'OFPFC_DELETE_STRICT', |
| 387 | } |
| 388 | |
| 389 | # Identifiers from group ofp_flow_mod_failed_code |
| 390 | OFPFMFC_UNKNOWN = 0 |
| 391 | OFPFMFC_TABLE_FULL = 1 |
| 392 | OFPFMFC_BAD_TABLE_ID = 2 |
| 393 | OFPFMFC_OVERLAP = 3 |
| 394 | OFPFMFC_EPERM = 4 |
| 395 | OFPFMFC_BAD_TIMEOUT = 5 |
| 396 | OFPFMFC_BAD_COMMAND = 6 |
| 397 | OFPFMFC_BAD_FLAGS = 7 |
| 398 | |
| 399 | ofp_flow_mod_failed_code_map = { |
| 400 | 0: 'OFPFMFC_UNKNOWN', |
| 401 | 1: 'OFPFMFC_TABLE_FULL', |
| 402 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 403 | 3: 'OFPFMFC_OVERLAP', |
| 404 | 4: 'OFPFMFC_EPERM', |
| 405 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 406 | 6: 'OFPFMFC_BAD_COMMAND', |
| 407 | 7: 'OFPFMFC_BAD_FLAGS', |
| 408 | } |
| 409 | |
| 410 | # Identifiers from group ofp_flow_mod_flags |
| 411 | OFPFF_SEND_FLOW_REM = 1 |
| 412 | OFPFF_CHECK_OVERLAP = 2 |
| 413 | OFPFF_RESET_COUNTS = 4 |
| 414 | OFPFF_NO_PKT_COUNTS = 8 |
| 415 | OFPFF_NO_BYT_COUNTS = 16 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 416 | OFPFF_BSN_SEND_IDLE = 128 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 417 | |
| 418 | ofp_flow_mod_flags_map = { |
| 419 | 1: 'OFPFF_SEND_FLOW_REM', |
| 420 | 2: 'OFPFF_CHECK_OVERLAP', |
| 421 | 4: 'OFPFF_RESET_COUNTS', |
| 422 | 8: 'OFPFF_NO_PKT_COUNTS', |
| 423 | 16: 'OFPFF_NO_BYT_COUNTS', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 424 | 128: 'OFPFF_BSN_SEND_IDLE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 425 | } |
| 426 | |
| 427 | # Identifiers from group ofp_flow_removed_reason |
| 428 | OFPRR_IDLE_TIMEOUT = 0 |
| 429 | OFPRR_HARD_TIMEOUT = 1 |
| 430 | OFPRR_DELETE = 2 |
| 431 | OFPRR_GROUP_DELETE = 3 |
| 432 | |
| 433 | ofp_flow_removed_reason_map = { |
| 434 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 435 | 1: 'OFPRR_HARD_TIMEOUT', |
| 436 | 2: 'OFPRR_DELETE', |
| 437 | 3: 'OFPRR_GROUP_DELETE', |
| 438 | } |
| 439 | |
| 440 | # Identifiers from group ofp_group |
| 441 | OFPG_MAX = 4294967040 |
| 442 | OFPG_ALL = 4294967292 |
| 443 | OFPG_ANY = 4294967295 |
| 444 | |
| 445 | ofp_group_map = { |
| 446 | 4294967040: 'OFPG_MAX', |
| 447 | 4294967292: 'OFPG_ALL', |
| 448 | 4294967295: 'OFPG_ANY', |
| 449 | } |
| 450 | |
| 451 | # Identifiers from group ofp_group_capabilities |
| 452 | OFPGFC_SELECT_WEIGHT = 1 |
| 453 | OFPGFC_SELECT_LIVENESS = 2 |
| 454 | OFPGFC_CHAINING = 4 |
| 455 | OFPGFC_CHAINING_CHECKS = 8 |
| 456 | |
| 457 | ofp_group_capabilities_map = { |
| 458 | 1: 'OFPGFC_SELECT_WEIGHT', |
| 459 | 2: 'OFPGFC_SELECT_LIVENESS', |
| 460 | 4: 'OFPGFC_CHAINING', |
| 461 | 8: 'OFPGFC_CHAINING_CHECKS', |
| 462 | } |
| 463 | |
| 464 | # Identifiers from group ofp_group_mod_command |
| 465 | OFPGC_ADD = 0 |
| 466 | OFPGC_MODIFY = 1 |
| 467 | OFPGC_DELETE = 2 |
| 468 | |
| 469 | ofp_group_mod_command_map = { |
| 470 | 0: 'OFPGC_ADD', |
| 471 | 1: 'OFPGC_MODIFY', |
| 472 | 2: 'OFPGC_DELETE', |
| 473 | } |
| 474 | |
| 475 | # Identifiers from group ofp_group_mod_failed_code |
| 476 | OFPGMFC_GROUP_EXISTS = 0 |
| 477 | OFPGMFC_INVALID_GROUP = 1 |
| 478 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 479 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 480 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 481 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 482 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 483 | OFPGMFC_LOOP = 7 |
| 484 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 485 | OFPGMFC_CHAINED_GROUP = 9 |
| 486 | OFPGMFC_BAD_TYPE = 10 |
| 487 | OFPGMFC_BAD_COMMAND = 11 |
| 488 | OFPGMFC_BAD_BUCKET = 12 |
| 489 | OFPGMFC_BAD_WATCH = 13 |
| 490 | OFPGMFC_EPERM = 14 |
| 491 | |
| 492 | ofp_group_mod_failed_code_map = { |
| 493 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 494 | 1: 'OFPGMFC_INVALID_GROUP', |
| 495 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 496 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 497 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 498 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 499 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 500 | 7: 'OFPGMFC_LOOP', |
| 501 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 502 | 9: 'OFPGMFC_CHAINED_GROUP', |
| 503 | 10: 'OFPGMFC_BAD_TYPE', |
| 504 | 11: 'OFPGMFC_BAD_COMMAND', |
| 505 | 12: 'OFPGMFC_BAD_BUCKET', |
| 506 | 13: 'OFPGMFC_BAD_WATCH', |
| 507 | 14: 'OFPGMFC_EPERM', |
| 508 | } |
| 509 | |
| 510 | # Identifiers from group ofp_group_type |
| 511 | OFPGT_ALL = 0 |
| 512 | OFPGT_SELECT = 1 |
| 513 | OFPGT_INDIRECT = 2 |
| 514 | OFPGT_FF = 3 |
| 515 | |
| 516 | ofp_group_type_map = { |
| 517 | 0: 'OFPGT_ALL', |
| 518 | 1: 'OFPGT_SELECT', |
| 519 | 2: 'OFPGT_INDIRECT', |
| 520 | 3: 'OFPGT_FF', |
| 521 | } |
| 522 | |
| 523 | # Identifiers from group ofp_hello_elem_type |
| 524 | OFPHET_VERSIONBITMAP = 1 |
| 525 | |
| 526 | ofp_hello_elem_type_map = { |
| 527 | 1: 'OFPHET_VERSIONBITMAP', |
| 528 | } |
| 529 | |
| 530 | # Identifiers from group ofp_hello_failed_code |
| 531 | OFPHFC_INCOMPATIBLE = 0 |
| 532 | OFPHFC_EPERM = 1 |
| 533 | |
| 534 | ofp_hello_failed_code_map = { |
| 535 | 0: 'OFPHFC_INCOMPATIBLE', |
| 536 | 1: 'OFPHFC_EPERM', |
| 537 | } |
| 538 | |
| 539 | # Identifiers from group ofp_instruction_type |
| 540 | OFPIT_GOTO_TABLE = 1 |
| 541 | OFPIT_WRITE_METADATA = 2 |
| 542 | OFPIT_WRITE_ACTIONS = 3 |
| 543 | OFPIT_APPLY_ACTIONS = 4 |
| 544 | OFPIT_CLEAR_ACTIONS = 5 |
| 545 | OFPIT_METER = 6 |
| 546 | OFPIT_EXPERIMENTER = 65535 |
| 547 | |
| 548 | ofp_instruction_type_map = { |
| 549 | 1: 'OFPIT_GOTO_TABLE', |
| 550 | 2: 'OFPIT_WRITE_METADATA', |
| 551 | 3: 'OFPIT_WRITE_ACTIONS', |
| 552 | 4: 'OFPIT_APPLY_ACTIONS', |
| 553 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 554 | 6: 'OFPIT_METER', |
| 555 | 65535: 'OFPIT_EXPERIMENTER', |
| 556 | } |
| 557 | |
| 558 | # Identifiers from group ofp_ipv6exthdr_flags |
| 559 | OFPIEH_NONEXT = 1 |
| 560 | OFPIEH_ESP = 2 |
| 561 | OFPIEH_AUTH = 4 |
| 562 | OFPIEH_DEST = 8 |
| 563 | OFPIEH_FRAG = 16 |
| 564 | OFPIEH_ROUTER = 32 |
| 565 | OFPIEH_HOP = 64 |
| 566 | OFPIEH_UNREP = 128 |
| 567 | OFPIEH_UNSEQ = 256 |
| 568 | |
| 569 | ofp_ipv6exthdr_flags_map = { |
| 570 | 1: 'OFPIEH_NONEXT', |
| 571 | 2: 'OFPIEH_ESP', |
| 572 | 4: 'OFPIEH_AUTH', |
| 573 | 8: 'OFPIEH_DEST', |
| 574 | 16: 'OFPIEH_FRAG', |
| 575 | 32: 'OFPIEH_ROUTER', |
| 576 | 64: 'OFPIEH_HOP', |
| 577 | 128: 'OFPIEH_UNREP', |
| 578 | 256: 'OFPIEH_UNSEQ', |
| 579 | } |
| 580 | |
| 581 | # Identifiers from group ofp_match_type |
| 582 | OFPMT_STANDARD = 0 |
| 583 | OFPMT_OXM = 1 |
| 584 | |
| 585 | ofp_match_type_map = { |
| 586 | 0: 'OFPMT_STANDARD', |
| 587 | 1: 'OFPMT_OXM', |
| 588 | } |
| 589 | |
| 590 | # Identifiers from group ofp_meter |
| 591 | OFPM_MAX = 4294901760 |
| 592 | OFPM_SLOWPATH = 4294967293 |
| 593 | OFPM_CONTROLLER = 4294967294 |
| 594 | OFPM_ALL = 4294967295 |
| 595 | |
| 596 | ofp_meter_map = { |
| 597 | 4294901760: 'OFPM_MAX', |
| 598 | 4294967293: 'OFPM_SLOWPATH', |
| 599 | 4294967294: 'OFPM_CONTROLLER', |
| 600 | 4294967295: 'OFPM_ALL', |
| 601 | } |
| 602 | |
| 603 | # Identifiers from group ofp_meter_band_type |
| 604 | OFPMBT_DROP = 1 |
| 605 | OFPMBT_DSCP_REMARK = 2 |
| 606 | OFPMBT_EXPERIMENTER = 65535 |
| 607 | |
| 608 | ofp_meter_band_type_map = { |
| 609 | 1: 'OFPMBT_DROP', |
| 610 | 2: 'OFPMBT_DSCP_REMARK', |
| 611 | 65535: 'OFPMBT_EXPERIMENTER', |
| 612 | } |
| 613 | |
| 614 | # Identifiers from group ofp_meter_flags |
| 615 | OFPMF_KBPS = 1 |
| 616 | OFPMF_PKTPS = 2 |
| 617 | OFPMF_BURST = 4 |
| 618 | OFPMF_STATS = 8 |
| 619 | |
| 620 | ofp_meter_flags_map = { |
| 621 | 1: 'OFPMF_KBPS', |
| 622 | 2: 'OFPMF_PKTPS', |
| 623 | 4: 'OFPMF_BURST', |
| 624 | 8: 'OFPMF_STATS', |
| 625 | } |
| 626 | |
| 627 | # Identifiers from group ofp_meter_mod_command |
| 628 | OFPMC_ADD = 0 |
| 629 | OFPMC_MODIFY = 1 |
| 630 | OFPMC_DELETE = 2 |
| 631 | |
| 632 | ofp_meter_mod_command_map = { |
| 633 | 0: 'OFPMC_ADD', |
| 634 | 1: 'OFPMC_MODIFY', |
| 635 | 2: 'OFPMC_DELETE', |
| 636 | } |
| 637 | |
| 638 | # Identifiers from group ofp_meter_mod_failed_code |
| 639 | OFPMMFC_UNKNOWN = 0 |
| 640 | OFPMMFC_METER_EXISTS = 1 |
| 641 | OFPMMFC_INVALID_METER = 2 |
| 642 | OFPMMFC_UNKNOWN_METER = 3 |
| 643 | OFPMMFC_BAD_COMMAND = 4 |
| 644 | OFPMMFC_BAD_FLAGS = 5 |
| 645 | OFPMMFC_BAD_RATE = 6 |
| 646 | OFPMMFC_BAD_BURST = 7 |
| 647 | OFPMMFC_BAD_BAND = 8 |
| 648 | OFPMMFC_BAD_BAND_VALUE = 9 |
| 649 | OFPMMFC_OUT_OF_METERS = 10 |
| 650 | OFPMMFC_OUT_OF_BANDS = 11 |
| 651 | |
| 652 | ofp_meter_mod_failed_code_map = { |
| 653 | 0: 'OFPMMFC_UNKNOWN', |
| 654 | 1: 'OFPMMFC_METER_EXISTS', |
| 655 | 2: 'OFPMMFC_INVALID_METER', |
| 656 | 3: 'OFPMMFC_UNKNOWN_METER', |
| 657 | 4: 'OFPMMFC_BAD_COMMAND', |
| 658 | 5: 'OFPMMFC_BAD_FLAGS', |
| 659 | 6: 'OFPMMFC_BAD_RATE', |
| 660 | 7: 'OFPMMFC_BAD_BURST', |
| 661 | 8: 'OFPMMFC_BAD_BAND', |
| 662 | 9: 'OFPMMFC_BAD_BAND_VALUE', |
| 663 | 10: 'OFPMMFC_OUT_OF_METERS', |
| 664 | 11: 'OFPMMFC_OUT_OF_BANDS', |
| 665 | } |
| 666 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 667 | # Identifiers from group ofp_oxm_class |
| 668 | OFPXMC_NXM_0 = 0 |
| 669 | OFPXMC_NXM_1 = 1 |
| 670 | OFPXMC_OPENFLOW_BASIC = 32768 |
| 671 | OFPXMC_EXPERIMENTER = 65535 |
| 672 | |
| 673 | ofp_oxm_class_map = { |
| 674 | 0: 'OFPXMC_NXM_0', |
| 675 | 1: 'OFPXMC_NXM_1', |
| 676 | 32768: 'OFPXMC_OPENFLOW_BASIC', |
| 677 | 65535: 'OFPXMC_EXPERIMENTER', |
| 678 | } |
| 679 | |
| 680 | # Identifiers from group ofp_packet_in_reason |
| 681 | OFPR_NO_MATCH = 0 |
| 682 | OFPR_ACTION = 1 |
| 683 | OFPR_INVALID_TTL = 2 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 684 | OFPR_BSN_NEW_HOST = 128 |
| 685 | OFPR_BSN_STATION_MOVE = 129 |
| 686 | OFPR_BSN_BAD_VLAN = 130 |
| 687 | OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131 |
Rich Lane | 1a82041 | 2014-01-06 14:15:07 -0800 | [diff] [blame^] | 688 | OFPR_BSN_NO_ROUTE = 132 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 689 | |
| 690 | ofp_packet_in_reason_map = { |
| 691 | 0: 'OFPR_NO_MATCH', |
| 692 | 1: 'OFPR_ACTION', |
| 693 | 2: 'OFPR_INVALID_TTL', |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 694 | 128: 'OFPR_BSN_NEW_HOST', |
| 695 | 129: 'OFPR_BSN_STATION_MOVE', |
| 696 | 130: 'OFPR_BSN_BAD_VLAN', |
| 697 | 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE', |
Rich Lane | 1a82041 | 2014-01-06 14:15:07 -0800 | [diff] [blame^] | 698 | 132: 'OFPR_BSN_NO_ROUTE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 699 | } |
| 700 | |
| 701 | # Identifiers from group ofp_port |
| 702 | OFPP_MAX = 4294967040 |
| 703 | OFPP_IN_PORT = 4294967288 |
| 704 | OFPP_TABLE = 4294967289 |
| 705 | OFPP_NORMAL = 4294967290 |
| 706 | OFPP_FLOOD = 4294967291 |
| 707 | OFPP_ALL = 4294967292 |
| 708 | OFPP_CONTROLLER = 4294967293 |
| 709 | OFPP_LOCAL = 4294967294 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 710 | OFPP_ANY = 4294967295 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 711 | |
| 712 | ofp_port_map = { |
| 713 | 4294967040: 'OFPP_MAX', |
| 714 | 4294967288: 'OFPP_IN_PORT', |
| 715 | 4294967289: 'OFPP_TABLE', |
| 716 | 4294967290: 'OFPP_NORMAL', |
| 717 | 4294967291: 'OFPP_FLOOD', |
| 718 | 4294967292: 'OFPP_ALL', |
| 719 | 4294967293: 'OFPP_CONTROLLER', |
| 720 | 4294967294: 'OFPP_LOCAL', |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 721 | 4294967295: 'OFPP_ANY', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 722 | } |
| 723 | |
| 724 | # Identifiers from group ofp_port_config |
| 725 | OFPPC_PORT_DOWN = 1 |
| 726 | OFPPC_NO_RECV = 4 |
| 727 | OFPPC_NO_FWD = 32 |
| 728 | OFPPC_NO_PACKET_IN = 64 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 729 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 730 | |
| 731 | ofp_port_config_map = { |
| 732 | 1: 'OFPPC_PORT_DOWN', |
| 733 | 4: 'OFPPC_NO_RECV', |
| 734 | 32: 'OFPPC_NO_FWD', |
| 735 | 64: 'OFPPC_NO_PACKET_IN', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 736 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 737 | } |
| 738 | |
| 739 | # Identifiers from group ofp_port_features |
| 740 | OFPPF_10MB_HD = 1 |
| 741 | OFPPF_10MB_FD = 2 |
| 742 | OFPPF_100MB_HD = 4 |
| 743 | OFPPF_100MB_FD = 8 |
| 744 | OFPPF_1GB_HD = 16 |
| 745 | OFPPF_1GB_FD = 32 |
| 746 | OFPPF_10GB_FD = 64 |
| 747 | OFPPF_40GB_FD = 128 |
| 748 | OFPPF_100GB_FD = 256 |
| 749 | OFPPF_1TB_FD = 512 |
| 750 | OFPPF_OTHER = 1024 |
| 751 | OFPPF_COPPER = 2048 |
| 752 | OFPPF_FIBER = 4096 |
| 753 | OFPPF_AUTONEG = 8192 |
| 754 | OFPPF_PAUSE = 16384 |
| 755 | OFPPF_PAUSE_ASYM = 32768 |
| 756 | |
| 757 | ofp_port_features_map = { |
| 758 | 1: 'OFPPF_10MB_HD', |
| 759 | 2: 'OFPPF_10MB_FD', |
| 760 | 4: 'OFPPF_100MB_HD', |
| 761 | 8: 'OFPPF_100MB_FD', |
| 762 | 16: 'OFPPF_1GB_HD', |
| 763 | 32: 'OFPPF_1GB_FD', |
| 764 | 64: 'OFPPF_10GB_FD', |
| 765 | 128: 'OFPPF_40GB_FD', |
| 766 | 256: 'OFPPF_100GB_FD', |
| 767 | 512: 'OFPPF_1TB_FD', |
| 768 | 1024: 'OFPPF_OTHER', |
| 769 | 2048: 'OFPPF_COPPER', |
| 770 | 4096: 'OFPPF_FIBER', |
| 771 | 8192: 'OFPPF_AUTONEG', |
| 772 | 16384: 'OFPPF_PAUSE', |
| 773 | 32768: 'OFPPF_PAUSE_ASYM', |
| 774 | } |
| 775 | |
| 776 | # Identifiers from group ofp_port_mod_failed_code |
| 777 | OFPPMFC_BAD_PORT = 0 |
| 778 | OFPPMFC_BAD_HW_ADDR = 1 |
| 779 | OFPPMFC_BAD_CONFIG = 2 |
| 780 | OFPPMFC_BAD_ADVERTISE = 3 |
| 781 | OFPPMFC_EPERM = 4 |
| 782 | |
| 783 | ofp_port_mod_failed_code_map = { |
| 784 | 0: 'OFPPMFC_BAD_PORT', |
| 785 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 786 | 2: 'OFPPMFC_BAD_CONFIG', |
| 787 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 788 | 4: 'OFPPMFC_EPERM', |
| 789 | } |
| 790 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 791 | # Identifiers from group ofp_port_reason |
| 792 | OFPPR_ADD = 0 |
| 793 | OFPPR_DELETE = 1 |
| 794 | OFPPR_MODIFY = 2 |
| 795 | |
| 796 | ofp_port_reason_map = { |
| 797 | 0: 'OFPPR_ADD', |
| 798 | 1: 'OFPPR_DELETE', |
| 799 | 2: 'OFPPR_MODIFY', |
| 800 | } |
| 801 | |
| 802 | # Identifiers from group ofp_port_state |
| 803 | OFPPS_LINK_DOWN = 1 |
| 804 | OFPPS_BLOCKED = 2 |
| 805 | OFPPS_LIVE = 4 |
| 806 | |
| 807 | ofp_port_state_map = { |
| 808 | 1: 'OFPPS_LINK_DOWN', |
| 809 | 2: 'OFPPS_BLOCKED', |
| 810 | 4: 'OFPPS_LIVE', |
| 811 | } |
| 812 | |
| 813 | # Identifiers from group ofp_queue_op_failed_code |
| 814 | OFPQOFC_BAD_PORT = 0 |
| 815 | OFPQOFC_BAD_QUEUE = 1 |
| 816 | OFPQOFC_EPERM = 2 |
| 817 | |
| 818 | ofp_queue_op_failed_code_map = { |
| 819 | 0: 'OFPQOFC_BAD_PORT', |
| 820 | 1: 'OFPQOFC_BAD_QUEUE', |
| 821 | 2: 'OFPQOFC_EPERM', |
| 822 | } |
| 823 | |
| 824 | # Identifiers from group ofp_queue_properties |
| 825 | OFPQT_MIN_RATE = 1 |
| 826 | OFPQT_MAX_RATE = 2 |
| 827 | OFPQT_EXPERIMENTER = 65535 |
| 828 | |
| 829 | ofp_queue_properties_map = { |
| 830 | 1: 'OFPQT_MIN_RATE', |
| 831 | 2: 'OFPQT_MAX_RATE', |
| 832 | 65535: 'OFPQT_EXPERIMENTER', |
| 833 | } |
| 834 | |
| 835 | # Identifiers from group ofp_role_request_failed_code |
| 836 | OFPRRFC_STALE = 0 |
| 837 | OFPRRFC_UNSUP = 1 |
| 838 | OFPRRFC_BAD_ROLE = 2 |
| 839 | |
| 840 | ofp_role_request_failed_code_map = { |
| 841 | 0: 'OFPRRFC_STALE', |
| 842 | 1: 'OFPRRFC_UNSUP', |
| 843 | 2: 'OFPRRFC_BAD_ROLE', |
| 844 | } |
| 845 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 846 | # Identifiers from group ofp_stats_reply_flags |
| 847 | OFPSF_REPLY_MORE = 1 |
| 848 | |
| 849 | ofp_stats_reply_flags_map = { |
| 850 | 1: 'OFPSF_REPLY_MORE', |
| 851 | } |
| 852 | |
| 853 | # Identifiers from group ofp_stats_request_flags |
| 854 | OFPSF_REQ_MORE = 1 |
| 855 | |
| 856 | ofp_stats_request_flags_map = { |
| 857 | 1: 'OFPSF_REQ_MORE', |
| 858 | } |
| 859 | |
| 860 | # Identifiers from group ofp_stats_type |
| 861 | OFPST_DESC = 0 |
| 862 | OFPST_FLOW = 1 |
| 863 | OFPST_AGGREGATE = 2 |
| 864 | OFPST_TABLE = 3 |
| 865 | OFPST_PORT = 4 |
| 866 | OFPST_QUEUE = 5 |
| 867 | OFPST_GROUP = 6 |
| 868 | OFPST_GROUP_DESC = 7 |
| 869 | OFPST_GROUP_FEATURES = 8 |
| 870 | OFPST_METER = 9 |
| 871 | OFPST_METER_CONFIG = 10 |
| 872 | OFPST_METER_FEATURES = 11 |
| 873 | OFPST_TABLE_FEATURES = 12 |
| 874 | OFPST_PORT_DESC = 13 |
| 875 | OFPST_EXPERIMENTER = 65535 |
| 876 | |
| 877 | ofp_stats_type_map = { |
| 878 | 0: 'OFPST_DESC', |
| 879 | 1: 'OFPST_FLOW', |
| 880 | 2: 'OFPST_AGGREGATE', |
| 881 | 3: 'OFPST_TABLE', |
| 882 | 4: 'OFPST_PORT', |
| 883 | 5: 'OFPST_QUEUE', |
| 884 | 6: 'OFPST_GROUP', |
| 885 | 7: 'OFPST_GROUP_DESC', |
| 886 | 8: 'OFPST_GROUP_FEATURES', |
| 887 | 9: 'OFPST_METER', |
| 888 | 10: 'OFPST_METER_CONFIG', |
| 889 | 11: 'OFPST_METER_FEATURES', |
| 890 | 12: 'OFPST_TABLE_FEATURES', |
| 891 | 13: 'OFPST_PORT_DESC', |
| 892 | 65535: 'OFPST_EXPERIMENTER', |
| 893 | } |
| 894 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 895 | # Identifiers from group ofp_switch_config_failed_code |
| 896 | OFPSCFC_BAD_FLAGS = 0 |
| 897 | OFPSCFC_BAD_LEN = 1 |
| 898 | OFPSCFC_EPERM = 2 |
| 899 | |
| 900 | ofp_switch_config_failed_code_map = { |
| 901 | 0: 'OFPSCFC_BAD_FLAGS', |
| 902 | 1: 'OFPSCFC_BAD_LEN', |
| 903 | 2: 'OFPSCFC_EPERM', |
| 904 | } |
| 905 | |
| 906 | # Identifiers from group ofp_table |
| 907 | OFPTT_MAX = 254 |
| 908 | OFPTT_ALL = 255 |
| 909 | |
| 910 | ofp_table_map = { |
| 911 | 254: 'OFPTT_MAX', |
| 912 | 255: 'OFPTT_ALL', |
| 913 | } |
| 914 | |
| 915 | # Identifiers from group ofp_table_config |
| 916 | OFPTC_DEPRECATED_MASK = 3 |
| 917 | |
| 918 | ofp_table_config_map = { |
| 919 | 3: 'OFPTC_DEPRECATED_MASK', |
| 920 | } |
| 921 | |
| 922 | # Identifiers from group ofp_table_feature_prop_type |
| 923 | OFPTFPT_INSTRUCTIONS = 0 |
| 924 | OFPTFPT_INSTRUCTIONS_MISS = 1 |
| 925 | OFPTFPT_NEXT_TABLES = 2 |
| 926 | OFPTFPT_NEXT_TABLES_MISS = 3 |
| 927 | OFPTFPT_WRITE_ACTIONS = 4 |
| 928 | OFPTFPT_WRITE_ACTIONS_MISS = 5 |
| 929 | OFPTFPT_APPLY_ACTIONS = 6 |
| 930 | OFPTFPT_APPLY_ACTIONS_MISS = 7 |
| 931 | OFPTFPT_MATCH = 8 |
| 932 | OFPTFPT_WILDCARDS = 10 |
| 933 | OFPTFPT_WRITE_SETFIELD = 12 |
| 934 | OFPTFPT_WRITE_SETFIELD_MISS = 13 |
| 935 | OFPTFPT_APPLY_SETFIELD = 14 |
| 936 | OFPTFPT_APPLY_SETFIELD_MISS = 15 |
| 937 | OFPTFPT_EXPERIMENTER = 65534 |
| 938 | OFPTFPT_EXPERIMENTER_MISS = 65535 |
| 939 | |
| 940 | ofp_table_feature_prop_type_map = { |
| 941 | 0: 'OFPTFPT_INSTRUCTIONS', |
| 942 | 1: 'OFPTFPT_INSTRUCTIONS_MISS', |
| 943 | 2: 'OFPTFPT_NEXT_TABLES', |
| 944 | 3: 'OFPTFPT_NEXT_TABLES_MISS', |
| 945 | 4: 'OFPTFPT_WRITE_ACTIONS', |
| 946 | 5: 'OFPTFPT_WRITE_ACTIONS_MISS', |
| 947 | 6: 'OFPTFPT_APPLY_ACTIONS', |
| 948 | 7: 'OFPTFPT_APPLY_ACTIONS_MISS', |
| 949 | 8: 'OFPTFPT_MATCH', |
| 950 | 10: 'OFPTFPT_WILDCARDS', |
| 951 | 12: 'OFPTFPT_WRITE_SETFIELD', |
| 952 | 13: 'OFPTFPT_WRITE_SETFIELD_MISS', |
| 953 | 14: 'OFPTFPT_APPLY_SETFIELD', |
| 954 | 15: 'OFPTFPT_APPLY_SETFIELD_MISS', |
| 955 | 65534: 'OFPTFPT_EXPERIMENTER', |
| 956 | 65535: 'OFPTFPT_EXPERIMENTER_MISS', |
| 957 | } |
| 958 | |
| 959 | # Identifiers from group ofp_table_features_failed_code |
| 960 | OFPTFFC_BAD_TABLE = 0 |
| 961 | OFPTFFC_BAD_METADATA = 1 |
| 962 | OFPTFFC_BAD_TYPE = 2 |
| 963 | OFPTFFC_BAD_LEN = 3 |
| 964 | OFPTFFC_BAD_ARGUMENT = 4 |
| 965 | OFPTFFC_EPERM = 5 |
| 966 | |
| 967 | ofp_table_features_failed_code_map = { |
| 968 | 0: 'OFPTFFC_BAD_TABLE', |
| 969 | 1: 'OFPTFFC_BAD_METADATA', |
| 970 | 2: 'OFPTFFC_BAD_TYPE', |
| 971 | 3: 'OFPTFFC_BAD_LEN', |
| 972 | 4: 'OFPTFFC_BAD_ARGUMENT', |
| 973 | 5: 'OFPTFFC_EPERM', |
| 974 | } |
| 975 | |
| 976 | # Identifiers from group ofp_table_mod_failed_code |
| 977 | OFPTMFC_BAD_TABLE = 0 |
| 978 | OFPTMFC_BAD_CONFIG = 1 |
| 979 | OFPTMFC_EPERM = 2 |
| 980 | |
| 981 | ofp_table_mod_failed_code_map = { |
| 982 | 0: 'OFPTMFC_BAD_TABLE', |
| 983 | 1: 'OFPTMFC_BAD_CONFIG', |
| 984 | 2: 'OFPTMFC_EPERM', |
| 985 | } |
| 986 | |
| 987 | # Identifiers from group ofp_type |
| 988 | OFPT_HELLO = 0 |
| 989 | OFPT_ERROR = 1 |
| 990 | OFPT_ECHO_REQUEST = 2 |
| 991 | OFPT_ECHO_REPLY = 3 |
| 992 | OFPT_EXPERIMENTER = 4 |
| 993 | OFPT_FEATURES_REQUEST = 5 |
| 994 | OFPT_FEATURES_REPLY = 6 |
| 995 | OFPT_GET_CONFIG_REQUEST = 7 |
| 996 | OFPT_GET_CONFIG_REPLY = 8 |
| 997 | OFPT_SET_CONFIG = 9 |
| 998 | OFPT_PACKET_IN = 10 |
| 999 | OFPT_FLOW_REMOVED = 11 |
| 1000 | OFPT_PORT_STATUS = 12 |
| 1001 | OFPT_PACKET_OUT = 13 |
| 1002 | OFPT_FLOW_MOD = 14 |
| 1003 | OFPT_GROUP_MOD = 15 |
| 1004 | OFPT_PORT_MOD = 16 |
| 1005 | OFPT_TABLE_MOD = 17 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 1006 | OFPT_STATS_REQUEST = 18 |
| 1007 | OFPT_STATS_REPLY = 19 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 1008 | OFPT_BARRIER_REQUEST = 20 |
| 1009 | OFPT_BARRIER_REPLY = 21 |
| 1010 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 1011 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 1012 | OFPT_ROLE_REQUEST = 24 |
| 1013 | OFPT_ROLE_REPLY = 25 |
| 1014 | OFPT_GET_ASYNC_REQUEST = 26 |
| 1015 | OFPT_GET_ASYNC_REPLY = 27 |
| 1016 | OFPT_SET_ASYNC = 28 |
| 1017 | OFPT_METER_MOD = 29 |
| 1018 | |
| 1019 | ofp_type_map = { |
| 1020 | 0: 'OFPT_HELLO', |
| 1021 | 1: 'OFPT_ERROR', |
| 1022 | 2: 'OFPT_ECHO_REQUEST', |
| 1023 | 3: 'OFPT_ECHO_REPLY', |
| 1024 | 4: 'OFPT_EXPERIMENTER', |
| 1025 | 5: 'OFPT_FEATURES_REQUEST', |
| 1026 | 6: 'OFPT_FEATURES_REPLY', |
| 1027 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 1028 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 1029 | 9: 'OFPT_SET_CONFIG', |
| 1030 | 10: 'OFPT_PACKET_IN', |
| 1031 | 11: 'OFPT_FLOW_REMOVED', |
| 1032 | 12: 'OFPT_PORT_STATUS', |
| 1033 | 13: 'OFPT_PACKET_OUT', |
| 1034 | 14: 'OFPT_FLOW_MOD', |
| 1035 | 15: 'OFPT_GROUP_MOD', |
| 1036 | 16: 'OFPT_PORT_MOD', |
| 1037 | 17: 'OFPT_TABLE_MOD', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 1038 | 18: 'OFPT_STATS_REQUEST', |
| 1039 | 19: 'OFPT_STATS_REPLY', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 1040 | 20: 'OFPT_BARRIER_REQUEST', |
| 1041 | 21: 'OFPT_BARRIER_REPLY', |
| 1042 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 1043 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 1044 | 24: 'OFPT_ROLE_REQUEST', |
| 1045 | 25: 'OFPT_ROLE_REPLY', |
| 1046 | 26: 'OFPT_GET_ASYNC_REQUEST', |
| 1047 | 27: 'OFPT_GET_ASYNC_REPLY', |
| 1048 | 28: 'OFPT_SET_ASYNC', |
| 1049 | 29: 'OFPT_METER_MOD', |
| 1050 | } |
| 1051 | |
| 1052 | # Identifiers from group ofp_vlan_id |
| 1053 | OFPVID_NONE = 0 |
| 1054 | OFPVID_PRESENT = 4096 |
| 1055 | |
| 1056 | ofp_vlan_id_map = { |
| 1057 | 0: 'OFPVID_NONE', |
| 1058 | 4096: 'OFPVID_PRESENT', |
| 1059 | } |
| 1060 | |