Stephane Barbarie | 6e1bd50 | 2018-11-05 22:44:45 -0500 | [diff] [blame] | 1 | # Copyright 2017-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | # Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University |
| 15 | # Copyright (c) 2011, 2012 Open Networking Foundation |
| 16 | # Copyright (c) 2012, 2013 Big Switch Networks, Inc. |
| 17 | # See the file LICENSE.pyloxi which should have been included in the source distribution |
| 18 | |
| 19 | # Automatically generated by LOXI from template const.py |
| 20 | # Do not modify |
| 21 | |
| 22 | OFP_VERSION = 3 |
| 23 | |
| 24 | # Identifiers from group macro_definitions |
| 25 | OFP_MAX_TABLE_NAME_LEN = 32 |
| 26 | OFP_MAX_PORT_NAME_LEN = 16 |
| 27 | OFP_TCP_PORT = 6653 |
| 28 | OFP_SSL_PORT = 6653 |
| 29 | OFP_ETH_ALEN = 6 |
| 30 | OFP_DEFAULT_MISS_SEND_LEN = 128 |
| 31 | OFP_VLAN_NONE = 0 |
| 32 | OFP_FLOW_PERMANENT = 0 |
| 33 | OFP_DEFAULT_PRIORITY = 32768 |
| 34 | OFP_NO_BUFFER = 4294967295 |
| 35 | DESC_STR_LEN = 256 |
| 36 | SERIAL_NUM_LEN = 32 |
| 37 | OFPQ_ALL = 4294967295 |
| 38 | OFPQ_MIN_RATE_UNCFG = 65535 |
| 39 | OFPQ_MAX_RATE_UNCFG = 65535 |
| 40 | |
| 41 | # Identifiers from group of_bsn_pdu_slot_num |
| 42 | BSN_PDU_SLOT_NUM_ANY = 255 |
| 43 | |
| 44 | of_bsn_pdu_slot_num_map = { |
| 45 | 255: 'BSN_PDU_SLOT_NUM_ANY', |
| 46 | } |
| 47 | |
| 48 | # Identifiers from group ofp_action_type |
| 49 | OFPAT_OUTPUT = 0 |
| 50 | OFPAT_COPY_TTL_OUT = 11 |
| 51 | OFPAT_COPY_TTL_IN = 12 |
| 52 | OFPAT_SET_MPLS_TTL = 15 |
| 53 | OFPAT_DEC_MPLS_TTL = 16 |
| 54 | OFPAT_PUSH_VLAN = 17 |
| 55 | OFPAT_POP_VLAN = 18 |
| 56 | OFPAT_PUSH_MPLS = 19 |
| 57 | OFPAT_POP_MPLS = 20 |
| 58 | OFPAT_SET_QUEUE = 21 |
| 59 | OFPAT_GROUP = 22 |
| 60 | OFPAT_SET_NW_TTL = 23 |
| 61 | OFPAT_DEC_NW_TTL = 24 |
| 62 | OFPAT_SET_FIELD = 25 |
| 63 | OFPAT_EXPERIMENTER = 65535 |
| 64 | |
| 65 | ofp_action_type_map = { |
| 66 | 0: 'OFPAT_OUTPUT', |
| 67 | 11: 'OFPAT_COPY_TTL_OUT', |
| 68 | 12: 'OFPAT_COPY_TTL_IN', |
| 69 | 15: 'OFPAT_SET_MPLS_TTL', |
| 70 | 16: 'OFPAT_DEC_MPLS_TTL', |
| 71 | 17: 'OFPAT_PUSH_VLAN', |
| 72 | 18: 'OFPAT_POP_VLAN', |
| 73 | 19: 'OFPAT_PUSH_MPLS', |
| 74 | 20: 'OFPAT_POP_MPLS', |
| 75 | 21: 'OFPAT_SET_QUEUE', |
| 76 | 22: 'OFPAT_GROUP', |
| 77 | 23: 'OFPAT_SET_NW_TTL', |
| 78 | 24: 'OFPAT_DEC_NW_TTL', |
| 79 | 25: 'OFPAT_SET_FIELD', |
| 80 | 65535: 'OFPAT_EXPERIMENTER', |
| 81 | } |
| 82 | |
| 83 | # Identifiers from group ofp_bad_action_code |
| 84 | OFPBAC_BAD_TYPE = 0 |
| 85 | OFPBAC_BAD_LEN = 1 |
| 86 | OFPBAC_BAD_EXPERIMENTER = 2 |
| 87 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3 |
| 88 | OFPBAC_BAD_OUT_PORT = 4 |
| 89 | OFPBAC_BAD_ARGUMENT = 5 |
| 90 | OFPBAC_EPERM = 6 |
| 91 | OFPBAC_TOO_MANY = 7 |
| 92 | OFPBAC_BAD_QUEUE = 8 |
| 93 | OFPBAC_BAD_OUT_GROUP = 9 |
| 94 | OFPBAC_MATCH_INCONSISTENT = 10 |
| 95 | OFPBAC_UNSUPPORTED_ORDER = 11 |
| 96 | OFPBAC_BAD_TAG = 12 |
| 97 | OFPBAC_BAD_SET_TYPE = 13 |
| 98 | OFPBAC_BAD_SET_LEN = 14 |
| 99 | OFPBAC_BAD_SET_ARGUMENT = 15 |
| 100 | |
| 101 | ofp_bad_action_code_map = { |
| 102 | 0: 'OFPBAC_BAD_TYPE', |
| 103 | 1: 'OFPBAC_BAD_LEN', |
| 104 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
| 105 | 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE', |
| 106 | 4: 'OFPBAC_BAD_OUT_PORT', |
| 107 | 5: 'OFPBAC_BAD_ARGUMENT', |
| 108 | 6: 'OFPBAC_EPERM', |
| 109 | 7: 'OFPBAC_TOO_MANY', |
| 110 | 8: 'OFPBAC_BAD_QUEUE', |
| 111 | 9: 'OFPBAC_BAD_OUT_GROUP', |
| 112 | 10: 'OFPBAC_MATCH_INCONSISTENT', |
| 113 | 11: 'OFPBAC_UNSUPPORTED_ORDER', |
| 114 | 12: 'OFPBAC_BAD_TAG', |
| 115 | 13: 'OFPBAC_BAD_SET_TYPE', |
| 116 | 14: 'OFPBAC_BAD_SET_LEN', |
| 117 | 15: 'OFPBAC_BAD_SET_ARGUMENT', |
| 118 | } |
| 119 | |
| 120 | # Identifiers from group ofp_bad_instruction_code |
| 121 | OFPBIC_UNKNOWN_INST = 0 |
| 122 | OFPBIC_UNSUP_INST = 1 |
| 123 | OFPBIC_BAD_TABLE_ID = 2 |
| 124 | OFPBIC_UNSUP_METADATA = 3 |
| 125 | OFPBIC_UNSUP_METADATA_MASK = 4 |
| 126 | OFPBIC_BAD_EXPERIMENTER = 5 |
| 127 | OFPBIC_BAD_EXPERIMENTER_TYPE = 6 |
| 128 | OFPBIC_BAD_LEN = 7 |
| 129 | OFPBIC_EPERM = 8 |
| 130 | |
| 131 | ofp_bad_instruction_code_map = { |
| 132 | 0: 'OFPBIC_UNKNOWN_INST', |
| 133 | 1: 'OFPBIC_UNSUP_INST', |
| 134 | 2: 'OFPBIC_BAD_TABLE_ID', |
| 135 | 3: 'OFPBIC_UNSUP_METADATA', |
| 136 | 4: 'OFPBIC_UNSUP_METADATA_MASK', |
| 137 | 5: 'OFPBIC_BAD_EXPERIMENTER', |
| 138 | 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE', |
| 139 | 7: 'OFPBIC_BAD_LEN', |
| 140 | 8: 'OFPBIC_EPERM', |
| 141 | } |
| 142 | |
| 143 | # Identifiers from group ofp_bad_match_code |
| 144 | OFPBMC_BAD_TYPE = 0 |
| 145 | OFPBMC_BAD_LEN = 1 |
| 146 | OFPBMC_BAD_TAG = 2 |
| 147 | OFPBMC_BAD_DL_ADDR_MASK = 3 |
| 148 | OFPBMC_BAD_NW_ADDR_MASK = 4 |
| 149 | OFPBMC_BAD_WILDCARDS = 5 |
| 150 | OFPBMC_BAD_FIELD = 6 |
| 151 | OFPBMC_BAD_VALUE = 7 |
| 152 | OFPBMC_BAD_MASK = 8 |
| 153 | OFPBMC_BAD_PREREQ = 9 |
| 154 | OFPBMC_DUP_FIELD = 10 |
| 155 | OFPBMC_EPERM = 11 |
| 156 | |
| 157 | ofp_bad_match_code_map = { |
| 158 | 0: 'OFPBMC_BAD_TYPE', |
| 159 | 1: 'OFPBMC_BAD_LEN', |
| 160 | 2: 'OFPBMC_BAD_TAG', |
| 161 | 3: 'OFPBMC_BAD_DL_ADDR_MASK', |
| 162 | 4: 'OFPBMC_BAD_NW_ADDR_MASK', |
| 163 | 5: 'OFPBMC_BAD_WILDCARDS', |
| 164 | 6: 'OFPBMC_BAD_FIELD', |
| 165 | 7: 'OFPBMC_BAD_VALUE', |
| 166 | 8: 'OFPBMC_BAD_MASK', |
| 167 | 9: 'OFPBMC_BAD_PREREQ', |
| 168 | 10: 'OFPBMC_DUP_FIELD', |
| 169 | 11: 'OFPBMC_EPERM', |
| 170 | } |
| 171 | |
| 172 | # Identifiers from group ofp_bad_request_code |
| 173 | OFPBRC_BAD_VERSION = 0 |
| 174 | OFPBRC_BAD_TYPE = 1 |
| 175 | OFPBRC_BAD_STAT = 2 |
| 176 | OFPBRC_BAD_EXPERIMENTER = 3 |
| 177 | OFPBRC_BAD_EXPERIMENTER_TYPE = 4 |
| 178 | OFPBRC_EPERM = 5 |
| 179 | OFPBRC_BAD_LEN = 6 |
| 180 | OFPBRC_BUFFER_EMPTY = 7 |
| 181 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 182 | OFPBRC_BAD_TABLE_ID = 9 |
| 183 | OFPBRC_IS_SLAVE = 10 |
| 184 | OFPBRC_BAD_PORT = 11 |
| 185 | OFPBRC_BAD_PACKET = 12 |
| 186 | |
| 187 | ofp_bad_request_code_map = { |
| 188 | 0: 'OFPBRC_BAD_VERSION', |
| 189 | 1: 'OFPBRC_BAD_TYPE', |
| 190 | 2: 'OFPBRC_BAD_STAT', |
| 191 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
| 192 | 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE', |
| 193 | 5: 'OFPBRC_EPERM', |
| 194 | 6: 'OFPBRC_BAD_LEN', |
| 195 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 196 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 197 | 9: 'OFPBRC_BAD_TABLE_ID', |
| 198 | 10: 'OFPBRC_IS_SLAVE', |
| 199 | 11: 'OFPBRC_BAD_PORT', |
| 200 | 12: 'OFPBRC_BAD_PACKET', |
| 201 | } |
| 202 | |
| 203 | # Identifiers from group ofp_bsn_tcp_flag |
| 204 | OFP_BSN_TCP_FLAG_FIN = 1 |
| 205 | OFP_BSN_TCP_FLAG_SYN = 2 |
| 206 | OFP_BSN_TCP_FLAG_RST = 4 |
| 207 | OFP_BSN_TCP_FLAG_PSH = 8 |
| 208 | OFP_BSN_TCP_FLAG_ACK = 16 |
| 209 | OFP_BSN_TCP_FLAG_URG = 32 |
| 210 | OFP_BSN_TCP_FLAG_ECE = 64 |
| 211 | OFP_BSN_TCP_FLAG_CWR = 128 |
| 212 | OFP_BSN_TCP_FLAG_NS = 256 |
| 213 | |
| 214 | ofp_bsn_tcp_flag_map = { |
| 215 | 1: 'OFP_BSN_TCP_FLAG_FIN', |
| 216 | 2: 'OFP_BSN_TCP_FLAG_SYN', |
| 217 | 4: 'OFP_BSN_TCP_FLAG_RST', |
| 218 | 8: 'OFP_BSN_TCP_FLAG_PSH', |
| 219 | 16: 'OFP_BSN_TCP_FLAG_ACK', |
| 220 | 32: 'OFP_BSN_TCP_FLAG_URG', |
| 221 | 64: 'OFP_BSN_TCP_FLAG_ECE', |
| 222 | 128: 'OFP_BSN_TCP_FLAG_CWR', |
| 223 | 256: 'OFP_BSN_TCP_FLAG_NS', |
| 224 | } |
| 225 | |
| 226 | # Identifiers from group ofp_bsn_vport_l2gre_flags |
| 227 | OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1 |
| 228 | OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2 |
| 229 | OF_BSN_VPORT_L2GRE_DSCP_COPY = 4 |
| 230 | OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8 |
| 231 | OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16 |
| 232 | |
| 233 | ofp_bsn_vport_l2gre_flags_map = { |
| 234 | 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID', |
| 235 | 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN', |
| 236 | 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY', |
| 237 | 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID', |
| 238 | 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID', |
| 239 | } |
| 240 | |
| 241 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 242 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 243 | |
| 244 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 245 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 246 | } |
| 247 | |
| 248 | # Identifiers from group ofp_bsn_vport_status |
| 249 | OF_BSN_VPORT_STATUS_OK = 0 |
| 250 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 251 | |
| 252 | ofp_bsn_vport_status_map = { |
| 253 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 254 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 255 | } |
| 256 | |
| 257 | # Identifiers from group ofp_capabilities |
| 258 | OFPC_FLOW_STATS = 1 |
| 259 | OFPC_TABLE_STATS = 2 |
| 260 | OFPC_PORT_STATS = 4 |
| 261 | OFPC_GROUP_STATS = 8 |
| 262 | OFPC_IP_REASM = 32 |
| 263 | OFPC_QUEUE_STATS = 64 |
| 264 | OFPC_PORT_BLOCKED = 256 |
| 265 | |
| 266 | ofp_capabilities_map = { |
| 267 | 1: 'OFPC_FLOW_STATS', |
| 268 | 2: 'OFPC_TABLE_STATS', |
| 269 | 4: 'OFPC_PORT_STATS', |
| 270 | 8: 'OFPC_GROUP_STATS', |
| 271 | 32: 'OFPC_IP_REASM', |
| 272 | 64: 'OFPC_QUEUE_STATS', |
| 273 | 256: 'OFPC_PORT_BLOCKED', |
| 274 | } |
| 275 | |
| 276 | # Identifiers from group ofp_config_flags |
| 277 | OFPC_FRAG_NORMAL = 0 |
| 278 | OFPC_FRAG_DROP = 1 |
| 279 | OFPC_FRAG_REASM = 2 |
| 280 | OFPC_FRAG_MASK = 3 |
| 281 | OFPC_INVALID_TTL_TO_CONTROLLER = 4 |
| 282 | |
| 283 | ofp_config_flags_map = { |
| 284 | 0: 'OFPC_FRAG_NORMAL', |
| 285 | 1: 'OFPC_FRAG_DROP', |
| 286 | 2: 'OFPC_FRAG_REASM', |
| 287 | 3: 'OFPC_FRAG_MASK', |
| 288 | 4: 'OFPC_INVALID_TTL_TO_CONTROLLER', |
| 289 | } |
| 290 | |
| 291 | # Identifiers from group ofp_controller_max_len |
| 292 | OFPCML_MAX = 65509 |
| 293 | OFPCML_NO_BUFFER = 65535 |
| 294 | |
| 295 | ofp_controller_max_len_map = { |
| 296 | 65509: 'OFPCML_MAX', |
| 297 | 65535: 'OFPCML_NO_BUFFER', |
| 298 | } |
| 299 | |
| 300 | # Identifiers from group ofp_controller_role |
| 301 | OFPCR_ROLE_NOCHANGE = 0 |
| 302 | OFPCR_ROLE_EQUAL = 1 |
| 303 | OFPCR_ROLE_MASTER = 2 |
| 304 | OFPCR_ROLE_SLAVE = 3 |
| 305 | |
| 306 | ofp_controller_role_map = { |
| 307 | 0: 'OFPCR_ROLE_NOCHANGE', |
| 308 | 1: 'OFPCR_ROLE_EQUAL', |
| 309 | 2: 'OFPCR_ROLE_MASTER', |
| 310 | 3: 'OFPCR_ROLE_SLAVE', |
| 311 | } |
| 312 | |
| 313 | # Identifiers from group ofp_error_type |
| 314 | OFPET_HELLO_FAILED = 0 |
| 315 | OFPET_BAD_REQUEST = 1 |
| 316 | OFPET_BAD_ACTION = 2 |
| 317 | OFPET_BAD_INSTRUCTION = 3 |
| 318 | OFPET_BAD_MATCH = 4 |
| 319 | OFPET_FLOW_MOD_FAILED = 5 |
| 320 | OFPET_GROUP_MOD_FAILED = 6 |
| 321 | OFPET_PORT_MOD_FAILED = 7 |
| 322 | OFPET_TABLE_MOD_FAILED = 8 |
| 323 | OFPET_QUEUE_OP_FAILED = 9 |
| 324 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 325 | OFPET_ROLE_REQUEST_FAILED = 11 |
| 326 | OFPET_EXPERIMENTER = 65535 |
| 327 | |
| 328 | ofp_error_type_map = { |
| 329 | 0: 'OFPET_HELLO_FAILED', |
| 330 | 1: 'OFPET_BAD_REQUEST', |
| 331 | 2: 'OFPET_BAD_ACTION', |
| 332 | 3: 'OFPET_BAD_INSTRUCTION', |
| 333 | 4: 'OFPET_BAD_MATCH', |
| 334 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 335 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 336 | 7: 'OFPET_PORT_MOD_FAILED', |
| 337 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 338 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 339 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 340 | 11: 'OFPET_ROLE_REQUEST_FAILED', |
| 341 | 65535: 'OFPET_EXPERIMENTER', |
| 342 | } |
| 343 | |
| 344 | # Identifiers from group ofp_flow_mod_command |
| 345 | OFPFC_ADD = 0 |
| 346 | OFPFC_MODIFY = 1 |
| 347 | OFPFC_MODIFY_STRICT = 2 |
| 348 | OFPFC_DELETE = 3 |
| 349 | OFPFC_DELETE_STRICT = 4 |
| 350 | |
| 351 | ofp_flow_mod_command_map = { |
| 352 | 0: 'OFPFC_ADD', |
| 353 | 1: 'OFPFC_MODIFY', |
| 354 | 2: 'OFPFC_MODIFY_STRICT', |
| 355 | 3: 'OFPFC_DELETE', |
| 356 | 4: 'OFPFC_DELETE_STRICT', |
| 357 | } |
| 358 | |
| 359 | # Identifiers from group ofp_flow_mod_failed_code |
| 360 | OFPFMFC_UNKNOWN = 0 |
| 361 | OFPFMFC_TABLE_FULL = 1 |
| 362 | OFPFMFC_BAD_TABLE_ID = 2 |
| 363 | OFPFMFC_OVERLAP = 3 |
| 364 | OFPFMFC_EPERM = 4 |
| 365 | OFPFMFC_BAD_TIMEOUT = 5 |
| 366 | OFPFMFC_BAD_COMMAND = 6 |
| 367 | OFPFMFC_BAD_FLAGS = 7 |
| 368 | |
| 369 | ofp_flow_mod_failed_code_map = { |
| 370 | 0: 'OFPFMFC_UNKNOWN', |
| 371 | 1: 'OFPFMFC_TABLE_FULL', |
| 372 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 373 | 3: 'OFPFMFC_OVERLAP', |
| 374 | 4: 'OFPFMFC_EPERM', |
| 375 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 376 | 6: 'OFPFMFC_BAD_COMMAND', |
| 377 | 7: 'OFPFMFC_BAD_FLAGS', |
| 378 | } |
| 379 | |
| 380 | # Identifiers from group ofp_flow_mod_flags |
| 381 | OFPFF_SEND_FLOW_REM = 1 |
| 382 | OFPFF_CHECK_OVERLAP = 2 |
| 383 | OFPFF_RESET_COUNTS = 4 |
| 384 | |
| 385 | ofp_flow_mod_flags_map = { |
| 386 | 1: 'OFPFF_SEND_FLOW_REM', |
| 387 | 2: 'OFPFF_CHECK_OVERLAP', |
| 388 | 4: 'OFPFF_RESET_COUNTS', |
| 389 | } |
| 390 | |
| 391 | # Identifiers from group ofp_flow_removed_reason |
| 392 | OFPRR_IDLE_TIMEOUT = 0 |
| 393 | OFPRR_HARD_TIMEOUT = 1 |
| 394 | OFPRR_DELETE = 2 |
| 395 | OFPRR_GROUP_DELETE = 3 |
| 396 | |
| 397 | ofp_flow_removed_reason_map = { |
| 398 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 399 | 1: 'OFPRR_HARD_TIMEOUT', |
| 400 | 2: 'OFPRR_DELETE', |
| 401 | 3: 'OFPRR_GROUP_DELETE', |
| 402 | } |
| 403 | |
| 404 | # Identifiers from group ofp_group |
| 405 | OFPG_MAX = 4294967040 |
| 406 | OFPG_ALL = 4294967292 |
| 407 | OFPG_ANY = 4294967295 |
| 408 | |
| 409 | ofp_group_map = { |
| 410 | 4294967040: 'OFPG_MAX', |
| 411 | 4294967292: 'OFPG_ALL', |
| 412 | 4294967295: 'OFPG_ANY', |
| 413 | } |
| 414 | |
| 415 | # Identifiers from group ofp_group_capabilities |
| 416 | OFPGFC_SELECT_WEIGHT = 1 |
| 417 | OFPGFC_SELECT_LIVENESS = 2 |
| 418 | OFPGFC_CHAINING = 4 |
| 419 | OFPGFC_CHAINING_CHECKS = 8 |
| 420 | |
| 421 | ofp_group_capabilities_map = { |
| 422 | 1: 'OFPGFC_SELECT_WEIGHT', |
| 423 | 2: 'OFPGFC_SELECT_LIVENESS', |
| 424 | 4: 'OFPGFC_CHAINING', |
| 425 | 8: 'OFPGFC_CHAINING_CHECKS', |
| 426 | } |
| 427 | |
| 428 | # Identifiers from group ofp_group_mod_command |
| 429 | OFPGC_ADD = 0 |
| 430 | OFPGC_MODIFY = 1 |
| 431 | OFPGC_DELETE = 2 |
| 432 | |
| 433 | ofp_group_mod_command_map = { |
| 434 | 0: 'OFPGC_ADD', |
| 435 | 1: 'OFPGC_MODIFY', |
| 436 | 2: 'OFPGC_DELETE', |
| 437 | } |
| 438 | |
| 439 | # Identifiers from group ofp_group_mod_failed_code |
| 440 | OFPGMFC_GROUP_EXISTS = 0 |
| 441 | OFPGMFC_INVALID_GROUP = 1 |
| 442 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 443 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 444 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 445 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 446 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 447 | OFPGMFC_LOOP = 7 |
| 448 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 449 | OFPGMFC_CHAINED_GROUP = 9 |
| 450 | OFPGMFC_BAD_TYPE = 10 |
| 451 | OFPGMFC_BAD_COMMAND = 11 |
| 452 | OFPGMFC_BAD_BUCKET = 12 |
| 453 | OFPGMFC_BAD_WATCH = 13 |
| 454 | OFPGMFC_EPERM = 14 |
| 455 | |
| 456 | ofp_group_mod_failed_code_map = { |
| 457 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 458 | 1: 'OFPGMFC_INVALID_GROUP', |
| 459 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 460 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 461 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 462 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 463 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 464 | 7: 'OFPGMFC_LOOP', |
| 465 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 466 | 9: 'OFPGMFC_CHAINED_GROUP', |
| 467 | 10: 'OFPGMFC_BAD_TYPE', |
| 468 | 11: 'OFPGMFC_BAD_COMMAND', |
| 469 | 12: 'OFPGMFC_BAD_BUCKET', |
| 470 | 13: 'OFPGMFC_BAD_WATCH', |
| 471 | 14: 'OFPGMFC_EPERM', |
| 472 | } |
| 473 | |
| 474 | # Identifiers from group ofp_group_type |
| 475 | OFPGT_ALL = 0 |
| 476 | OFPGT_SELECT = 1 |
| 477 | OFPGT_INDIRECT = 2 |
| 478 | OFPGT_FF = 3 |
| 479 | |
| 480 | ofp_group_type_map = { |
| 481 | 0: 'OFPGT_ALL', |
| 482 | 1: 'OFPGT_SELECT', |
| 483 | 2: 'OFPGT_INDIRECT', |
| 484 | 3: 'OFPGT_FF', |
| 485 | } |
| 486 | |
| 487 | # Identifiers from group ofp_hello_failed_code |
| 488 | OFPHFC_INCOMPATIBLE = 0 |
| 489 | OFPHFC_EPERM = 1 |
| 490 | |
| 491 | ofp_hello_failed_code_map = { |
| 492 | 0: 'OFPHFC_INCOMPATIBLE', |
| 493 | 1: 'OFPHFC_EPERM', |
| 494 | } |
| 495 | |
| 496 | # Identifiers from group ofp_instruction_type |
| 497 | OFPIT_GOTO_TABLE = 1 |
| 498 | OFPIT_WRITE_METADATA = 2 |
| 499 | OFPIT_WRITE_ACTIONS = 3 |
| 500 | OFPIT_APPLY_ACTIONS = 4 |
| 501 | OFPIT_CLEAR_ACTIONS = 5 |
| 502 | OFPIT_EXPERIMENTER = 65535 |
| 503 | |
| 504 | ofp_instruction_type_map = { |
| 505 | 1: 'OFPIT_GOTO_TABLE', |
| 506 | 2: 'OFPIT_WRITE_METADATA', |
| 507 | 3: 'OFPIT_WRITE_ACTIONS', |
| 508 | 4: 'OFPIT_APPLY_ACTIONS', |
| 509 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 510 | 65535: 'OFPIT_EXPERIMENTER', |
| 511 | } |
| 512 | |
| 513 | # Identifiers from group ofp_match_type |
| 514 | OFPMT_STANDARD = 0 |
| 515 | OFPMT_OXM = 1 |
| 516 | |
| 517 | ofp_match_type_map = { |
| 518 | 0: 'OFPMT_STANDARD', |
| 519 | 1: 'OFPMT_OXM', |
| 520 | } |
| 521 | |
| 522 | # Identifiers from group ofp_oxm_class |
| 523 | OFPXMC_NXM_0 = 0 |
| 524 | OFPXMC_NXM_1 = 1 |
| 525 | OFPXMC_OPENFLOW_BASIC = 32768 |
| 526 | OFPXMC_EXPERIMENTER = 65535 |
| 527 | |
| 528 | ofp_oxm_class_map = { |
| 529 | 0: 'OFPXMC_NXM_0', |
| 530 | 1: 'OFPXMC_NXM_1', |
| 531 | 32768: 'OFPXMC_OPENFLOW_BASIC', |
| 532 | 65535: 'OFPXMC_EXPERIMENTER', |
| 533 | } |
| 534 | |
| 535 | # Identifiers from group ofp_packet_in_reason |
| 536 | OFPR_NO_MATCH = 0 |
| 537 | OFPR_ACTION = 1 |
| 538 | OFPR_INVALID_TTL = 2 |
| 539 | |
| 540 | ofp_packet_in_reason_map = { |
| 541 | 0: 'OFPR_NO_MATCH', |
| 542 | 1: 'OFPR_ACTION', |
| 543 | 2: 'OFPR_INVALID_TTL', |
| 544 | } |
| 545 | |
| 546 | # Identifiers from group ofp_port |
| 547 | OFPP_MAX = 4294967040 |
| 548 | OFPP_IN_PORT = 4294967288 |
| 549 | OFPP_TABLE = 4294967289 |
| 550 | OFPP_NORMAL = 4294967290 |
| 551 | OFPP_FLOOD = 4294967291 |
| 552 | OFPP_ALL = 4294967292 |
| 553 | OFPP_CONTROLLER = 4294967293 |
| 554 | OFPP_LOCAL = 4294967294 |
| 555 | OFPP_ANY = 4294967295 |
| 556 | |
| 557 | ofp_port_map = { |
| 558 | 4294967040: 'OFPP_MAX', |
| 559 | 4294967288: 'OFPP_IN_PORT', |
| 560 | 4294967289: 'OFPP_TABLE', |
| 561 | 4294967290: 'OFPP_NORMAL', |
| 562 | 4294967291: 'OFPP_FLOOD', |
| 563 | 4294967292: 'OFPP_ALL', |
| 564 | 4294967293: 'OFPP_CONTROLLER', |
| 565 | 4294967294: 'OFPP_LOCAL', |
| 566 | 4294967295: 'OFPP_ANY', |
| 567 | } |
| 568 | |
| 569 | # Identifiers from group ofp_port_config |
| 570 | OFPPC_PORT_DOWN = 1 |
| 571 | OFPPC_NO_RECV = 4 |
| 572 | OFPPC_NO_FWD = 32 |
| 573 | OFPPC_NO_PACKET_IN = 64 |
| 574 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
| 575 | |
| 576 | ofp_port_config_map = { |
| 577 | 1: 'OFPPC_PORT_DOWN', |
| 578 | 4: 'OFPPC_NO_RECV', |
| 579 | 32: 'OFPPC_NO_FWD', |
| 580 | 64: 'OFPPC_NO_PACKET_IN', |
| 581 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
| 582 | } |
| 583 | |
| 584 | # Identifiers from group ofp_port_features |
| 585 | OFPPF_10MB_HD = 1 |
| 586 | OFPPF_10MB_FD = 2 |
| 587 | OFPPF_100MB_HD = 4 |
| 588 | OFPPF_100MB_FD = 8 |
| 589 | OFPPF_1GB_HD = 16 |
| 590 | OFPPF_1GB_FD = 32 |
| 591 | OFPPF_10GB_FD = 64 |
| 592 | OFPPF_40GB_FD = 128 |
| 593 | OFPPF_100GB_FD = 256 |
| 594 | OFPPF_1TB_FD = 512 |
| 595 | OFPPF_OTHER = 1024 |
| 596 | OFPPF_COPPER = 2048 |
| 597 | OFPPF_FIBER = 4096 |
| 598 | OFPPF_AUTONEG = 8192 |
| 599 | OFPPF_PAUSE = 16384 |
| 600 | OFPPF_PAUSE_ASYM = 32768 |
| 601 | |
| 602 | ofp_port_features_map = { |
| 603 | 1: 'OFPPF_10MB_HD', |
| 604 | 2: 'OFPPF_10MB_FD', |
| 605 | 4: 'OFPPF_100MB_HD', |
| 606 | 8: 'OFPPF_100MB_FD', |
| 607 | 16: 'OFPPF_1GB_HD', |
| 608 | 32: 'OFPPF_1GB_FD', |
| 609 | 64: 'OFPPF_10GB_FD', |
| 610 | 128: 'OFPPF_40GB_FD', |
| 611 | 256: 'OFPPF_100GB_FD', |
| 612 | 512: 'OFPPF_1TB_FD', |
| 613 | 1024: 'OFPPF_OTHER', |
| 614 | 2048: 'OFPPF_COPPER', |
| 615 | 4096: 'OFPPF_FIBER', |
| 616 | 8192: 'OFPPF_AUTONEG', |
| 617 | 16384: 'OFPPF_PAUSE', |
| 618 | 32768: 'OFPPF_PAUSE_ASYM', |
| 619 | } |
| 620 | |
| 621 | # Identifiers from group ofp_port_mod_failed_code |
| 622 | OFPPMFC_BAD_PORT = 0 |
| 623 | OFPPMFC_BAD_HW_ADDR = 1 |
| 624 | OFPPMFC_BAD_CONFIG = 2 |
| 625 | OFPPMFC_BAD_ADVERTISE = 3 |
| 626 | OFPPMFC_EPERM = 4 |
| 627 | |
| 628 | ofp_port_mod_failed_code_map = { |
| 629 | 0: 'OFPPMFC_BAD_PORT', |
| 630 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 631 | 2: 'OFPPMFC_BAD_CONFIG', |
| 632 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 633 | 4: 'OFPPMFC_EPERM', |
| 634 | } |
| 635 | |
| 636 | # Identifiers from group ofp_port_reason |
| 637 | OFPPR_ADD = 0 |
| 638 | OFPPR_DELETE = 1 |
| 639 | OFPPR_MODIFY = 2 |
| 640 | |
| 641 | ofp_port_reason_map = { |
| 642 | 0: 'OFPPR_ADD', |
| 643 | 1: 'OFPPR_DELETE', |
| 644 | 2: 'OFPPR_MODIFY', |
| 645 | } |
| 646 | |
| 647 | # Identifiers from group ofp_port_state |
| 648 | OFPPS_LINK_DOWN = 1 |
| 649 | OFPPS_BLOCKED = 2 |
| 650 | OFPPS_LIVE = 4 |
| 651 | |
| 652 | ofp_port_state_map = { |
| 653 | 1: 'OFPPS_LINK_DOWN', |
| 654 | 2: 'OFPPS_BLOCKED', |
| 655 | 4: 'OFPPS_LIVE', |
| 656 | } |
| 657 | |
| 658 | # Identifiers from group ofp_queue_op_failed_code |
| 659 | OFPQOFC_BAD_PORT = 0 |
| 660 | OFPQOFC_BAD_QUEUE = 1 |
| 661 | OFPQOFC_EPERM = 2 |
| 662 | |
| 663 | ofp_queue_op_failed_code_map = { |
| 664 | 0: 'OFPQOFC_BAD_PORT', |
| 665 | 1: 'OFPQOFC_BAD_QUEUE', |
| 666 | 2: 'OFPQOFC_EPERM', |
| 667 | } |
| 668 | |
| 669 | # Identifiers from group ofp_queue_properties |
| 670 | OFPQT_MIN_RATE = 1 |
| 671 | OFPQT_MAX_RATE = 2 |
| 672 | OFPQT_EXPERIMENTER = 65535 |
| 673 | |
| 674 | ofp_queue_properties_map = { |
| 675 | 1: 'OFPQT_MIN_RATE', |
| 676 | 2: 'OFPQT_MAX_RATE', |
| 677 | 65535: 'OFPQT_EXPERIMENTER', |
| 678 | } |
| 679 | |
| 680 | # Identifiers from group ofp_role_request_failed_code |
| 681 | OFPRRFC_STALE = 0 |
| 682 | OFPRRFC_UNSUP = 1 |
| 683 | OFPRRFC_BAD_ROLE = 2 |
| 684 | |
| 685 | ofp_role_request_failed_code_map = { |
| 686 | 0: 'OFPRRFC_STALE', |
| 687 | 1: 'OFPRRFC_UNSUP', |
| 688 | 2: 'OFPRRFC_BAD_ROLE', |
| 689 | } |
| 690 | |
| 691 | # Identifiers from group ofp_stats_reply_flags |
| 692 | OFPSF_REPLY_MORE = 1 |
| 693 | |
| 694 | ofp_stats_reply_flags_map = { |
| 695 | 1: 'OFPSF_REPLY_MORE', |
| 696 | } |
| 697 | |
| 698 | # Identifiers from group ofp_stats_request_flags |
| 699 | |
| 700 | ofp_stats_request_flags_map = { |
| 701 | } |
| 702 | |
| 703 | # Identifiers from group ofp_stats_type |
| 704 | OFPST_DESC = 0 |
| 705 | OFPST_FLOW = 1 |
| 706 | OFPST_AGGREGATE = 2 |
| 707 | OFPST_TABLE = 3 |
| 708 | OFPST_PORT = 4 |
| 709 | OFPST_QUEUE = 5 |
| 710 | OFPST_GROUP = 6 |
| 711 | OFPST_GROUP_DESC = 7 |
| 712 | OFPST_GROUP_FEATURES = 8 |
| 713 | OFPST_EXPERIMENTER = 65535 |
| 714 | |
| 715 | ofp_stats_type_map = { |
| 716 | 0: 'OFPST_DESC', |
| 717 | 1: 'OFPST_FLOW', |
| 718 | 2: 'OFPST_AGGREGATE', |
| 719 | 3: 'OFPST_TABLE', |
| 720 | 4: 'OFPST_PORT', |
| 721 | 5: 'OFPST_QUEUE', |
| 722 | 6: 'OFPST_GROUP', |
| 723 | 7: 'OFPST_GROUP_DESC', |
| 724 | 8: 'OFPST_GROUP_FEATURES', |
| 725 | 65535: 'OFPST_EXPERIMENTER', |
| 726 | } |
| 727 | |
| 728 | # Identifiers from group ofp_switch_config_failed_code |
| 729 | OFPSCFC_BAD_FLAGS = 0 |
| 730 | OFPSCFC_BAD_LEN = 1 |
| 731 | OFPSCFC_EPERM = 2 |
| 732 | |
| 733 | ofp_switch_config_failed_code_map = { |
| 734 | 0: 'OFPSCFC_BAD_FLAGS', |
| 735 | 1: 'OFPSCFC_BAD_LEN', |
| 736 | 2: 'OFPSCFC_EPERM', |
| 737 | } |
| 738 | |
| 739 | # Identifiers from group ofp_table |
| 740 | OFPTT_MAX = 254 |
| 741 | OFPTT_ALL = 255 |
| 742 | |
| 743 | ofp_table_map = { |
| 744 | 254: 'OFPTT_MAX', |
| 745 | 255: 'OFPTT_ALL', |
| 746 | } |
| 747 | |
| 748 | # Identifiers from group ofp_table_config |
| 749 | OFPTC_TABLE_MISS_CONTROLLER = 0 |
| 750 | OFPTC_TABLE_MISS_CONTINUE = 1 |
| 751 | OFPTC_TABLE_MISS_DROP = 2 |
| 752 | OFPTC_TABLE_MISS_MASK = 3 |
| 753 | |
| 754 | ofp_table_config_map = { |
| 755 | 0: 'OFPTC_TABLE_MISS_CONTROLLER', |
| 756 | 1: 'OFPTC_TABLE_MISS_CONTINUE', |
| 757 | 2: 'OFPTC_TABLE_MISS_DROP', |
| 758 | 3: 'OFPTC_TABLE_MISS_MASK', |
| 759 | } |
| 760 | |
| 761 | # Identifiers from group ofp_table_mod_failed_code |
| 762 | OFPTMFC_BAD_TABLE = 0 |
| 763 | OFPTMFC_BAD_CONFIG = 1 |
| 764 | OFPTMFC_EPERM = 2 |
| 765 | |
| 766 | ofp_table_mod_failed_code_map = { |
| 767 | 0: 'OFPTMFC_BAD_TABLE', |
| 768 | 1: 'OFPTMFC_BAD_CONFIG', |
| 769 | 2: 'OFPTMFC_EPERM', |
| 770 | } |
| 771 | |
| 772 | # Identifiers from group ofp_type |
| 773 | OFPT_HELLO = 0 |
| 774 | OFPT_ERROR = 1 |
| 775 | OFPT_ECHO_REQUEST = 2 |
| 776 | OFPT_ECHO_REPLY = 3 |
| 777 | OFPT_EXPERIMENTER = 4 |
| 778 | OFPT_FEATURES_REQUEST = 5 |
| 779 | OFPT_FEATURES_REPLY = 6 |
| 780 | OFPT_GET_CONFIG_REQUEST = 7 |
| 781 | OFPT_GET_CONFIG_REPLY = 8 |
| 782 | OFPT_SET_CONFIG = 9 |
| 783 | OFPT_PACKET_IN = 10 |
| 784 | OFPT_FLOW_REMOVED = 11 |
| 785 | OFPT_PORT_STATUS = 12 |
| 786 | OFPT_PACKET_OUT = 13 |
| 787 | OFPT_FLOW_MOD = 14 |
| 788 | OFPT_GROUP_MOD = 15 |
| 789 | OFPT_PORT_MOD = 16 |
| 790 | OFPT_TABLE_MOD = 17 |
| 791 | OFPT_STATS_REQUEST = 18 |
| 792 | OFPT_STATS_REPLY = 19 |
| 793 | OFPT_BARRIER_REQUEST = 20 |
| 794 | OFPT_BARRIER_REPLY = 21 |
| 795 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 796 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 797 | OFPT_ROLE_REQUEST = 24 |
| 798 | OFPT_ROLE_REPLY = 25 |
| 799 | |
| 800 | ofp_type_map = { |
| 801 | 0: 'OFPT_HELLO', |
| 802 | 1: 'OFPT_ERROR', |
| 803 | 2: 'OFPT_ECHO_REQUEST', |
| 804 | 3: 'OFPT_ECHO_REPLY', |
| 805 | 4: 'OFPT_EXPERIMENTER', |
| 806 | 5: 'OFPT_FEATURES_REQUEST', |
| 807 | 6: 'OFPT_FEATURES_REPLY', |
| 808 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 809 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 810 | 9: 'OFPT_SET_CONFIG', |
| 811 | 10: 'OFPT_PACKET_IN', |
| 812 | 11: 'OFPT_FLOW_REMOVED', |
| 813 | 12: 'OFPT_PORT_STATUS', |
| 814 | 13: 'OFPT_PACKET_OUT', |
| 815 | 14: 'OFPT_FLOW_MOD', |
| 816 | 15: 'OFPT_GROUP_MOD', |
| 817 | 16: 'OFPT_PORT_MOD', |
| 818 | 17: 'OFPT_TABLE_MOD', |
| 819 | 18: 'OFPT_STATS_REQUEST', |
| 820 | 19: 'OFPT_STATS_REPLY', |
| 821 | 20: 'OFPT_BARRIER_REQUEST', |
| 822 | 21: 'OFPT_BARRIER_REPLY', |
| 823 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 824 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 825 | 24: 'OFPT_ROLE_REQUEST', |
| 826 | 25: 'OFPT_ROLE_REPLY', |
| 827 | } |
| 828 | |
| 829 | # Identifiers from group ofp_vlan_id |
| 830 | OFPVID_NONE = 0 |
| 831 | OFPVID_PRESENT = 4096 |
| 832 | |
| 833 | ofp_vlan_id_map = { |
| 834 | 0: 'OFPVID_NONE', |
| 835 | 4096: 'OFPVID_PRESENT', |
| 836 | } |
| 837 | |