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 = 2 |
| 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 | OFPFW_ICMP_TYPE = 64 |
| 32 | OFPFW_ICMP_CODE = 128 |
| 33 | OFP_DL_TYPE_ETH2_CUTOFF = 1536 |
| 34 | OFP_DL_TYPE_NOT_ETH_TYPE = 1535 |
| 35 | OFP_VLAN_NONE = 0 |
| 36 | OFPMT_STANDARD_LENGTH = 88 |
| 37 | OFP_FLOW_PERMANENT = 0 |
| 38 | OFP_DEFAULT_PRIORITY = 32768 |
| 39 | DESC_STR_LEN = 256 |
| 40 | SERIAL_NUM_LEN = 32 |
| 41 | OFPQ_ALL = 4294967295 |
| 42 | OFPQ_MIN_RATE_UNCFG = 65535 |
| 43 | |
| 44 | # Identifiers from group of_bsn_pdu_slot_num |
| 45 | BSN_PDU_SLOT_NUM_ANY = 255 |
| 46 | |
| 47 | of_bsn_pdu_slot_num_map = { |
| 48 | 255: 'BSN_PDU_SLOT_NUM_ANY', |
| 49 | } |
| 50 | |
| 51 | # Identifiers from group ofp_action_type |
| 52 | OFPAT_OUTPUT = 0 |
| 53 | OFPAT_SET_VLAN_VID = 1 |
| 54 | OFPAT_SET_VLAN_PCP = 2 |
| 55 | OFPAT_SET_DL_SRC = 3 |
| 56 | OFPAT_SET_DL_DST = 4 |
| 57 | OFPAT_SET_NW_SRC = 5 |
| 58 | OFPAT_SET_NW_DST = 6 |
| 59 | OFPAT_SET_NW_TOS = 7 |
| 60 | OFPAT_SET_NW_ECN = 8 |
| 61 | OFPAT_SET_TP_SRC = 9 |
| 62 | OFPAT_SET_TP_DST = 10 |
| 63 | OFPAT_COPY_TTL_OUT = 11 |
| 64 | OFPAT_COPY_TTL_IN = 12 |
| 65 | OFPAT_SET_MPLS_LABEL = 13 |
| 66 | OFPAT_SET_MPLS_TC = 14 |
| 67 | OFPAT_SET_MPLS_TTL = 15 |
| 68 | OFPAT_DEC_MPLS_TTL = 16 |
| 69 | OFPAT_PUSH_VLAN = 17 |
| 70 | OFPAT_POP_VLAN = 18 |
| 71 | OFPAT_PUSH_MPLS = 19 |
| 72 | OFPAT_POP_MPLS = 20 |
| 73 | OFPAT_SET_QUEUE = 21 |
| 74 | OFPAT_GROUP = 22 |
| 75 | OFPAT_SET_NW_TTL = 23 |
| 76 | OFPAT_DEC_NW_TTL = 24 |
| 77 | OFPAT_EXPERIMENTER = 65535 |
| 78 | |
| 79 | ofp_action_type_map = { |
| 80 | 0: 'OFPAT_OUTPUT', |
| 81 | 1: 'OFPAT_SET_VLAN_VID', |
| 82 | 2: 'OFPAT_SET_VLAN_PCP', |
| 83 | 3: 'OFPAT_SET_DL_SRC', |
| 84 | 4: 'OFPAT_SET_DL_DST', |
| 85 | 5: 'OFPAT_SET_NW_SRC', |
| 86 | 6: 'OFPAT_SET_NW_DST', |
| 87 | 7: 'OFPAT_SET_NW_TOS', |
| 88 | 8: 'OFPAT_SET_NW_ECN', |
| 89 | 9: 'OFPAT_SET_TP_SRC', |
| 90 | 10: 'OFPAT_SET_TP_DST', |
| 91 | 11: 'OFPAT_COPY_TTL_OUT', |
| 92 | 12: 'OFPAT_COPY_TTL_IN', |
| 93 | 13: 'OFPAT_SET_MPLS_LABEL', |
| 94 | 14: 'OFPAT_SET_MPLS_TC', |
| 95 | 15: 'OFPAT_SET_MPLS_TTL', |
| 96 | 16: 'OFPAT_DEC_MPLS_TTL', |
| 97 | 17: 'OFPAT_PUSH_VLAN', |
| 98 | 18: 'OFPAT_POP_VLAN', |
| 99 | 19: 'OFPAT_PUSH_MPLS', |
| 100 | 20: 'OFPAT_POP_MPLS', |
| 101 | 21: 'OFPAT_SET_QUEUE', |
| 102 | 22: 'OFPAT_GROUP', |
| 103 | 23: 'OFPAT_SET_NW_TTL', |
| 104 | 24: 'OFPAT_DEC_NW_TTL', |
| 105 | 65535: 'OFPAT_EXPERIMENTER', |
| 106 | } |
| 107 | |
| 108 | # Identifiers from group ofp_bad_action_code |
| 109 | OFPBAC_BAD_TYPE = 0 |
| 110 | OFPBAC_BAD_LEN = 1 |
| 111 | OFPBAC_BAD_EXPERIMENTER = 2 |
| 112 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3 |
| 113 | OFPBAC_BAD_OUT_PORT = 4 |
| 114 | OFPBAC_BAD_ARGUMENT = 5 |
| 115 | OFPBAC_EPERM = 6 |
| 116 | OFPBAC_TOO_MANY = 7 |
| 117 | OFPBAC_BAD_QUEUE = 8 |
| 118 | OFPBAC_BAD_OUT_GROUP = 9 |
| 119 | OFPBAC_MATCH_INCONSISTENT = 10 |
| 120 | OFPBAC_UNSUPPORTED_ORDER = 11 |
| 121 | OFPBAC_BAD_TAG = 12 |
| 122 | |
| 123 | ofp_bad_action_code_map = { |
| 124 | 0: 'OFPBAC_BAD_TYPE', |
| 125 | 1: 'OFPBAC_BAD_LEN', |
| 126 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
| 127 | 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE', |
| 128 | 4: 'OFPBAC_BAD_OUT_PORT', |
| 129 | 5: 'OFPBAC_BAD_ARGUMENT', |
| 130 | 6: 'OFPBAC_EPERM', |
| 131 | 7: 'OFPBAC_TOO_MANY', |
| 132 | 8: 'OFPBAC_BAD_QUEUE', |
| 133 | 9: 'OFPBAC_BAD_OUT_GROUP', |
| 134 | 10: 'OFPBAC_MATCH_INCONSISTENT', |
| 135 | 11: 'OFPBAC_UNSUPPORTED_ORDER', |
| 136 | 12: 'OFPBAC_BAD_TAG', |
| 137 | } |
| 138 | |
| 139 | # Identifiers from group ofp_bad_instruction_code |
| 140 | OFPBIC_UNKNOWN_INST = 0 |
| 141 | OFPBIC_UNSUP_INST = 1 |
| 142 | OFPBIC_BAD_TABLE_ID = 2 |
| 143 | OFPBIC_UNSUP_METADATA = 3 |
| 144 | OFPBIC_UNSUP_METADATA_MASK = 4 |
| 145 | OFPBIC_UNSUP_EXP_INST = 5 |
| 146 | |
| 147 | ofp_bad_instruction_code_map = { |
| 148 | 0: 'OFPBIC_UNKNOWN_INST', |
| 149 | 1: 'OFPBIC_UNSUP_INST', |
| 150 | 2: 'OFPBIC_BAD_TABLE_ID', |
| 151 | 3: 'OFPBIC_UNSUP_METADATA', |
| 152 | 4: 'OFPBIC_UNSUP_METADATA_MASK', |
| 153 | 5: 'OFPBIC_UNSUP_EXP_INST', |
| 154 | } |
| 155 | |
| 156 | # Identifiers from group ofp_bad_match_code |
| 157 | OFPBMC_BAD_TYPE = 0 |
| 158 | OFPBMC_BAD_LEN = 1 |
| 159 | OFPBMC_BAD_TAG = 2 |
| 160 | OFPBMC_BAD_DL_ADDR_MASK = 3 |
| 161 | OFPBMC_BAD_NW_ADDR_MASK = 4 |
| 162 | OFPBMC_BAD_WILDCARDS = 5 |
| 163 | OFPBMC_BAD_FIELD = 6 |
| 164 | OFPBMC_BAD_VALUE = 7 |
| 165 | |
| 166 | ofp_bad_match_code_map = { |
| 167 | 0: 'OFPBMC_BAD_TYPE', |
| 168 | 1: 'OFPBMC_BAD_LEN', |
| 169 | 2: 'OFPBMC_BAD_TAG', |
| 170 | 3: 'OFPBMC_BAD_DL_ADDR_MASK', |
| 171 | 4: 'OFPBMC_BAD_NW_ADDR_MASK', |
| 172 | 5: 'OFPBMC_BAD_WILDCARDS', |
| 173 | 6: 'OFPBMC_BAD_FIELD', |
| 174 | 7: 'OFPBMC_BAD_VALUE', |
| 175 | } |
| 176 | |
| 177 | # Identifiers from group ofp_bad_request_code |
| 178 | OFPBRC_BAD_VERSION = 0 |
| 179 | OFPBRC_BAD_TYPE = 1 |
| 180 | OFPBRC_BAD_STAT = 2 |
| 181 | OFPBRC_BAD_EXPERIMENTER = 3 |
| 182 | OFPBRC_BAD_SUBTYPE = 4 |
| 183 | OFPBRC_EPERM = 5 |
| 184 | OFPBRC_BAD_LEN = 6 |
| 185 | OFPBRC_BUFFER_EMPTY = 7 |
| 186 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 187 | OFPBRC_BAD_TABLE_ID = 9 |
| 188 | |
| 189 | ofp_bad_request_code_map = { |
| 190 | 0: 'OFPBRC_BAD_VERSION', |
| 191 | 1: 'OFPBRC_BAD_TYPE', |
| 192 | 2: 'OFPBRC_BAD_STAT', |
| 193 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
| 194 | 4: 'OFPBRC_BAD_SUBTYPE', |
| 195 | 5: 'OFPBRC_EPERM', |
| 196 | 6: 'OFPBRC_BAD_LEN', |
| 197 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 198 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 199 | 9: 'OFPBRC_BAD_TABLE_ID', |
| 200 | } |
| 201 | |
| 202 | # Identifiers from group ofp_bsn_vport_l2gre_flags |
| 203 | OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1 |
| 204 | OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2 |
| 205 | OF_BSN_VPORT_L2GRE_DSCP_COPY = 4 |
| 206 | OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8 |
| 207 | OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16 |
| 208 | |
| 209 | ofp_bsn_vport_l2gre_flags_map = { |
| 210 | 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID', |
| 211 | 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN', |
| 212 | 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY', |
| 213 | 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID', |
| 214 | 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID', |
| 215 | } |
| 216 | |
| 217 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 218 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 219 | |
| 220 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 221 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 222 | } |
| 223 | |
| 224 | # Identifiers from group ofp_bsn_vport_status |
| 225 | OF_BSN_VPORT_STATUS_OK = 0 |
| 226 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 227 | |
| 228 | ofp_bsn_vport_status_map = { |
| 229 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 230 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 231 | } |
| 232 | |
| 233 | # Identifiers from group ofp_capabilities |
| 234 | OFPC_FLOW_STATS = 1 |
| 235 | OFPC_TABLE_STATS = 2 |
| 236 | OFPC_PORT_STATS = 4 |
| 237 | OFPC_GROUP_STATS = 8 |
| 238 | OFPC_IP_REASM = 32 |
| 239 | OFPC_QUEUE_STATS = 64 |
| 240 | OFPC_ARP_MATCH_IP = 128 |
| 241 | |
| 242 | ofp_capabilities_map = { |
| 243 | 1: 'OFPC_FLOW_STATS', |
| 244 | 2: 'OFPC_TABLE_STATS', |
| 245 | 4: 'OFPC_PORT_STATS', |
| 246 | 8: 'OFPC_GROUP_STATS', |
| 247 | 32: 'OFPC_IP_REASM', |
| 248 | 64: 'OFPC_QUEUE_STATS', |
| 249 | 128: 'OFPC_ARP_MATCH_IP', |
| 250 | } |
| 251 | |
| 252 | # Identifiers from group ofp_config_flags |
| 253 | OFPC_FRAG_NORMAL = 0 |
| 254 | OFPC_FRAG_DROP = 1 |
| 255 | OFPC_FRAG_REASM = 2 |
| 256 | OFPC_FRAG_MASK = 3 |
| 257 | OFPC_INVALID_TTL_TO_CONTROLLER = 4 |
| 258 | |
| 259 | ofp_config_flags_map = { |
| 260 | 0: 'OFPC_FRAG_NORMAL', |
| 261 | 1: 'OFPC_FRAG_DROP', |
| 262 | 2: 'OFPC_FRAG_REASM', |
| 263 | 3: 'OFPC_FRAG_MASK', |
| 264 | 4: 'OFPC_INVALID_TTL_TO_CONTROLLER', |
| 265 | } |
| 266 | |
| 267 | # Identifiers from group ofp_error_type |
| 268 | OFPET_HELLO_FAILED = 0 |
| 269 | OFPET_BAD_REQUEST = 1 |
| 270 | OFPET_BAD_ACTION = 2 |
| 271 | OFPET_BAD_INSTRUCTION = 3 |
| 272 | OFPET_BAD_MATCH = 4 |
| 273 | OFPET_FLOW_MOD_FAILED = 5 |
| 274 | OFPET_GROUP_MOD_FAILED = 6 |
| 275 | OFPET_PORT_MOD_FAILED = 7 |
| 276 | OFPET_TABLE_MOD_FAILED = 8 |
| 277 | OFPET_QUEUE_OP_FAILED = 9 |
| 278 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 279 | |
| 280 | ofp_error_type_map = { |
| 281 | 0: 'OFPET_HELLO_FAILED', |
| 282 | 1: 'OFPET_BAD_REQUEST', |
| 283 | 2: 'OFPET_BAD_ACTION', |
| 284 | 3: 'OFPET_BAD_INSTRUCTION', |
| 285 | 4: 'OFPET_BAD_MATCH', |
| 286 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 287 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 288 | 7: 'OFPET_PORT_MOD_FAILED', |
| 289 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 290 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 291 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 292 | } |
| 293 | |
| 294 | # Identifiers from group ofp_flow_mod_command |
| 295 | OFPFC_ADD = 0 |
| 296 | OFPFC_MODIFY = 1 |
| 297 | OFPFC_MODIFY_STRICT = 2 |
| 298 | OFPFC_DELETE = 3 |
| 299 | OFPFC_DELETE_STRICT = 4 |
| 300 | |
| 301 | ofp_flow_mod_command_map = { |
| 302 | 0: 'OFPFC_ADD', |
| 303 | 1: 'OFPFC_MODIFY', |
| 304 | 2: 'OFPFC_MODIFY_STRICT', |
| 305 | 3: 'OFPFC_DELETE', |
| 306 | 4: 'OFPFC_DELETE_STRICT', |
| 307 | } |
| 308 | |
| 309 | # Identifiers from group ofp_flow_mod_failed_code |
| 310 | OFPFMFC_UNKNOWN = 0 |
| 311 | OFPFMFC_TABLE_FULL = 1 |
| 312 | OFPFMFC_BAD_TABLE_ID = 2 |
| 313 | OFPFMFC_OVERLAP = 3 |
| 314 | OFPFMFC_EPERM = 4 |
| 315 | OFPFMFC_BAD_TIMEOUT = 5 |
| 316 | OFPFMFC_BAD_COMMAND = 6 |
| 317 | |
| 318 | ofp_flow_mod_failed_code_map = { |
| 319 | 0: 'OFPFMFC_UNKNOWN', |
| 320 | 1: 'OFPFMFC_TABLE_FULL', |
| 321 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 322 | 3: 'OFPFMFC_OVERLAP', |
| 323 | 4: 'OFPFMFC_EPERM', |
| 324 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 325 | 6: 'OFPFMFC_BAD_COMMAND', |
| 326 | } |
| 327 | |
| 328 | # Identifiers from group ofp_flow_mod_flags |
| 329 | OFPFF_SEND_FLOW_REM = 1 |
| 330 | OFPFF_CHECK_OVERLAP = 2 |
| 331 | |
| 332 | ofp_flow_mod_flags_map = { |
| 333 | 1: 'OFPFF_SEND_FLOW_REM', |
| 334 | 2: 'OFPFF_CHECK_OVERLAP', |
| 335 | } |
| 336 | |
| 337 | # Identifiers from group ofp_flow_removed_reason |
| 338 | OFPRR_IDLE_TIMEOUT = 0 |
| 339 | OFPRR_HARD_TIMEOUT = 1 |
| 340 | OFPRR_DELETE = 2 |
| 341 | OFPRR_GROUP_DELETE = 3 |
| 342 | |
| 343 | ofp_flow_removed_reason_map = { |
| 344 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 345 | 1: 'OFPRR_HARD_TIMEOUT', |
| 346 | 2: 'OFPRR_DELETE', |
| 347 | 3: 'OFPRR_GROUP_DELETE', |
| 348 | } |
| 349 | |
| 350 | # Identifiers from group ofp_flow_wildcards |
| 351 | OFPFW_IN_PORT = 1 |
| 352 | OFPFW_DL_VLAN = 2 |
| 353 | OFPFW_DL_VLAN_PCP = 4 |
| 354 | OFPFW_DL_TYPE = 8 |
| 355 | OFPFW_NW_TOS = 16 |
| 356 | OFPFW_NW_PROTO = 32 |
| 357 | OFPFW_TP_SRC = 64 |
| 358 | OFPFW_TP_DST = 128 |
| 359 | OFPFW_MPLS_LABEL = 256 |
| 360 | OFPFW_MPLS_TC = 512 |
| 361 | OFPFW_ALL = 1023 |
| 362 | |
| 363 | ofp_flow_wildcards_map = { |
| 364 | 1: 'OFPFW_IN_PORT', |
| 365 | 2: 'OFPFW_DL_VLAN', |
| 366 | 4: 'OFPFW_DL_VLAN_PCP', |
| 367 | 8: 'OFPFW_DL_TYPE', |
| 368 | 16: 'OFPFW_NW_TOS', |
| 369 | 32: 'OFPFW_NW_PROTO', |
| 370 | 64: 'OFPFW_TP_SRC', |
| 371 | 128: 'OFPFW_TP_DST', |
| 372 | 256: 'OFPFW_MPLS_LABEL', |
| 373 | 512: 'OFPFW_MPLS_TC', |
| 374 | } |
| 375 | |
| 376 | # Identifiers from group ofp_group |
| 377 | OFPG_MAX = 4294967040 |
| 378 | OFPG_ALL = 4294967292 |
| 379 | OFPG_ANY = 4294967295 |
| 380 | |
| 381 | ofp_group_map = { |
| 382 | 4294967040: 'OFPG_MAX', |
| 383 | 4294967292: 'OFPG_ALL', |
| 384 | 4294967295: 'OFPG_ANY', |
| 385 | } |
| 386 | |
| 387 | # Identifiers from group ofp_group_mod_command |
| 388 | OFPGC_ADD = 0 |
| 389 | OFPGC_MODIFY = 1 |
| 390 | OFPGC_DELETE = 2 |
| 391 | |
| 392 | ofp_group_mod_command_map = { |
| 393 | 0: 'OFPGC_ADD', |
| 394 | 1: 'OFPGC_MODIFY', |
| 395 | 2: 'OFPGC_DELETE', |
| 396 | } |
| 397 | |
| 398 | # Identifiers from group ofp_group_mod_failed_code |
| 399 | OFPGMFC_GROUP_EXISTS = 0 |
| 400 | OFPGMFC_INVALID_GROUP = 1 |
| 401 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 402 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 403 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 404 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 405 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 406 | OFPGMFC_LOOP = 7 |
| 407 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 408 | |
| 409 | ofp_group_mod_failed_code_map = { |
| 410 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 411 | 1: 'OFPGMFC_INVALID_GROUP', |
| 412 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 413 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 414 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 415 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 416 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 417 | 7: 'OFPGMFC_LOOP', |
| 418 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 419 | } |
| 420 | |
| 421 | # Identifiers from group ofp_group_type |
| 422 | OFPGT_ALL = 0 |
| 423 | OFPGT_SELECT = 1 |
| 424 | OFPGT_INDIRECT = 2 |
| 425 | OFPGT_FF = 3 |
| 426 | |
| 427 | ofp_group_type_map = { |
| 428 | 0: 'OFPGT_ALL', |
| 429 | 1: 'OFPGT_SELECT', |
| 430 | 2: 'OFPGT_INDIRECT', |
| 431 | 3: 'OFPGT_FF', |
| 432 | } |
| 433 | |
| 434 | # Identifiers from group ofp_hello_failed_code |
| 435 | OFPHFC_INCOMPATIBLE = 0 |
| 436 | OFPHFC_EPERM = 1 |
| 437 | |
| 438 | ofp_hello_failed_code_map = { |
| 439 | 0: 'OFPHFC_INCOMPATIBLE', |
| 440 | 1: 'OFPHFC_EPERM', |
| 441 | } |
| 442 | |
| 443 | # Identifiers from group ofp_instruction_type |
| 444 | OFPIT_GOTO_TABLE = 1 |
| 445 | OFPIT_WRITE_METADATA = 2 |
| 446 | OFPIT_WRITE_ACTIONS = 3 |
| 447 | OFPIT_APPLY_ACTIONS = 4 |
| 448 | OFPIT_CLEAR_ACTIONS = 5 |
| 449 | OFPIT_EXPERIMENTER = 65535 |
| 450 | |
| 451 | ofp_instruction_type_map = { |
| 452 | 1: 'OFPIT_GOTO_TABLE', |
| 453 | 2: 'OFPIT_WRITE_METADATA', |
| 454 | 3: 'OFPIT_WRITE_ACTIONS', |
| 455 | 4: 'OFPIT_APPLY_ACTIONS', |
| 456 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 457 | 65535: 'OFPIT_EXPERIMENTER', |
| 458 | } |
| 459 | |
| 460 | # Identifiers from group ofp_match_type |
| 461 | OFPMT_STANDARD = 0 |
| 462 | |
| 463 | ofp_match_type_map = { |
| 464 | 0: 'OFPMT_STANDARD', |
| 465 | } |
| 466 | |
| 467 | # Identifiers from group ofp_packet_in_reason |
| 468 | OFPR_NO_MATCH = 0 |
| 469 | OFPR_ACTION = 1 |
| 470 | |
| 471 | ofp_packet_in_reason_map = { |
| 472 | 0: 'OFPR_NO_MATCH', |
| 473 | 1: 'OFPR_ACTION', |
| 474 | } |
| 475 | |
| 476 | # Identifiers from group ofp_port |
| 477 | OFPP_MAX = 4294967040 |
| 478 | OFPP_IN_PORT = 4294967288 |
| 479 | OFPP_TABLE = 4294967289 |
| 480 | OFPP_NORMAL = 4294967290 |
| 481 | OFPP_FLOOD = 4294967291 |
| 482 | OFPP_ALL = 4294967292 |
| 483 | OFPP_CONTROLLER = 4294967293 |
| 484 | OFPP_LOCAL = 4294967294 |
| 485 | OFPP_ANY = 4294967295 |
| 486 | |
| 487 | ofp_port_map = { |
| 488 | 4294967040: 'OFPP_MAX', |
| 489 | 4294967288: 'OFPP_IN_PORT', |
| 490 | 4294967289: 'OFPP_TABLE', |
| 491 | 4294967290: 'OFPP_NORMAL', |
| 492 | 4294967291: 'OFPP_FLOOD', |
| 493 | 4294967292: 'OFPP_ALL', |
| 494 | 4294967293: 'OFPP_CONTROLLER', |
| 495 | 4294967294: 'OFPP_LOCAL', |
| 496 | 4294967295: 'OFPP_ANY', |
| 497 | } |
| 498 | |
| 499 | # Identifiers from group ofp_port_config |
| 500 | OFPPC_PORT_DOWN = 1 |
| 501 | OFPPC_NO_RECV = 4 |
| 502 | OFPPC_NO_FWD = 32 |
| 503 | OFPPC_NO_PACKET_IN = 64 |
| 504 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
| 505 | |
| 506 | ofp_port_config_map = { |
| 507 | 1: 'OFPPC_PORT_DOWN', |
| 508 | 4: 'OFPPC_NO_RECV', |
| 509 | 32: 'OFPPC_NO_FWD', |
| 510 | 64: 'OFPPC_NO_PACKET_IN', |
| 511 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
| 512 | } |
| 513 | |
| 514 | # Identifiers from group ofp_port_features |
| 515 | OFPPF_10MB_HD = 1 |
| 516 | OFPPF_10MB_FD = 2 |
| 517 | OFPPF_100MB_HD = 4 |
| 518 | OFPPF_100MB_FD = 8 |
| 519 | OFPPF_1GB_HD = 16 |
| 520 | OFPPF_1GB_FD = 32 |
| 521 | OFPPF_10GB_FD = 64 |
| 522 | OFPPF_40GB_FD = 128 |
| 523 | OFPPF_100GB_FD = 256 |
| 524 | OFPPF_1TB_FD = 512 |
| 525 | OFPPF_OTHER = 1024 |
| 526 | OFPPF_COPPER = 2048 |
| 527 | OFPPF_FIBER = 4096 |
| 528 | OFPPF_AUTONEG = 8192 |
| 529 | OFPPF_PAUSE = 16384 |
| 530 | OFPPF_PAUSE_ASYM = 32768 |
| 531 | |
| 532 | ofp_port_features_map = { |
| 533 | 1: 'OFPPF_10MB_HD', |
| 534 | 2: 'OFPPF_10MB_FD', |
| 535 | 4: 'OFPPF_100MB_HD', |
| 536 | 8: 'OFPPF_100MB_FD', |
| 537 | 16: 'OFPPF_1GB_HD', |
| 538 | 32: 'OFPPF_1GB_FD', |
| 539 | 64: 'OFPPF_10GB_FD', |
| 540 | 128: 'OFPPF_40GB_FD', |
| 541 | 256: 'OFPPF_100GB_FD', |
| 542 | 512: 'OFPPF_1TB_FD', |
| 543 | 1024: 'OFPPF_OTHER', |
| 544 | 2048: 'OFPPF_COPPER', |
| 545 | 4096: 'OFPPF_FIBER', |
| 546 | 8192: 'OFPPF_AUTONEG', |
| 547 | 16384: 'OFPPF_PAUSE', |
| 548 | 32768: 'OFPPF_PAUSE_ASYM', |
| 549 | } |
| 550 | |
| 551 | # Identifiers from group ofp_port_mod_failed_code |
| 552 | OFPPMFC_BAD_PORT = 0 |
| 553 | OFPPMFC_BAD_HW_ADDR = 1 |
| 554 | OFPPMFC_BAD_CONFIG = 2 |
| 555 | OFPPMFC_BAD_ADVERTISE = 3 |
| 556 | |
| 557 | ofp_port_mod_failed_code_map = { |
| 558 | 0: 'OFPPMFC_BAD_PORT', |
| 559 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 560 | 2: 'OFPPMFC_BAD_CONFIG', |
| 561 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 562 | } |
| 563 | |
| 564 | # Identifiers from group ofp_port_reason |
| 565 | OFPPR_ADD = 0 |
| 566 | OFPPR_DELETE = 1 |
| 567 | OFPPR_MODIFY = 2 |
| 568 | |
| 569 | ofp_port_reason_map = { |
| 570 | 0: 'OFPPR_ADD', |
| 571 | 1: 'OFPPR_DELETE', |
| 572 | 2: 'OFPPR_MODIFY', |
| 573 | } |
| 574 | |
| 575 | # Identifiers from group ofp_port_state |
| 576 | OFPPS_LINK_DOWN = 1 |
| 577 | OFPPS_BLOCKED = 2 |
| 578 | OFPPS_LIVE = 4 |
| 579 | |
| 580 | ofp_port_state_map = { |
| 581 | 1: 'OFPPS_LINK_DOWN', |
| 582 | 2: 'OFPPS_BLOCKED', |
| 583 | 4: 'OFPPS_LIVE', |
| 584 | } |
| 585 | |
| 586 | # Identifiers from group ofp_queue_op_failed_code |
| 587 | OFPQOFC_BAD_PORT = 0 |
| 588 | OFPQOFC_BAD_QUEUE = 1 |
| 589 | OFPQOFC_EPERM = 2 |
| 590 | |
| 591 | ofp_queue_op_failed_code_map = { |
| 592 | 0: 'OFPQOFC_BAD_PORT', |
| 593 | 1: 'OFPQOFC_BAD_QUEUE', |
| 594 | 2: 'OFPQOFC_EPERM', |
| 595 | } |
| 596 | |
| 597 | # Identifiers from group ofp_queue_properties |
| 598 | OFPQT_NONE = 0 |
| 599 | OFPQT_MIN_RATE = 1 |
| 600 | |
| 601 | ofp_queue_properties_map = { |
| 602 | 0: 'OFPQT_NONE', |
| 603 | 1: 'OFPQT_MIN_RATE', |
| 604 | } |
| 605 | |
| 606 | # Identifiers from group ofp_stats_reply_flags |
| 607 | OFPSF_REPLY_MORE = 1 |
| 608 | |
| 609 | ofp_stats_reply_flags_map = { |
| 610 | 1: 'OFPSF_REPLY_MORE', |
| 611 | } |
| 612 | |
| 613 | # Identifiers from group ofp_stats_request_flags |
| 614 | |
| 615 | ofp_stats_request_flags_map = { |
| 616 | } |
| 617 | |
| 618 | # Identifiers from group ofp_stats_type |
| 619 | OFPST_DESC = 0 |
| 620 | OFPST_FLOW = 1 |
| 621 | OFPST_AGGREGATE = 2 |
| 622 | OFPST_TABLE = 3 |
| 623 | OFPST_PORT = 4 |
| 624 | OFPST_QUEUE = 5 |
| 625 | OFPST_GROUP = 6 |
| 626 | OFPST_GROUP_DESC = 7 |
| 627 | OFPST_EXPERIMENTER = 65535 |
| 628 | |
| 629 | ofp_stats_type_map = { |
| 630 | 0: 'OFPST_DESC', |
| 631 | 1: 'OFPST_FLOW', |
| 632 | 2: 'OFPST_AGGREGATE', |
| 633 | 3: 'OFPST_TABLE', |
| 634 | 4: 'OFPST_PORT', |
| 635 | 5: 'OFPST_QUEUE', |
| 636 | 6: 'OFPST_GROUP', |
| 637 | 7: 'OFPST_GROUP_DESC', |
| 638 | 65535: 'OFPST_EXPERIMENTER', |
| 639 | } |
| 640 | |
| 641 | # Identifiers from group ofp_switch_config_failed_code |
| 642 | OFPSCFC_BAD_FLAGS = 0 |
| 643 | OFPSCFC_BAD_LEN = 1 |
| 644 | |
| 645 | ofp_switch_config_failed_code_map = { |
| 646 | 0: 'OFPSCFC_BAD_FLAGS', |
| 647 | 1: 'OFPSCFC_BAD_LEN', |
| 648 | } |
| 649 | |
| 650 | # Identifiers from group ofp_table_config |
| 651 | OFPTC_TABLE_MISS_CONTROLLER = 0 |
| 652 | OFPTC_TABLE_MISS_CONTINUE = 1 |
| 653 | OFPTC_TABLE_MISS_DROP = 2 |
| 654 | OFPTC_TABLE_MISS_MASK = 3 |
| 655 | |
| 656 | ofp_table_config_map = { |
| 657 | 0: 'OFPTC_TABLE_MISS_CONTROLLER', |
| 658 | 1: 'OFPTC_TABLE_MISS_CONTINUE', |
| 659 | 2: 'OFPTC_TABLE_MISS_DROP', |
| 660 | 3: 'OFPTC_TABLE_MISS_MASK', |
| 661 | } |
| 662 | |
| 663 | # Identifiers from group ofp_table_mod_failed_code |
| 664 | OFPTMFC_BAD_TABLE = 0 |
| 665 | OFPTMFC_BAD_CONFIG = 1 |
| 666 | |
| 667 | ofp_table_mod_failed_code_map = { |
| 668 | 0: 'OFPTMFC_BAD_TABLE', |
| 669 | 1: 'OFPTMFC_BAD_CONFIG', |
| 670 | } |
| 671 | |
| 672 | # Identifiers from group ofp_type |
| 673 | OFPT_HELLO = 0 |
| 674 | OFPT_ERROR = 1 |
| 675 | OFPT_ECHO_REQUEST = 2 |
| 676 | OFPT_ECHO_REPLY = 3 |
| 677 | OFPT_EXPERIMENTER = 4 |
| 678 | OFPT_FEATURES_REQUEST = 5 |
| 679 | OFPT_FEATURES_REPLY = 6 |
| 680 | OFPT_GET_CONFIG_REQUEST = 7 |
| 681 | OFPT_GET_CONFIG_REPLY = 8 |
| 682 | OFPT_SET_CONFIG = 9 |
| 683 | OFPT_PACKET_IN = 10 |
| 684 | OFPT_FLOW_REMOVED = 11 |
| 685 | OFPT_PORT_STATUS = 12 |
| 686 | OFPT_PACKET_OUT = 13 |
| 687 | OFPT_FLOW_MOD = 14 |
| 688 | OFPT_GROUP_MOD = 15 |
| 689 | OFPT_PORT_MOD = 16 |
| 690 | OFPT_TABLE_MOD = 17 |
| 691 | OFPT_STATS_REQUEST = 18 |
| 692 | OFPT_STATS_REPLY = 19 |
| 693 | OFPT_BARRIER_REQUEST = 20 |
| 694 | OFPT_BARRIER_REPLY = 21 |
| 695 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 696 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 697 | |
| 698 | ofp_type_map = { |
| 699 | 0: 'OFPT_HELLO', |
| 700 | 1: 'OFPT_ERROR', |
| 701 | 2: 'OFPT_ECHO_REQUEST', |
| 702 | 3: 'OFPT_ECHO_REPLY', |
| 703 | 4: 'OFPT_EXPERIMENTER', |
| 704 | 5: 'OFPT_FEATURES_REQUEST', |
| 705 | 6: 'OFPT_FEATURES_REPLY', |
| 706 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 707 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 708 | 9: 'OFPT_SET_CONFIG', |
| 709 | 10: 'OFPT_PACKET_IN', |
| 710 | 11: 'OFPT_FLOW_REMOVED', |
| 711 | 12: 'OFPT_PORT_STATUS', |
| 712 | 13: 'OFPT_PACKET_OUT', |
| 713 | 14: 'OFPT_FLOW_MOD', |
| 714 | 15: 'OFPT_GROUP_MOD', |
| 715 | 16: 'OFPT_PORT_MOD', |
| 716 | 17: 'OFPT_TABLE_MOD', |
| 717 | 18: 'OFPT_STATS_REQUEST', |
| 718 | 19: 'OFPT_STATS_REPLY', |
| 719 | 20: 'OFPT_BARRIER_REQUEST', |
| 720 | 21: 'OFPT_BARRIER_REPLY', |
| 721 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 722 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 723 | } |
| 724 | |
| 725 | # Identifiers from group ofp_vlan_id |
| 726 | OFPVID_ANY = 65534 |
| 727 | OFPVID_NONE = 65535 |
| 728 | |
| 729 | ofp_vlan_id_map = { |
| 730 | 65534: 'OFPVID_ANY', |
| 731 | 65535: 'OFPVID_NONE', |
| 732 | } |
| 733 | |