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