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