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