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