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