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 | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 190 | # Identifiers from group ofp_capabilities |
| 191 | OFPC_FLOW_STATS = 1 |
| 192 | OFPC_TABLE_STATS = 2 |
| 193 | OFPC_PORT_STATS = 4 |
| 194 | OFPC_GROUP_STATS = 8 |
| 195 | OFPC_IP_REASM = 32 |
| 196 | OFPC_QUEUE_STATS = 64 |
| 197 | OFPC_PORT_BLOCKED = 256 |
| 198 | |
| 199 | ofp_capabilities_map = { |
| 200 | 1: 'OFPC_FLOW_STATS', |
| 201 | 2: 'OFPC_TABLE_STATS', |
| 202 | 4: 'OFPC_PORT_STATS', |
| 203 | 8: 'OFPC_GROUP_STATS', |
| 204 | 32: 'OFPC_IP_REASM', |
| 205 | 64: 'OFPC_QUEUE_STATS', |
| 206 | 256: 'OFPC_PORT_BLOCKED', |
| 207 | } |
| 208 | |
| 209 | # Identifiers from group ofp_config_flags |
| 210 | OFPC_FRAG_NORMAL = 0 |
| 211 | OFPC_FRAG_DROP = 1 |
| 212 | OFPC_FRAG_REASM = 2 |
| 213 | OFPC_FRAG_MASK = 3 |
| 214 | OFPC_INVALID_TTL_TO_CONTROLLER = 4 |
| 215 | |
| 216 | ofp_config_flags_map = { |
| 217 | 0: 'OFPC_FRAG_NORMAL', |
| 218 | 1: 'OFPC_FRAG_DROP', |
| 219 | 2: 'OFPC_FRAG_REASM', |
| 220 | 3: 'OFPC_FRAG_MASK', |
| 221 | 4: 'OFPC_INVALID_TTL_TO_CONTROLLER', |
| 222 | } |
| 223 | |
| 224 | # Identifiers from group ofp_controller_max_len |
| 225 | OFPCML_MAX = 65509 |
| 226 | OFPCML_NO_BUFFER = 65535 |
| 227 | |
| 228 | ofp_controller_max_len_map = { |
| 229 | 65509: 'OFPCML_MAX', |
| 230 | 65535: 'OFPCML_NO_BUFFER', |
| 231 | } |
| 232 | |
| 233 | # Identifiers from group ofp_controller_role |
| 234 | OFPCR_ROLE_NOCHANGE = 0 |
| 235 | OFPCR_ROLE_EQUAL = 1 |
| 236 | OFPCR_ROLE_MASTER = 2 |
| 237 | OFPCR_ROLE_SLAVE = 3 |
| 238 | |
| 239 | ofp_controller_role_map = { |
| 240 | 0: 'OFPCR_ROLE_NOCHANGE', |
| 241 | 1: 'OFPCR_ROLE_EQUAL', |
| 242 | 2: 'OFPCR_ROLE_MASTER', |
| 243 | 3: 'OFPCR_ROLE_SLAVE', |
| 244 | } |
| 245 | |
| 246 | # Identifiers from group ofp_error_type |
| 247 | OFPET_HELLO_FAILED = 0 |
| 248 | OFPET_BAD_REQUEST = 1 |
| 249 | OFPET_BAD_ACTION = 2 |
| 250 | OFPET_BAD_INSTRUCTION = 3 |
| 251 | OFPET_BAD_MATCH = 4 |
| 252 | OFPET_FLOW_MOD_FAILED = 5 |
| 253 | OFPET_GROUP_MOD_FAILED = 6 |
| 254 | OFPET_PORT_MOD_FAILED = 7 |
| 255 | OFPET_TABLE_MOD_FAILED = 8 |
| 256 | OFPET_QUEUE_OP_FAILED = 9 |
| 257 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 258 | OFPET_ROLE_REQUEST_FAILED = 11 |
| 259 | OFPET_EXPERIMENTER = 65535 |
| 260 | |
| 261 | ofp_error_type_map = { |
| 262 | 0: 'OFPET_HELLO_FAILED', |
| 263 | 1: 'OFPET_BAD_REQUEST', |
| 264 | 2: 'OFPET_BAD_ACTION', |
| 265 | 3: 'OFPET_BAD_INSTRUCTION', |
| 266 | 4: 'OFPET_BAD_MATCH', |
| 267 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 268 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 269 | 7: 'OFPET_PORT_MOD_FAILED', |
| 270 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 271 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 272 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 273 | 11: 'OFPET_ROLE_REQUEST_FAILED', |
| 274 | 65535: 'OFPET_EXPERIMENTER', |
| 275 | } |
| 276 | |
| 277 | # Identifiers from group ofp_flow_mod_command |
| 278 | OFPFC_ADD = 0 |
| 279 | OFPFC_MODIFY = 1 |
| 280 | OFPFC_MODIFY_STRICT = 2 |
| 281 | OFPFC_DELETE = 3 |
| 282 | OFPFC_DELETE_STRICT = 4 |
| 283 | |
| 284 | ofp_flow_mod_command_map = { |
| 285 | 0: 'OFPFC_ADD', |
| 286 | 1: 'OFPFC_MODIFY', |
| 287 | 2: 'OFPFC_MODIFY_STRICT', |
| 288 | 3: 'OFPFC_DELETE', |
| 289 | 4: 'OFPFC_DELETE_STRICT', |
| 290 | } |
| 291 | |
| 292 | # Identifiers from group ofp_flow_mod_failed_code |
| 293 | OFPFMFC_UNKNOWN = 0 |
| 294 | OFPFMFC_TABLE_FULL = 1 |
| 295 | OFPFMFC_BAD_TABLE_ID = 2 |
| 296 | OFPFMFC_OVERLAP = 3 |
| 297 | OFPFMFC_EPERM = 4 |
| 298 | OFPFMFC_BAD_TIMEOUT = 5 |
| 299 | OFPFMFC_BAD_COMMAND = 6 |
| 300 | OFPFMFC_BAD_FLAGS = 7 |
| 301 | |
| 302 | ofp_flow_mod_failed_code_map = { |
| 303 | 0: 'OFPFMFC_UNKNOWN', |
| 304 | 1: 'OFPFMFC_TABLE_FULL', |
| 305 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 306 | 3: 'OFPFMFC_OVERLAP', |
| 307 | 4: 'OFPFMFC_EPERM', |
| 308 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 309 | 6: 'OFPFMFC_BAD_COMMAND', |
| 310 | 7: 'OFPFMFC_BAD_FLAGS', |
| 311 | } |
| 312 | |
| 313 | # Identifiers from group ofp_flow_mod_flags |
| 314 | OFPFF_SEND_FLOW_REM = 1 |
| 315 | OFPFF_CHECK_OVERLAP = 2 |
| 316 | OFPFF_RESET_COUNTS = 4 |
| 317 | |
| 318 | ofp_flow_mod_flags_map = { |
| 319 | 1: 'OFPFF_SEND_FLOW_REM', |
| 320 | 2: 'OFPFF_CHECK_OVERLAP', |
| 321 | 4: 'OFPFF_RESET_COUNTS', |
| 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_group |
| 338 | OFPG_MAX = 4294967040 |
| 339 | OFPG_ALL = 4294967292 |
| 340 | OFPG_ANY = 4294967295 |
| 341 | |
| 342 | ofp_group_map = { |
| 343 | 4294967040: 'OFPG_MAX', |
| 344 | 4294967292: 'OFPG_ALL', |
| 345 | 4294967295: 'OFPG_ANY', |
| 346 | } |
| 347 | |
| 348 | # Identifiers from group ofp_group_capabilities |
| 349 | OFPGFC_SELECT_WEIGHT = 1 |
| 350 | OFPGFC_SELECT_LIVENESS = 2 |
| 351 | OFPGFC_CHAINING = 4 |
| 352 | OFPGFC_CHAINING_CHECKS = 8 |
| 353 | |
| 354 | ofp_group_capabilities_map = { |
| 355 | 1: 'OFPGFC_SELECT_WEIGHT', |
| 356 | 2: 'OFPGFC_SELECT_LIVENESS', |
| 357 | 4: 'OFPGFC_CHAINING', |
| 358 | 8: 'OFPGFC_CHAINING_CHECKS', |
| 359 | } |
| 360 | |
| 361 | # Identifiers from group ofp_group_mod_command |
| 362 | OFPGC_ADD = 0 |
| 363 | OFPGC_MODIFY = 1 |
| 364 | OFPGC_DELETE = 2 |
| 365 | |
| 366 | ofp_group_mod_command_map = { |
| 367 | 0: 'OFPGC_ADD', |
| 368 | 1: 'OFPGC_MODIFY', |
| 369 | 2: 'OFPGC_DELETE', |
| 370 | } |
| 371 | |
| 372 | # Identifiers from group ofp_group_mod_failed_code |
| 373 | OFPGMFC_GROUP_EXISTS = 0 |
| 374 | OFPGMFC_INVALID_GROUP = 1 |
| 375 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 376 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 377 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 378 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 379 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 380 | OFPGMFC_LOOP = 7 |
| 381 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 382 | OFPGMFC_CHAINED_GROUP = 9 |
| 383 | OFPGMFC_BAD_TYPE = 10 |
| 384 | OFPGMFC_BAD_COMMAND = 11 |
| 385 | OFPGMFC_BAD_BUCKET = 12 |
| 386 | OFPGMFC_BAD_WATCH = 13 |
| 387 | OFPGMFC_EPERM = 14 |
| 388 | |
| 389 | ofp_group_mod_failed_code_map = { |
| 390 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 391 | 1: 'OFPGMFC_INVALID_GROUP', |
| 392 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 393 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 394 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 395 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 396 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 397 | 7: 'OFPGMFC_LOOP', |
| 398 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 399 | 9: 'OFPGMFC_CHAINED_GROUP', |
| 400 | 10: 'OFPGMFC_BAD_TYPE', |
| 401 | 11: 'OFPGMFC_BAD_COMMAND', |
| 402 | 12: 'OFPGMFC_BAD_BUCKET', |
| 403 | 13: 'OFPGMFC_BAD_WATCH', |
| 404 | 14: 'OFPGMFC_EPERM', |
| 405 | } |
| 406 | |
| 407 | # Identifiers from group ofp_group_type |
| 408 | OFPGT_ALL = 0 |
| 409 | OFPGT_SELECT = 1 |
| 410 | OFPGT_INDIRECT = 2 |
| 411 | OFPGT_FF = 3 |
| 412 | |
| 413 | ofp_group_type_map = { |
| 414 | 0: 'OFPGT_ALL', |
| 415 | 1: 'OFPGT_SELECT', |
| 416 | 2: 'OFPGT_INDIRECT', |
| 417 | 3: 'OFPGT_FF', |
| 418 | } |
| 419 | |
| 420 | # Identifiers from group ofp_hello_failed_code |
| 421 | OFPHFC_INCOMPATIBLE = 0 |
| 422 | OFPHFC_EPERM = 1 |
| 423 | |
| 424 | ofp_hello_failed_code_map = { |
| 425 | 0: 'OFPHFC_INCOMPATIBLE', |
| 426 | 1: 'OFPHFC_EPERM', |
| 427 | } |
| 428 | |
| 429 | # Identifiers from group ofp_instruction_type |
| 430 | OFPIT_GOTO_TABLE = 1 |
| 431 | OFPIT_WRITE_METADATA = 2 |
| 432 | OFPIT_WRITE_ACTIONS = 3 |
| 433 | OFPIT_APPLY_ACTIONS = 4 |
| 434 | OFPIT_CLEAR_ACTIONS = 5 |
| 435 | OFPIT_EXPERIMENTER = 65535 |
| 436 | |
| 437 | ofp_instruction_type_map = { |
| 438 | 1: 'OFPIT_GOTO_TABLE', |
| 439 | 2: 'OFPIT_WRITE_METADATA', |
| 440 | 3: 'OFPIT_WRITE_ACTIONS', |
| 441 | 4: 'OFPIT_APPLY_ACTIONS', |
| 442 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 443 | 65535: 'OFPIT_EXPERIMENTER', |
| 444 | } |
| 445 | |
| 446 | # Identifiers from group ofp_match_type |
| 447 | OFPMT_STANDARD = 0 |
| 448 | OFPMT_OXM = 1 |
| 449 | |
| 450 | ofp_match_type_map = { |
| 451 | 0: 'OFPMT_STANDARD', |
| 452 | 1: 'OFPMT_OXM', |
| 453 | } |
| 454 | |
| 455 | # Identifiers from group ofp_oxm_class |
| 456 | OFPXMC_NXM_0 = 0 |
| 457 | OFPXMC_NXM_1 = 1 |
| 458 | OFPXMC_OPENFLOW_BASIC = 32768 |
| 459 | OFPXMC_EXPERIMENTER = 65535 |
| 460 | |
| 461 | ofp_oxm_class_map = { |
| 462 | 0: 'OFPXMC_NXM_0', |
| 463 | 1: 'OFPXMC_NXM_1', |
| 464 | 32768: 'OFPXMC_OPENFLOW_BASIC', |
| 465 | 65535: 'OFPXMC_EXPERIMENTER', |
| 466 | } |
| 467 | |
| 468 | # Identifiers from group ofp_packet_in_reason |
| 469 | OFPR_NO_MATCH = 0 |
| 470 | OFPR_ACTION = 1 |
| 471 | OFPR_INVALID_TTL = 2 |
| 472 | |
| 473 | ofp_packet_in_reason_map = { |
| 474 | 0: 'OFPR_NO_MATCH', |
| 475 | 1: 'OFPR_ACTION', |
| 476 | 2: 'OFPR_INVALID_TTL', |
| 477 | } |
| 478 | |
| 479 | # Identifiers from group ofp_port |
| 480 | OFPP_MAX = 4294967040 |
| 481 | OFPP_IN_PORT = 4294967288 |
| 482 | OFPP_TABLE = 4294967289 |
| 483 | OFPP_NORMAL = 4294967290 |
| 484 | OFPP_FLOOD = 4294967291 |
| 485 | OFPP_ALL = 4294967292 |
| 486 | OFPP_CONTROLLER = 4294967293 |
| 487 | OFPP_LOCAL = 4294967294 |
| 488 | |
| 489 | ofp_port_map = { |
| 490 | 4294967040: 'OFPP_MAX', |
| 491 | 4294967288: 'OFPP_IN_PORT', |
| 492 | 4294967289: 'OFPP_TABLE', |
| 493 | 4294967290: 'OFPP_NORMAL', |
| 494 | 4294967291: 'OFPP_FLOOD', |
| 495 | 4294967292: 'OFPP_ALL', |
| 496 | 4294967293: 'OFPP_CONTROLLER', |
| 497 | 4294967294: 'OFPP_LOCAL', |
| 498 | } |
| 499 | |
| 500 | # Identifiers from group ofp_port_config |
| 501 | OFPPC_PORT_DOWN = 1 |
| 502 | OFPPC_NO_RECV = 4 |
| 503 | OFPPC_NO_FWD = 32 |
| 504 | OFPPC_NO_PACKET_IN = 64 |
| 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 | } |
| 512 | |
| 513 | # Identifiers from group ofp_port_features |
| 514 | OFPPF_10MB_HD = 1 |
| 515 | OFPPF_10MB_FD = 2 |
| 516 | OFPPF_100MB_HD = 4 |
| 517 | OFPPF_100MB_FD = 8 |
| 518 | OFPPF_1GB_HD = 16 |
| 519 | OFPPF_1GB_FD = 32 |
| 520 | OFPPF_10GB_FD = 64 |
| 521 | OFPPF_40GB_FD = 128 |
| 522 | OFPPF_100GB_FD = 256 |
| 523 | OFPPF_1TB_FD = 512 |
| 524 | OFPPF_OTHER = 1024 |
| 525 | OFPPF_COPPER = 2048 |
| 526 | OFPPF_FIBER = 4096 |
| 527 | OFPPF_AUTONEG = 8192 |
| 528 | OFPPF_PAUSE = 16384 |
| 529 | OFPPF_PAUSE_ASYM = 32768 |
| 530 | |
| 531 | ofp_port_features_map = { |
| 532 | 1: 'OFPPF_10MB_HD', |
| 533 | 2: 'OFPPF_10MB_FD', |
| 534 | 4: 'OFPPF_100MB_HD', |
| 535 | 8: 'OFPPF_100MB_FD', |
| 536 | 16: 'OFPPF_1GB_HD', |
| 537 | 32: 'OFPPF_1GB_FD', |
| 538 | 64: 'OFPPF_10GB_FD', |
| 539 | 128: 'OFPPF_40GB_FD', |
| 540 | 256: 'OFPPF_100GB_FD', |
| 541 | 512: 'OFPPF_1TB_FD', |
| 542 | 1024: 'OFPPF_OTHER', |
| 543 | 2048: 'OFPPF_COPPER', |
| 544 | 4096: 'OFPPF_FIBER', |
| 545 | 8192: 'OFPPF_AUTONEG', |
| 546 | 16384: 'OFPPF_PAUSE', |
| 547 | 32768: 'OFPPF_PAUSE_ASYM', |
| 548 | } |
| 549 | |
| 550 | # Identifiers from group ofp_port_mod_failed_code |
| 551 | OFPPMFC_BAD_PORT = 0 |
| 552 | OFPPMFC_BAD_HW_ADDR = 1 |
| 553 | OFPPMFC_BAD_CONFIG = 2 |
| 554 | OFPPMFC_BAD_ADVERTISE = 3 |
| 555 | OFPPMFC_EPERM = 4 |
| 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 | 4: 'OFPPMFC_EPERM', |
| 563 | } |
| 564 | |
| 565 | # Identifiers from group ofp_port_no |
| 566 | OFPP_ANY = 4294967295 |
| 567 | |
| 568 | ofp_port_no_map = { |
| 569 | 4294967295: 'OFPP_ANY', |
| 570 | } |
| 571 | |
| 572 | # Identifiers from group ofp_port_reason |
| 573 | OFPPR_ADD = 0 |
| 574 | OFPPR_DELETE = 1 |
| 575 | OFPPR_MODIFY = 2 |
| 576 | |
| 577 | ofp_port_reason_map = { |
| 578 | 0: 'OFPPR_ADD', |
| 579 | 1: 'OFPPR_DELETE', |
| 580 | 2: 'OFPPR_MODIFY', |
| 581 | } |
| 582 | |
| 583 | # Identifiers from group ofp_port_state |
| 584 | OFPPS_LINK_DOWN = 1 |
| 585 | OFPPS_BLOCKED = 2 |
| 586 | OFPPS_LIVE = 4 |
| 587 | |
| 588 | ofp_port_state_map = { |
| 589 | 1: 'OFPPS_LINK_DOWN', |
| 590 | 2: 'OFPPS_BLOCKED', |
| 591 | 4: 'OFPPS_LIVE', |
| 592 | } |
| 593 | |
| 594 | # Identifiers from group ofp_queue_op_failed_code |
| 595 | OFPQOFC_BAD_PORT = 0 |
| 596 | OFPQOFC_BAD_QUEUE = 1 |
| 597 | OFPQOFC_EPERM = 2 |
| 598 | |
| 599 | ofp_queue_op_failed_code_map = { |
| 600 | 0: 'OFPQOFC_BAD_PORT', |
| 601 | 1: 'OFPQOFC_BAD_QUEUE', |
| 602 | 2: 'OFPQOFC_EPERM', |
| 603 | } |
| 604 | |
| 605 | # Identifiers from group ofp_queue_properties |
| 606 | OFPQT_MIN_RATE = 1 |
| 607 | OFPQT_MAX_RATE = 2 |
| 608 | OFPQT_EXPERIMENTER = 65535 |
| 609 | |
| 610 | ofp_queue_properties_map = { |
| 611 | 1: 'OFPQT_MIN_RATE', |
| 612 | 2: 'OFPQT_MAX_RATE', |
| 613 | 65535: 'OFPQT_EXPERIMENTER', |
| 614 | } |
| 615 | |
| 616 | # Identifiers from group ofp_role_request_failed_code |
| 617 | OFPRRFC_STALE = 0 |
| 618 | OFPRRFC_UNSUP = 1 |
| 619 | OFPRRFC_BAD_ROLE = 2 |
| 620 | |
| 621 | ofp_role_request_failed_code_map = { |
| 622 | 0: 'OFPRRFC_STALE', |
| 623 | 1: 'OFPRRFC_UNSUP', |
| 624 | 2: 'OFPRRFC_BAD_ROLE', |
| 625 | } |
| 626 | |
| 627 | # Identifiers from group ofp_stats_reply_flags |
| 628 | OFPSF_REPLY_MORE = 1 |
| 629 | |
| 630 | ofp_stats_reply_flags_map = { |
| 631 | 1: 'OFPSF_REPLY_MORE', |
| 632 | } |
| 633 | |
| 634 | # Identifiers from group ofp_stats_types |
| 635 | OFPST_DESC = 0 |
| 636 | OFPST_FLOW = 1 |
| 637 | OFPST_AGGREGATE = 2 |
| 638 | OFPST_TABLE = 3 |
| 639 | OFPST_PORT = 4 |
| 640 | OFPST_QUEUE = 5 |
| 641 | OFPST_GROUP = 6 |
| 642 | OFPST_GROUP_DESC = 7 |
| 643 | OFPST_GROUP_FEATURES = 8 |
| 644 | OFPST_EXPERIMENTER = 65535 |
| 645 | |
| 646 | ofp_stats_types_map = { |
| 647 | 0: 'OFPST_DESC', |
| 648 | 1: 'OFPST_FLOW', |
| 649 | 2: 'OFPST_AGGREGATE', |
| 650 | 3: 'OFPST_TABLE', |
| 651 | 4: 'OFPST_PORT', |
| 652 | 5: 'OFPST_QUEUE', |
| 653 | 6: 'OFPST_GROUP', |
| 654 | 7: 'OFPST_GROUP_DESC', |
| 655 | 8: 'OFPST_GROUP_FEATURES', |
| 656 | 65535: 'OFPST_EXPERIMENTER', |
| 657 | } |
| 658 | |
| 659 | # Identifiers from group ofp_switch_config_failed_code |
| 660 | OFPSCFC_BAD_FLAGS = 0 |
| 661 | OFPSCFC_BAD_LEN = 1 |
| 662 | OFPSCFC_EPERM = 2 |
| 663 | |
| 664 | ofp_switch_config_failed_code_map = { |
| 665 | 0: 'OFPSCFC_BAD_FLAGS', |
| 666 | 1: 'OFPSCFC_BAD_LEN', |
| 667 | 2: 'OFPSCFC_EPERM', |
| 668 | } |
| 669 | |
| 670 | # Identifiers from group ofp_table |
| 671 | OFPTT_MAX = 254 |
| 672 | OFPTT_ALL = 255 |
| 673 | |
| 674 | ofp_table_map = { |
| 675 | 254: 'OFPTT_MAX', |
| 676 | 255: 'OFPTT_ALL', |
| 677 | } |
| 678 | |
| 679 | # Identifiers from group ofp_table_config |
| 680 | OFPTC_TABLE_MISS_CONTROLLER = 0 |
| 681 | OFPTC_TABLE_MISS_CONTINUE = 1 |
| 682 | OFPTC_TABLE_MISS_DROP = 2 |
| 683 | OFPTC_TABLE_MISS_MASK = 3 |
| 684 | |
| 685 | ofp_table_config_map = { |
| 686 | 0: 'OFPTC_TABLE_MISS_CONTROLLER', |
| 687 | 1: 'OFPTC_TABLE_MISS_CONTINUE', |
| 688 | 2: 'OFPTC_TABLE_MISS_DROP', |
| 689 | 3: 'OFPTC_TABLE_MISS_MASK', |
| 690 | } |
| 691 | |
| 692 | # Identifiers from group ofp_table_mod_failed_code |
| 693 | OFPTMFC_BAD_TABLE = 0 |
| 694 | OFPTMFC_BAD_CONFIG = 1 |
| 695 | OFPTMFC_EPERM = 2 |
| 696 | |
| 697 | ofp_table_mod_failed_code_map = { |
| 698 | 0: 'OFPTMFC_BAD_TABLE', |
| 699 | 1: 'OFPTMFC_BAD_CONFIG', |
| 700 | 2: 'OFPTMFC_EPERM', |
| 701 | } |
| 702 | |
| 703 | # Identifiers from group ofp_type |
| 704 | OFPT_HELLO = 0 |
| 705 | OFPT_ERROR = 1 |
| 706 | OFPT_ECHO_REQUEST = 2 |
| 707 | OFPT_ECHO_REPLY = 3 |
| 708 | OFPT_EXPERIMENTER = 4 |
| 709 | OFPT_FEATURES_REQUEST = 5 |
| 710 | OFPT_FEATURES_REPLY = 6 |
| 711 | OFPT_GET_CONFIG_REQUEST = 7 |
| 712 | OFPT_GET_CONFIG_REPLY = 8 |
| 713 | OFPT_SET_CONFIG = 9 |
| 714 | OFPT_PACKET_IN = 10 |
| 715 | OFPT_FLOW_REMOVED = 11 |
| 716 | OFPT_PORT_STATUS = 12 |
| 717 | OFPT_PACKET_OUT = 13 |
| 718 | OFPT_FLOW_MOD = 14 |
| 719 | OFPT_GROUP_MOD = 15 |
| 720 | OFPT_PORT_MOD = 16 |
| 721 | OFPT_TABLE_MOD = 17 |
| 722 | OFPT_STATS_REQUEST = 18 |
| 723 | OFPT_STATS_REPLY = 19 |
| 724 | OFPT_BARRIER_REQUEST = 20 |
| 725 | OFPT_BARRIER_REPLY = 21 |
| 726 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 727 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 728 | OFPT_ROLE_REQUEST = 24 |
| 729 | OFPT_ROLE_REPLY = 25 |
| 730 | |
| 731 | ofp_type_map = { |
| 732 | 0: 'OFPT_HELLO', |
| 733 | 1: 'OFPT_ERROR', |
| 734 | 2: 'OFPT_ECHO_REQUEST', |
| 735 | 3: 'OFPT_ECHO_REPLY', |
| 736 | 4: 'OFPT_EXPERIMENTER', |
| 737 | 5: 'OFPT_FEATURES_REQUEST', |
| 738 | 6: 'OFPT_FEATURES_REPLY', |
| 739 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 740 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 741 | 9: 'OFPT_SET_CONFIG', |
| 742 | 10: 'OFPT_PACKET_IN', |
| 743 | 11: 'OFPT_FLOW_REMOVED', |
| 744 | 12: 'OFPT_PORT_STATUS', |
| 745 | 13: 'OFPT_PACKET_OUT', |
| 746 | 14: 'OFPT_FLOW_MOD', |
| 747 | 15: 'OFPT_GROUP_MOD', |
| 748 | 16: 'OFPT_PORT_MOD', |
| 749 | 17: 'OFPT_TABLE_MOD', |
| 750 | 18: 'OFPT_STATS_REQUEST', |
| 751 | 19: 'OFPT_STATS_REPLY', |
| 752 | 20: 'OFPT_BARRIER_REQUEST', |
| 753 | 21: 'OFPT_BARRIER_REPLY', |
| 754 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 755 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 756 | 24: 'OFPT_ROLE_REQUEST', |
| 757 | 25: 'OFPT_ROLE_REPLY', |
| 758 | } |
| 759 | |
| 760 | # Identifiers from group ofp_vlan_id |
| 761 | OFPVID_NONE = 0 |
| 762 | OFPVID_PRESENT = 4096 |
| 763 | |
| 764 | ofp_vlan_id_map = { |
| 765 | 0: 'OFPVID_NONE', |
| 766 | 4096: 'OFPVID_PRESENT', |
| 767 | } |
| 768 | |