Nathan Knuth | 418fdc8 | 2016-09-16 22:51:15 -0700 | [diff] [blame] | 1 | # Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University |
| 2 | # Copyright (c) 2011, 2012 Open Networking Foundation |
| 3 | # Copyright (c) 2012, 2013 Big Switch Networks, Inc. |
| 4 | # See the file LICENSE.pyloxi which should have been included in the source distribution |
| 5 | |
| 6 | # Automatically generated by LOXI from template const.py |
| 7 | # Do not modify |
| 8 | |
| 9 | OFP_VERSION = 4 |
| 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_hash_packet_field |
| 29 | OFP_BSN_HASH_FIELD_DISABLE = 1 |
| 30 | OFP_BSN_HASH_FIELD_DST_MAC = 2 |
| 31 | OFP_BSN_HASH_FIELD_SRC_MAC = 4 |
| 32 | OFP_BSN_HASH_FIELD_ETH_TYPE = 8 |
| 33 | OFP_BSN_HASH_FIELD_VLAN_ID = 16 |
| 34 | OFP_BSN_HASH_FIELD_INNER_L2 = 32 |
| 35 | OFP_BSN_HASH_FIELD_INNER_L3 = 64 |
| 36 | OFP_BSN_HASH_FIELD_SRC_IP = 128 |
| 37 | OFP_BSN_HASH_FIELD_DST_IP = 256 |
| 38 | OFP_BSN_HASH_FIELD_IP_PROTO = 512 |
| 39 | OFP_BSN_HASH_FIELD_SRC_L4_PORT = 1024 |
| 40 | OFP_BSN_HASH_FIELD_DST_L4_PORT = 2048 |
| 41 | OFP_BSN_HASH_FIELD_MPLS_LABEL1 = 4096 |
| 42 | OFP_BSN_HASH_FIELD_MPLS_LABEL2 = 8192 |
| 43 | OFP_BSN_HASH_FIELD_MPLS_LABEL3 = 16384 |
| 44 | OFP_BSN_HASH_FIELD_MPLS_LABEL_HI_BITS = 32768 |
| 45 | OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_SRC_IP = 65536 |
| 46 | OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_DST_IP = 131072 |
| 47 | OFP_BSN_HASH_FIELD_SYMMETRIC = 262144 |
| 48 | |
| 49 | of_bsn_hash_packet_field_map = { |
| 50 | 1: 'OFP_BSN_HASH_FIELD_DISABLE', |
| 51 | 2: 'OFP_BSN_HASH_FIELD_DST_MAC', |
| 52 | 4: 'OFP_BSN_HASH_FIELD_SRC_MAC', |
| 53 | 8: 'OFP_BSN_HASH_FIELD_ETH_TYPE', |
| 54 | 16: 'OFP_BSN_HASH_FIELD_VLAN_ID', |
| 55 | 32: 'OFP_BSN_HASH_FIELD_INNER_L2', |
| 56 | 64: 'OFP_BSN_HASH_FIELD_INNER_L3', |
| 57 | 128: 'OFP_BSN_HASH_FIELD_SRC_IP', |
| 58 | 256: 'OFP_BSN_HASH_FIELD_DST_IP', |
| 59 | 512: 'OFP_BSN_HASH_FIELD_IP_PROTO', |
| 60 | 1024: 'OFP_BSN_HASH_FIELD_SRC_L4_PORT', |
| 61 | 2048: 'OFP_BSN_HASH_FIELD_DST_L4_PORT', |
| 62 | 4096: 'OFP_BSN_HASH_FIELD_MPLS_LABEL1', |
| 63 | 8192: 'OFP_BSN_HASH_FIELD_MPLS_LABEL2', |
| 64 | 16384: 'OFP_BSN_HASH_FIELD_MPLS_LABEL3', |
| 65 | 32768: 'OFP_BSN_HASH_FIELD_MPLS_LABEL_HI_BITS', |
| 66 | 65536: 'OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_SRC_IP', |
| 67 | 131072: 'OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_DST_IP', |
| 68 | 262144: 'OFP_BSN_HASH_FIELD_SYMMETRIC', |
| 69 | } |
| 70 | |
| 71 | # Identifiers from group of_bsn_hash_packet_type |
| 72 | OF_BSN_HASH_PACKET_L2 = 0 |
| 73 | OF_BSN_HASH_PACKET_L2GRE = 1 |
| 74 | OF_BSN_HASH_PACKET_IPV4 = 3 |
| 75 | OF_BSN_HASH_PACKET_IPV6 = 4 |
| 76 | OF_BSN_HASH_PACKET_GTP = 5 |
| 77 | OF_BSN_HASH_PACKET_MPLS = 6 |
| 78 | OF_BSN_HASH_PACKET_SYMMETRIC = 7 |
| 79 | |
| 80 | of_bsn_hash_packet_type_map = { |
| 81 | 0: 'OF_BSN_HASH_PACKET_L2', |
| 82 | 1: 'OF_BSN_HASH_PACKET_L2GRE', |
| 83 | 3: 'OF_BSN_HASH_PACKET_IPV4', |
| 84 | 4: 'OF_BSN_HASH_PACKET_IPV6', |
| 85 | 5: 'OF_BSN_HASH_PACKET_GTP', |
| 86 | 6: 'OF_BSN_HASH_PACKET_MPLS', |
| 87 | 7: 'OF_BSN_HASH_PACKET_SYMMETRIC', |
| 88 | } |
| 89 | |
| 90 | # Identifiers from group of_bsn_hash_type |
| 91 | OFP_BSN_HASH_TYPE_L2 = 0 |
| 92 | OFP_BSN_HASH_TYPE_L3 = 1 |
| 93 | OFP_BSN_HASH_TYPE_ENHANCED = 2 |
| 94 | |
| 95 | of_bsn_hash_type_map = { |
| 96 | 0: 'OFP_BSN_HASH_TYPE_L2', |
| 97 | 1: 'OFP_BSN_HASH_TYPE_L3', |
| 98 | 2: 'OFP_BSN_HASH_TYPE_ENHANCED', |
| 99 | } |
| 100 | |
| 101 | # Identifiers from group of_bsn_lacp_convergence_status |
| 102 | LACP_SUCCESS = 0 |
| 103 | LACP_TIMEDOUT = 1 |
| 104 | LACP_OUT_OF_SYNC = 2 |
| 105 | |
| 106 | of_bsn_lacp_convergence_status_map = { |
| 107 | 0: 'LACP_SUCCESS', |
| 108 | 1: 'LACP_TIMEDOUT', |
| 109 | 2: 'LACP_OUT_OF_SYNC', |
| 110 | } |
| 111 | |
| 112 | # Identifiers from group of_bsn_pdu_slot_num |
| 113 | BSN_PDU_SLOT_NUM_ANY = 255 |
| 114 | |
| 115 | of_bsn_pdu_slot_num_map = { |
| 116 | 255: 'BSN_PDU_SLOT_NUM_ANY', |
| 117 | } |
| 118 | |
| 119 | # Identifiers from group of_bsn_vlan_counter |
| 120 | OFP_BSN_VLAN_COUNTER_RX_BYTES = 0 |
| 121 | OFP_BSN_VLAN_COUNTER_RX_PACKETS = 1 |
| 122 | OFP_BSN_VLAN_COUNTER_TX_BYTES = 2 |
| 123 | OFP_BSN_VLAN_COUNTER_TX_PACKETS = 3 |
| 124 | |
| 125 | of_bsn_vlan_counter_map = { |
| 126 | 0: 'OFP_BSN_VLAN_COUNTER_RX_BYTES', |
| 127 | 1: 'OFP_BSN_VLAN_COUNTER_RX_PACKETS', |
| 128 | 2: 'OFP_BSN_VLAN_COUNTER_TX_BYTES', |
| 129 | 3: 'OFP_BSN_VLAN_COUNTER_TX_PACKETS', |
| 130 | } |
| 131 | |
| 132 | # Identifiers from group of_bsn_vrf_counter |
| 133 | OFP_BSN_VRF_COUNTER_BYTES = 0 |
| 134 | OFP_BSN_VRF_COUNTER_PACKETS = 1 |
| 135 | |
| 136 | of_bsn_vrf_counter_map = { |
| 137 | 0: 'OFP_BSN_VRF_COUNTER_BYTES', |
| 138 | 1: 'OFP_BSN_VRF_COUNTER_PACKETS', |
| 139 | } |
| 140 | |
| 141 | # Identifiers from group ofp_action_type |
| 142 | OFPAT_OUTPUT = 0 |
| 143 | OFPAT_COPY_TTL_OUT = 11 |
| 144 | OFPAT_COPY_TTL_IN = 12 |
| 145 | OFPAT_SET_MPLS_TTL = 15 |
| 146 | OFPAT_DEC_MPLS_TTL = 16 |
| 147 | OFPAT_PUSH_VLAN = 17 |
| 148 | OFPAT_POP_VLAN = 18 |
| 149 | OFPAT_PUSH_MPLS = 19 |
| 150 | OFPAT_POP_MPLS = 20 |
| 151 | OFPAT_SET_QUEUE = 21 |
| 152 | OFPAT_GROUP = 22 |
| 153 | OFPAT_SET_NW_TTL = 23 |
| 154 | OFPAT_DEC_NW_TTL = 24 |
| 155 | OFPAT_SET_FIELD = 25 |
| 156 | OFPAT_PUSH_PBB = 26 |
| 157 | OFPAT_POP_PBB = 27 |
| 158 | OFPAT_EXPERIMENTER = 65535 |
| 159 | |
| 160 | ofp_action_type_map = { |
| 161 | 0: 'OFPAT_OUTPUT', |
| 162 | 11: 'OFPAT_COPY_TTL_OUT', |
| 163 | 12: 'OFPAT_COPY_TTL_IN', |
| 164 | 15: 'OFPAT_SET_MPLS_TTL', |
| 165 | 16: 'OFPAT_DEC_MPLS_TTL', |
| 166 | 17: 'OFPAT_PUSH_VLAN', |
| 167 | 18: 'OFPAT_POP_VLAN', |
| 168 | 19: 'OFPAT_PUSH_MPLS', |
| 169 | 20: 'OFPAT_POP_MPLS', |
| 170 | 21: 'OFPAT_SET_QUEUE', |
| 171 | 22: 'OFPAT_GROUP', |
| 172 | 23: 'OFPAT_SET_NW_TTL', |
| 173 | 24: 'OFPAT_DEC_NW_TTL', |
| 174 | 25: 'OFPAT_SET_FIELD', |
| 175 | 26: 'OFPAT_PUSH_PBB', |
| 176 | 27: 'OFPAT_POP_PBB', |
| 177 | 65535: 'OFPAT_EXPERIMENTER', |
| 178 | } |
| 179 | |
| 180 | # Identifiers from group ofp_bad_action_code |
| 181 | OFPBAC_BAD_TYPE = 0 |
| 182 | OFPBAC_BAD_LEN = 1 |
| 183 | OFPBAC_BAD_EXPERIMENTER = 2 |
| 184 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3 |
| 185 | OFPBAC_BAD_OUT_PORT = 4 |
| 186 | OFPBAC_BAD_ARGUMENT = 5 |
| 187 | OFPBAC_EPERM = 6 |
| 188 | OFPBAC_TOO_MANY = 7 |
| 189 | OFPBAC_BAD_QUEUE = 8 |
| 190 | OFPBAC_BAD_OUT_GROUP = 9 |
| 191 | OFPBAC_MATCH_INCONSISTENT = 10 |
| 192 | OFPBAC_UNSUPPORTED_ORDER = 11 |
| 193 | OFPBAC_BAD_TAG = 12 |
| 194 | OFPBAC_BAD_SET_TYPE = 13 |
| 195 | OFPBAC_BAD_SET_LEN = 14 |
| 196 | OFPBAC_BAD_SET_ARGUMENT = 15 |
| 197 | |
| 198 | ofp_bad_action_code_map = { |
| 199 | 0: 'OFPBAC_BAD_TYPE', |
| 200 | 1: 'OFPBAC_BAD_LEN', |
| 201 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
| 202 | 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE', |
| 203 | 4: 'OFPBAC_BAD_OUT_PORT', |
| 204 | 5: 'OFPBAC_BAD_ARGUMENT', |
| 205 | 6: 'OFPBAC_EPERM', |
| 206 | 7: 'OFPBAC_TOO_MANY', |
| 207 | 8: 'OFPBAC_BAD_QUEUE', |
| 208 | 9: 'OFPBAC_BAD_OUT_GROUP', |
| 209 | 10: 'OFPBAC_MATCH_INCONSISTENT', |
| 210 | 11: 'OFPBAC_UNSUPPORTED_ORDER', |
| 211 | 12: 'OFPBAC_BAD_TAG', |
| 212 | 13: 'OFPBAC_BAD_SET_TYPE', |
| 213 | 14: 'OFPBAC_BAD_SET_LEN', |
| 214 | 15: 'OFPBAC_BAD_SET_ARGUMENT', |
| 215 | } |
| 216 | |
| 217 | # Identifiers from group ofp_bad_instruction_code |
| 218 | OFPBIC_UNKNOWN_INST = 0 |
| 219 | OFPBIC_UNSUP_INST = 1 |
| 220 | OFPBIC_BAD_TABLE_ID = 2 |
| 221 | OFPBIC_UNSUP_METADATA = 3 |
| 222 | OFPBIC_UNSUP_METADATA_MASK = 4 |
| 223 | OFPBIC_BAD_EXPERIMENTER = 5 |
| 224 | OFPBIC_BAD_EXPERIMENTER_TYPE = 6 |
| 225 | OFPBIC_BAD_LEN = 7 |
| 226 | OFPBIC_EPERM = 8 |
| 227 | |
| 228 | ofp_bad_instruction_code_map = { |
| 229 | 0: 'OFPBIC_UNKNOWN_INST', |
| 230 | 1: 'OFPBIC_UNSUP_INST', |
| 231 | 2: 'OFPBIC_BAD_TABLE_ID', |
| 232 | 3: 'OFPBIC_UNSUP_METADATA', |
| 233 | 4: 'OFPBIC_UNSUP_METADATA_MASK', |
| 234 | 5: 'OFPBIC_BAD_EXPERIMENTER', |
| 235 | 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE', |
| 236 | 7: 'OFPBIC_BAD_LEN', |
| 237 | 8: 'OFPBIC_EPERM', |
| 238 | } |
| 239 | |
| 240 | # Identifiers from group ofp_bad_match_code |
| 241 | OFPBMC_BAD_TYPE = 0 |
| 242 | OFPBMC_BAD_LEN = 1 |
| 243 | OFPBMC_BAD_TAG = 2 |
| 244 | OFPBMC_BAD_DL_ADDR_MASK = 3 |
| 245 | OFPBMC_BAD_NW_ADDR_MASK = 4 |
| 246 | OFPBMC_BAD_WILDCARDS = 5 |
| 247 | OFPBMC_BAD_FIELD = 6 |
| 248 | OFPBMC_BAD_VALUE = 7 |
| 249 | OFPBMC_BAD_MASK = 8 |
| 250 | OFPBMC_BAD_PREREQ = 9 |
| 251 | OFPBMC_DUP_FIELD = 10 |
| 252 | OFPBMC_EPERM = 11 |
| 253 | |
| 254 | ofp_bad_match_code_map = { |
| 255 | 0: 'OFPBMC_BAD_TYPE', |
| 256 | 1: 'OFPBMC_BAD_LEN', |
| 257 | 2: 'OFPBMC_BAD_TAG', |
| 258 | 3: 'OFPBMC_BAD_DL_ADDR_MASK', |
| 259 | 4: 'OFPBMC_BAD_NW_ADDR_MASK', |
| 260 | 5: 'OFPBMC_BAD_WILDCARDS', |
| 261 | 6: 'OFPBMC_BAD_FIELD', |
| 262 | 7: 'OFPBMC_BAD_VALUE', |
| 263 | 8: 'OFPBMC_BAD_MASK', |
| 264 | 9: 'OFPBMC_BAD_PREREQ', |
| 265 | 10: 'OFPBMC_DUP_FIELD', |
| 266 | 11: 'OFPBMC_EPERM', |
| 267 | } |
| 268 | |
| 269 | # Identifiers from group ofp_bad_request_code |
| 270 | OFPBRC_BAD_VERSION = 0 |
| 271 | OFPBRC_BAD_TYPE = 1 |
| 272 | OFPBRC_BAD_STAT = 2 |
| 273 | OFPBRC_BAD_EXPERIMENTER = 3 |
| 274 | OFPBRC_BAD_EXPERIMENTER_TYPE = 4 |
| 275 | OFPBRC_EPERM = 5 |
| 276 | OFPBRC_BAD_LEN = 6 |
| 277 | OFPBRC_BUFFER_EMPTY = 7 |
| 278 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 279 | OFPBRC_BAD_TABLE_ID = 9 |
| 280 | OFPBRC_IS_SLAVE = 10 |
| 281 | OFPBRC_BAD_PORT = 11 |
| 282 | OFPBRC_BAD_PACKET = 12 |
| 283 | OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13 |
| 284 | |
| 285 | ofp_bad_request_code_map = { |
| 286 | 0: 'OFPBRC_BAD_VERSION', |
| 287 | 1: 'OFPBRC_BAD_TYPE', |
| 288 | 2: 'OFPBRC_BAD_STAT', |
| 289 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
| 290 | 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE', |
| 291 | 5: 'OFPBRC_EPERM', |
| 292 | 6: 'OFPBRC_BAD_LEN', |
| 293 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 294 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 295 | 9: 'OFPBRC_BAD_TABLE_ID', |
| 296 | 10: 'OFPBRC_IS_SLAVE', |
| 297 | 11: 'OFPBRC_BAD_PORT', |
| 298 | 12: 'OFPBRC_BAD_PACKET', |
| 299 | 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW', |
| 300 | } |
| 301 | |
| 302 | # Identifiers from group ofp_bsn_anchor |
| 303 | OFP_BSN_ANCHOR_PACKET_START = 0 |
| 304 | OFP_BSN_ANCHOR_L3_HEADER_START = 1 |
| 305 | OFP_BSN_ANCHOR_L4_HEADER_START = 2 |
| 306 | OFP_BSN_ANCHOR_L4_PAYLOAD_START = 3 |
| 307 | |
| 308 | ofp_bsn_anchor_map = { |
| 309 | 0: 'OFP_BSN_ANCHOR_PACKET_START', |
| 310 | 1: 'OFP_BSN_ANCHOR_L3_HEADER_START', |
| 311 | 2: 'OFP_BSN_ANCHOR_L4_HEADER_START', |
| 312 | 3: 'OFP_BSN_ANCHOR_L4_PAYLOAD_START', |
| 313 | } |
| 314 | |
| 315 | # Identifiers from group ofp_bsn_controller_connection_state |
| 316 | OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED = 0 |
| 317 | OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED = 1 |
| 318 | |
| 319 | ofp_bsn_controller_connection_state_map = { |
| 320 | 0: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED', |
| 321 | 1: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED', |
| 322 | } |
| 323 | |
| 324 | # Identifiers from group ofp_bsn_controller_role_reason |
| 325 | OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST = 0 |
| 326 | OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG = 1 |
| 327 | OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER = 2 |
| 328 | |
| 329 | ofp_bsn_controller_role_reason_map = { |
| 330 | 0: 'OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST', |
| 331 | 1: 'OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG', |
| 332 | 2: 'OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER', |
| 333 | } |
| 334 | |
| 335 | # Identifiers from group ofp_bsn_decap |
| 336 | OFP_BSN_DECAP_VXLAN = 0 |
| 337 | OFP_BSN_DECAP_ERSPAN = 1 |
| 338 | OFP_BSN_DECAP_L2_GRE = 2 |
| 339 | OFP_BSN_DECAP_NVGRE = 3 |
| 340 | OFP_BSN_DECAP_CAPWAP = 4 |
| 341 | OFP_BSN_DECAP_L2_MPLS = 5 |
| 342 | OFP_BSN_DECAP_L3_GRE = 6 |
| 343 | OFP_BSN_DECAP_GTP = 7 |
| 344 | OFP_BSN_DECAP_L3_MPLS = 8 |
| 345 | |
| 346 | ofp_bsn_decap_map = { |
| 347 | 0: 'OFP_BSN_DECAP_VXLAN', |
| 348 | 1: 'OFP_BSN_DECAP_ERSPAN', |
| 349 | 2: 'OFP_BSN_DECAP_L2_GRE', |
| 350 | 3: 'OFP_BSN_DECAP_NVGRE', |
| 351 | 4: 'OFP_BSN_DECAP_CAPWAP', |
| 352 | 5: 'OFP_BSN_DECAP_L2_MPLS', |
| 353 | 6: 'OFP_BSN_DECAP_L3_GRE', |
| 354 | 7: 'OFP_BSN_DECAP_GTP', |
| 355 | 8: 'OFP_BSN_DECAP_L3_MPLS', |
| 356 | } |
| 357 | |
| 358 | # Identifiers from group ofp_bsn_lacp_state |
| 359 | OFP_BSN_LACP_STATE_ACTIVITY = 1 |
| 360 | OFP_BSN_LACP_STATE_TIMEOUT = 2 |
| 361 | OFP_BSN_LACP_STATE_AGGREGATION = 4 |
| 362 | OFP_BSN_LACP_STATE_SYNCHRONIZATION = 8 |
| 363 | OFP_BSN_LACP_STATE_COLLECTING = 16 |
| 364 | OFP_BSN_LACP_STATE_DISTRIBUTING = 32 |
| 365 | OFP_BSN_LACP_STATE_DEFAULTED = 64 |
| 366 | OFP_BSN_LACP_STATE_EXPIRED = 128 |
| 367 | |
| 368 | ofp_bsn_lacp_state_map = { |
| 369 | 1: 'OFP_BSN_LACP_STATE_ACTIVITY', |
| 370 | 2: 'OFP_BSN_LACP_STATE_TIMEOUT', |
| 371 | 4: 'OFP_BSN_LACP_STATE_AGGREGATION', |
| 372 | 8: 'OFP_BSN_LACP_STATE_SYNCHRONIZATION', |
| 373 | 16: 'OFP_BSN_LACP_STATE_COLLECTING', |
| 374 | 32: 'OFP_BSN_LACP_STATE_DISTRIBUTING', |
| 375 | 64: 'OFP_BSN_LACP_STATE_DEFAULTED', |
| 376 | 128: 'OFP_BSN_LACP_STATE_EXPIRED', |
| 377 | } |
| 378 | |
| 379 | # Identifiers from group ofp_bsn_loglevel |
| 380 | OFP_BSN_LOGLEVEL_MSG = 0 |
| 381 | OFP_BSN_LOGLEVEL_ERROR = 1 |
| 382 | OFP_BSN_LOGLEVEL_WARN = 2 |
| 383 | OFP_BSN_LOGLEVEL_INFO = 3 |
| 384 | OFP_BSN_LOGLEVEL_VERBOSE = 4 |
| 385 | OFP_BSN_LOGLEVEL_TRACE = 5 |
| 386 | |
| 387 | ofp_bsn_loglevel_map = { |
| 388 | 0: 'OFP_BSN_LOGLEVEL_MSG', |
| 389 | 1: 'OFP_BSN_LOGLEVEL_ERROR', |
| 390 | 2: 'OFP_BSN_LOGLEVEL_WARN', |
| 391 | 3: 'OFP_BSN_LOGLEVEL_INFO', |
| 392 | 4: 'OFP_BSN_LOGLEVEL_VERBOSE', |
| 393 | 5: 'OFP_BSN_LOGLEVEL_TRACE', |
| 394 | } |
| 395 | |
| 396 | # Identifiers from group ofp_bsn_lua_upload_flags |
| 397 | OFP_BSN_LUA_UPLOAD_MORE = 1 |
| 398 | OFP_BSN_LUA_UPLOAD_FORCE = 2 |
| 399 | |
| 400 | ofp_bsn_lua_upload_flags_map = { |
| 401 | 1: 'OFP_BSN_LUA_UPLOAD_MORE', |
| 402 | 2: 'OFP_BSN_LUA_UPLOAD_FORCE', |
| 403 | } |
| 404 | |
| 405 | # Identifiers from group ofp_bsn_pktin_flag |
| 406 | OFP_BSN_PKTIN_FLAG_PDU = 1 |
| 407 | OFP_BSN_PKTIN_FLAG_NEW_HOST = 2 |
| 408 | OFP_BSN_PKTIN_FLAG_STATION_MOVE = 4 |
| 409 | OFP_BSN_PKTIN_FLAG_ARP = 8 |
| 410 | OFP_BSN_PKTIN_FLAG_DHCP = 16 |
| 411 | OFP_BSN_PKTIN_FLAG_L2_CPU = 32 |
| 412 | OFP_BSN_PKTIN_FLAG_DEBUG = 64 |
| 413 | OFP_BSN_PKTIN_FLAG_TTL_EXPIRED = 128 |
| 414 | OFP_BSN_PKTIN_FLAG_L3_MISS = 256 |
| 415 | OFP_BSN_PKTIN_FLAG_L3_CPU = 512 |
| 416 | OFP_BSN_PKTIN_FLAG_INGRESS_ACL = 1024 |
| 417 | OFP_BSN_PKTIN_FLAG_SFLOW = 2048 |
| 418 | OFP_BSN_PKTIN_FLAG_ARP_CACHE = 4096 |
| 419 | OFP_BSN_PKTIN_FLAG_ARP_TARGET = 8192 |
| 420 | OFP_BSN_PKTIN_FLAG_IGMP = 16384 |
| 421 | OFP_BSN_PKTIN_FLAG_PIM = 32768 |
| 422 | OFP_BSN_PKTIN_FLAG_VXLAN_SIP_MISS = 65536 |
| 423 | OFP_BSN_PKTIN_FLAG_MC_RESERVED = 131072 |
| 424 | |
| 425 | ofp_bsn_pktin_flag_map = { |
| 426 | 1: 'OFP_BSN_PKTIN_FLAG_PDU', |
| 427 | 2: 'OFP_BSN_PKTIN_FLAG_NEW_HOST', |
| 428 | 4: 'OFP_BSN_PKTIN_FLAG_STATION_MOVE', |
| 429 | 8: 'OFP_BSN_PKTIN_FLAG_ARP', |
| 430 | 16: 'OFP_BSN_PKTIN_FLAG_DHCP', |
| 431 | 32: 'OFP_BSN_PKTIN_FLAG_L2_CPU', |
| 432 | 64: 'OFP_BSN_PKTIN_FLAG_DEBUG', |
| 433 | 128: 'OFP_BSN_PKTIN_FLAG_TTL_EXPIRED', |
| 434 | 256: 'OFP_BSN_PKTIN_FLAG_L3_MISS', |
| 435 | 512: 'OFP_BSN_PKTIN_FLAG_L3_CPU', |
| 436 | 1024: 'OFP_BSN_PKTIN_FLAG_INGRESS_ACL', |
| 437 | 2048: 'OFP_BSN_PKTIN_FLAG_SFLOW', |
| 438 | 4096: 'OFP_BSN_PKTIN_FLAG_ARP_CACHE', |
| 439 | 8192: 'OFP_BSN_PKTIN_FLAG_ARP_TARGET', |
| 440 | 16384: 'OFP_BSN_PKTIN_FLAG_IGMP', |
| 441 | 32768: 'OFP_BSN_PKTIN_FLAG_PIM', |
| 442 | 65536: 'OFP_BSN_PKTIN_FLAG_VXLAN_SIP_MISS', |
| 443 | 131072: 'OFP_BSN_PKTIN_FLAG_MC_RESERVED', |
| 444 | } |
| 445 | |
| 446 | # Identifiers from group ofp_bsn_port_counter |
| 447 | OFP_BSN_PORT_COUNTER_RX_BYTES = 0 |
| 448 | OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST = 1 |
| 449 | OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST = 2 |
| 450 | OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST = 3 |
| 451 | OFP_BSN_PORT_COUNTER_RX_DROPPED = 4 |
| 452 | OFP_BSN_PORT_COUNTER_RX_ERRORS = 5 |
| 453 | OFP_BSN_PORT_COUNTER_TX_BYTES = 6 |
| 454 | OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST = 7 |
| 455 | OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST = 8 |
| 456 | OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST = 9 |
| 457 | OFP_BSN_PORT_COUNTER_TX_DROPPED = 10 |
| 458 | OFP_BSN_PORT_COUNTER_TX_ERRORS = 11 |
| 459 | OFP_BSN_PORT_COUNTER_RX_RUNTS = 12 |
| 460 | OFP_BSN_PORT_COUNTER_RX_GIANTS = 13 |
| 461 | OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS = 14 |
| 462 | OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS = 15 |
| 463 | OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS = 16 |
| 464 | OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT = 17 |
| 465 | OFP_BSN_PORT_COUNTER_TX_COLLISIONS = 18 |
| 466 | OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS = 19 |
| 467 | OFP_BSN_PORT_COUNTER_TX_DEFERRED = 20 |
| 468 | OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT = 21 |
| 469 | OFP_BSN_PORT_COUNTER_RX_PACKETS = 22 |
| 470 | OFP_BSN_PORT_COUNTER_TX_PACKETS = 23 |
| 471 | OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS = 24 |
| 472 | OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS = 25 |
| 473 | OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS = 26 |
| 474 | OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN = 27 |
| 475 | OFP_BSN_PORT_COUNTER_LINK_UP = 28 |
| 476 | OFP_BSN_PORT_COUNTER_LINK_DOWN = 29 |
| 477 | |
| 478 | ofp_bsn_port_counter_map = { |
| 479 | 0: 'OFP_BSN_PORT_COUNTER_RX_BYTES', |
| 480 | 1: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST', |
| 481 | 2: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST', |
| 482 | 3: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST', |
| 483 | 4: 'OFP_BSN_PORT_COUNTER_RX_DROPPED', |
| 484 | 5: 'OFP_BSN_PORT_COUNTER_RX_ERRORS', |
| 485 | 6: 'OFP_BSN_PORT_COUNTER_TX_BYTES', |
| 486 | 7: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST', |
| 487 | 8: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST', |
| 488 | 9: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST', |
| 489 | 10: 'OFP_BSN_PORT_COUNTER_TX_DROPPED', |
| 490 | 11: 'OFP_BSN_PORT_COUNTER_TX_ERRORS', |
| 491 | 12: 'OFP_BSN_PORT_COUNTER_RX_RUNTS', |
| 492 | 13: 'OFP_BSN_PORT_COUNTER_RX_GIANTS', |
| 493 | 14: 'OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS', |
| 494 | 15: 'OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS', |
| 495 | 16: 'OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS', |
| 496 | 17: 'OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT', |
| 497 | 18: 'OFP_BSN_PORT_COUNTER_TX_COLLISIONS', |
| 498 | 19: 'OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS', |
| 499 | 20: 'OFP_BSN_PORT_COUNTER_TX_DEFERRED', |
| 500 | 21: 'OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT', |
| 501 | 22: 'OFP_BSN_PORT_COUNTER_RX_PACKETS', |
| 502 | 23: 'OFP_BSN_PORT_COUNTER_TX_PACKETS', |
| 503 | 24: 'OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS', |
| 504 | 25: 'OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS', |
| 505 | 26: 'OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS', |
| 506 | 27: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN', |
| 507 | 28: 'OFP_BSN_PORT_COUNTER_LINK_UP', |
| 508 | 29: 'OFP_BSN_PORT_COUNTER_LINK_DOWN', |
| 509 | } |
| 510 | |
| 511 | # Identifiers from group ofp_bsn_port_vxlan_mode |
| 512 | OFP_BSN_PORT_VXLAN_RECIRCULATION_ENABLE = 0 |
| 513 | OFP_BSN_PORT_VXLAN_TERMINATION_ENABLE = 1 |
| 514 | |
| 515 | ofp_bsn_port_vxlan_mode_map = { |
| 516 | 0: 'OFP_BSN_PORT_VXLAN_RECIRCULATION_ENABLE', |
| 517 | 1: 'OFP_BSN_PORT_VXLAN_TERMINATION_ENABLE', |
| 518 | } |
| 519 | |
| 520 | # Identifiers from group ofp_bsn_rate_unit |
| 521 | OFP_BSN_RATE_UNIT_PPS = 0 |
| 522 | OFP_BSN_RATE_UNIT_KBITPS = 1 |
| 523 | |
| 524 | ofp_bsn_rate_unit_map = { |
| 525 | 0: 'OFP_BSN_RATE_UNIT_PPS', |
| 526 | 1: 'OFP_BSN_RATE_UNIT_KBITPS', |
| 527 | } |
| 528 | |
| 529 | # Identifiers from group ofp_bsn_status |
| 530 | OFP_BSN_STATUS_DISABLE = 0 |
| 531 | OFP_BSN_STATUS_ENABLE = 1 |
| 532 | |
| 533 | ofp_bsn_status_map = { |
| 534 | 0: 'OFP_BSN_STATUS_DISABLE', |
| 535 | 1: 'OFP_BSN_STATUS_ENABLE', |
| 536 | } |
| 537 | |
| 538 | # Identifiers from group ofp_bsn_tcp_flag |
| 539 | OFP_BSN_TCP_FLAG_FIN = 1 |
| 540 | OFP_BSN_TCP_FLAG_SYN = 2 |
| 541 | OFP_BSN_TCP_FLAG_RST = 4 |
| 542 | OFP_BSN_TCP_FLAG_PSH = 8 |
| 543 | OFP_BSN_TCP_FLAG_ACK = 16 |
| 544 | OFP_BSN_TCP_FLAG_URG = 32 |
| 545 | OFP_BSN_TCP_FLAG_ECE = 64 |
| 546 | OFP_BSN_TCP_FLAG_CWR = 128 |
| 547 | OFP_BSN_TCP_FLAG_NS = 256 |
| 548 | |
| 549 | ofp_bsn_tcp_flag_map = { |
| 550 | 1: 'OFP_BSN_TCP_FLAG_FIN', |
| 551 | 2: 'OFP_BSN_TCP_FLAG_SYN', |
| 552 | 4: 'OFP_BSN_TCP_FLAG_RST', |
| 553 | 8: 'OFP_BSN_TCP_FLAG_PSH', |
| 554 | 16: 'OFP_BSN_TCP_FLAG_ACK', |
| 555 | 32: 'OFP_BSN_TCP_FLAG_URG', |
| 556 | 64: 'OFP_BSN_TCP_FLAG_ECE', |
| 557 | 128: 'OFP_BSN_TCP_FLAG_CWR', |
| 558 | 256: 'OFP_BSN_TCP_FLAG_NS', |
| 559 | } |
| 560 | |
| 561 | # Identifiers from group ofp_bsn_udf_anchor |
| 562 | OFP_BSN_UDF_ANCHOR_PACKET_START = 0 |
| 563 | OFP_BSN_UDF_ANCHOR_L3_HEADER_START = 1 |
| 564 | OFP_BSN_UDF_ANCHOR_L4_HEADER_START = 2 |
| 565 | |
| 566 | ofp_bsn_udf_anchor_map = { |
| 567 | 0: 'OFP_BSN_UDF_ANCHOR_PACKET_START', |
| 568 | 1: 'OFP_BSN_UDF_ANCHOR_L3_HEADER_START', |
| 569 | 2: 'OFP_BSN_UDF_ANCHOR_L4_HEADER_START', |
| 570 | } |
| 571 | |
| 572 | # Identifiers from group ofp_bsn_vlan_counter_constants |
| 573 | OFP_BSN_VLAN_ALL = 65535 |
| 574 | |
| 575 | ofp_bsn_vlan_counter_constants_map = { |
| 576 | 65535: 'OFP_BSN_VLAN_ALL', |
| 577 | } |
| 578 | |
| 579 | # Identifiers from group ofp_bsn_vport_l2gre_flags |
| 580 | OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1 |
| 581 | OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2 |
| 582 | OF_BSN_VPORT_L2GRE_DSCP_COPY = 4 |
| 583 | OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8 |
| 584 | OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16 |
| 585 | |
| 586 | ofp_bsn_vport_l2gre_flags_map = { |
| 587 | 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID', |
| 588 | 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN', |
| 589 | 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY', |
| 590 | 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID', |
| 591 | 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID', |
| 592 | } |
| 593 | |
| 594 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 595 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 596 | |
| 597 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 598 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 599 | } |
| 600 | |
| 601 | # Identifiers from group ofp_bsn_vport_status |
| 602 | OF_BSN_VPORT_STATUS_OK = 0 |
| 603 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 604 | |
| 605 | ofp_bsn_vport_status_map = { |
| 606 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 607 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 608 | } |
| 609 | |
| 610 | # Identifiers from group ofp_bsn_vrf_counter_constants |
| 611 | OFP_BSN_VRF_ALL = 4294967295 |
| 612 | |
| 613 | ofp_bsn_vrf_counter_constants_map = { |
| 614 | 4294967295: 'OFP_BSN_VRF_ALL', |
| 615 | } |
| 616 | |
| 617 | # Identifiers from group ofp_capabilities |
| 618 | OFPC_FLOW_STATS = 1 |
| 619 | OFPC_TABLE_STATS = 2 |
| 620 | OFPC_PORT_STATS = 4 |
| 621 | OFPC_GROUP_STATS = 8 |
| 622 | OFPC_IP_REASM = 32 |
| 623 | OFPC_QUEUE_STATS = 64 |
| 624 | OFPC_PORT_BLOCKED = 256 |
| 625 | |
| 626 | ofp_capabilities_map = { |
| 627 | 1: 'OFPC_FLOW_STATS', |
| 628 | 2: 'OFPC_TABLE_STATS', |
| 629 | 4: 'OFPC_PORT_STATS', |
| 630 | 8: 'OFPC_GROUP_STATS', |
| 631 | 32: 'OFPC_IP_REASM', |
| 632 | 64: 'OFPC_QUEUE_STATS', |
| 633 | 256: 'OFPC_PORT_BLOCKED', |
| 634 | } |
| 635 | |
| 636 | # Identifiers from group ofp_config_flags |
| 637 | OFPC_FRAG_NORMAL = 0 |
| 638 | OFPC_FRAG_DROP = 1 |
| 639 | OFPC_FRAG_REASM = 2 |
| 640 | OFPC_FRAG_MASK = 3 |
| 641 | |
| 642 | ofp_config_flags_map = { |
| 643 | 0: 'OFPC_FRAG_NORMAL', |
| 644 | 1: 'OFPC_FRAG_DROP', |
| 645 | 2: 'OFPC_FRAG_REASM', |
| 646 | 3: 'OFPC_FRAG_MASK', |
| 647 | } |
| 648 | |
| 649 | # Identifiers from group ofp_controller_max_len |
| 650 | OFPCML_MAX = 65509 |
| 651 | OFPCML_NO_BUFFER = 65535 |
| 652 | |
| 653 | ofp_controller_max_len_map = { |
| 654 | 65509: 'OFPCML_MAX', |
| 655 | 65535: 'OFPCML_NO_BUFFER', |
| 656 | } |
| 657 | |
| 658 | # Identifiers from group ofp_controller_role |
| 659 | OFPCR_ROLE_NOCHANGE = 0 |
| 660 | OFPCR_ROLE_EQUAL = 1 |
| 661 | OFPCR_ROLE_MASTER = 2 |
| 662 | OFPCR_ROLE_SLAVE = 3 |
| 663 | |
| 664 | ofp_controller_role_map = { |
| 665 | 0: 'OFPCR_ROLE_NOCHANGE', |
| 666 | 1: 'OFPCR_ROLE_EQUAL', |
| 667 | 2: 'OFPCR_ROLE_MASTER', |
| 668 | 3: 'OFPCR_ROLE_SLAVE', |
| 669 | } |
| 670 | |
| 671 | # Identifiers from group ofp_error_type |
| 672 | OFPET_HELLO_FAILED = 0 |
| 673 | OFPET_BAD_REQUEST = 1 |
| 674 | OFPET_BAD_ACTION = 2 |
| 675 | OFPET_BAD_INSTRUCTION = 3 |
| 676 | OFPET_BAD_MATCH = 4 |
| 677 | OFPET_FLOW_MOD_FAILED = 5 |
| 678 | OFPET_GROUP_MOD_FAILED = 6 |
| 679 | OFPET_PORT_MOD_FAILED = 7 |
| 680 | OFPET_TABLE_MOD_FAILED = 8 |
| 681 | OFPET_QUEUE_OP_FAILED = 9 |
| 682 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 683 | OFPET_ROLE_REQUEST_FAILED = 11 |
| 684 | OFPET_METER_MOD_FAILED = 12 |
| 685 | OFPET_TABLE_FEATURES_FAILED = 13 |
| 686 | OFPET_EXPERIMENTER = 65535 |
| 687 | |
| 688 | ofp_error_type_map = { |
| 689 | 0: 'OFPET_HELLO_FAILED', |
| 690 | 1: 'OFPET_BAD_REQUEST', |
| 691 | 2: 'OFPET_BAD_ACTION', |
| 692 | 3: 'OFPET_BAD_INSTRUCTION', |
| 693 | 4: 'OFPET_BAD_MATCH', |
| 694 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 695 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 696 | 7: 'OFPET_PORT_MOD_FAILED', |
| 697 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 698 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 699 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 700 | 11: 'OFPET_ROLE_REQUEST_FAILED', |
| 701 | 12: 'OFPET_METER_MOD_FAILED', |
| 702 | 13: 'OFPET_TABLE_FEATURES_FAILED', |
| 703 | 65535: 'OFPET_EXPERIMENTER', |
| 704 | } |
| 705 | |
| 706 | # Identifiers from group ofp_flow_mod_command |
| 707 | OFPFC_ADD = 0 |
| 708 | OFPFC_MODIFY = 1 |
| 709 | OFPFC_MODIFY_STRICT = 2 |
| 710 | OFPFC_DELETE = 3 |
| 711 | OFPFC_DELETE_STRICT = 4 |
| 712 | |
| 713 | ofp_flow_mod_command_map = { |
| 714 | 0: 'OFPFC_ADD', |
| 715 | 1: 'OFPFC_MODIFY', |
| 716 | 2: 'OFPFC_MODIFY_STRICT', |
| 717 | 3: 'OFPFC_DELETE', |
| 718 | 4: 'OFPFC_DELETE_STRICT', |
| 719 | } |
| 720 | |
| 721 | # Identifiers from group ofp_flow_mod_failed_code |
| 722 | OFPFMFC_UNKNOWN = 0 |
| 723 | OFPFMFC_TABLE_FULL = 1 |
| 724 | OFPFMFC_BAD_TABLE_ID = 2 |
| 725 | OFPFMFC_OVERLAP = 3 |
| 726 | OFPFMFC_EPERM = 4 |
| 727 | OFPFMFC_BAD_TIMEOUT = 5 |
| 728 | OFPFMFC_BAD_COMMAND = 6 |
| 729 | OFPFMFC_BAD_FLAGS = 7 |
| 730 | |
| 731 | ofp_flow_mod_failed_code_map = { |
| 732 | 0: 'OFPFMFC_UNKNOWN', |
| 733 | 1: 'OFPFMFC_TABLE_FULL', |
| 734 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 735 | 3: 'OFPFMFC_OVERLAP', |
| 736 | 4: 'OFPFMFC_EPERM', |
| 737 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 738 | 6: 'OFPFMFC_BAD_COMMAND', |
| 739 | 7: 'OFPFMFC_BAD_FLAGS', |
| 740 | } |
| 741 | |
| 742 | # Identifiers from group ofp_flow_mod_flags |
| 743 | OFPFF_SEND_FLOW_REM = 1 |
| 744 | OFPFF_CHECK_OVERLAP = 2 |
| 745 | OFPFF_RESET_COUNTS = 4 |
| 746 | OFPFF_NO_PKT_COUNTS = 8 |
| 747 | OFPFF_NO_BYT_COUNTS = 16 |
| 748 | OFPFF_BSN_SEND_IDLE = 128 |
| 749 | |
| 750 | ofp_flow_mod_flags_map = { |
| 751 | 1: 'OFPFF_SEND_FLOW_REM', |
| 752 | 2: 'OFPFF_CHECK_OVERLAP', |
| 753 | 4: 'OFPFF_RESET_COUNTS', |
| 754 | 8: 'OFPFF_NO_PKT_COUNTS', |
| 755 | 16: 'OFPFF_NO_BYT_COUNTS', |
| 756 | 128: 'OFPFF_BSN_SEND_IDLE', |
| 757 | } |
| 758 | |
| 759 | # Identifiers from group ofp_flow_removed_reason |
| 760 | OFPRR_IDLE_TIMEOUT = 0 |
| 761 | OFPRR_HARD_TIMEOUT = 1 |
| 762 | OFPRR_DELETE = 2 |
| 763 | OFPRR_GROUP_DELETE = 3 |
| 764 | |
| 765 | ofp_flow_removed_reason_map = { |
| 766 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 767 | 1: 'OFPRR_HARD_TIMEOUT', |
| 768 | 2: 'OFPRR_DELETE', |
| 769 | 3: 'OFPRR_GROUP_DELETE', |
| 770 | } |
| 771 | |
| 772 | # Identifiers from group ofp_group |
| 773 | OFPG_MAX = 4294967040 |
| 774 | OFPG_ALL = 4294967292 |
| 775 | OFPG_ANY = 4294967295 |
| 776 | |
| 777 | ofp_group_map = { |
| 778 | 4294967040: 'OFPG_MAX', |
| 779 | 4294967292: 'OFPG_ALL', |
| 780 | 4294967295: 'OFPG_ANY', |
| 781 | } |
| 782 | |
| 783 | # Identifiers from group ofp_group_capabilities |
| 784 | OFPGFC_SELECT_WEIGHT = 1 |
| 785 | OFPGFC_SELECT_LIVENESS = 2 |
| 786 | OFPGFC_CHAINING = 4 |
| 787 | OFPGFC_CHAINING_CHECKS = 8 |
| 788 | |
| 789 | ofp_group_capabilities_map = { |
| 790 | 1: 'OFPGFC_SELECT_WEIGHT', |
| 791 | 2: 'OFPGFC_SELECT_LIVENESS', |
| 792 | 4: 'OFPGFC_CHAINING', |
| 793 | 8: 'OFPGFC_CHAINING_CHECKS', |
| 794 | } |
| 795 | |
| 796 | # Identifiers from group ofp_group_mod_command |
| 797 | OFPGC_ADD = 0 |
| 798 | OFPGC_MODIFY = 1 |
| 799 | OFPGC_DELETE = 2 |
| 800 | |
| 801 | ofp_group_mod_command_map = { |
| 802 | 0: 'OFPGC_ADD', |
| 803 | 1: 'OFPGC_MODIFY', |
| 804 | 2: 'OFPGC_DELETE', |
| 805 | } |
| 806 | |
| 807 | # Identifiers from group ofp_group_mod_failed_code |
| 808 | OFPGMFC_GROUP_EXISTS = 0 |
| 809 | OFPGMFC_INVALID_GROUP = 1 |
| 810 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 811 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 812 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 813 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 814 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 815 | OFPGMFC_LOOP = 7 |
| 816 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 817 | OFPGMFC_CHAINED_GROUP = 9 |
| 818 | OFPGMFC_BAD_TYPE = 10 |
| 819 | OFPGMFC_BAD_COMMAND = 11 |
| 820 | OFPGMFC_BAD_BUCKET = 12 |
| 821 | OFPGMFC_BAD_WATCH = 13 |
| 822 | OFPGMFC_EPERM = 14 |
| 823 | |
| 824 | ofp_group_mod_failed_code_map = { |
| 825 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 826 | 1: 'OFPGMFC_INVALID_GROUP', |
| 827 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 828 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 829 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 830 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 831 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 832 | 7: 'OFPGMFC_LOOP', |
| 833 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 834 | 9: 'OFPGMFC_CHAINED_GROUP', |
| 835 | 10: 'OFPGMFC_BAD_TYPE', |
| 836 | 11: 'OFPGMFC_BAD_COMMAND', |
| 837 | 12: 'OFPGMFC_BAD_BUCKET', |
| 838 | 13: 'OFPGMFC_BAD_WATCH', |
| 839 | 14: 'OFPGMFC_EPERM', |
| 840 | } |
| 841 | |
| 842 | # Identifiers from group ofp_group_type |
| 843 | OFPGT_ALL = 0 |
| 844 | OFPGT_SELECT = 1 |
| 845 | OFPGT_INDIRECT = 2 |
| 846 | OFPGT_FF = 3 |
| 847 | |
| 848 | ofp_group_type_map = { |
| 849 | 0: 'OFPGT_ALL', |
| 850 | 1: 'OFPGT_SELECT', |
| 851 | 2: 'OFPGT_INDIRECT', |
| 852 | 3: 'OFPGT_FF', |
| 853 | } |
| 854 | |
| 855 | # Identifiers from group ofp_hello_elem_type |
| 856 | OFPHET_VERSIONBITMAP = 1 |
| 857 | |
| 858 | ofp_hello_elem_type_map = { |
| 859 | 1: 'OFPHET_VERSIONBITMAP', |
| 860 | } |
| 861 | |
| 862 | # Identifiers from group ofp_hello_failed_code |
| 863 | OFPHFC_INCOMPATIBLE = 0 |
| 864 | OFPHFC_EPERM = 1 |
| 865 | |
| 866 | ofp_hello_failed_code_map = { |
| 867 | 0: 'OFPHFC_INCOMPATIBLE', |
| 868 | 1: 'OFPHFC_EPERM', |
| 869 | } |
| 870 | |
| 871 | # Identifiers from group ofp_instruction_type |
| 872 | OFPIT_GOTO_TABLE = 1 |
| 873 | OFPIT_WRITE_METADATA = 2 |
| 874 | OFPIT_WRITE_ACTIONS = 3 |
| 875 | OFPIT_APPLY_ACTIONS = 4 |
| 876 | OFPIT_CLEAR_ACTIONS = 5 |
| 877 | OFPIT_METER = 6 |
| 878 | OFPIT_EXPERIMENTER = 65535 |
| 879 | |
| 880 | ofp_instruction_type_map = { |
| 881 | 1: 'OFPIT_GOTO_TABLE', |
| 882 | 2: 'OFPIT_WRITE_METADATA', |
| 883 | 3: 'OFPIT_WRITE_ACTIONS', |
| 884 | 4: 'OFPIT_APPLY_ACTIONS', |
| 885 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 886 | 6: 'OFPIT_METER', |
| 887 | 65535: 'OFPIT_EXPERIMENTER', |
| 888 | } |
| 889 | |
| 890 | # Identifiers from group ofp_ipv6exthdr_flags |
| 891 | OFPIEH_NONEXT = 1 |
| 892 | OFPIEH_ESP = 2 |
| 893 | OFPIEH_AUTH = 4 |
| 894 | OFPIEH_DEST = 8 |
| 895 | OFPIEH_FRAG = 16 |
| 896 | OFPIEH_ROUTER = 32 |
| 897 | OFPIEH_HOP = 64 |
| 898 | OFPIEH_UNREP = 128 |
| 899 | OFPIEH_UNSEQ = 256 |
| 900 | |
| 901 | ofp_ipv6exthdr_flags_map = { |
| 902 | 1: 'OFPIEH_NONEXT', |
| 903 | 2: 'OFPIEH_ESP', |
| 904 | 4: 'OFPIEH_AUTH', |
| 905 | 8: 'OFPIEH_DEST', |
| 906 | 16: 'OFPIEH_FRAG', |
| 907 | 32: 'OFPIEH_ROUTER', |
| 908 | 64: 'OFPIEH_HOP', |
| 909 | 128: 'OFPIEH_UNREP', |
| 910 | 256: 'OFPIEH_UNSEQ', |
| 911 | } |
| 912 | |
| 913 | # Identifiers from group ofp_match_type |
| 914 | OFPMT_STANDARD = 0 |
| 915 | OFPMT_OXM = 1 |
| 916 | |
| 917 | ofp_match_type_map = { |
| 918 | 0: 'OFPMT_STANDARD', |
| 919 | 1: 'OFPMT_OXM', |
| 920 | } |
| 921 | |
| 922 | # Identifiers from group ofp_meter |
| 923 | OFPM_MAX = 4294901760 |
| 924 | OFPM_SLOWPATH = 4294967293 |
| 925 | OFPM_CONTROLLER = 4294967294 |
| 926 | OFPM_ALL = 4294967295 |
| 927 | |
| 928 | ofp_meter_map = { |
| 929 | 4294901760: 'OFPM_MAX', |
| 930 | 4294967293: 'OFPM_SLOWPATH', |
| 931 | 4294967294: 'OFPM_CONTROLLER', |
| 932 | 4294967295: 'OFPM_ALL', |
| 933 | } |
| 934 | |
| 935 | # Identifiers from group ofp_meter_band_type |
| 936 | OFPMBT_DROP = 1 |
| 937 | OFPMBT_DSCP_REMARK = 2 |
| 938 | OFPMBT_EXPERIMENTER = 65535 |
| 939 | |
| 940 | ofp_meter_band_type_map = { |
| 941 | 1: 'OFPMBT_DROP', |
| 942 | 2: 'OFPMBT_DSCP_REMARK', |
| 943 | 65535: 'OFPMBT_EXPERIMENTER', |
| 944 | } |
| 945 | |
| 946 | # Identifiers from group ofp_meter_flags |
| 947 | OFPMF_KBPS = 1 |
| 948 | OFPMF_PKTPS = 2 |
| 949 | OFPMF_BURST = 4 |
| 950 | OFPMF_STATS = 8 |
| 951 | |
| 952 | ofp_meter_flags_map = { |
| 953 | 1: 'OFPMF_KBPS', |
| 954 | 2: 'OFPMF_PKTPS', |
| 955 | 4: 'OFPMF_BURST', |
| 956 | 8: 'OFPMF_STATS', |
| 957 | } |
| 958 | |
| 959 | # Identifiers from group ofp_meter_mod_command |
| 960 | OFPMC_ADD = 0 |
| 961 | OFPMC_MODIFY = 1 |
| 962 | OFPMC_DELETE = 2 |
| 963 | |
| 964 | ofp_meter_mod_command_map = { |
| 965 | 0: 'OFPMC_ADD', |
| 966 | 1: 'OFPMC_MODIFY', |
| 967 | 2: 'OFPMC_DELETE', |
| 968 | } |
| 969 | |
| 970 | # Identifiers from group ofp_meter_mod_failed_code |
| 971 | OFPMMFC_UNKNOWN = 0 |
| 972 | OFPMMFC_METER_EXISTS = 1 |
| 973 | OFPMMFC_INVALID_METER = 2 |
| 974 | OFPMMFC_UNKNOWN_METER = 3 |
| 975 | OFPMMFC_BAD_COMMAND = 4 |
| 976 | OFPMMFC_BAD_FLAGS = 5 |
| 977 | OFPMMFC_BAD_RATE = 6 |
| 978 | OFPMMFC_BAD_BURST = 7 |
| 979 | OFPMMFC_BAD_BAND = 8 |
| 980 | OFPMMFC_BAD_BAND_VALUE = 9 |
| 981 | OFPMMFC_OUT_OF_METERS = 10 |
| 982 | OFPMMFC_OUT_OF_BANDS = 11 |
| 983 | |
| 984 | ofp_meter_mod_failed_code_map = { |
| 985 | 0: 'OFPMMFC_UNKNOWN', |
| 986 | 1: 'OFPMMFC_METER_EXISTS', |
| 987 | 2: 'OFPMMFC_INVALID_METER', |
| 988 | 3: 'OFPMMFC_UNKNOWN_METER', |
| 989 | 4: 'OFPMMFC_BAD_COMMAND', |
| 990 | 5: 'OFPMMFC_BAD_FLAGS', |
| 991 | 6: 'OFPMMFC_BAD_RATE', |
| 992 | 7: 'OFPMMFC_BAD_BURST', |
| 993 | 8: 'OFPMMFC_BAD_BAND', |
| 994 | 9: 'OFPMMFC_BAD_BAND_VALUE', |
| 995 | 10: 'OFPMMFC_OUT_OF_METERS', |
| 996 | 11: 'OFPMMFC_OUT_OF_BANDS', |
| 997 | } |
| 998 | |
| 999 | # Identifiers from group ofp_oxm_class |
| 1000 | OFPXMC_NXM_0 = 0 |
| 1001 | OFPXMC_NXM_1 = 1 |
| 1002 | OFPXMC_OPENFLOW_BASIC = 32768 |
| 1003 | OFPXMC_EXPERIMENTER = 65535 |
| 1004 | |
| 1005 | ofp_oxm_class_map = { |
| 1006 | 0: 'OFPXMC_NXM_0', |
| 1007 | 1: 'OFPXMC_NXM_1', |
| 1008 | 32768: 'OFPXMC_OPENFLOW_BASIC', |
| 1009 | 65535: 'OFPXMC_EXPERIMENTER', |
| 1010 | } |
| 1011 | |
| 1012 | # Identifiers from group ofp_packet_in_reason |
| 1013 | OFPR_NO_MATCH = 0 |
| 1014 | OFPR_ACTION = 1 |
| 1015 | OFPR_INVALID_TTL = 2 |
| 1016 | OFPR_BSN_NEW_HOST = 128 |
| 1017 | OFPR_BSN_STATION_MOVE = 129 |
| 1018 | OFPR_BSN_BAD_VLAN = 130 |
| 1019 | OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131 |
| 1020 | OFPR_BSN_NO_ROUTE = 132 |
| 1021 | OFPR_BSN_ICMP_ECHO_REQUEST = 133 |
| 1022 | OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134 |
| 1023 | OFPR_BSN_DEST_HOST_UNREACHABLE = 135 |
| 1024 | OFPR_BSN_DEST_PORT_UNREACHABLE = 136 |
| 1025 | OFPR_BSN_FRAGMENTATION_REQUIRED = 137 |
| 1026 | OFPR_BSN_ARP = 139 |
| 1027 | OFPR_BSN_DHCP = 140 |
| 1028 | OFPR_BSN_DEBUG = 141 |
| 1029 | OFPR_BSN_PACKET_OF_DEATH = 142 |
| 1030 | |
| 1031 | ofp_packet_in_reason_map = { |
| 1032 | 0: 'OFPR_NO_MATCH', |
| 1033 | 1: 'OFPR_ACTION', |
| 1034 | 2: 'OFPR_INVALID_TTL', |
| 1035 | 128: 'OFPR_BSN_NEW_HOST', |
| 1036 | 129: 'OFPR_BSN_STATION_MOVE', |
| 1037 | 130: 'OFPR_BSN_BAD_VLAN', |
| 1038 | 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE', |
| 1039 | 132: 'OFPR_BSN_NO_ROUTE', |
| 1040 | 133: 'OFPR_BSN_ICMP_ECHO_REQUEST', |
| 1041 | 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE', |
| 1042 | 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE', |
| 1043 | 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE', |
| 1044 | 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED', |
| 1045 | 139: 'OFPR_BSN_ARP', |
| 1046 | 140: 'OFPR_BSN_DHCP', |
| 1047 | 141: 'OFPR_BSN_DEBUG', |
| 1048 | 142: 'OFPR_BSN_PACKET_OF_DEATH', |
| 1049 | } |
| 1050 | |
| 1051 | # Identifiers from group ofp_port |
| 1052 | OFPP_MAX = 4294967040 |
| 1053 | OFPP_IN_PORT = 4294967288 |
| 1054 | OFPP_TABLE = 4294967289 |
| 1055 | OFPP_NORMAL = 4294967290 |
| 1056 | OFPP_FLOOD = 4294967291 |
| 1057 | OFPP_ALL = 4294967292 |
| 1058 | OFPP_CONTROLLER = 4294967293 |
| 1059 | OFPP_LOCAL = 4294967294 |
| 1060 | OFPP_ANY = 4294967295 |
| 1061 | |
| 1062 | ofp_port_map = { |
| 1063 | 4294967040: 'OFPP_MAX', |
| 1064 | 4294967288: 'OFPP_IN_PORT', |
| 1065 | 4294967289: 'OFPP_TABLE', |
| 1066 | 4294967290: 'OFPP_NORMAL', |
| 1067 | 4294967291: 'OFPP_FLOOD', |
| 1068 | 4294967292: 'OFPP_ALL', |
| 1069 | 4294967293: 'OFPP_CONTROLLER', |
| 1070 | 4294967294: 'OFPP_LOCAL', |
| 1071 | 4294967295: 'OFPP_ANY', |
| 1072 | } |
| 1073 | |
| 1074 | # Identifiers from group ofp_port_config |
| 1075 | OFPPC_PORT_DOWN = 1 |
| 1076 | OFPPC_NO_RECV = 4 |
| 1077 | OFPPC_NO_FWD = 32 |
| 1078 | OFPPC_NO_PACKET_IN = 64 |
| 1079 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
| 1080 | |
| 1081 | ofp_port_config_map = { |
| 1082 | 1: 'OFPPC_PORT_DOWN', |
| 1083 | 4: 'OFPPC_NO_RECV', |
| 1084 | 32: 'OFPPC_NO_FWD', |
| 1085 | 64: 'OFPPC_NO_PACKET_IN', |
| 1086 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
| 1087 | } |
| 1088 | |
| 1089 | # Identifiers from group ofp_port_features |
| 1090 | OFPPF_10MB_HD = 1 |
| 1091 | OFPPF_10MB_FD = 2 |
| 1092 | OFPPF_100MB_HD = 4 |
| 1093 | OFPPF_100MB_FD = 8 |
| 1094 | OFPPF_1GB_HD = 16 |
| 1095 | OFPPF_1GB_FD = 32 |
| 1096 | OFPPF_10GB_FD = 64 |
| 1097 | OFPPF_40GB_FD = 128 |
| 1098 | OFPPF_100GB_FD = 256 |
| 1099 | OFPPF_1TB_FD = 512 |
| 1100 | OFPPF_OTHER = 1024 |
| 1101 | OFPPF_COPPER = 2048 |
| 1102 | OFPPF_FIBER = 4096 |
| 1103 | OFPPF_AUTONEG = 8192 |
| 1104 | OFPPF_PAUSE = 16384 |
| 1105 | OFPPF_PAUSE_ASYM = 32768 |
| 1106 | OFPPF_BSN_BREAKOUT_CAPABLE = 2147483648 |
| 1107 | |
| 1108 | ofp_port_features_map = { |
| 1109 | 1: 'OFPPF_10MB_HD', |
| 1110 | 2: 'OFPPF_10MB_FD', |
| 1111 | 4: 'OFPPF_100MB_HD', |
| 1112 | 8: 'OFPPF_100MB_FD', |
| 1113 | 16: 'OFPPF_1GB_HD', |
| 1114 | 32: 'OFPPF_1GB_FD', |
| 1115 | 64: 'OFPPF_10GB_FD', |
| 1116 | 128: 'OFPPF_40GB_FD', |
| 1117 | 256: 'OFPPF_100GB_FD', |
| 1118 | 512: 'OFPPF_1TB_FD', |
| 1119 | 1024: 'OFPPF_OTHER', |
| 1120 | 2048: 'OFPPF_COPPER', |
| 1121 | 4096: 'OFPPF_FIBER', |
| 1122 | 8192: 'OFPPF_AUTONEG', |
| 1123 | 16384: 'OFPPF_PAUSE', |
| 1124 | 32768: 'OFPPF_PAUSE_ASYM', |
| 1125 | 2147483648: 'OFPPF_BSN_BREAKOUT_CAPABLE', |
| 1126 | } |
| 1127 | |
| 1128 | # Identifiers from group ofp_port_mod_failed_code |
| 1129 | OFPPMFC_BAD_PORT = 0 |
| 1130 | OFPPMFC_BAD_HW_ADDR = 1 |
| 1131 | OFPPMFC_BAD_CONFIG = 2 |
| 1132 | OFPPMFC_BAD_ADVERTISE = 3 |
| 1133 | OFPPMFC_EPERM = 4 |
| 1134 | |
| 1135 | ofp_port_mod_failed_code_map = { |
| 1136 | 0: 'OFPPMFC_BAD_PORT', |
| 1137 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 1138 | 2: 'OFPPMFC_BAD_CONFIG', |
| 1139 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 1140 | 4: 'OFPPMFC_EPERM', |
| 1141 | } |
| 1142 | |
| 1143 | # Identifiers from group ofp_port_reason |
| 1144 | OFPPR_ADD = 0 |
| 1145 | OFPPR_DELETE = 1 |
| 1146 | OFPPR_MODIFY = 2 |
| 1147 | |
| 1148 | ofp_port_reason_map = { |
| 1149 | 0: 'OFPPR_ADD', |
| 1150 | 1: 'OFPPR_DELETE', |
| 1151 | 2: 'OFPPR_MODIFY', |
| 1152 | } |
| 1153 | |
| 1154 | # Identifiers from group ofp_port_state |
| 1155 | OFPPS_LINK_DOWN = 1 |
| 1156 | OFPPS_BLOCKED = 2 |
| 1157 | OFPPS_LIVE = 4 |
| 1158 | |
| 1159 | ofp_port_state_map = { |
| 1160 | 1: 'OFPPS_LINK_DOWN', |
| 1161 | 2: 'OFPPS_BLOCKED', |
| 1162 | 4: 'OFPPS_LIVE', |
| 1163 | } |
| 1164 | |
| 1165 | # Identifiers from group ofp_queue_op_failed_code |
| 1166 | OFPQOFC_BAD_PORT = 0 |
| 1167 | OFPQOFC_BAD_QUEUE = 1 |
| 1168 | OFPQOFC_EPERM = 2 |
| 1169 | |
| 1170 | ofp_queue_op_failed_code_map = { |
| 1171 | 0: 'OFPQOFC_BAD_PORT', |
| 1172 | 1: 'OFPQOFC_BAD_QUEUE', |
| 1173 | 2: 'OFPQOFC_EPERM', |
| 1174 | } |
| 1175 | |
| 1176 | # Identifiers from group ofp_queue_properties |
| 1177 | OFPQT_MIN_RATE = 1 |
| 1178 | OFPQT_MAX_RATE = 2 |
| 1179 | OFPQT_EXPERIMENTER = 65535 |
| 1180 | |
| 1181 | ofp_queue_properties_map = { |
| 1182 | 1: 'OFPQT_MIN_RATE', |
| 1183 | 2: 'OFPQT_MAX_RATE', |
| 1184 | 65535: 'OFPQT_EXPERIMENTER', |
| 1185 | } |
| 1186 | |
| 1187 | # Identifiers from group ofp_role_request_failed_code |
| 1188 | OFPRRFC_STALE = 0 |
| 1189 | OFPRRFC_UNSUP = 1 |
| 1190 | OFPRRFC_BAD_ROLE = 2 |
| 1191 | |
| 1192 | ofp_role_request_failed_code_map = { |
| 1193 | 0: 'OFPRRFC_STALE', |
| 1194 | 1: 'OFPRRFC_UNSUP', |
| 1195 | 2: 'OFPRRFC_BAD_ROLE', |
| 1196 | } |
| 1197 | |
| 1198 | # Identifiers from group ofp_stats_reply_flags |
| 1199 | OFPSF_REPLY_MORE = 1 |
| 1200 | |
| 1201 | ofp_stats_reply_flags_map = { |
| 1202 | 1: 'OFPSF_REPLY_MORE', |
| 1203 | } |
| 1204 | |
| 1205 | # Identifiers from group ofp_stats_request_flags |
| 1206 | OFPSF_REQ_MORE = 1 |
| 1207 | |
| 1208 | ofp_stats_request_flags_map = { |
| 1209 | 1: 'OFPSF_REQ_MORE', |
| 1210 | } |
| 1211 | |
| 1212 | # Identifiers from group ofp_stats_type |
| 1213 | OFPST_DESC = 0 |
| 1214 | OFPST_FLOW = 1 |
| 1215 | OFPST_AGGREGATE = 2 |
| 1216 | OFPST_TABLE = 3 |
| 1217 | OFPST_PORT = 4 |
| 1218 | OFPST_QUEUE = 5 |
| 1219 | OFPST_GROUP = 6 |
| 1220 | OFPST_GROUP_DESC = 7 |
| 1221 | OFPST_GROUP_FEATURES = 8 |
| 1222 | OFPST_METER = 9 |
| 1223 | OFPST_METER_CONFIG = 10 |
| 1224 | OFPST_METER_FEATURES = 11 |
| 1225 | OFPST_TABLE_FEATURES = 12 |
| 1226 | OFPST_PORT_DESC = 13 |
| 1227 | OFPST_EXPERIMENTER = 65535 |
| 1228 | |
| 1229 | ofp_stats_type_map = { |
| 1230 | 0: 'OFPST_DESC', |
| 1231 | 1: 'OFPST_FLOW', |
| 1232 | 2: 'OFPST_AGGREGATE', |
| 1233 | 3: 'OFPST_TABLE', |
| 1234 | 4: 'OFPST_PORT', |
| 1235 | 5: 'OFPST_QUEUE', |
| 1236 | 6: 'OFPST_GROUP', |
| 1237 | 7: 'OFPST_GROUP_DESC', |
| 1238 | 8: 'OFPST_GROUP_FEATURES', |
| 1239 | 9: 'OFPST_METER', |
| 1240 | 10: 'OFPST_METER_CONFIG', |
| 1241 | 11: 'OFPST_METER_FEATURES', |
| 1242 | 12: 'OFPST_TABLE_FEATURES', |
| 1243 | 13: 'OFPST_PORT_DESC', |
| 1244 | 65535: 'OFPST_EXPERIMENTER', |
| 1245 | } |
| 1246 | |
| 1247 | # Identifiers from group ofp_switch_config_failed_code |
| 1248 | OFPSCFC_BAD_FLAGS = 0 |
| 1249 | OFPSCFC_BAD_LEN = 1 |
| 1250 | OFPSCFC_EPERM = 2 |
| 1251 | |
| 1252 | ofp_switch_config_failed_code_map = { |
| 1253 | 0: 'OFPSCFC_BAD_FLAGS', |
| 1254 | 1: 'OFPSCFC_BAD_LEN', |
| 1255 | 2: 'OFPSCFC_EPERM', |
| 1256 | } |
| 1257 | |
| 1258 | # Identifiers from group ofp_table |
| 1259 | OFPTT_MAX = 254 |
| 1260 | OFPTT_ALL = 255 |
| 1261 | |
| 1262 | ofp_table_map = { |
| 1263 | 254: 'OFPTT_MAX', |
| 1264 | 255: 'OFPTT_ALL', |
| 1265 | } |
| 1266 | |
| 1267 | # Identifiers from group ofp_table_config |
| 1268 | OFPTC_DEPRECATED_MASK = 3 |
| 1269 | |
| 1270 | ofp_table_config_map = { |
| 1271 | 3: 'OFPTC_DEPRECATED_MASK', |
| 1272 | } |
| 1273 | |
| 1274 | # Identifiers from group ofp_table_feature_prop_type |
| 1275 | OFPTFPT_INSTRUCTIONS = 0 |
| 1276 | OFPTFPT_INSTRUCTIONS_MISS = 1 |
| 1277 | OFPTFPT_NEXT_TABLES = 2 |
| 1278 | OFPTFPT_NEXT_TABLES_MISS = 3 |
| 1279 | OFPTFPT_WRITE_ACTIONS = 4 |
| 1280 | OFPTFPT_WRITE_ACTIONS_MISS = 5 |
| 1281 | OFPTFPT_APPLY_ACTIONS = 6 |
| 1282 | OFPTFPT_APPLY_ACTIONS_MISS = 7 |
| 1283 | OFPTFPT_MATCH = 8 |
| 1284 | OFPTFPT_WILDCARDS = 10 |
| 1285 | OFPTFPT_WRITE_SETFIELD = 12 |
| 1286 | OFPTFPT_WRITE_SETFIELD_MISS = 13 |
| 1287 | OFPTFPT_APPLY_SETFIELD = 14 |
| 1288 | OFPTFPT_APPLY_SETFIELD_MISS = 15 |
| 1289 | OFPTFPT_EXPERIMENTER = 65534 |
| 1290 | OFPTFPT_EXPERIMENTER_MISS = 65535 |
| 1291 | |
| 1292 | ofp_table_feature_prop_type_map = { |
| 1293 | 0: 'OFPTFPT_INSTRUCTIONS', |
| 1294 | 1: 'OFPTFPT_INSTRUCTIONS_MISS', |
| 1295 | 2: 'OFPTFPT_NEXT_TABLES', |
| 1296 | 3: 'OFPTFPT_NEXT_TABLES_MISS', |
| 1297 | 4: 'OFPTFPT_WRITE_ACTIONS', |
| 1298 | 5: 'OFPTFPT_WRITE_ACTIONS_MISS', |
| 1299 | 6: 'OFPTFPT_APPLY_ACTIONS', |
| 1300 | 7: 'OFPTFPT_APPLY_ACTIONS_MISS', |
| 1301 | 8: 'OFPTFPT_MATCH', |
| 1302 | 10: 'OFPTFPT_WILDCARDS', |
| 1303 | 12: 'OFPTFPT_WRITE_SETFIELD', |
| 1304 | 13: 'OFPTFPT_WRITE_SETFIELD_MISS', |
| 1305 | 14: 'OFPTFPT_APPLY_SETFIELD', |
| 1306 | 15: 'OFPTFPT_APPLY_SETFIELD_MISS', |
| 1307 | 65534: 'OFPTFPT_EXPERIMENTER', |
| 1308 | 65535: 'OFPTFPT_EXPERIMENTER_MISS', |
| 1309 | } |
| 1310 | |
| 1311 | # Identifiers from group ofp_table_features_failed_code |
| 1312 | OFPTFFC_BAD_TABLE = 0 |
| 1313 | OFPTFFC_BAD_METADATA = 1 |
| 1314 | OFPTFFC_BAD_TYPE = 2 |
| 1315 | OFPTFFC_BAD_LEN = 3 |
| 1316 | OFPTFFC_BAD_ARGUMENT = 4 |
| 1317 | OFPTFFC_EPERM = 5 |
| 1318 | |
| 1319 | ofp_table_features_failed_code_map = { |
| 1320 | 0: 'OFPTFFC_BAD_TABLE', |
| 1321 | 1: 'OFPTFFC_BAD_METADATA', |
| 1322 | 2: 'OFPTFFC_BAD_TYPE', |
| 1323 | 3: 'OFPTFFC_BAD_LEN', |
| 1324 | 4: 'OFPTFFC_BAD_ARGUMENT', |
| 1325 | 5: 'OFPTFFC_EPERM', |
| 1326 | } |
| 1327 | |
| 1328 | # Identifiers from group ofp_table_mod_failed_code |
| 1329 | OFPTMFC_BAD_TABLE = 0 |
| 1330 | OFPTMFC_BAD_CONFIG = 1 |
| 1331 | OFPTMFC_EPERM = 2 |
| 1332 | |
| 1333 | ofp_table_mod_failed_code_map = { |
| 1334 | 0: 'OFPTMFC_BAD_TABLE', |
| 1335 | 1: 'OFPTMFC_BAD_CONFIG', |
| 1336 | 2: 'OFPTMFC_EPERM', |
| 1337 | } |
| 1338 | |
| 1339 | # Identifiers from group ofp_type |
| 1340 | OFPT_HELLO = 0 |
| 1341 | OFPT_ERROR = 1 |
| 1342 | OFPT_ECHO_REQUEST = 2 |
| 1343 | OFPT_ECHO_REPLY = 3 |
| 1344 | OFPT_EXPERIMENTER = 4 |
| 1345 | OFPT_FEATURES_REQUEST = 5 |
| 1346 | OFPT_FEATURES_REPLY = 6 |
| 1347 | OFPT_GET_CONFIG_REQUEST = 7 |
| 1348 | OFPT_GET_CONFIG_REPLY = 8 |
| 1349 | OFPT_SET_CONFIG = 9 |
| 1350 | OFPT_PACKET_IN = 10 |
| 1351 | OFPT_FLOW_REMOVED = 11 |
| 1352 | OFPT_PORT_STATUS = 12 |
| 1353 | OFPT_PACKET_OUT = 13 |
| 1354 | OFPT_FLOW_MOD = 14 |
| 1355 | OFPT_GROUP_MOD = 15 |
| 1356 | OFPT_PORT_MOD = 16 |
| 1357 | OFPT_TABLE_MOD = 17 |
| 1358 | OFPT_STATS_REQUEST = 18 |
| 1359 | OFPT_STATS_REPLY = 19 |
| 1360 | OFPT_BARRIER_REQUEST = 20 |
| 1361 | OFPT_BARRIER_REPLY = 21 |
| 1362 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 1363 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 1364 | OFPT_ROLE_REQUEST = 24 |
| 1365 | OFPT_ROLE_REPLY = 25 |
| 1366 | OFPT_GET_ASYNC_REQUEST = 26 |
| 1367 | OFPT_GET_ASYNC_REPLY = 27 |
| 1368 | OFPT_SET_ASYNC = 28 |
| 1369 | OFPT_METER_MOD = 29 |
| 1370 | |
| 1371 | ofp_type_map = { |
| 1372 | 0: 'OFPT_HELLO', |
| 1373 | 1: 'OFPT_ERROR', |
| 1374 | 2: 'OFPT_ECHO_REQUEST', |
| 1375 | 3: 'OFPT_ECHO_REPLY', |
| 1376 | 4: 'OFPT_EXPERIMENTER', |
| 1377 | 5: 'OFPT_FEATURES_REQUEST', |
| 1378 | 6: 'OFPT_FEATURES_REPLY', |
| 1379 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 1380 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 1381 | 9: 'OFPT_SET_CONFIG', |
| 1382 | 10: 'OFPT_PACKET_IN', |
| 1383 | 11: 'OFPT_FLOW_REMOVED', |
| 1384 | 12: 'OFPT_PORT_STATUS', |
| 1385 | 13: 'OFPT_PACKET_OUT', |
| 1386 | 14: 'OFPT_FLOW_MOD', |
| 1387 | 15: 'OFPT_GROUP_MOD', |
| 1388 | 16: 'OFPT_PORT_MOD', |
| 1389 | 17: 'OFPT_TABLE_MOD', |
| 1390 | 18: 'OFPT_STATS_REQUEST', |
| 1391 | 19: 'OFPT_STATS_REPLY', |
| 1392 | 20: 'OFPT_BARRIER_REQUEST', |
| 1393 | 21: 'OFPT_BARRIER_REPLY', |
| 1394 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 1395 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 1396 | 24: 'OFPT_ROLE_REQUEST', |
| 1397 | 25: 'OFPT_ROLE_REPLY', |
| 1398 | 26: 'OFPT_GET_ASYNC_REQUEST', |
| 1399 | 27: 'OFPT_GET_ASYNC_REPLY', |
| 1400 | 28: 'OFPT_SET_ASYNC', |
| 1401 | 29: 'OFPT_METER_MOD', |
| 1402 | } |
| 1403 | |
| 1404 | # Identifiers from group ofp_vlan_id |
| 1405 | OFPVID_NONE = 0 |
| 1406 | OFPVID_PRESENT = 4096 |
| 1407 | |
| 1408 | ofp_vlan_id_map = { |
| 1409 | 0: 'OFPVID_NONE', |
| 1410 | 4096: 'OFPVID_PRESENT', |
| 1411 | } |
| 1412 | |