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