Rich Lane | 2e079da | 2014-10-29 15:30:24 -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 = 5 |
| 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_MAX_RATE_UNCFG = 65535 |
| 26 | OFPQ_MIN_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_PUSH_PBB = 26 |
| 51 | OFPAT_POP_PBB = 27 |
| 52 | OFPAT_EXPERIMENTER = 65535 |
| 53 | |
| 54 | ofp_action_type_map = { |
| 55 | 0: 'OFPAT_OUTPUT', |
| 56 | 11: 'OFPAT_COPY_TTL_OUT', |
| 57 | 12: 'OFPAT_COPY_TTL_IN', |
| 58 | 15: 'OFPAT_SET_MPLS_TTL', |
| 59 | 16: 'OFPAT_DEC_MPLS_TTL', |
| 60 | 17: 'OFPAT_PUSH_VLAN', |
| 61 | 18: 'OFPAT_POP_VLAN', |
| 62 | 19: 'OFPAT_PUSH_MPLS', |
| 63 | 20: 'OFPAT_POP_MPLS', |
| 64 | 21: 'OFPAT_SET_QUEUE', |
| 65 | 22: 'OFPAT_GROUP', |
| 66 | 23: 'OFPAT_SET_NW_TTL', |
| 67 | 24: 'OFPAT_DEC_NW_TTL', |
| 68 | 25: 'OFPAT_SET_FIELD', |
| 69 | 26: 'OFPAT_PUSH_PBB', |
| 70 | 27: 'OFPAT_POP_PBB', |
| 71 | 65535: 'OFPAT_EXPERIMENTER', |
| 72 | } |
| 73 | |
| 74 | # Identifiers from group ofp_async_config_failed_code |
| 75 | OFPACFC_INVALID = 0 |
| 76 | OFPACFC_UNSUPPORTED = 1 |
| 77 | OFPACFC_EPERM = 2 |
| 78 | |
| 79 | ofp_async_config_failed_code_map = { |
| 80 | 0: 'OFPACFC_INVALID', |
| 81 | 1: 'OFPACFC_UNSUPPORTED', |
| 82 | 2: 'OFPACFC_EPERM', |
| 83 | } |
| 84 | |
| 85 | # Identifiers from group ofp_bad_action_code |
| 86 | OFPBAC_BAD_TYPE = 0 |
| 87 | OFPBAC_BAD_LEN = 1 |
| 88 | OFPBAC_BAD_EXPERIMENTER = 2 |
| 89 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3 |
| 90 | OFPBAC_BAD_OUT_PORT = 4 |
| 91 | OFPBAC_BAD_ARGUMENT = 5 |
| 92 | OFPBAC_EPERM = 6 |
| 93 | OFPBAC_TOO_MANY = 7 |
| 94 | OFPBAC_BAD_QUEUE = 8 |
| 95 | OFPBAC_BAD_OUT_GROUP = 9 |
| 96 | OFPBAC_MATCH_INCONSISTENT = 10 |
| 97 | OFPBAC_UNSUPPORTED_ORDER = 11 |
| 98 | OFPBAC_BAD_TAG = 12 |
| 99 | OFPBAC_BAD_SET_TYPE = 13 |
| 100 | OFPBAC_BAD_SET_LEN = 14 |
| 101 | OFPBAC_BAD_SET_ARGUMENT = 15 |
| 102 | |
| 103 | ofp_bad_action_code_map = { |
| 104 | 0: 'OFPBAC_BAD_TYPE', |
| 105 | 1: 'OFPBAC_BAD_LEN', |
| 106 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
| 107 | 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE', |
| 108 | 4: 'OFPBAC_BAD_OUT_PORT', |
| 109 | 5: 'OFPBAC_BAD_ARGUMENT', |
| 110 | 6: 'OFPBAC_EPERM', |
| 111 | 7: 'OFPBAC_TOO_MANY', |
| 112 | 8: 'OFPBAC_BAD_QUEUE', |
| 113 | 9: 'OFPBAC_BAD_OUT_GROUP', |
| 114 | 10: 'OFPBAC_MATCH_INCONSISTENT', |
| 115 | 11: 'OFPBAC_UNSUPPORTED_ORDER', |
| 116 | 12: 'OFPBAC_BAD_TAG', |
| 117 | 13: 'OFPBAC_BAD_SET_TYPE', |
| 118 | 14: 'OFPBAC_BAD_SET_LEN', |
| 119 | 15: 'OFPBAC_BAD_SET_ARGUMENT', |
| 120 | } |
| 121 | |
| 122 | # Identifiers from group ofp_bad_instruction_code |
| 123 | OFPBIC_UNKNOWN_INST = 0 |
| 124 | OFPBIC_UNSUP_INST = 1 |
| 125 | OFPBIC_BAD_TABLE_ID = 2 |
| 126 | OFPBIC_UNSUP_METADATA = 3 |
| 127 | OFPBIC_UNSUP_METADATA_MASK = 4 |
| 128 | OFPBIC_BAD_EXPERIMENTER = 5 |
| 129 | OFPBIC_BAD_EXPERIMENTER_TYPE = 6 |
| 130 | OFPBIC_BAD_LEN = 7 |
| 131 | OFPBIC_EPERM = 8 |
| 132 | OFPBIC_DUP_INST = 9 |
| 133 | |
| 134 | ofp_bad_instruction_code_map = { |
| 135 | 0: 'OFPBIC_UNKNOWN_INST', |
| 136 | 1: 'OFPBIC_UNSUP_INST', |
| 137 | 2: 'OFPBIC_BAD_TABLE_ID', |
| 138 | 3: 'OFPBIC_UNSUP_METADATA', |
| 139 | 4: 'OFPBIC_UNSUP_METADATA_MASK', |
| 140 | 5: 'OFPBIC_BAD_EXPERIMENTER', |
| 141 | 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE', |
| 142 | 7: 'OFPBIC_BAD_LEN', |
| 143 | 8: 'OFPBIC_EPERM', |
| 144 | 9: 'OFPBIC_DUP_INST', |
| 145 | } |
| 146 | |
| 147 | # Identifiers from group ofp_bad_match_code |
| 148 | OFPBMC_BAD_TYPE = 0 |
| 149 | OFPBMC_BAD_LEN = 1 |
| 150 | OFPBMC_BAD_TAG = 2 |
| 151 | OFPBMC_BAD_DL_ADDR_MASK = 3 |
| 152 | OFPBMC_BAD_NW_ADDR_MASK = 4 |
| 153 | OFPBMC_BAD_WILDCARDS = 5 |
| 154 | OFPBMC_BAD_FIELD = 6 |
| 155 | OFPBMC_BAD_VALUE = 7 |
| 156 | OFPBMC_BAD_MASK = 8 |
| 157 | OFPBMC_BAD_PREREQ = 9 |
| 158 | OFPBMC_DUP_FIELD = 10 |
| 159 | OFPBMC_EPERM = 11 |
| 160 | |
| 161 | ofp_bad_match_code_map = { |
| 162 | 0: 'OFPBMC_BAD_TYPE', |
| 163 | 1: 'OFPBMC_BAD_LEN', |
| 164 | 2: 'OFPBMC_BAD_TAG', |
| 165 | 3: 'OFPBMC_BAD_DL_ADDR_MASK', |
| 166 | 4: 'OFPBMC_BAD_NW_ADDR_MASK', |
| 167 | 5: 'OFPBMC_BAD_WILDCARDS', |
| 168 | 6: 'OFPBMC_BAD_FIELD', |
| 169 | 7: 'OFPBMC_BAD_VALUE', |
| 170 | 8: 'OFPBMC_BAD_MASK', |
| 171 | 9: 'OFPBMC_BAD_PREREQ', |
| 172 | 10: 'OFPBMC_DUP_FIELD', |
| 173 | 11: 'OFPBMC_EPERM', |
| 174 | } |
| 175 | |
| 176 | # Identifiers from group ofp_bad_property_code |
| 177 | OFPBPC_BAD_TYPE = 0 |
| 178 | OFPBPC_BAD_LEN = 1 |
| 179 | OFPBPC_BAD_VALUE = 2 |
| 180 | OFPBPC_TOO_MANY = 3 |
| 181 | OFPBPC_DUP_TYPE = 4 |
| 182 | OFPBPC_BAD_EXPERIMENTER = 5 |
| 183 | OFPBPC_BAD_EXP_TYPE = 6 |
| 184 | OFPBPC_BAD_EXP_VALUE = 7 |
| 185 | OFPBPC_EPERM = 8 |
| 186 | |
| 187 | ofp_bad_property_code_map = { |
| 188 | 0: 'OFPBPC_BAD_TYPE', |
| 189 | 1: 'OFPBPC_BAD_LEN', |
| 190 | 2: 'OFPBPC_BAD_VALUE', |
| 191 | 3: 'OFPBPC_TOO_MANY', |
| 192 | 4: 'OFPBPC_DUP_TYPE', |
| 193 | 5: 'OFPBPC_BAD_EXPERIMENTER', |
| 194 | 6: 'OFPBPC_BAD_EXP_TYPE', |
| 195 | 7: 'OFPBPC_BAD_EXP_VALUE', |
| 196 | 8: 'OFPBPC_EPERM', |
| 197 | } |
| 198 | |
| 199 | # Identifiers from group ofp_bad_request_code |
| 200 | OFPBRC_BAD_VERSION = 0 |
| 201 | OFPBRC_BAD_TYPE = 1 |
| 202 | OFPBRC_BAD_STAT = 2 |
| 203 | OFPBRC_BAD_EXPERIMENTER = 3 |
| 204 | OFPBRC_BAD_EXPERIMENTER_TYPE = 4 |
| 205 | OFPBRC_EPERM = 5 |
| 206 | OFPBRC_BAD_LEN = 6 |
| 207 | OFPBRC_BUFFER_EMPTY = 7 |
| 208 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 209 | OFPBRC_BAD_TABLE_ID = 9 |
| 210 | OFPBRC_IS_SLAVE = 10 |
| 211 | OFPBRC_BAD_PORT = 11 |
| 212 | OFPBRC_BAD_PACKET = 12 |
| 213 | OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13 |
| 214 | OFPBRC_MULTIPART_REQUEST_TIMEOUT = 14 |
| 215 | OFPBRC_MULTIPART_REPLY_TIMEOUT = 15 |
| 216 | |
| 217 | ofp_bad_request_code_map = { |
| 218 | 0: 'OFPBRC_BAD_VERSION', |
| 219 | 1: 'OFPBRC_BAD_TYPE', |
| 220 | 2: 'OFPBRC_BAD_STAT', |
| 221 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
| 222 | 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE', |
| 223 | 5: 'OFPBRC_EPERM', |
| 224 | 6: 'OFPBRC_BAD_LEN', |
| 225 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 226 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 227 | 9: 'OFPBRC_BAD_TABLE_ID', |
| 228 | 10: 'OFPBRC_IS_SLAVE', |
| 229 | 11: 'OFPBRC_BAD_PORT', |
| 230 | 12: 'OFPBRC_BAD_PACKET', |
| 231 | 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW', |
| 232 | 14: 'OFPBRC_MULTIPART_REQUEST_TIMEOUT', |
| 233 | 15: 'OFPBRC_MULTIPART_REPLY_TIMEOUT', |
| 234 | } |
| 235 | |
| 236 | # Identifiers from group ofp_bsn_vport_l2gre_flags |
| 237 | OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1 |
| 238 | OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2 |
| 239 | OF_BSN_VPORT_L2GRE_DSCP_COPY = 4 |
| 240 | OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8 |
| 241 | OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16 |
| 242 | |
| 243 | ofp_bsn_vport_l2gre_flags_map = { |
| 244 | 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID', |
| 245 | 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN', |
| 246 | 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY', |
| 247 | 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID', |
| 248 | 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID', |
| 249 | } |
| 250 | |
| 251 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 252 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 253 | |
| 254 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 255 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 256 | } |
| 257 | |
| 258 | # Identifiers from group ofp_bsn_vport_status |
| 259 | OF_BSN_VPORT_STATUS_OK = 0 |
| 260 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 261 | |
| 262 | ofp_bsn_vport_status_map = { |
| 263 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 264 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 265 | } |
| 266 | |
| 267 | # Identifiers from group ofp_bundle_ctrl_type |
| 268 | OFPBCT_OPEN_REQUEST = 0 |
| 269 | OFPBCT_OPEN_REPLY = 1 |
| 270 | OFPBCT_CLOSE_REQUEST = 2 |
| 271 | OFPBCT_CLOSE_REPLY = 3 |
| 272 | OFPBCT_COMMIT_REQUEST = 4 |
| 273 | OFPBCT_COMMIT_REPLY = 5 |
| 274 | OFPBCT_DISCARD_REQUEST = 6 |
| 275 | OFPBCT_DISCARD_REPLY = 7 |
| 276 | |
| 277 | ofp_bundle_ctrl_type_map = { |
| 278 | 0: 'OFPBCT_OPEN_REQUEST', |
| 279 | 1: 'OFPBCT_OPEN_REPLY', |
| 280 | 2: 'OFPBCT_CLOSE_REQUEST', |
| 281 | 3: 'OFPBCT_CLOSE_REPLY', |
| 282 | 4: 'OFPBCT_COMMIT_REQUEST', |
| 283 | 5: 'OFPBCT_COMMIT_REPLY', |
| 284 | 6: 'OFPBCT_DISCARD_REQUEST', |
| 285 | 7: 'OFPBCT_DISCARD_REPLY', |
| 286 | } |
| 287 | |
| 288 | # Identifiers from group ofp_bundle_failed_code |
| 289 | OFPBFC_UNKNOWN = 0 |
| 290 | OFPBFC_EPERM = 1 |
| 291 | OFPBFC_BAD_ID = 2 |
| 292 | OFPBFC_BUNDLE_EXIST = 3 |
| 293 | OFPBFC_BUNDLE_CLOSED = 4 |
| 294 | OFPBFC_OUT_OF_BUNDLES = 5 |
| 295 | OFPBFC_BAD_TYPE = 6 |
| 296 | OFPBFC_BAD_FLAGS = 7 |
| 297 | OFPBFC_MSG_BAD_LEN = 8 |
| 298 | OFPBFC_MSG_BAD_XID = 9 |
| 299 | OFPBFC_MSG_UNSUP = 10 |
| 300 | OFPBFC_MSG_CONFLICT = 11 |
| 301 | OFPBFC_MSG_TOO_MANY = 12 |
| 302 | OFPBFC_MSG_FAILED = 13 |
| 303 | OFPBFC_TIMEOUT = 14 |
| 304 | OFPBFC_BUNDLE_IN_PROGRESS = 15 |
| 305 | |
| 306 | ofp_bundle_failed_code_map = { |
| 307 | 0: 'OFPBFC_UNKNOWN', |
| 308 | 1: 'OFPBFC_EPERM', |
| 309 | 2: 'OFPBFC_BAD_ID', |
| 310 | 3: 'OFPBFC_BUNDLE_EXIST', |
| 311 | 4: 'OFPBFC_BUNDLE_CLOSED', |
| 312 | 5: 'OFPBFC_OUT_OF_BUNDLES', |
| 313 | 6: 'OFPBFC_BAD_TYPE', |
| 314 | 7: 'OFPBFC_BAD_FLAGS', |
| 315 | 8: 'OFPBFC_MSG_BAD_LEN', |
| 316 | 9: 'OFPBFC_MSG_BAD_XID', |
| 317 | 10: 'OFPBFC_MSG_UNSUP', |
| 318 | 11: 'OFPBFC_MSG_CONFLICT', |
| 319 | 12: 'OFPBFC_MSG_TOO_MANY', |
| 320 | 13: 'OFPBFC_MSG_FAILED', |
| 321 | 14: 'OFPBFC_TIMEOUT', |
| 322 | 15: 'OFPBFC_BUNDLE_IN_PROGRESS', |
| 323 | } |
| 324 | |
| 325 | # Identifiers from group ofp_bundle_flags |
| 326 | OFPBF_ATOMIC = 1 |
| 327 | OFPBF_ORDERED = 2 |
| 328 | |
| 329 | ofp_bundle_flags_map = { |
| 330 | 1: 'OFPBF_ATOMIC', |
| 331 | 2: 'OFPBF_ORDERED', |
| 332 | } |
| 333 | |
| 334 | # Identifiers from group ofp_capabilities |
| 335 | OFPC_FLOW_STATS = 1 |
| 336 | OFPC_TABLE_STATS = 2 |
| 337 | OFPC_PORT_STATS = 4 |
| 338 | OFPC_GROUP_STATS = 8 |
| 339 | OFPC_IP_REASM = 32 |
| 340 | OFPC_QUEUE_STATS = 64 |
| 341 | OFPC_PORT_BLOCKED = 256 |
| 342 | |
| 343 | ofp_capabilities_map = { |
| 344 | 1: 'OFPC_FLOW_STATS', |
| 345 | 2: 'OFPC_TABLE_STATS', |
| 346 | 4: 'OFPC_PORT_STATS', |
| 347 | 8: 'OFPC_GROUP_STATS', |
| 348 | 32: 'OFPC_IP_REASM', |
| 349 | 64: 'OFPC_QUEUE_STATS', |
| 350 | 256: 'OFPC_PORT_BLOCKED', |
| 351 | } |
| 352 | |
| 353 | # Identifiers from group ofp_config_flags |
| 354 | OFPC_FRAG_NORMAL = 0 |
| 355 | OFPC_FRAG_DROP = 1 |
| 356 | OFPC_FRAG_REASM = 2 |
| 357 | OFPC_FRAG_MASK = 3 |
| 358 | |
| 359 | ofp_config_flags_map = { |
| 360 | 0: 'OFPC_FRAG_NORMAL', |
| 361 | 1: 'OFPC_FRAG_DROP', |
| 362 | 2: 'OFPC_FRAG_REASM', |
| 363 | 3: 'OFPC_FRAG_MASK', |
| 364 | } |
| 365 | |
| 366 | # Identifiers from group ofp_controller_max_len |
| 367 | OFPCML_MAX = 65509 |
| 368 | OFPCML_NO_BUFFER = 65535 |
| 369 | |
| 370 | ofp_controller_max_len_map = { |
| 371 | 65509: 'OFPCML_MAX', |
| 372 | 65535: 'OFPCML_NO_BUFFER', |
| 373 | } |
| 374 | |
| 375 | # Identifiers from group ofp_controller_role |
| 376 | OFPCR_ROLE_NOCHANGE = 0 |
| 377 | OFPCR_ROLE_EQUAL = 1 |
| 378 | OFPCR_ROLE_MASTER = 2 |
| 379 | OFPCR_ROLE_SLAVE = 3 |
| 380 | |
| 381 | ofp_controller_role_map = { |
| 382 | 0: 'OFPCR_ROLE_NOCHANGE', |
| 383 | 1: 'OFPCR_ROLE_EQUAL', |
| 384 | 2: 'OFPCR_ROLE_MASTER', |
| 385 | 3: 'OFPCR_ROLE_SLAVE', |
| 386 | } |
| 387 | |
| 388 | # Identifiers from group ofp_controller_role_reason |
| 389 | OFPCRR_MASTER_REQUEST = 0 |
| 390 | OFPCRR_CONFIG = 1 |
| 391 | OFPCRR_EXPERIMENTER = 2 |
| 392 | |
| 393 | ofp_controller_role_reason_map = { |
| 394 | 0: 'OFPCRR_MASTER_REQUEST', |
| 395 | 1: 'OFPCRR_CONFIG', |
| 396 | 2: 'OFPCRR_EXPERIMENTER', |
| 397 | } |
| 398 | |
| 399 | # Identifiers from group ofp_error_type |
| 400 | OFPET_HELLO_FAILED = 0 |
| 401 | OFPET_BAD_REQUEST = 1 |
| 402 | OFPET_BAD_ACTION = 2 |
| 403 | OFPET_BAD_INSTRUCTION = 3 |
| 404 | OFPET_BAD_MATCH = 4 |
| 405 | OFPET_FLOW_MOD_FAILED = 5 |
| 406 | OFPET_GROUP_MOD_FAILED = 6 |
| 407 | OFPET_PORT_MOD_FAILED = 7 |
| 408 | OFPET_TABLE_MOD_FAILED = 8 |
| 409 | OFPET_QUEUE_OP_FAILED = 9 |
| 410 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 411 | OFPET_ROLE_REQUEST_FAILED = 11 |
| 412 | OFPET_METER_MOD_FAILED = 12 |
| 413 | OFPET_TABLE_FEATURES_FAILED = 13 |
| 414 | OFPET_BAD_PROPERTY = 14 |
| 415 | OFPET_ASYNC_CONFIG_FAILED = 15 |
| 416 | OFPET_FLOW_MONITOR_FAILED = 16 |
| 417 | OFPET_BUNDLE_FAILED = 17 |
| 418 | OFPET_EXPERIMENTER = 65535 |
| 419 | |
| 420 | ofp_error_type_map = { |
| 421 | 0: 'OFPET_HELLO_FAILED', |
| 422 | 1: 'OFPET_BAD_REQUEST', |
| 423 | 2: 'OFPET_BAD_ACTION', |
| 424 | 3: 'OFPET_BAD_INSTRUCTION', |
| 425 | 4: 'OFPET_BAD_MATCH', |
| 426 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 427 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 428 | 7: 'OFPET_PORT_MOD_FAILED', |
| 429 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 430 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 431 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 432 | 11: 'OFPET_ROLE_REQUEST_FAILED', |
| 433 | 12: 'OFPET_METER_MOD_FAILED', |
| 434 | 13: 'OFPET_TABLE_FEATURES_FAILED', |
| 435 | 14: 'OFPET_BAD_PROPERTY', |
| 436 | 15: 'OFPET_ASYNC_CONFIG_FAILED', |
| 437 | 16: 'OFPET_FLOW_MONITOR_FAILED', |
| 438 | 17: 'OFPET_BUNDLE_FAILED', |
| 439 | 65535: 'OFPET_EXPERIMENTER', |
| 440 | } |
| 441 | |
| 442 | # Identifiers from group ofp_flow_mod_command |
| 443 | OFPFC_ADD = 0 |
| 444 | OFPFC_MODIFY = 1 |
| 445 | OFPFC_MODIFY_STRICT = 2 |
| 446 | OFPFC_DELETE = 3 |
| 447 | OFPFC_DELETE_STRICT = 4 |
| 448 | |
| 449 | ofp_flow_mod_command_map = { |
| 450 | 0: 'OFPFC_ADD', |
| 451 | 1: 'OFPFC_MODIFY', |
| 452 | 2: 'OFPFC_MODIFY_STRICT', |
| 453 | 3: 'OFPFC_DELETE', |
| 454 | 4: 'OFPFC_DELETE_STRICT', |
| 455 | } |
| 456 | |
| 457 | # Identifiers from group ofp_flow_mod_failed_code |
| 458 | OFPFMFC_UNKNOWN = 0 |
| 459 | OFPFMFC_TABLE_FULL = 1 |
| 460 | OFPFMFC_BAD_TABLE_ID = 2 |
| 461 | OFPFMFC_OVERLAP = 3 |
| 462 | OFPFMFC_EPERM = 4 |
| 463 | OFPFMFC_BAD_TIMEOUT = 5 |
| 464 | OFPFMFC_BAD_COMMAND = 6 |
| 465 | OFPFMFC_BAD_FLAGS = 7 |
| 466 | OFPFMFC_CANT_SYNC = 8 |
| 467 | OFPFMFC_BAD_PRIORITY = 9 |
| 468 | |
| 469 | ofp_flow_mod_failed_code_map = { |
| 470 | 0: 'OFPFMFC_UNKNOWN', |
| 471 | 1: 'OFPFMFC_TABLE_FULL', |
| 472 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 473 | 3: 'OFPFMFC_OVERLAP', |
| 474 | 4: 'OFPFMFC_EPERM', |
| 475 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 476 | 6: 'OFPFMFC_BAD_COMMAND', |
| 477 | 7: 'OFPFMFC_BAD_FLAGS', |
| 478 | 8: 'OFPFMFC_CANT_SYNC', |
| 479 | 9: 'OFPFMFC_BAD_PRIORITY', |
| 480 | } |
| 481 | |
| 482 | # Identifiers from group ofp_flow_mod_flags |
| 483 | OFPFF_SEND_FLOW_REM = 1 |
| 484 | OFPFF_CHECK_OVERLAP = 2 |
| 485 | OFPFF_RESET_COUNTS = 4 |
| 486 | OFPFF_NO_PKT_COUNTS = 8 |
| 487 | OFPFF_NO_BYT_COUNTS = 16 |
| 488 | OFPFF_BSN_SEND_IDLE = 128 |
| 489 | |
| 490 | ofp_flow_mod_flags_map = { |
| 491 | 1: 'OFPFF_SEND_FLOW_REM', |
| 492 | 2: 'OFPFF_CHECK_OVERLAP', |
| 493 | 4: 'OFPFF_RESET_COUNTS', |
| 494 | 8: 'OFPFF_NO_PKT_COUNTS', |
| 495 | 16: 'OFPFF_NO_BYT_COUNTS', |
| 496 | 128: 'OFPFF_BSN_SEND_IDLE', |
| 497 | } |
| 498 | |
| 499 | # Identifiers from group ofp_flow_monitor_failed_code |
| 500 | OFPMOFC_UNKNOWN = 0 |
| 501 | OFPMOFC_MONITOR_EXISTS = 1 |
| 502 | OFPMOFC_INVALID_MONITOR = 2 |
| 503 | OFPMOFC_UNKNOWN_MONITOR = 3 |
| 504 | OFPMOFC_BAD_COMMAND = 4 |
| 505 | OFPMOFC_BAD_FLAGS = 5 |
| 506 | OFPMOFC_BAD_TABLE_ID = 6 |
| 507 | OFPMOFC_BAD_OUT = 7 |
| 508 | |
| 509 | ofp_flow_monitor_failed_code_map = { |
| 510 | 0: 'OFPMOFC_UNKNOWN', |
| 511 | 1: 'OFPMOFC_MONITOR_EXISTS', |
| 512 | 2: 'OFPMOFC_INVALID_MONITOR', |
| 513 | 3: 'OFPMOFC_UNKNOWN_MONITOR', |
| 514 | 4: 'OFPMOFC_BAD_COMMAND', |
| 515 | 5: 'OFPMOFC_BAD_FLAGS', |
| 516 | 6: 'OFPMOFC_BAD_TABLE_ID', |
| 517 | 7: 'OFPMOFC_BAD_OUT', |
| 518 | } |
| 519 | |
| 520 | # Identifiers from group ofp_flow_removed_reason |
| 521 | OFPRR_IDLE_TIMEOUT = 0 |
| 522 | OFPRR_HARD_TIMEOUT = 1 |
| 523 | OFPRR_DELETE = 2 |
| 524 | OFPRR_GROUP_DELETE = 3 |
| 525 | OFPRR_METER_DELETE = 4 |
| 526 | OFPRR_EVICTION = 5 |
| 527 | |
| 528 | ofp_flow_removed_reason_map = { |
| 529 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 530 | 1: 'OFPRR_HARD_TIMEOUT', |
| 531 | 2: 'OFPRR_DELETE', |
| 532 | 3: 'OFPRR_GROUP_DELETE', |
| 533 | 4: 'OFPRR_METER_DELETE', |
| 534 | 5: 'OFPRR_EVICTION', |
| 535 | } |
| 536 | |
| 537 | # Identifiers from group ofp_group |
| 538 | OFPG_MAX = 4294967040 |
| 539 | OFPG_ALL = 4294967292 |
| 540 | OFPG_ANY = 4294967295 |
| 541 | |
| 542 | ofp_group_map = { |
| 543 | 4294967040: 'OFPG_MAX', |
| 544 | 4294967292: 'OFPG_ALL', |
| 545 | 4294967295: 'OFPG_ANY', |
| 546 | } |
| 547 | |
| 548 | # Identifiers from group ofp_group_capabilities |
| 549 | OFPGFC_SELECT_WEIGHT = 1 |
| 550 | OFPGFC_SELECT_LIVENESS = 2 |
| 551 | OFPGFC_CHAINING = 4 |
| 552 | OFPGFC_CHAINING_CHECKS = 8 |
| 553 | |
| 554 | ofp_group_capabilities_map = { |
| 555 | 1: 'OFPGFC_SELECT_WEIGHT', |
| 556 | 2: 'OFPGFC_SELECT_LIVENESS', |
| 557 | 4: 'OFPGFC_CHAINING', |
| 558 | 8: 'OFPGFC_CHAINING_CHECKS', |
| 559 | } |
| 560 | |
| 561 | # Identifiers from group ofp_group_mod_command |
| 562 | OFPGC_ADD = 0 |
| 563 | OFPGC_MODIFY = 1 |
| 564 | OFPGC_DELETE = 2 |
| 565 | |
| 566 | ofp_group_mod_command_map = { |
| 567 | 0: 'OFPGC_ADD', |
| 568 | 1: 'OFPGC_MODIFY', |
| 569 | 2: 'OFPGC_DELETE', |
| 570 | } |
| 571 | |
| 572 | # Identifiers from group ofp_group_mod_failed_code |
| 573 | OFPGMFC_GROUP_EXISTS = 0 |
| 574 | OFPGMFC_INVALID_GROUP = 1 |
| 575 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 576 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 577 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 578 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 579 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 580 | OFPGMFC_LOOP = 7 |
| 581 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 582 | OFPGMFC_CHAINED_GROUP = 9 |
| 583 | OFPGMFC_BAD_TYPE = 10 |
| 584 | OFPGMFC_BAD_COMMAND = 11 |
| 585 | OFPGMFC_BAD_BUCKET = 12 |
| 586 | OFPGMFC_BAD_WATCH = 13 |
| 587 | OFPGMFC_EPERM = 14 |
| 588 | |
| 589 | ofp_group_mod_failed_code_map = { |
| 590 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 591 | 1: 'OFPGMFC_INVALID_GROUP', |
| 592 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 593 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 594 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 595 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 596 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 597 | 7: 'OFPGMFC_LOOP', |
| 598 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 599 | 9: 'OFPGMFC_CHAINED_GROUP', |
| 600 | 10: 'OFPGMFC_BAD_TYPE', |
| 601 | 11: 'OFPGMFC_BAD_COMMAND', |
| 602 | 12: 'OFPGMFC_BAD_BUCKET', |
| 603 | 13: 'OFPGMFC_BAD_WATCH', |
| 604 | 14: 'OFPGMFC_EPERM', |
| 605 | } |
| 606 | |
| 607 | # Identifiers from group ofp_group_type |
| 608 | OFPGT_ALL = 0 |
| 609 | OFPGT_SELECT = 1 |
| 610 | OFPGT_INDIRECT = 2 |
| 611 | OFPGT_FF = 3 |
| 612 | |
| 613 | ofp_group_type_map = { |
| 614 | 0: 'OFPGT_ALL', |
| 615 | 1: 'OFPGT_SELECT', |
| 616 | 2: 'OFPGT_INDIRECT', |
| 617 | 3: 'OFPGT_FF', |
| 618 | } |
| 619 | |
| 620 | # Identifiers from group ofp_hello_elem_type |
| 621 | OFPHET_VERSIONBITMAP = 1 |
| 622 | |
| 623 | ofp_hello_elem_type_map = { |
| 624 | 1: 'OFPHET_VERSIONBITMAP', |
| 625 | } |
| 626 | |
| 627 | # Identifiers from group ofp_hello_failed_code |
| 628 | OFPHFC_INCOMPATIBLE = 0 |
| 629 | OFPHFC_EPERM = 1 |
| 630 | |
| 631 | ofp_hello_failed_code_map = { |
| 632 | 0: 'OFPHFC_INCOMPATIBLE', |
| 633 | 1: 'OFPHFC_EPERM', |
| 634 | } |
| 635 | |
| 636 | # Identifiers from group ofp_instruction_type |
| 637 | OFPIT_GOTO_TABLE = 1 |
| 638 | OFPIT_WRITE_METADATA = 2 |
| 639 | OFPIT_WRITE_ACTIONS = 3 |
| 640 | OFPIT_APPLY_ACTIONS = 4 |
| 641 | OFPIT_CLEAR_ACTIONS = 5 |
| 642 | OFPIT_METER = 6 |
| 643 | OFPIT_EXPERIMENTER = 65535 |
| 644 | |
| 645 | ofp_instruction_type_map = { |
| 646 | 1: 'OFPIT_GOTO_TABLE', |
| 647 | 2: 'OFPIT_WRITE_METADATA', |
| 648 | 3: 'OFPIT_WRITE_ACTIONS', |
| 649 | 4: 'OFPIT_APPLY_ACTIONS', |
| 650 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 651 | 6: 'OFPIT_METER', |
| 652 | 65535: 'OFPIT_EXPERIMENTER', |
| 653 | } |
| 654 | |
| 655 | # Identifiers from group ofp_ipv6exthdr_flags |
| 656 | OFPIEH_NONEXT = 1 |
| 657 | OFPIEH_ESP = 2 |
| 658 | OFPIEH_AUTH = 4 |
| 659 | OFPIEH_DEST = 8 |
| 660 | OFPIEH_FRAG = 16 |
| 661 | OFPIEH_ROUTER = 32 |
| 662 | OFPIEH_HOP = 64 |
| 663 | OFPIEH_UNREP = 128 |
| 664 | OFPIEH_UNSEQ = 256 |
| 665 | |
| 666 | ofp_ipv6exthdr_flags_map = { |
| 667 | 1: 'OFPIEH_NONEXT', |
| 668 | 2: 'OFPIEH_ESP', |
| 669 | 4: 'OFPIEH_AUTH', |
| 670 | 8: 'OFPIEH_DEST', |
| 671 | 16: 'OFPIEH_FRAG', |
| 672 | 32: 'OFPIEH_ROUTER', |
| 673 | 64: 'OFPIEH_HOP', |
| 674 | 128: 'OFPIEH_UNREP', |
| 675 | 256: 'OFPIEH_UNSEQ', |
| 676 | } |
| 677 | |
| 678 | # Identifiers from group ofp_match_type |
| 679 | OFPMT_STANDARD = 0 |
| 680 | OFPMT_OXM = 1 |
| 681 | |
| 682 | ofp_match_type_map = { |
| 683 | 0: 'OFPMT_STANDARD', |
| 684 | 1: 'OFPMT_OXM', |
| 685 | } |
| 686 | |
| 687 | # Identifiers from group ofp_meter |
| 688 | OFPM_MAX = 4294901760 |
| 689 | OFPM_SLOWPATH = 4294967293 |
| 690 | OFPM_CONTROLLER = 4294967294 |
| 691 | OFPM_ALL = 4294967295 |
| 692 | |
| 693 | ofp_meter_map = { |
| 694 | 4294901760: 'OFPM_MAX', |
| 695 | 4294967293: 'OFPM_SLOWPATH', |
| 696 | 4294967294: 'OFPM_CONTROLLER', |
| 697 | 4294967295: 'OFPM_ALL', |
| 698 | } |
| 699 | |
| 700 | # Identifiers from group ofp_meter_band_type |
| 701 | OFPMBT_DROP = 1 |
| 702 | OFPMBT_DSCP_REMARK = 2 |
| 703 | OFPMBT_EXPERIMENTER = 65535 |
| 704 | |
| 705 | ofp_meter_band_type_map = { |
| 706 | 1: 'OFPMBT_DROP', |
| 707 | 2: 'OFPMBT_DSCP_REMARK', |
| 708 | 65535: 'OFPMBT_EXPERIMENTER', |
| 709 | } |
| 710 | |
| 711 | # Identifiers from group ofp_meter_flags |
| 712 | OFPMF_KBPS = 1 |
| 713 | OFPMF_PKTPS = 2 |
| 714 | OFPMF_BURST = 4 |
| 715 | OFPMF_STATS = 8 |
| 716 | |
| 717 | ofp_meter_flags_map = { |
| 718 | 1: 'OFPMF_KBPS', |
| 719 | 2: 'OFPMF_PKTPS', |
| 720 | 4: 'OFPMF_BURST', |
| 721 | 8: 'OFPMF_STATS', |
| 722 | } |
| 723 | |
| 724 | # Identifiers from group ofp_meter_mod_command |
| 725 | OFPMC_ADD = 0 |
| 726 | OFPMC_MODIFY = 1 |
| 727 | OFPMC_DELETE = 2 |
| 728 | |
| 729 | ofp_meter_mod_command_map = { |
| 730 | 0: 'OFPMC_ADD', |
| 731 | 1: 'OFPMC_MODIFY', |
| 732 | 2: 'OFPMC_DELETE', |
| 733 | } |
| 734 | |
| 735 | # Identifiers from group ofp_meter_mod_failed_code |
| 736 | OFPMMFC_UNKNOWN = 0 |
| 737 | OFPMMFC_METER_EXISTS = 1 |
| 738 | OFPMMFC_INVALID_METER = 2 |
| 739 | OFPMMFC_UNKNOWN_METER = 3 |
| 740 | OFPMMFC_BAD_COMMAND = 4 |
| 741 | OFPMMFC_BAD_FLAGS = 5 |
| 742 | OFPMMFC_BAD_RATE = 6 |
| 743 | OFPMMFC_BAD_BURST = 7 |
| 744 | OFPMMFC_BAD_BAND = 8 |
| 745 | OFPMMFC_BAD_BAND_VALUE = 9 |
| 746 | OFPMMFC_OUT_OF_METERS = 10 |
| 747 | OFPMMFC_OUT_OF_BANDS = 11 |
| 748 | |
| 749 | ofp_meter_mod_failed_code_map = { |
| 750 | 0: 'OFPMMFC_UNKNOWN', |
| 751 | 1: 'OFPMMFC_METER_EXISTS', |
| 752 | 2: 'OFPMMFC_INVALID_METER', |
| 753 | 3: 'OFPMMFC_UNKNOWN_METER', |
| 754 | 4: 'OFPMMFC_BAD_COMMAND', |
| 755 | 5: 'OFPMMFC_BAD_FLAGS', |
| 756 | 6: 'OFPMMFC_BAD_RATE', |
| 757 | 7: 'OFPMMFC_BAD_BURST', |
| 758 | 8: 'OFPMMFC_BAD_BAND', |
| 759 | 9: 'OFPMMFC_BAD_BAND_VALUE', |
| 760 | 10: 'OFPMMFC_OUT_OF_METERS', |
| 761 | 11: 'OFPMMFC_OUT_OF_BANDS', |
| 762 | } |
| 763 | |
| 764 | # Identifiers from group ofp_optical_port_features |
| 765 | OFPOPF_RX_TUNE = 1 |
| 766 | OFPOPF_TX_TUNE = 2 |
| 767 | OFPOPF_TX_PWR = 4 |
| 768 | OFPOPF_USE_FREQ = 8 |
| 769 | |
| 770 | ofp_optical_port_features_map = { |
| 771 | 1: 'OFPOPF_RX_TUNE', |
| 772 | 2: 'OFPOPF_TX_TUNE', |
| 773 | 4: 'OFPOPF_TX_PWR', |
| 774 | 8: 'OFPOPF_USE_FREQ', |
| 775 | } |
| 776 | |
| 777 | # Identifiers from group ofp_oxm_class |
| 778 | OFPXMC_NXM_0 = 0 |
| 779 | OFPXMC_NXM_1 = 1 |
| 780 | OFPXMC_OPENFLOW_BASIC = 32768 |
| 781 | OFPXMC_EXPERIMENTER = 65535 |
| 782 | |
| 783 | ofp_oxm_class_map = { |
| 784 | 0: 'OFPXMC_NXM_0', |
| 785 | 1: 'OFPXMC_NXM_1', |
| 786 | 32768: 'OFPXMC_OPENFLOW_BASIC', |
| 787 | 65535: 'OFPXMC_EXPERIMENTER', |
| 788 | } |
| 789 | |
| 790 | # Identifiers from group ofp_packet_in_reason |
| 791 | OFPR_NO_MATCH = 0 |
| 792 | OFPR_ACTION = 1 |
| 793 | OFPR_INVALID_TTL = 2 |
| 794 | OFPR_ACTION_SET = 3 |
| 795 | OFPR_GROUP = 4 |
| 796 | OFPR_PACKET_OUT = 5 |
| 797 | OFPR_BSN_NEW_HOST = 128 |
| 798 | OFPR_BSN_STATION_MOVE = 129 |
| 799 | OFPR_BSN_BAD_VLAN = 130 |
| 800 | OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131 |
| 801 | OFPR_BSN_NO_ROUTE = 132 |
| 802 | OFPR_BSN_ICMP_ECHO_REQUEST = 133 |
| 803 | OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134 |
| 804 | OFPR_BSN_DEST_HOST_UNREACHABLE = 135 |
| 805 | OFPR_BSN_DEST_PORT_UNREACHABLE = 136 |
| 806 | OFPR_BSN_FRAGMENTATION_REQUIRED = 137 |
| 807 | OFPR_BSN_ARP = 139 |
| 808 | OFPR_BSN_DHCP = 140 |
| 809 | OFPR_BSN_DEBUG = 141 |
| 810 | OFPR_BSN_PACKET_OF_DEATH = 142 |
| 811 | |
| 812 | ofp_packet_in_reason_map = { |
| 813 | 0: 'OFPR_NO_MATCH', |
| 814 | 1: 'OFPR_ACTION', |
| 815 | 2: 'OFPR_INVALID_TTL', |
| 816 | 3: 'OFPR_ACTION_SET', |
| 817 | 4: 'OFPR_GROUP', |
| 818 | 5: 'OFPR_PACKET_OUT', |
| 819 | 128: 'OFPR_BSN_NEW_HOST', |
| 820 | 129: 'OFPR_BSN_STATION_MOVE', |
| 821 | 130: 'OFPR_BSN_BAD_VLAN', |
| 822 | 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE', |
| 823 | 132: 'OFPR_BSN_NO_ROUTE', |
| 824 | 133: 'OFPR_BSN_ICMP_ECHO_REQUEST', |
| 825 | 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE', |
| 826 | 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE', |
| 827 | 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE', |
| 828 | 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED', |
| 829 | 139: 'OFPR_BSN_ARP', |
| 830 | 140: 'OFPR_BSN_DHCP', |
| 831 | 141: 'OFPR_BSN_DEBUG', |
| 832 | 142: 'OFPR_BSN_PACKET_OF_DEATH', |
| 833 | } |
| 834 | |
| 835 | # Identifiers from group ofp_port |
| 836 | OFPP_MAX = 4294967040 |
| 837 | OFPP_IN_PORT = 4294967288 |
| 838 | OFPP_TABLE = 4294967289 |
| 839 | OFPP_NORMAL = 4294967290 |
| 840 | OFPP_FLOOD = 4294967291 |
| 841 | OFPP_ALL = 4294967292 |
| 842 | OFPP_CONTROLLER = 4294967293 |
| 843 | OFPP_LOCAL = 4294967294 |
| 844 | OFPP_ANY = 4294967295 |
| 845 | |
| 846 | ofp_port_map = { |
| 847 | 4294967040: 'OFPP_MAX', |
| 848 | 4294967288: 'OFPP_IN_PORT', |
| 849 | 4294967289: 'OFPP_TABLE', |
| 850 | 4294967290: 'OFPP_NORMAL', |
| 851 | 4294967291: 'OFPP_FLOOD', |
| 852 | 4294967292: 'OFPP_ALL', |
| 853 | 4294967293: 'OFPP_CONTROLLER', |
| 854 | 4294967294: 'OFPP_LOCAL', |
| 855 | 4294967295: 'OFPP_ANY', |
| 856 | } |
| 857 | |
| 858 | # Identifiers from group ofp_port_config |
| 859 | OFPPC_PORT_DOWN = 1 |
| 860 | OFPPC_NO_RECV = 4 |
| 861 | OFPPC_NO_FWD = 32 |
| 862 | OFPPC_NO_PACKET_IN = 64 |
| 863 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
| 864 | |
| 865 | ofp_port_config_map = { |
| 866 | 1: 'OFPPC_PORT_DOWN', |
| 867 | 4: 'OFPPC_NO_RECV', |
| 868 | 32: 'OFPPC_NO_FWD', |
| 869 | 64: 'OFPPC_NO_PACKET_IN', |
| 870 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
| 871 | } |
| 872 | |
| 873 | # Identifiers from group ofp_port_features |
| 874 | OFPPF_10MB_HD = 1 |
| 875 | OFPPF_10MB_FD = 2 |
| 876 | OFPPF_100MB_HD = 4 |
| 877 | OFPPF_100MB_FD = 8 |
| 878 | OFPPF_1GB_HD = 16 |
| 879 | OFPPF_1GB_FD = 32 |
| 880 | OFPPF_10GB_FD = 64 |
| 881 | OFPPF_40GB_FD = 128 |
| 882 | OFPPF_100GB_FD = 256 |
| 883 | OFPPF_1TB_FD = 512 |
| 884 | OFPPF_OTHER = 1024 |
| 885 | OFPPF_COPPER = 2048 |
| 886 | OFPPF_FIBER = 4096 |
| 887 | OFPPF_AUTONEG = 8192 |
| 888 | OFPPF_PAUSE = 16384 |
| 889 | OFPPF_PAUSE_ASYM = 32768 |
| 890 | |
| 891 | ofp_port_features_map = { |
| 892 | 1: 'OFPPF_10MB_HD', |
| 893 | 2: 'OFPPF_10MB_FD', |
| 894 | 4: 'OFPPF_100MB_HD', |
| 895 | 8: 'OFPPF_100MB_FD', |
| 896 | 16: 'OFPPF_1GB_HD', |
| 897 | 32: 'OFPPF_1GB_FD', |
| 898 | 64: 'OFPPF_10GB_FD', |
| 899 | 128: 'OFPPF_40GB_FD', |
| 900 | 256: 'OFPPF_100GB_FD', |
| 901 | 512: 'OFPPF_1TB_FD', |
| 902 | 1024: 'OFPPF_OTHER', |
| 903 | 2048: 'OFPPF_COPPER', |
| 904 | 4096: 'OFPPF_FIBER', |
| 905 | 8192: 'OFPPF_AUTONEG', |
| 906 | 16384: 'OFPPF_PAUSE', |
| 907 | 32768: 'OFPPF_PAUSE_ASYM', |
| 908 | } |
| 909 | |
| 910 | # Identifiers from group ofp_port_mod_failed_code |
| 911 | OFPPMFC_BAD_PORT = 0 |
| 912 | OFPPMFC_BAD_HW_ADDR = 1 |
| 913 | OFPPMFC_BAD_CONFIG = 2 |
| 914 | OFPPMFC_BAD_ADVERTISE = 3 |
| 915 | OFPPMFC_EPERM = 4 |
| 916 | |
| 917 | ofp_port_mod_failed_code_map = { |
| 918 | 0: 'OFPPMFC_BAD_PORT', |
| 919 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 920 | 2: 'OFPPMFC_BAD_CONFIG', |
| 921 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 922 | 4: 'OFPPMFC_EPERM', |
| 923 | } |
| 924 | |
| 925 | # Identifiers from group ofp_port_reason |
| 926 | OFPPR_ADD = 0 |
| 927 | OFPPR_DELETE = 1 |
| 928 | OFPPR_MODIFY = 2 |
| 929 | |
| 930 | ofp_port_reason_map = { |
| 931 | 0: 'OFPPR_ADD', |
| 932 | 1: 'OFPPR_DELETE', |
| 933 | 2: 'OFPPR_MODIFY', |
| 934 | } |
| 935 | |
| 936 | # Identifiers from group ofp_port_state |
| 937 | OFPPS_LINK_DOWN = 1 |
| 938 | OFPPS_BLOCKED = 2 |
| 939 | OFPPS_LIVE = 4 |
| 940 | |
| 941 | ofp_port_state_map = { |
| 942 | 1: 'OFPPS_LINK_DOWN', |
| 943 | 2: 'OFPPS_BLOCKED', |
| 944 | 4: 'OFPPS_LIVE', |
| 945 | } |
| 946 | |
| 947 | # Identifiers from group ofp_port_stats_optical_flags |
| 948 | OFPOSF_RX_TUNE = 1 |
| 949 | OFPOSF_TX_TUNE = 2 |
| 950 | OFPOSF_TX_PWR = 4 |
| 951 | OFPOSF_RX_PWR = 16 |
| 952 | OFPOSF_TX_BIAS = 32 |
| 953 | OFPOSF_TX_TEMP = 64 |
| 954 | |
| 955 | ofp_port_stats_optical_flags_map = { |
| 956 | 1: 'OFPOSF_RX_TUNE', |
| 957 | 2: 'OFPOSF_TX_TUNE', |
| 958 | 4: 'OFPOSF_TX_PWR', |
| 959 | 16: 'OFPOSF_RX_PWR', |
| 960 | 32: 'OFPOSF_TX_BIAS', |
| 961 | 64: 'OFPOSF_TX_TEMP', |
| 962 | } |
| 963 | |
| 964 | # Identifiers from group ofp_port_stats_prop_type |
| 965 | OFPPSPT_ETHERNET = 0 |
| 966 | OFPPSPT_OPTICAL = 1 |
| 967 | OFPPSPT_EXPERIMENTER = 65535 |
| 968 | |
| 969 | ofp_port_stats_prop_type_map = { |
| 970 | 0: 'OFPPSPT_ETHERNET', |
| 971 | 1: 'OFPPSPT_OPTICAL', |
| 972 | 65535: 'OFPPSPT_EXPERIMENTER', |
| 973 | } |
| 974 | |
| 975 | # Identifiers from group ofp_queue_op_failed_code |
| 976 | OFPQOFC_BAD_PORT = 0 |
| 977 | OFPQOFC_BAD_QUEUE = 1 |
| 978 | OFPQOFC_EPERM = 2 |
| 979 | |
| 980 | ofp_queue_op_failed_code_map = { |
| 981 | 0: 'OFPQOFC_BAD_PORT', |
| 982 | 1: 'OFPQOFC_BAD_QUEUE', |
| 983 | 2: 'OFPQOFC_EPERM', |
| 984 | } |
| 985 | |
| 986 | # Identifiers from group ofp_requestforward_reason |
| 987 | OFPRFR_GROUP_MOD = 0 |
| 988 | OFPRFR_METER_MOD = 1 |
| 989 | |
| 990 | ofp_requestforward_reason_map = { |
| 991 | 0: 'OFPRFR_GROUP_MOD', |
| 992 | 1: 'OFPRFR_METER_MOD', |
| 993 | } |
| 994 | |
| 995 | # Identifiers from group ofp_role_request_failed_code |
| 996 | OFPRRFC_STALE = 0 |
| 997 | OFPRRFC_UNSUP = 1 |
| 998 | OFPRRFC_BAD_ROLE = 2 |
| 999 | |
| 1000 | ofp_role_request_failed_code_map = { |
| 1001 | 0: 'OFPRRFC_STALE', |
| 1002 | 1: 'OFPRRFC_UNSUP', |
| 1003 | 2: 'OFPRRFC_BAD_ROLE', |
| 1004 | } |
| 1005 | |
| 1006 | # Identifiers from group ofp_stats_reply_flags |
| 1007 | OFPSF_REPLY_MORE = 1 |
| 1008 | |
| 1009 | ofp_stats_reply_flags_map = { |
| 1010 | 1: 'OFPSF_REPLY_MORE', |
| 1011 | } |
| 1012 | |
| 1013 | # Identifiers from group ofp_stats_request_flags |
| 1014 | OFPSF_REQ_MORE = 1 |
| 1015 | |
| 1016 | ofp_stats_request_flags_map = { |
| 1017 | 1: 'OFPSF_REQ_MORE', |
| 1018 | } |
| 1019 | |
| 1020 | # Identifiers from group ofp_stats_type |
| 1021 | OFPST_DESC = 0 |
| 1022 | OFPST_FLOW = 1 |
| 1023 | OFPST_AGGREGATE = 2 |
| 1024 | OFPST_TABLE = 3 |
| 1025 | OFPST_PORT = 4 |
| 1026 | OFPST_QUEUE = 5 |
| 1027 | OFPST_GROUP = 6 |
| 1028 | OFPST_GROUP_DESC = 7 |
| 1029 | OFPST_GROUP_FEATURES = 8 |
| 1030 | OFPST_METER = 9 |
| 1031 | OFPST_METER_CONFIG = 10 |
| 1032 | OFPST_METER_FEATURES = 11 |
| 1033 | OFPST_TABLE_FEATURES = 12 |
| 1034 | OFPST_PORT_DESC = 13 |
| 1035 | OFPMP_TABLE_DESC = 14 |
| 1036 | OFPMP_QUEUE_DESC = 15 |
| 1037 | OFPMP_FLOW_MONITOR = 16 |
| 1038 | OFPST_EXPERIMENTER = 65535 |
| 1039 | |
| 1040 | ofp_stats_type_map = { |
| 1041 | 0: 'OFPST_DESC', |
| 1042 | 1: 'OFPST_FLOW', |
| 1043 | 2: 'OFPST_AGGREGATE', |
| 1044 | 3: 'OFPST_TABLE', |
| 1045 | 4: 'OFPST_PORT', |
| 1046 | 5: 'OFPST_QUEUE', |
| 1047 | 6: 'OFPST_GROUP', |
| 1048 | 7: 'OFPST_GROUP_DESC', |
| 1049 | 8: 'OFPST_GROUP_FEATURES', |
| 1050 | 9: 'OFPST_METER', |
| 1051 | 10: 'OFPST_METER_CONFIG', |
| 1052 | 11: 'OFPST_METER_FEATURES', |
| 1053 | 12: 'OFPST_TABLE_FEATURES', |
| 1054 | 13: 'OFPST_PORT_DESC', |
| 1055 | 14: 'OFPMP_TABLE_DESC', |
| 1056 | 15: 'OFPMP_QUEUE_DESC', |
| 1057 | 16: 'OFPMP_FLOW_MONITOR', |
| 1058 | 65535: 'OFPST_EXPERIMENTER', |
| 1059 | } |
| 1060 | |
| 1061 | # Identifiers from group ofp_switch_config_failed_code |
| 1062 | OFPSCFC_BAD_FLAGS = 0 |
| 1063 | OFPSCFC_BAD_LEN = 1 |
| 1064 | OFPSCFC_EPERM = 2 |
| 1065 | |
| 1066 | ofp_switch_config_failed_code_map = { |
| 1067 | 0: 'OFPSCFC_BAD_FLAGS', |
| 1068 | 1: 'OFPSCFC_BAD_LEN', |
| 1069 | 2: 'OFPSCFC_EPERM', |
| 1070 | } |
| 1071 | |
| 1072 | # Identifiers from group ofp_table |
| 1073 | OFPTT_MAX = 254 |
| 1074 | OFPTT_ALL = 255 |
| 1075 | |
| 1076 | ofp_table_map = { |
| 1077 | 254: 'OFPTT_MAX', |
| 1078 | 255: 'OFPTT_ALL', |
| 1079 | } |
| 1080 | |
| 1081 | # Identifiers from group ofp_table_config |
| 1082 | OFPTC_DEPRECATED_MASK = 3 |
| 1083 | OFPTC_EVICTION = 4 |
| 1084 | OFPTC_VACANCY_EVENTS = 8 |
| 1085 | |
| 1086 | ofp_table_config_map = { |
| 1087 | 3: 'OFPTC_DEPRECATED_MASK', |
| 1088 | 4: 'OFPTC_EVICTION', |
| 1089 | 8: 'OFPTC_VACANCY_EVENTS', |
| 1090 | } |
| 1091 | |
| 1092 | # Identifiers from group ofp_table_feature_prop_type |
| 1093 | OFPTFPT_INSTRUCTIONS = 0 |
| 1094 | OFPTFPT_INSTRUCTIONS_MISS = 1 |
| 1095 | OFPTFPT_NEXT_TABLES = 2 |
| 1096 | OFPTFPT_NEXT_TABLES_MISS = 3 |
| 1097 | OFPTFPT_WRITE_ACTIONS = 4 |
| 1098 | OFPTFPT_WRITE_ACTIONS_MISS = 5 |
| 1099 | OFPTFPT_APPLY_ACTIONS = 6 |
| 1100 | OFPTFPT_APPLY_ACTIONS_MISS = 7 |
| 1101 | OFPTFPT_MATCH = 8 |
| 1102 | OFPTFPT_WILDCARDS = 10 |
| 1103 | OFPTFPT_WRITE_SETFIELD = 12 |
| 1104 | OFPTFPT_WRITE_SETFIELD_MISS = 13 |
| 1105 | OFPTFPT_APPLY_SETFIELD = 14 |
| 1106 | OFPTFPT_APPLY_SETFIELD_MISS = 15 |
| 1107 | OFPTFPT_TABLE_SYNC_FROM = 16 |
| 1108 | OFPTFPT_EXPERIMENTER = 65534 |
| 1109 | OFPTFPT_EXPERIMENTER_MISS = 65535 |
| 1110 | |
| 1111 | ofp_table_feature_prop_type_map = { |
| 1112 | 0: 'OFPTFPT_INSTRUCTIONS', |
| 1113 | 1: 'OFPTFPT_INSTRUCTIONS_MISS', |
| 1114 | 2: 'OFPTFPT_NEXT_TABLES', |
| 1115 | 3: 'OFPTFPT_NEXT_TABLES_MISS', |
| 1116 | 4: 'OFPTFPT_WRITE_ACTIONS', |
| 1117 | 5: 'OFPTFPT_WRITE_ACTIONS_MISS', |
| 1118 | 6: 'OFPTFPT_APPLY_ACTIONS', |
| 1119 | 7: 'OFPTFPT_APPLY_ACTIONS_MISS', |
| 1120 | 8: 'OFPTFPT_MATCH', |
| 1121 | 10: 'OFPTFPT_WILDCARDS', |
| 1122 | 12: 'OFPTFPT_WRITE_SETFIELD', |
| 1123 | 13: 'OFPTFPT_WRITE_SETFIELD_MISS', |
| 1124 | 14: 'OFPTFPT_APPLY_SETFIELD', |
| 1125 | 15: 'OFPTFPT_APPLY_SETFIELD_MISS', |
| 1126 | 16: 'OFPTFPT_TABLE_SYNC_FROM', |
| 1127 | 65534: 'OFPTFPT_EXPERIMENTER', |
| 1128 | 65535: 'OFPTFPT_EXPERIMENTER_MISS', |
| 1129 | } |
| 1130 | |
| 1131 | # Identifiers from group ofp_table_features_failed_code |
| 1132 | OFPTFFC_BAD_TABLE = 0 |
| 1133 | OFPTFFC_BAD_METADATA = 1 |
| 1134 | OFPTFFC_EPERM = 5 |
| 1135 | |
| 1136 | ofp_table_features_failed_code_map = { |
| 1137 | 0: 'OFPTFFC_BAD_TABLE', |
| 1138 | 1: 'OFPTFFC_BAD_METADATA', |
| 1139 | 5: 'OFPTFFC_EPERM', |
| 1140 | } |
| 1141 | |
| 1142 | # Identifiers from group ofp_table_mod_failed_code |
| 1143 | OFPTMFC_BAD_TABLE = 0 |
| 1144 | OFPTMFC_BAD_CONFIG = 1 |
| 1145 | OFPTMFC_EPERM = 2 |
| 1146 | |
| 1147 | ofp_table_mod_failed_code_map = { |
| 1148 | 0: 'OFPTMFC_BAD_TABLE', |
| 1149 | 1: 'OFPTMFC_BAD_CONFIG', |
| 1150 | 2: 'OFPTMFC_EPERM', |
| 1151 | } |
| 1152 | |
| 1153 | # Identifiers from group ofp_table_mod_prop_eviction_flag |
| 1154 | OFPTMPEF_OTHER = 1 |
| 1155 | OFPTMPEF_IMPORTANCE = 2 |
| 1156 | OFPTMPEF_LIFETIME = 4 |
| 1157 | |
| 1158 | ofp_table_mod_prop_eviction_flag_map = { |
| 1159 | 1: 'OFPTMPEF_OTHER', |
| 1160 | 2: 'OFPTMPEF_IMPORTANCE', |
| 1161 | 4: 'OFPTMPEF_LIFETIME', |
| 1162 | } |
| 1163 | |
| 1164 | # Identifiers from group ofp_table_reason |
| 1165 | OFPTR_VACANCY_DOWN = 3 |
| 1166 | OFPTR_VACANCY_UP = 4 |
| 1167 | |
| 1168 | ofp_table_reason_map = { |
| 1169 | 3: 'OFPTR_VACANCY_DOWN', |
| 1170 | 4: 'OFPTR_VACANCY_UP', |
| 1171 | } |
| 1172 | |
| 1173 | # Identifiers from group ofp_type |
| 1174 | OFPT_HELLO = 0 |
| 1175 | OFPT_ERROR = 1 |
| 1176 | OFPT_ECHO_REQUEST = 2 |
| 1177 | OFPT_ECHO_REPLY = 3 |
| 1178 | OFPT_EXPERIMENTER = 4 |
| 1179 | OFPT_FEATURES_REQUEST = 5 |
| 1180 | OFPT_FEATURES_REPLY = 6 |
| 1181 | OFPT_GET_CONFIG_REQUEST = 7 |
| 1182 | OFPT_GET_CONFIG_REPLY = 8 |
| 1183 | OFPT_SET_CONFIG = 9 |
| 1184 | OFPT_PACKET_IN = 10 |
| 1185 | OFPT_FLOW_REMOVED = 11 |
| 1186 | OFPT_PORT_STATUS = 12 |
| 1187 | OFPT_PACKET_OUT = 13 |
| 1188 | OFPT_FLOW_MOD = 14 |
| 1189 | OFPT_GROUP_MOD = 15 |
| 1190 | OFPT_PORT_MOD = 16 |
| 1191 | OFPT_TABLE_MOD = 17 |
| 1192 | OFPT_STATS_REQUEST = 18 |
| 1193 | OFPT_STATS_REPLY = 19 |
| 1194 | OFPT_BARRIER_REQUEST = 20 |
| 1195 | OFPT_BARRIER_REPLY = 21 |
| 1196 | OFPT_ROLE_REQUEST = 24 |
| 1197 | OFPT_ROLE_REPLY = 25 |
| 1198 | OFPT_GET_ASYNC_REQUEST = 26 |
| 1199 | OFPT_GET_ASYNC_REPLY = 27 |
| 1200 | OFPT_SET_ASYNC = 28 |
| 1201 | OFPT_METER_MOD = 29 |
| 1202 | OFPT_ROLE_STATUS = 30 |
| 1203 | OFPT_TABLE_STATUS = 31 |
| 1204 | OFPT_REQUESTFORWARD = 32 |
| 1205 | OFPT_BUNDLE_CONTROL = 33 |
| 1206 | OFPT_BUNDLE_ADD_MESSAGE = 34 |
| 1207 | |
| 1208 | ofp_type_map = { |
| 1209 | 0: 'OFPT_HELLO', |
| 1210 | 1: 'OFPT_ERROR', |
| 1211 | 2: 'OFPT_ECHO_REQUEST', |
| 1212 | 3: 'OFPT_ECHO_REPLY', |
| 1213 | 4: 'OFPT_EXPERIMENTER', |
| 1214 | 5: 'OFPT_FEATURES_REQUEST', |
| 1215 | 6: 'OFPT_FEATURES_REPLY', |
| 1216 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 1217 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 1218 | 9: 'OFPT_SET_CONFIG', |
| 1219 | 10: 'OFPT_PACKET_IN', |
| 1220 | 11: 'OFPT_FLOW_REMOVED', |
| 1221 | 12: 'OFPT_PORT_STATUS', |
| 1222 | 13: 'OFPT_PACKET_OUT', |
| 1223 | 14: 'OFPT_FLOW_MOD', |
| 1224 | 15: 'OFPT_GROUP_MOD', |
| 1225 | 16: 'OFPT_PORT_MOD', |
| 1226 | 17: 'OFPT_TABLE_MOD', |
| 1227 | 18: 'OFPT_STATS_REQUEST', |
| 1228 | 19: 'OFPT_STATS_REPLY', |
| 1229 | 20: 'OFPT_BARRIER_REQUEST', |
| 1230 | 21: 'OFPT_BARRIER_REPLY', |
| 1231 | 24: 'OFPT_ROLE_REQUEST', |
| 1232 | 25: 'OFPT_ROLE_REPLY', |
| 1233 | 26: 'OFPT_GET_ASYNC_REQUEST', |
| 1234 | 27: 'OFPT_GET_ASYNC_REPLY', |
| 1235 | 28: 'OFPT_SET_ASYNC', |
| 1236 | 29: 'OFPT_METER_MOD', |
| 1237 | 30: 'OFPT_ROLE_STATUS', |
| 1238 | 31: 'OFPT_TABLE_STATUS', |
| 1239 | 32: 'OFPT_REQUESTFORWARD', |
| 1240 | 33: 'OFPT_BUNDLE_CONTROL', |
| 1241 | 34: 'OFPT_BUNDLE_ADD_MESSAGE', |
| 1242 | } |
| 1243 | |
| 1244 | # Identifiers from group ofp_vlan_id |
| 1245 | OFPVID_NONE = 0 |
| 1246 | OFPVID_PRESENT = 4096 |
| 1247 | |
| 1248 | ofp_vlan_id_map = { |
| 1249 | 0: 'OFPVID_NONE', |
| 1250 | 4096: 'OFPVID_PRESENT', |
| 1251 | } |
| 1252 | |