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 = 4 |
| 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 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 21 | OFP_NO_BUFFER = 4294967295 |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 22 | DESC_STR_LEN = 256 |
| 23 | SERIAL_NUM_LEN = 32 |
| 24 | OFPQ_ALL = 4294967295 |
| 25 | OFPQ_MAX_RATE_UNCFG = 65535 |
| 26 | OFPQ_MIN_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_PUSH_PBB = 26 |
| 44 | OFPAT_POP_PBB = 27 |
| 45 | OFPAT_EXPERIMENTER = 65535 |
| 46 | |
| 47 | ofp_action_type_map = { |
| 48 | 0: 'OFPAT_OUTPUT', |
| 49 | 11: 'OFPAT_COPY_TTL_OUT', |
| 50 | 12: 'OFPAT_COPY_TTL_IN', |
| 51 | 15: 'OFPAT_SET_MPLS_TTL', |
| 52 | 16: 'OFPAT_DEC_MPLS_TTL', |
| 53 | 17: 'OFPAT_PUSH_VLAN', |
| 54 | 18: 'OFPAT_POP_VLAN', |
| 55 | 19: 'OFPAT_PUSH_MPLS', |
| 56 | 20: 'OFPAT_POP_MPLS', |
| 57 | 21: 'OFPAT_SET_QUEUE', |
| 58 | 22: 'OFPAT_GROUP', |
| 59 | 23: 'OFPAT_SET_NW_TTL', |
| 60 | 24: 'OFPAT_DEC_NW_TTL', |
| 61 | 25: 'OFPAT_SET_FIELD', |
| 62 | 26: 'OFPAT_PUSH_PBB', |
| 63 | 27: 'OFPAT_POP_PBB', |
| 64 | 65535: 'OFPAT_EXPERIMENTER', |
| 65 | } |
| 66 | |
| 67 | # Identifiers from group ofp_bad_action_code |
| 68 | OFPBAC_BAD_TYPE = 0 |
| 69 | OFPBAC_BAD_LEN = 1 |
| 70 | OFPBAC_BAD_EXPERIMENTER = 2 |
| 71 | OFPBAC_BAD_EXP_TYPE = 3 |
| 72 | OFPBAC_BAD_OUT_PORT = 4 |
| 73 | OFPBAC_BAD_ARGUMENT = 5 |
| 74 | OFPBAC_EPERM = 6 |
| 75 | OFPBAC_TOO_MANY = 7 |
| 76 | OFPBAC_BAD_QUEUE = 8 |
| 77 | OFPBAC_BAD_OUT_GROUP = 9 |
| 78 | OFPBAC_MATCH_INCONSISTENT = 10 |
| 79 | OFPBAC_UNSUPPORTED_ORDER = 11 |
| 80 | OFPBAC_BAD_TAG = 12 |
| 81 | OFPBAC_BAD_SET_TYPE = 13 |
| 82 | OFPBAC_BAD_SET_LEN = 14 |
| 83 | OFPBAC_BAD_SET_ARGUMENT = 15 |
| 84 | |
| 85 | ofp_bad_action_code_map = { |
| 86 | 0: 'OFPBAC_BAD_TYPE', |
| 87 | 1: 'OFPBAC_BAD_LEN', |
| 88 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
| 89 | 3: 'OFPBAC_BAD_EXP_TYPE', |
| 90 | 4: 'OFPBAC_BAD_OUT_PORT', |
| 91 | 5: 'OFPBAC_BAD_ARGUMENT', |
| 92 | 6: 'OFPBAC_EPERM', |
| 93 | 7: 'OFPBAC_TOO_MANY', |
| 94 | 8: 'OFPBAC_BAD_QUEUE', |
| 95 | 9: 'OFPBAC_BAD_OUT_GROUP', |
| 96 | 10: 'OFPBAC_MATCH_INCONSISTENT', |
| 97 | 11: 'OFPBAC_UNSUPPORTED_ORDER', |
| 98 | 12: 'OFPBAC_BAD_TAG', |
| 99 | 13: 'OFPBAC_BAD_SET_TYPE', |
| 100 | 14: 'OFPBAC_BAD_SET_LEN', |
| 101 | 15: 'OFPBAC_BAD_SET_ARGUMENT', |
| 102 | } |
| 103 | |
| 104 | # Identifiers from group ofp_bad_instruction_code |
| 105 | OFPBIC_UNKNOWN_INST = 0 |
| 106 | OFPBIC_UNSUP_INST = 1 |
| 107 | OFPBIC_BAD_TABLE_ID = 2 |
| 108 | OFPBIC_UNSUP_METADATA = 3 |
| 109 | OFPBIC_UNSUP_METADATA_MASK = 4 |
| 110 | OFPBIC_BAD_EXPERIMENTER = 5 |
| 111 | OFPBIC_BAD_EXP_TYPE = 6 |
| 112 | OFPBIC_BAD_LEN = 7 |
| 113 | OFPBIC_EPERM = 8 |
| 114 | |
| 115 | ofp_bad_instruction_code_map = { |
| 116 | 0: 'OFPBIC_UNKNOWN_INST', |
| 117 | 1: 'OFPBIC_UNSUP_INST', |
| 118 | 2: 'OFPBIC_BAD_TABLE_ID', |
| 119 | 3: 'OFPBIC_UNSUP_METADATA', |
| 120 | 4: 'OFPBIC_UNSUP_METADATA_MASK', |
| 121 | 5: 'OFPBIC_BAD_EXPERIMENTER', |
| 122 | 6: 'OFPBIC_BAD_EXP_TYPE', |
| 123 | 7: 'OFPBIC_BAD_LEN', |
| 124 | 8: 'OFPBIC_EPERM', |
| 125 | } |
| 126 | |
| 127 | # Identifiers from group ofp_bad_match_code |
| 128 | OFPBMC_BAD_TYPE = 0 |
| 129 | OFPBMC_BAD_LEN = 1 |
| 130 | OFPBMC_BAD_TAG = 2 |
| 131 | OFPBMC_BAD_DL_ADDR_MASK = 3 |
| 132 | OFPBMC_BAD_NW_ADDR_MASK = 4 |
| 133 | OFPBMC_BAD_WILDCARDS = 5 |
| 134 | OFPBMC_BAD_FIELD = 6 |
| 135 | OFPBMC_BAD_VALUE = 7 |
| 136 | OFPBMC_BAD_MASK = 8 |
| 137 | OFPBMC_BAD_PREREQ = 9 |
| 138 | OFPBMC_DUP_FIELD = 10 |
| 139 | OFPBMC_EPERM = 11 |
| 140 | |
| 141 | ofp_bad_match_code_map = { |
| 142 | 0: 'OFPBMC_BAD_TYPE', |
| 143 | 1: 'OFPBMC_BAD_LEN', |
| 144 | 2: 'OFPBMC_BAD_TAG', |
| 145 | 3: 'OFPBMC_BAD_DL_ADDR_MASK', |
| 146 | 4: 'OFPBMC_BAD_NW_ADDR_MASK', |
| 147 | 5: 'OFPBMC_BAD_WILDCARDS', |
| 148 | 6: 'OFPBMC_BAD_FIELD', |
| 149 | 7: 'OFPBMC_BAD_VALUE', |
| 150 | 8: 'OFPBMC_BAD_MASK', |
| 151 | 9: 'OFPBMC_BAD_PREREQ', |
| 152 | 10: 'OFPBMC_DUP_FIELD', |
| 153 | 11: 'OFPBMC_EPERM', |
| 154 | } |
| 155 | |
| 156 | # Identifiers from group ofp_bad_request_code |
| 157 | OFPBRC_BAD_VERSION = 0 |
| 158 | OFPBRC_BAD_TYPE = 1 |
| 159 | OFPBRC_BAD_MULTIPART = 2 |
| 160 | OFPBRC_BAD_EXPERIMENTER = 3 |
| 161 | OFPBRC_BAD_EXP_TYPE = 4 |
| 162 | OFPBRC_EPERM = 5 |
| 163 | OFPBRC_BAD_LEN = 6 |
| 164 | OFPBRC_BUFFER_EMPTY = 7 |
| 165 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 166 | OFPBRC_BAD_TABLE_ID = 9 |
| 167 | OFPBRC_IS_SLAVE = 10 |
| 168 | OFPBRC_BAD_PORT = 11 |
| 169 | OFPBRC_BAD_PACKET = 12 |
| 170 | OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13 |
| 171 | |
| 172 | ofp_bad_request_code_map = { |
| 173 | 0: 'OFPBRC_BAD_VERSION', |
| 174 | 1: 'OFPBRC_BAD_TYPE', |
| 175 | 2: 'OFPBRC_BAD_MULTIPART', |
| 176 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
| 177 | 4: 'OFPBRC_BAD_EXP_TYPE', |
| 178 | 5: 'OFPBRC_EPERM', |
| 179 | 6: 'OFPBRC_BAD_LEN', |
| 180 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 181 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 182 | 9: 'OFPBRC_BAD_TABLE_ID', |
| 183 | 10: 'OFPBRC_IS_SLAVE', |
| 184 | 11: 'OFPBRC_BAD_PORT', |
| 185 | 12: 'OFPBRC_BAD_PACKET', |
| 186 | 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW', |
| 187 | } |
| 188 | |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 189 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 190 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 191 | |
| 192 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 193 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 194 | } |
| 195 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 196 | # Identifiers from group ofp_capabilities |
| 197 | OFPC_FLOW_STATS = 1 |
| 198 | OFPC_TABLE_STATS = 2 |
| 199 | OFPC_PORT_STATS = 4 |
| 200 | OFPC_GROUP_STATS = 8 |
| 201 | OFPC_IP_REASM = 32 |
| 202 | OFPC_QUEUE_STATS = 64 |
| 203 | OFPC_PORT_BLOCKED = 256 |
| 204 | |
| 205 | ofp_capabilities_map = { |
| 206 | 1: 'OFPC_FLOW_STATS', |
| 207 | 2: 'OFPC_TABLE_STATS', |
| 208 | 4: 'OFPC_PORT_STATS', |
| 209 | 8: 'OFPC_GROUP_STATS', |
| 210 | 32: 'OFPC_IP_REASM', |
| 211 | 64: 'OFPC_QUEUE_STATS', |
| 212 | 256: 'OFPC_PORT_BLOCKED', |
| 213 | } |
| 214 | |
| 215 | # Identifiers from group ofp_config_flags |
| 216 | OFPC_FRAG_NORMAL = 0 |
| 217 | OFPC_FRAG_DROP = 1 |
| 218 | OFPC_FRAG_REASM = 2 |
| 219 | OFPC_FRAG_MASK = 3 |
| 220 | |
| 221 | ofp_config_flags_map = { |
| 222 | 0: 'OFPC_FRAG_NORMAL', |
| 223 | 1: 'OFPC_FRAG_DROP', |
| 224 | 2: 'OFPC_FRAG_REASM', |
| 225 | 3: 'OFPC_FRAG_MASK', |
| 226 | } |
| 227 | |
| 228 | # Identifiers from group ofp_controller_max_len |
| 229 | OFPCML_MAX = 65509 |
| 230 | OFPCML_NO_BUFFER = 65535 |
| 231 | |
| 232 | ofp_controller_max_len_map = { |
| 233 | 65509: 'OFPCML_MAX', |
| 234 | 65535: 'OFPCML_NO_BUFFER', |
| 235 | } |
| 236 | |
| 237 | # Identifiers from group ofp_controller_role |
| 238 | OFPCR_ROLE_NOCHANGE = 0 |
| 239 | OFPCR_ROLE_EQUAL = 1 |
| 240 | OFPCR_ROLE_MASTER = 2 |
| 241 | OFPCR_ROLE_SLAVE = 3 |
| 242 | |
| 243 | ofp_controller_role_map = { |
| 244 | 0: 'OFPCR_ROLE_NOCHANGE', |
| 245 | 1: 'OFPCR_ROLE_EQUAL', |
| 246 | 2: 'OFPCR_ROLE_MASTER', |
| 247 | 3: 'OFPCR_ROLE_SLAVE', |
| 248 | } |
| 249 | |
| 250 | # Identifiers from group ofp_error_type |
| 251 | OFPET_HELLO_FAILED = 0 |
| 252 | OFPET_BAD_REQUEST = 1 |
| 253 | OFPET_BAD_ACTION = 2 |
| 254 | OFPET_BAD_INSTRUCTION = 3 |
| 255 | OFPET_BAD_MATCH = 4 |
| 256 | OFPET_FLOW_MOD_FAILED = 5 |
| 257 | OFPET_GROUP_MOD_FAILED = 6 |
| 258 | OFPET_PORT_MOD_FAILED = 7 |
| 259 | OFPET_TABLE_MOD_FAILED = 8 |
| 260 | OFPET_QUEUE_OP_FAILED = 9 |
| 261 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 262 | OFPET_ROLE_REQUEST_FAILED = 11 |
| 263 | OFPET_METER_MOD_FAILED = 12 |
| 264 | OFPET_TABLE_FEATURES_FAILED = 13 |
| 265 | OFPET_EXPERIMENTER = 65535 |
| 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 | 11: 'OFPET_ROLE_REQUEST_FAILED', |
| 280 | 12: 'OFPET_METER_MOD_FAILED', |
| 281 | 13: 'OFPET_TABLE_FEATURES_FAILED', |
| 282 | 65535: 'OFPET_EXPERIMENTER', |
| 283 | } |
| 284 | |
| 285 | # Identifiers from group ofp_flow_mod_command |
| 286 | OFPFC_ADD = 0 |
| 287 | OFPFC_MODIFY = 1 |
| 288 | OFPFC_MODIFY_STRICT = 2 |
| 289 | OFPFC_DELETE = 3 |
| 290 | OFPFC_DELETE_STRICT = 4 |
| 291 | |
| 292 | ofp_flow_mod_command_map = { |
| 293 | 0: 'OFPFC_ADD', |
| 294 | 1: 'OFPFC_MODIFY', |
| 295 | 2: 'OFPFC_MODIFY_STRICT', |
| 296 | 3: 'OFPFC_DELETE', |
| 297 | 4: 'OFPFC_DELETE_STRICT', |
| 298 | } |
| 299 | |
| 300 | # Identifiers from group ofp_flow_mod_failed_code |
| 301 | OFPFMFC_UNKNOWN = 0 |
| 302 | OFPFMFC_TABLE_FULL = 1 |
| 303 | OFPFMFC_BAD_TABLE_ID = 2 |
| 304 | OFPFMFC_OVERLAP = 3 |
| 305 | OFPFMFC_EPERM = 4 |
| 306 | OFPFMFC_BAD_TIMEOUT = 5 |
| 307 | OFPFMFC_BAD_COMMAND = 6 |
| 308 | OFPFMFC_BAD_FLAGS = 7 |
| 309 | |
| 310 | ofp_flow_mod_failed_code_map = { |
| 311 | 0: 'OFPFMFC_UNKNOWN', |
| 312 | 1: 'OFPFMFC_TABLE_FULL', |
| 313 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 314 | 3: 'OFPFMFC_OVERLAP', |
| 315 | 4: 'OFPFMFC_EPERM', |
| 316 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 317 | 6: 'OFPFMFC_BAD_COMMAND', |
| 318 | 7: 'OFPFMFC_BAD_FLAGS', |
| 319 | } |
| 320 | |
| 321 | # Identifiers from group ofp_flow_mod_flags |
| 322 | OFPFF_SEND_FLOW_REM = 1 |
| 323 | OFPFF_CHECK_OVERLAP = 2 |
| 324 | OFPFF_RESET_COUNTS = 4 |
| 325 | OFPFF_NO_PKT_COUNTS = 8 |
| 326 | OFPFF_NO_BYT_COUNTS = 16 |
| 327 | |
| 328 | ofp_flow_mod_flags_map = { |
| 329 | 1: 'OFPFF_SEND_FLOW_REM', |
| 330 | 2: 'OFPFF_CHECK_OVERLAP', |
| 331 | 4: 'OFPFF_RESET_COUNTS', |
| 332 | 8: 'OFPFF_NO_PKT_COUNTS', |
| 333 | 16: 'OFPFF_NO_BYT_COUNTS', |
| 334 | } |
| 335 | |
| 336 | # Identifiers from group ofp_flow_removed_reason |
| 337 | OFPRR_IDLE_TIMEOUT = 0 |
| 338 | OFPRR_HARD_TIMEOUT = 1 |
| 339 | OFPRR_DELETE = 2 |
| 340 | OFPRR_GROUP_DELETE = 3 |
| 341 | |
| 342 | ofp_flow_removed_reason_map = { |
| 343 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 344 | 1: 'OFPRR_HARD_TIMEOUT', |
| 345 | 2: 'OFPRR_DELETE', |
| 346 | 3: 'OFPRR_GROUP_DELETE', |
| 347 | } |
| 348 | |
| 349 | # Identifiers from group ofp_group |
| 350 | OFPG_MAX = 4294967040 |
| 351 | OFPG_ALL = 4294967292 |
| 352 | OFPG_ANY = 4294967295 |
| 353 | |
| 354 | ofp_group_map = { |
| 355 | 4294967040: 'OFPG_MAX', |
| 356 | 4294967292: 'OFPG_ALL', |
| 357 | 4294967295: 'OFPG_ANY', |
| 358 | } |
| 359 | |
| 360 | # Identifiers from group ofp_group_capabilities |
| 361 | OFPGFC_SELECT_WEIGHT = 1 |
| 362 | OFPGFC_SELECT_LIVENESS = 2 |
| 363 | OFPGFC_CHAINING = 4 |
| 364 | OFPGFC_CHAINING_CHECKS = 8 |
| 365 | |
| 366 | ofp_group_capabilities_map = { |
| 367 | 1: 'OFPGFC_SELECT_WEIGHT', |
| 368 | 2: 'OFPGFC_SELECT_LIVENESS', |
| 369 | 4: 'OFPGFC_CHAINING', |
| 370 | 8: 'OFPGFC_CHAINING_CHECKS', |
| 371 | } |
| 372 | |
| 373 | # Identifiers from group ofp_group_mod_command |
| 374 | OFPGC_ADD = 0 |
| 375 | OFPGC_MODIFY = 1 |
| 376 | OFPGC_DELETE = 2 |
| 377 | |
| 378 | ofp_group_mod_command_map = { |
| 379 | 0: 'OFPGC_ADD', |
| 380 | 1: 'OFPGC_MODIFY', |
| 381 | 2: 'OFPGC_DELETE', |
| 382 | } |
| 383 | |
| 384 | # Identifiers from group ofp_group_mod_failed_code |
| 385 | OFPGMFC_GROUP_EXISTS = 0 |
| 386 | OFPGMFC_INVALID_GROUP = 1 |
| 387 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 388 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 389 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 390 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 391 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 392 | OFPGMFC_LOOP = 7 |
| 393 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 394 | OFPGMFC_CHAINED_GROUP = 9 |
| 395 | OFPGMFC_BAD_TYPE = 10 |
| 396 | OFPGMFC_BAD_COMMAND = 11 |
| 397 | OFPGMFC_BAD_BUCKET = 12 |
| 398 | OFPGMFC_BAD_WATCH = 13 |
| 399 | OFPGMFC_EPERM = 14 |
| 400 | |
| 401 | ofp_group_mod_failed_code_map = { |
| 402 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 403 | 1: 'OFPGMFC_INVALID_GROUP', |
| 404 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 405 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 406 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 407 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 408 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 409 | 7: 'OFPGMFC_LOOP', |
| 410 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 411 | 9: 'OFPGMFC_CHAINED_GROUP', |
| 412 | 10: 'OFPGMFC_BAD_TYPE', |
| 413 | 11: 'OFPGMFC_BAD_COMMAND', |
| 414 | 12: 'OFPGMFC_BAD_BUCKET', |
| 415 | 13: 'OFPGMFC_BAD_WATCH', |
| 416 | 14: 'OFPGMFC_EPERM', |
| 417 | } |
| 418 | |
| 419 | # Identifiers from group ofp_group_type |
| 420 | OFPGT_ALL = 0 |
| 421 | OFPGT_SELECT = 1 |
| 422 | OFPGT_INDIRECT = 2 |
| 423 | OFPGT_FF = 3 |
| 424 | |
| 425 | ofp_group_type_map = { |
| 426 | 0: 'OFPGT_ALL', |
| 427 | 1: 'OFPGT_SELECT', |
| 428 | 2: 'OFPGT_INDIRECT', |
| 429 | 3: 'OFPGT_FF', |
| 430 | } |
| 431 | |
| 432 | # Identifiers from group ofp_hello_elem_type |
| 433 | OFPHET_VERSIONBITMAP = 1 |
| 434 | |
| 435 | ofp_hello_elem_type_map = { |
| 436 | 1: 'OFPHET_VERSIONBITMAP', |
| 437 | } |
| 438 | |
| 439 | # Identifiers from group ofp_hello_failed_code |
| 440 | OFPHFC_INCOMPATIBLE = 0 |
| 441 | OFPHFC_EPERM = 1 |
| 442 | |
| 443 | ofp_hello_failed_code_map = { |
| 444 | 0: 'OFPHFC_INCOMPATIBLE', |
| 445 | 1: 'OFPHFC_EPERM', |
| 446 | } |
| 447 | |
| 448 | # Identifiers from group ofp_instruction_type |
| 449 | OFPIT_GOTO_TABLE = 1 |
| 450 | OFPIT_WRITE_METADATA = 2 |
| 451 | OFPIT_WRITE_ACTIONS = 3 |
| 452 | OFPIT_APPLY_ACTIONS = 4 |
| 453 | OFPIT_CLEAR_ACTIONS = 5 |
| 454 | OFPIT_METER = 6 |
| 455 | OFPIT_EXPERIMENTER = 65535 |
| 456 | |
| 457 | ofp_instruction_type_map = { |
| 458 | 1: 'OFPIT_GOTO_TABLE', |
| 459 | 2: 'OFPIT_WRITE_METADATA', |
| 460 | 3: 'OFPIT_WRITE_ACTIONS', |
| 461 | 4: 'OFPIT_APPLY_ACTIONS', |
| 462 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 463 | 6: 'OFPIT_METER', |
| 464 | 65535: 'OFPIT_EXPERIMENTER', |
| 465 | } |
| 466 | |
| 467 | # Identifiers from group ofp_ipv6exthdr_flags |
| 468 | OFPIEH_NONEXT = 1 |
| 469 | OFPIEH_ESP = 2 |
| 470 | OFPIEH_AUTH = 4 |
| 471 | OFPIEH_DEST = 8 |
| 472 | OFPIEH_FRAG = 16 |
| 473 | OFPIEH_ROUTER = 32 |
| 474 | OFPIEH_HOP = 64 |
| 475 | OFPIEH_UNREP = 128 |
| 476 | OFPIEH_UNSEQ = 256 |
| 477 | |
| 478 | ofp_ipv6exthdr_flags_map = { |
| 479 | 1: 'OFPIEH_NONEXT', |
| 480 | 2: 'OFPIEH_ESP', |
| 481 | 4: 'OFPIEH_AUTH', |
| 482 | 8: 'OFPIEH_DEST', |
| 483 | 16: 'OFPIEH_FRAG', |
| 484 | 32: 'OFPIEH_ROUTER', |
| 485 | 64: 'OFPIEH_HOP', |
| 486 | 128: 'OFPIEH_UNREP', |
| 487 | 256: 'OFPIEH_UNSEQ', |
| 488 | } |
| 489 | |
| 490 | # Identifiers from group ofp_match_type |
| 491 | OFPMT_STANDARD = 0 |
| 492 | OFPMT_OXM = 1 |
| 493 | |
| 494 | ofp_match_type_map = { |
| 495 | 0: 'OFPMT_STANDARD', |
| 496 | 1: 'OFPMT_OXM', |
| 497 | } |
| 498 | |
| 499 | # Identifiers from group ofp_meter |
| 500 | OFPM_MAX = 4294901760 |
| 501 | OFPM_SLOWPATH = 4294967293 |
| 502 | OFPM_CONTROLLER = 4294967294 |
| 503 | OFPM_ALL = 4294967295 |
| 504 | |
| 505 | ofp_meter_map = { |
| 506 | 4294901760: 'OFPM_MAX', |
| 507 | 4294967293: 'OFPM_SLOWPATH', |
| 508 | 4294967294: 'OFPM_CONTROLLER', |
| 509 | 4294967295: 'OFPM_ALL', |
| 510 | } |
| 511 | |
| 512 | # Identifiers from group ofp_meter_band_type |
| 513 | OFPMBT_DROP = 1 |
| 514 | OFPMBT_DSCP_REMARK = 2 |
| 515 | OFPMBT_EXPERIMENTER = 65535 |
| 516 | |
| 517 | ofp_meter_band_type_map = { |
| 518 | 1: 'OFPMBT_DROP', |
| 519 | 2: 'OFPMBT_DSCP_REMARK', |
| 520 | 65535: 'OFPMBT_EXPERIMENTER', |
| 521 | } |
| 522 | |
| 523 | # Identifiers from group ofp_meter_flags |
| 524 | OFPMF_KBPS = 1 |
| 525 | OFPMF_PKTPS = 2 |
| 526 | OFPMF_BURST = 4 |
| 527 | OFPMF_STATS = 8 |
| 528 | |
| 529 | ofp_meter_flags_map = { |
| 530 | 1: 'OFPMF_KBPS', |
| 531 | 2: 'OFPMF_PKTPS', |
| 532 | 4: 'OFPMF_BURST', |
| 533 | 8: 'OFPMF_STATS', |
| 534 | } |
| 535 | |
| 536 | # Identifiers from group ofp_meter_mod_command |
| 537 | OFPMC_ADD = 0 |
| 538 | OFPMC_MODIFY = 1 |
| 539 | OFPMC_DELETE = 2 |
| 540 | |
| 541 | ofp_meter_mod_command_map = { |
| 542 | 0: 'OFPMC_ADD', |
| 543 | 1: 'OFPMC_MODIFY', |
| 544 | 2: 'OFPMC_DELETE', |
| 545 | } |
| 546 | |
| 547 | # Identifiers from group ofp_meter_mod_failed_code |
| 548 | OFPMMFC_UNKNOWN = 0 |
| 549 | OFPMMFC_METER_EXISTS = 1 |
| 550 | OFPMMFC_INVALID_METER = 2 |
| 551 | OFPMMFC_UNKNOWN_METER = 3 |
| 552 | OFPMMFC_BAD_COMMAND = 4 |
| 553 | OFPMMFC_BAD_FLAGS = 5 |
| 554 | OFPMMFC_BAD_RATE = 6 |
| 555 | OFPMMFC_BAD_BURST = 7 |
| 556 | OFPMMFC_BAD_BAND = 8 |
| 557 | OFPMMFC_BAD_BAND_VALUE = 9 |
| 558 | OFPMMFC_OUT_OF_METERS = 10 |
| 559 | OFPMMFC_OUT_OF_BANDS = 11 |
| 560 | |
| 561 | ofp_meter_mod_failed_code_map = { |
| 562 | 0: 'OFPMMFC_UNKNOWN', |
| 563 | 1: 'OFPMMFC_METER_EXISTS', |
| 564 | 2: 'OFPMMFC_INVALID_METER', |
| 565 | 3: 'OFPMMFC_UNKNOWN_METER', |
| 566 | 4: 'OFPMMFC_BAD_COMMAND', |
| 567 | 5: 'OFPMMFC_BAD_FLAGS', |
| 568 | 6: 'OFPMMFC_BAD_RATE', |
| 569 | 7: 'OFPMMFC_BAD_BURST', |
| 570 | 8: 'OFPMMFC_BAD_BAND', |
| 571 | 9: 'OFPMMFC_BAD_BAND_VALUE', |
| 572 | 10: 'OFPMMFC_OUT_OF_METERS', |
| 573 | 11: 'OFPMMFC_OUT_OF_BANDS', |
| 574 | } |
| 575 | |
| 576 | # Identifiers from group ofp_multipart_reply_flags |
| 577 | OFPMPF_REPLY_MORE = 1 |
| 578 | |
| 579 | ofp_multipart_reply_flags_map = { |
| 580 | 1: 'OFPMPF_REPLY_MORE', |
| 581 | } |
| 582 | |
| 583 | # Identifiers from group ofp_multipart_request_flags |
| 584 | OFPMPF_REQ_MORE = 1 |
| 585 | |
| 586 | ofp_multipart_request_flags_map = { |
| 587 | 1: 'OFPMPF_REQ_MORE', |
| 588 | } |
| 589 | |
| 590 | # Identifiers from group ofp_multipart_types |
| 591 | OFPMP_DESC = 0 |
| 592 | OFPMP_FLOW = 1 |
| 593 | OFPMP_AGGREGATE = 2 |
| 594 | OFPMP_TABLE = 3 |
| 595 | OFPMP_PORT_STATS = 4 |
| 596 | OFPMP_QUEUE = 5 |
| 597 | OFPMP_GROUP = 6 |
| 598 | OFPMP_GROUP_DESC = 7 |
| 599 | OFPMP_GROUP_FEATURES = 8 |
| 600 | OFPMP_METER = 9 |
| 601 | OFPMP_METER_CONFIG = 10 |
| 602 | OFPMP_METER_FEATURES = 11 |
| 603 | OFPMP_TABLE_FEATURES = 12 |
| 604 | OFPMP_PORT_DESC = 13 |
| 605 | OFPMP_EXPERIMENTER = 65535 |
| 606 | |
| 607 | ofp_multipart_types_map = { |
| 608 | 0: 'OFPMP_DESC', |
| 609 | 1: 'OFPMP_FLOW', |
| 610 | 2: 'OFPMP_AGGREGATE', |
| 611 | 3: 'OFPMP_TABLE', |
| 612 | 4: 'OFPMP_PORT_STATS', |
| 613 | 5: 'OFPMP_QUEUE', |
| 614 | 6: 'OFPMP_GROUP', |
| 615 | 7: 'OFPMP_GROUP_DESC', |
| 616 | 8: 'OFPMP_GROUP_FEATURES', |
| 617 | 9: 'OFPMP_METER', |
| 618 | 10: 'OFPMP_METER_CONFIG', |
| 619 | 11: 'OFPMP_METER_FEATURES', |
| 620 | 12: 'OFPMP_TABLE_FEATURES', |
| 621 | 13: 'OFPMP_PORT_DESC', |
| 622 | 65535: 'OFPMP_EXPERIMENTER', |
| 623 | } |
| 624 | |
| 625 | # Identifiers from group ofp_oxm_class |
| 626 | OFPXMC_NXM_0 = 0 |
| 627 | OFPXMC_NXM_1 = 1 |
| 628 | OFPXMC_OPENFLOW_BASIC = 32768 |
| 629 | OFPXMC_EXPERIMENTER = 65535 |
| 630 | |
| 631 | ofp_oxm_class_map = { |
| 632 | 0: 'OFPXMC_NXM_0', |
| 633 | 1: 'OFPXMC_NXM_1', |
| 634 | 32768: 'OFPXMC_OPENFLOW_BASIC', |
| 635 | 65535: 'OFPXMC_EXPERIMENTER', |
| 636 | } |
| 637 | |
| 638 | # Identifiers from group ofp_packet_in_reason |
| 639 | OFPR_NO_MATCH = 0 |
| 640 | OFPR_ACTION = 1 |
| 641 | OFPR_INVALID_TTL = 2 |
| 642 | |
| 643 | ofp_packet_in_reason_map = { |
| 644 | 0: 'OFPR_NO_MATCH', |
| 645 | 1: 'OFPR_ACTION', |
| 646 | 2: 'OFPR_INVALID_TTL', |
| 647 | } |
| 648 | |
| 649 | # Identifiers from group ofp_port |
| 650 | OFPP_MAX = 4294967040 |
| 651 | OFPP_IN_PORT = 4294967288 |
| 652 | OFPP_TABLE = 4294967289 |
| 653 | OFPP_NORMAL = 4294967290 |
| 654 | OFPP_FLOOD = 4294967291 |
| 655 | OFPP_ALL = 4294967292 |
| 656 | OFPP_CONTROLLER = 4294967293 |
| 657 | OFPP_LOCAL = 4294967294 |
| 658 | |
| 659 | ofp_port_map = { |
| 660 | 4294967040: 'OFPP_MAX', |
| 661 | 4294967288: 'OFPP_IN_PORT', |
| 662 | 4294967289: 'OFPP_TABLE', |
| 663 | 4294967290: 'OFPP_NORMAL', |
| 664 | 4294967291: 'OFPP_FLOOD', |
| 665 | 4294967292: 'OFPP_ALL', |
| 666 | 4294967293: 'OFPP_CONTROLLER', |
| 667 | 4294967294: 'OFPP_LOCAL', |
| 668 | } |
| 669 | |
| 670 | # Identifiers from group ofp_port_config |
| 671 | OFPPC_PORT_DOWN = 1 |
| 672 | OFPPC_NO_RECV = 4 |
| 673 | OFPPC_NO_FWD = 32 |
| 674 | OFPPC_NO_PACKET_IN = 64 |
| 675 | |
| 676 | ofp_port_config_map = { |
| 677 | 1: 'OFPPC_PORT_DOWN', |
| 678 | 4: 'OFPPC_NO_RECV', |
| 679 | 32: 'OFPPC_NO_FWD', |
| 680 | 64: 'OFPPC_NO_PACKET_IN', |
| 681 | } |
| 682 | |
| 683 | # Identifiers from group ofp_port_features |
| 684 | OFPPF_10MB_HD = 1 |
| 685 | OFPPF_10MB_FD = 2 |
| 686 | OFPPF_100MB_HD = 4 |
| 687 | OFPPF_100MB_FD = 8 |
| 688 | OFPPF_1GB_HD = 16 |
| 689 | OFPPF_1GB_FD = 32 |
| 690 | OFPPF_10GB_FD = 64 |
| 691 | OFPPF_40GB_FD = 128 |
| 692 | OFPPF_100GB_FD = 256 |
| 693 | OFPPF_1TB_FD = 512 |
| 694 | OFPPF_OTHER = 1024 |
| 695 | OFPPF_COPPER = 2048 |
| 696 | OFPPF_FIBER = 4096 |
| 697 | OFPPF_AUTONEG = 8192 |
| 698 | OFPPF_PAUSE = 16384 |
| 699 | OFPPF_PAUSE_ASYM = 32768 |
| 700 | |
| 701 | ofp_port_features_map = { |
| 702 | 1: 'OFPPF_10MB_HD', |
| 703 | 2: 'OFPPF_10MB_FD', |
| 704 | 4: 'OFPPF_100MB_HD', |
| 705 | 8: 'OFPPF_100MB_FD', |
| 706 | 16: 'OFPPF_1GB_HD', |
| 707 | 32: 'OFPPF_1GB_FD', |
| 708 | 64: 'OFPPF_10GB_FD', |
| 709 | 128: 'OFPPF_40GB_FD', |
| 710 | 256: 'OFPPF_100GB_FD', |
| 711 | 512: 'OFPPF_1TB_FD', |
| 712 | 1024: 'OFPPF_OTHER', |
| 713 | 2048: 'OFPPF_COPPER', |
| 714 | 4096: 'OFPPF_FIBER', |
| 715 | 8192: 'OFPPF_AUTONEG', |
| 716 | 16384: 'OFPPF_PAUSE', |
| 717 | 32768: 'OFPPF_PAUSE_ASYM', |
| 718 | } |
| 719 | |
| 720 | # Identifiers from group ofp_port_mod_failed_code |
| 721 | OFPPMFC_BAD_PORT = 0 |
| 722 | OFPPMFC_BAD_HW_ADDR = 1 |
| 723 | OFPPMFC_BAD_CONFIG = 2 |
| 724 | OFPPMFC_BAD_ADVERTISE = 3 |
| 725 | OFPPMFC_EPERM = 4 |
| 726 | |
| 727 | ofp_port_mod_failed_code_map = { |
| 728 | 0: 'OFPPMFC_BAD_PORT', |
| 729 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 730 | 2: 'OFPPMFC_BAD_CONFIG', |
| 731 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 732 | 4: 'OFPPMFC_EPERM', |
| 733 | } |
| 734 | |
| 735 | # Identifiers from group ofp_port_no |
| 736 | OFPP_ANY = 4294967295 |
| 737 | |
| 738 | ofp_port_no_map = { |
| 739 | 4294967295: 'OFPP_ANY', |
| 740 | } |
| 741 | |
| 742 | # Identifiers from group ofp_port_reason |
| 743 | OFPPR_ADD = 0 |
| 744 | OFPPR_DELETE = 1 |
| 745 | OFPPR_MODIFY = 2 |
| 746 | |
| 747 | ofp_port_reason_map = { |
| 748 | 0: 'OFPPR_ADD', |
| 749 | 1: 'OFPPR_DELETE', |
| 750 | 2: 'OFPPR_MODIFY', |
| 751 | } |
| 752 | |
| 753 | # Identifiers from group ofp_port_state |
| 754 | OFPPS_LINK_DOWN = 1 |
| 755 | OFPPS_BLOCKED = 2 |
| 756 | OFPPS_LIVE = 4 |
| 757 | |
| 758 | ofp_port_state_map = { |
| 759 | 1: 'OFPPS_LINK_DOWN', |
| 760 | 2: 'OFPPS_BLOCKED', |
| 761 | 4: 'OFPPS_LIVE', |
| 762 | } |
| 763 | |
| 764 | # Identifiers from group ofp_queue_op_failed_code |
| 765 | OFPQOFC_BAD_PORT = 0 |
| 766 | OFPQOFC_BAD_QUEUE = 1 |
| 767 | OFPQOFC_EPERM = 2 |
| 768 | |
| 769 | ofp_queue_op_failed_code_map = { |
| 770 | 0: 'OFPQOFC_BAD_PORT', |
| 771 | 1: 'OFPQOFC_BAD_QUEUE', |
| 772 | 2: 'OFPQOFC_EPERM', |
| 773 | } |
| 774 | |
| 775 | # Identifiers from group ofp_queue_properties |
| 776 | OFPQT_MIN_RATE = 1 |
| 777 | OFPQT_MAX_RATE = 2 |
| 778 | OFPQT_EXPERIMENTER = 65535 |
| 779 | |
| 780 | ofp_queue_properties_map = { |
| 781 | 1: 'OFPQT_MIN_RATE', |
| 782 | 2: 'OFPQT_MAX_RATE', |
| 783 | 65535: 'OFPQT_EXPERIMENTER', |
| 784 | } |
| 785 | |
| 786 | # Identifiers from group ofp_role_request_failed_code |
| 787 | OFPRRFC_STALE = 0 |
| 788 | OFPRRFC_UNSUP = 1 |
| 789 | OFPRRFC_BAD_ROLE = 2 |
| 790 | |
| 791 | ofp_role_request_failed_code_map = { |
| 792 | 0: 'OFPRRFC_STALE', |
| 793 | 1: 'OFPRRFC_UNSUP', |
| 794 | 2: 'OFPRRFC_BAD_ROLE', |
| 795 | } |
| 796 | |
| 797 | # Identifiers from group ofp_switch_config_failed_code |
| 798 | OFPSCFC_BAD_FLAGS = 0 |
| 799 | OFPSCFC_BAD_LEN = 1 |
| 800 | OFPSCFC_EPERM = 2 |
| 801 | |
| 802 | ofp_switch_config_failed_code_map = { |
| 803 | 0: 'OFPSCFC_BAD_FLAGS', |
| 804 | 1: 'OFPSCFC_BAD_LEN', |
| 805 | 2: 'OFPSCFC_EPERM', |
| 806 | } |
| 807 | |
| 808 | # Identifiers from group ofp_table |
| 809 | OFPTT_MAX = 254 |
| 810 | OFPTT_ALL = 255 |
| 811 | |
| 812 | ofp_table_map = { |
| 813 | 254: 'OFPTT_MAX', |
| 814 | 255: 'OFPTT_ALL', |
| 815 | } |
| 816 | |
| 817 | # Identifiers from group ofp_table_config |
| 818 | OFPTC_DEPRECATED_MASK = 3 |
| 819 | |
| 820 | ofp_table_config_map = { |
| 821 | 3: 'OFPTC_DEPRECATED_MASK', |
| 822 | } |
| 823 | |
| 824 | # Identifiers from group ofp_table_feature_prop_type |
| 825 | OFPTFPT_INSTRUCTIONS = 0 |
| 826 | OFPTFPT_INSTRUCTIONS_MISS = 1 |
| 827 | OFPTFPT_NEXT_TABLES = 2 |
| 828 | OFPTFPT_NEXT_TABLES_MISS = 3 |
| 829 | OFPTFPT_WRITE_ACTIONS = 4 |
| 830 | OFPTFPT_WRITE_ACTIONS_MISS = 5 |
| 831 | OFPTFPT_APPLY_ACTIONS = 6 |
| 832 | OFPTFPT_APPLY_ACTIONS_MISS = 7 |
| 833 | OFPTFPT_MATCH = 8 |
| 834 | OFPTFPT_WILDCARDS = 10 |
| 835 | OFPTFPT_WRITE_SETFIELD = 12 |
| 836 | OFPTFPT_WRITE_SETFIELD_MISS = 13 |
| 837 | OFPTFPT_APPLY_SETFIELD = 14 |
| 838 | OFPTFPT_APPLY_SETFIELD_MISS = 15 |
| 839 | OFPTFPT_EXPERIMENTER = 65534 |
| 840 | OFPTFPT_EXPERIMENTER_MISS = 65535 |
| 841 | |
| 842 | ofp_table_feature_prop_type_map = { |
| 843 | 0: 'OFPTFPT_INSTRUCTIONS', |
| 844 | 1: 'OFPTFPT_INSTRUCTIONS_MISS', |
| 845 | 2: 'OFPTFPT_NEXT_TABLES', |
| 846 | 3: 'OFPTFPT_NEXT_TABLES_MISS', |
| 847 | 4: 'OFPTFPT_WRITE_ACTIONS', |
| 848 | 5: 'OFPTFPT_WRITE_ACTIONS_MISS', |
| 849 | 6: 'OFPTFPT_APPLY_ACTIONS', |
| 850 | 7: 'OFPTFPT_APPLY_ACTIONS_MISS', |
| 851 | 8: 'OFPTFPT_MATCH', |
| 852 | 10: 'OFPTFPT_WILDCARDS', |
| 853 | 12: 'OFPTFPT_WRITE_SETFIELD', |
| 854 | 13: 'OFPTFPT_WRITE_SETFIELD_MISS', |
| 855 | 14: 'OFPTFPT_APPLY_SETFIELD', |
| 856 | 15: 'OFPTFPT_APPLY_SETFIELD_MISS', |
| 857 | 65534: 'OFPTFPT_EXPERIMENTER', |
| 858 | 65535: 'OFPTFPT_EXPERIMENTER_MISS', |
| 859 | } |
| 860 | |
| 861 | # Identifiers from group ofp_table_features_failed_code |
| 862 | OFPTFFC_BAD_TABLE = 0 |
| 863 | OFPTFFC_BAD_METADATA = 1 |
| 864 | OFPTFFC_BAD_TYPE = 2 |
| 865 | OFPTFFC_BAD_LEN = 3 |
| 866 | OFPTFFC_BAD_ARGUMENT = 4 |
| 867 | OFPTFFC_EPERM = 5 |
| 868 | |
| 869 | ofp_table_features_failed_code_map = { |
| 870 | 0: 'OFPTFFC_BAD_TABLE', |
| 871 | 1: 'OFPTFFC_BAD_METADATA', |
| 872 | 2: 'OFPTFFC_BAD_TYPE', |
| 873 | 3: 'OFPTFFC_BAD_LEN', |
| 874 | 4: 'OFPTFFC_BAD_ARGUMENT', |
| 875 | 5: 'OFPTFFC_EPERM', |
| 876 | } |
| 877 | |
| 878 | # Identifiers from group ofp_table_mod_failed_code |
| 879 | OFPTMFC_BAD_TABLE = 0 |
| 880 | OFPTMFC_BAD_CONFIG = 1 |
| 881 | OFPTMFC_EPERM = 2 |
| 882 | |
| 883 | ofp_table_mod_failed_code_map = { |
| 884 | 0: 'OFPTMFC_BAD_TABLE', |
| 885 | 1: 'OFPTMFC_BAD_CONFIG', |
| 886 | 2: 'OFPTMFC_EPERM', |
| 887 | } |
| 888 | |
| 889 | # Identifiers from group ofp_type |
| 890 | OFPT_HELLO = 0 |
| 891 | OFPT_ERROR = 1 |
| 892 | OFPT_ECHO_REQUEST = 2 |
| 893 | OFPT_ECHO_REPLY = 3 |
| 894 | OFPT_EXPERIMENTER = 4 |
| 895 | OFPT_FEATURES_REQUEST = 5 |
| 896 | OFPT_FEATURES_REPLY = 6 |
| 897 | OFPT_GET_CONFIG_REQUEST = 7 |
| 898 | OFPT_GET_CONFIG_REPLY = 8 |
| 899 | OFPT_SET_CONFIG = 9 |
| 900 | OFPT_PACKET_IN = 10 |
| 901 | OFPT_FLOW_REMOVED = 11 |
| 902 | OFPT_PORT_STATUS = 12 |
| 903 | OFPT_PACKET_OUT = 13 |
| 904 | OFPT_FLOW_MOD = 14 |
| 905 | OFPT_GROUP_MOD = 15 |
| 906 | OFPT_PORT_MOD = 16 |
| 907 | OFPT_TABLE_MOD = 17 |
| 908 | OFPT_MULTIPART_REQUEST = 18 |
| 909 | OFPT_MULTIPART_REPLY = 19 |
| 910 | OFPT_BARRIER_REQUEST = 20 |
| 911 | OFPT_BARRIER_REPLY = 21 |
| 912 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 913 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 914 | OFPT_ROLE_REQUEST = 24 |
| 915 | OFPT_ROLE_REPLY = 25 |
| 916 | OFPT_GET_ASYNC_REQUEST = 26 |
| 917 | OFPT_GET_ASYNC_REPLY = 27 |
| 918 | OFPT_SET_ASYNC = 28 |
| 919 | OFPT_METER_MOD = 29 |
| 920 | |
| 921 | ofp_type_map = { |
| 922 | 0: 'OFPT_HELLO', |
| 923 | 1: 'OFPT_ERROR', |
| 924 | 2: 'OFPT_ECHO_REQUEST', |
| 925 | 3: 'OFPT_ECHO_REPLY', |
| 926 | 4: 'OFPT_EXPERIMENTER', |
| 927 | 5: 'OFPT_FEATURES_REQUEST', |
| 928 | 6: 'OFPT_FEATURES_REPLY', |
| 929 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 930 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 931 | 9: 'OFPT_SET_CONFIG', |
| 932 | 10: 'OFPT_PACKET_IN', |
| 933 | 11: 'OFPT_FLOW_REMOVED', |
| 934 | 12: 'OFPT_PORT_STATUS', |
| 935 | 13: 'OFPT_PACKET_OUT', |
| 936 | 14: 'OFPT_FLOW_MOD', |
| 937 | 15: 'OFPT_GROUP_MOD', |
| 938 | 16: 'OFPT_PORT_MOD', |
| 939 | 17: 'OFPT_TABLE_MOD', |
| 940 | 18: 'OFPT_MULTIPART_REQUEST', |
| 941 | 19: 'OFPT_MULTIPART_REPLY', |
| 942 | 20: 'OFPT_BARRIER_REQUEST', |
| 943 | 21: 'OFPT_BARRIER_REPLY', |
| 944 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 945 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 946 | 24: 'OFPT_ROLE_REQUEST', |
| 947 | 25: 'OFPT_ROLE_REPLY', |
| 948 | 26: 'OFPT_GET_ASYNC_REQUEST', |
| 949 | 27: 'OFPT_GET_ASYNC_REPLY', |
| 950 | 28: 'OFPT_SET_ASYNC', |
| 951 | 29: 'OFPT_METER_MOD', |
| 952 | } |
| 953 | |
| 954 | # Identifiers from group ofp_vlan_id |
| 955 | OFPVID_NONE = 0 |
| 956 | OFPVID_PRESENT = 4096 |
| 957 | |
| 958 | ofp_vlan_id_map = { |
| 959 | 0: 'OFPVID_NONE', |
| 960 | 4096: 'OFPVID_PRESENT', |
| 961 | } |
| 962 | |