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 = 3 |
| 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 |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 37 | OFP_NO_BUFFER = 4294967295 |
| 38 | DESC_STR_LEN = 256 |
| 39 | SERIAL_NUM_LEN = 32 |
| 40 | OFPQ_ALL = 4294967295 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 41 | OFPQ_MIN_RATE_UNCFG = 65535 |
| 42 | OFPQ_MAX_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_pdu_slot_num |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 45 | BSN_PDU_SLOT_NUM_ANY = 255 |
| 46 | |
Rich Lane | 2e079da | 2014-10-29 15:30:24 -0700 | [diff] [blame] | 47 | of_bsn_pdu_slot_num_map = { |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 48 | 255: 'BSN_PDU_SLOT_NUM_ANY', |
| 49 | } |
| 50 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 51 | # Identifiers from group ofp_action_type |
| 52 | OFPAT_OUTPUT = 0 |
| 53 | OFPAT_COPY_TTL_OUT = 11 |
| 54 | OFPAT_COPY_TTL_IN = 12 |
| 55 | OFPAT_SET_MPLS_TTL = 15 |
| 56 | OFPAT_DEC_MPLS_TTL = 16 |
| 57 | OFPAT_PUSH_VLAN = 17 |
| 58 | OFPAT_POP_VLAN = 18 |
| 59 | OFPAT_PUSH_MPLS = 19 |
| 60 | OFPAT_POP_MPLS = 20 |
| 61 | OFPAT_SET_QUEUE = 21 |
| 62 | OFPAT_GROUP = 22 |
| 63 | OFPAT_SET_NW_TTL = 23 |
| 64 | OFPAT_DEC_NW_TTL = 24 |
| 65 | OFPAT_SET_FIELD = 25 |
| 66 | OFPAT_EXPERIMENTER = 65535 |
| 67 | |
| 68 | ofp_action_type_map = { |
| 69 | 0: 'OFPAT_OUTPUT', |
| 70 | 11: 'OFPAT_COPY_TTL_OUT', |
| 71 | 12: 'OFPAT_COPY_TTL_IN', |
| 72 | 15: 'OFPAT_SET_MPLS_TTL', |
| 73 | 16: 'OFPAT_DEC_MPLS_TTL', |
| 74 | 17: 'OFPAT_PUSH_VLAN', |
| 75 | 18: 'OFPAT_POP_VLAN', |
| 76 | 19: 'OFPAT_PUSH_MPLS', |
| 77 | 20: 'OFPAT_POP_MPLS', |
| 78 | 21: 'OFPAT_SET_QUEUE', |
| 79 | 22: 'OFPAT_GROUP', |
| 80 | 23: 'OFPAT_SET_NW_TTL', |
| 81 | 24: 'OFPAT_DEC_NW_TTL', |
| 82 | 25: 'OFPAT_SET_FIELD', |
| 83 | 65535: 'OFPAT_EXPERIMENTER', |
| 84 | } |
| 85 | |
| 86 | # Identifiers from group ofp_bad_action_code |
| 87 | OFPBAC_BAD_TYPE = 0 |
| 88 | OFPBAC_BAD_LEN = 1 |
| 89 | OFPBAC_BAD_EXPERIMENTER = 2 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 90 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 91 | OFPBAC_BAD_OUT_PORT = 4 |
| 92 | OFPBAC_BAD_ARGUMENT = 5 |
| 93 | OFPBAC_EPERM = 6 |
| 94 | OFPBAC_TOO_MANY = 7 |
| 95 | OFPBAC_BAD_QUEUE = 8 |
| 96 | OFPBAC_BAD_OUT_GROUP = 9 |
| 97 | OFPBAC_MATCH_INCONSISTENT = 10 |
| 98 | OFPBAC_UNSUPPORTED_ORDER = 11 |
| 99 | OFPBAC_BAD_TAG = 12 |
| 100 | OFPBAC_BAD_SET_TYPE = 13 |
| 101 | OFPBAC_BAD_SET_LEN = 14 |
| 102 | OFPBAC_BAD_SET_ARGUMENT = 15 |
| 103 | |
| 104 | ofp_bad_action_code_map = { |
| 105 | 0: 'OFPBAC_BAD_TYPE', |
| 106 | 1: 'OFPBAC_BAD_LEN', |
| 107 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 108 | 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 109 | 4: 'OFPBAC_BAD_OUT_PORT', |
| 110 | 5: 'OFPBAC_BAD_ARGUMENT', |
| 111 | 6: 'OFPBAC_EPERM', |
| 112 | 7: 'OFPBAC_TOO_MANY', |
| 113 | 8: 'OFPBAC_BAD_QUEUE', |
| 114 | 9: 'OFPBAC_BAD_OUT_GROUP', |
| 115 | 10: 'OFPBAC_MATCH_INCONSISTENT', |
| 116 | 11: 'OFPBAC_UNSUPPORTED_ORDER', |
| 117 | 12: 'OFPBAC_BAD_TAG', |
| 118 | 13: 'OFPBAC_BAD_SET_TYPE', |
| 119 | 14: 'OFPBAC_BAD_SET_LEN', |
| 120 | 15: 'OFPBAC_BAD_SET_ARGUMENT', |
| 121 | } |
| 122 | |
| 123 | # Identifiers from group ofp_bad_instruction_code |
| 124 | OFPBIC_UNKNOWN_INST = 0 |
| 125 | OFPBIC_UNSUP_INST = 1 |
| 126 | OFPBIC_BAD_TABLE_ID = 2 |
| 127 | OFPBIC_UNSUP_METADATA = 3 |
| 128 | OFPBIC_UNSUP_METADATA_MASK = 4 |
| 129 | OFPBIC_BAD_EXPERIMENTER = 5 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 130 | OFPBIC_BAD_EXPERIMENTER_TYPE = 6 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 131 | OFPBIC_BAD_LEN = 7 |
| 132 | OFPBIC_EPERM = 8 |
| 133 | |
| 134 | ofp_bad_instruction_code_map = { |
| 135 | 0: 'OFPBIC_UNKNOWN_INST', |
| 136 | 1: 'OFPBIC_UNSUP_INST', |
| 137 | 2: 'OFPBIC_BAD_TABLE_ID', |
| 138 | 3: 'OFPBIC_UNSUP_METADATA', |
| 139 | 4: 'OFPBIC_UNSUP_METADATA_MASK', |
| 140 | 5: 'OFPBIC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 141 | 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 142 | 7: 'OFPBIC_BAD_LEN', |
| 143 | 8: 'OFPBIC_EPERM', |
| 144 | } |
| 145 | |
| 146 | # Identifiers from group ofp_bad_match_code |
| 147 | OFPBMC_BAD_TYPE = 0 |
| 148 | OFPBMC_BAD_LEN = 1 |
| 149 | OFPBMC_BAD_TAG = 2 |
| 150 | OFPBMC_BAD_DL_ADDR_MASK = 3 |
| 151 | OFPBMC_BAD_NW_ADDR_MASK = 4 |
| 152 | OFPBMC_BAD_WILDCARDS = 5 |
| 153 | OFPBMC_BAD_FIELD = 6 |
| 154 | OFPBMC_BAD_VALUE = 7 |
| 155 | OFPBMC_BAD_MASK = 8 |
| 156 | OFPBMC_BAD_PREREQ = 9 |
| 157 | OFPBMC_DUP_FIELD = 10 |
| 158 | OFPBMC_EPERM = 11 |
| 159 | |
| 160 | ofp_bad_match_code_map = { |
| 161 | 0: 'OFPBMC_BAD_TYPE', |
| 162 | 1: 'OFPBMC_BAD_LEN', |
| 163 | 2: 'OFPBMC_BAD_TAG', |
| 164 | 3: 'OFPBMC_BAD_DL_ADDR_MASK', |
| 165 | 4: 'OFPBMC_BAD_NW_ADDR_MASK', |
| 166 | 5: 'OFPBMC_BAD_WILDCARDS', |
| 167 | 6: 'OFPBMC_BAD_FIELD', |
| 168 | 7: 'OFPBMC_BAD_VALUE', |
| 169 | 8: 'OFPBMC_BAD_MASK', |
| 170 | 9: 'OFPBMC_BAD_PREREQ', |
| 171 | 10: 'OFPBMC_DUP_FIELD', |
| 172 | 11: 'OFPBMC_EPERM', |
| 173 | } |
| 174 | |
| 175 | # Identifiers from group ofp_bad_request_code |
| 176 | OFPBRC_BAD_VERSION = 0 |
| 177 | OFPBRC_BAD_TYPE = 1 |
| 178 | OFPBRC_BAD_STAT = 2 |
| 179 | OFPBRC_BAD_EXPERIMENTER = 3 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 180 | OFPBRC_BAD_EXPERIMENTER_TYPE = 4 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 181 | OFPBRC_EPERM = 5 |
| 182 | OFPBRC_BAD_LEN = 6 |
| 183 | OFPBRC_BUFFER_EMPTY = 7 |
| 184 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 185 | OFPBRC_BAD_TABLE_ID = 9 |
| 186 | OFPBRC_IS_SLAVE = 10 |
| 187 | OFPBRC_BAD_PORT = 11 |
| 188 | OFPBRC_BAD_PACKET = 12 |
| 189 | |
| 190 | ofp_bad_request_code_map = { |
| 191 | 0: 'OFPBRC_BAD_VERSION', |
| 192 | 1: 'OFPBRC_BAD_TYPE', |
| 193 | 2: 'OFPBRC_BAD_STAT', |
| 194 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 195 | 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 196 | 5: 'OFPBRC_EPERM', |
| 197 | 6: 'OFPBRC_BAD_LEN', |
| 198 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 199 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 200 | 9: 'OFPBRC_BAD_TABLE_ID', |
| 201 | 10: 'OFPBRC_IS_SLAVE', |
| 202 | 11: 'OFPBRC_BAD_PORT', |
| 203 | 12: 'OFPBRC_BAD_PACKET', |
| 204 | } |
| 205 | |
Harshmeet Singh | c51f404 | 2014-05-21 13:32:52 -0700 | [diff] [blame] | 206 | # Identifiers from group ofp_bsn_tcp_flag |
| 207 | OFP_BSN_TCP_FLAG_FIN = 1 |
| 208 | OFP_BSN_TCP_FLAG_SYN = 2 |
| 209 | OFP_BSN_TCP_FLAG_RST = 4 |
| 210 | OFP_BSN_TCP_FLAG_PSH = 8 |
| 211 | OFP_BSN_TCP_FLAG_ACK = 16 |
| 212 | OFP_BSN_TCP_FLAG_URG = 32 |
| 213 | OFP_BSN_TCP_FLAG_ECE = 64 |
| 214 | OFP_BSN_TCP_FLAG_CWR = 128 |
| 215 | OFP_BSN_TCP_FLAG_NS = 256 |
| 216 | |
| 217 | ofp_bsn_tcp_flag_map = { |
| 218 | 1: 'OFP_BSN_TCP_FLAG_FIN', |
| 219 | 2: 'OFP_BSN_TCP_FLAG_SYN', |
| 220 | 4: 'OFP_BSN_TCP_FLAG_RST', |
| 221 | 8: 'OFP_BSN_TCP_FLAG_PSH', |
| 222 | 16: 'OFP_BSN_TCP_FLAG_ACK', |
| 223 | 32: 'OFP_BSN_TCP_FLAG_URG', |
| 224 | 64: 'OFP_BSN_TCP_FLAG_ECE', |
| 225 | 128: 'OFP_BSN_TCP_FLAG_CWR', |
| 226 | 256: 'OFP_BSN_TCP_FLAG_NS', |
| 227 | } |
| 228 | |
Rich Lane | 93b3313 | 2014-04-21 12:20:58 -0700 | [diff] [blame] | 229 | # Identifiers from group ofp_bsn_vport_l2gre_flags |
| 230 | OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1 |
| 231 | OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2 |
| 232 | OF_BSN_VPORT_L2GRE_DSCP_COPY = 4 |
Rich Lane | 5587ab1 | 2014-06-30 11:19:09 -0700 | [diff] [blame] | 233 | OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8 |
Rich Lane | f9530c4 | 2014-09-15 09:59:43 -0700 | [diff] [blame] | 234 | OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16 |
Rich Lane | 93b3313 | 2014-04-21 12:20:58 -0700 | [diff] [blame] | 235 | |
| 236 | ofp_bsn_vport_l2gre_flags_map = { |
| 237 | 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID', |
| 238 | 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN', |
| 239 | 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY', |
Rich Lane | 5587ab1 | 2014-06-30 11:19:09 -0700 | [diff] [blame] | 240 | 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID', |
Rich Lane | f9530c4 | 2014-09-15 09:59:43 -0700 | [diff] [blame] | 241 | 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID', |
Rich Lane | 93b3313 | 2014-04-21 12:20:58 -0700 | [diff] [blame] | 242 | } |
| 243 | |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 244 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 245 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 246 | |
| 247 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 248 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 249 | } |
| 250 | |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 251 | # Identifiers from group ofp_bsn_vport_status |
| 252 | OF_BSN_VPORT_STATUS_OK = 0 |
| 253 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 254 | |
| 255 | ofp_bsn_vport_status_map = { |
| 256 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 257 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 258 | } |
| 259 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 260 | # Identifiers from group ofp_capabilities |
| 261 | OFPC_FLOW_STATS = 1 |
| 262 | OFPC_TABLE_STATS = 2 |
| 263 | OFPC_PORT_STATS = 4 |
| 264 | OFPC_GROUP_STATS = 8 |
| 265 | OFPC_IP_REASM = 32 |
| 266 | OFPC_QUEUE_STATS = 64 |
| 267 | OFPC_PORT_BLOCKED = 256 |
| 268 | |
| 269 | ofp_capabilities_map = { |
| 270 | 1: 'OFPC_FLOW_STATS', |
| 271 | 2: 'OFPC_TABLE_STATS', |
| 272 | 4: 'OFPC_PORT_STATS', |
| 273 | 8: 'OFPC_GROUP_STATS', |
| 274 | 32: 'OFPC_IP_REASM', |
| 275 | 64: 'OFPC_QUEUE_STATS', |
| 276 | 256: 'OFPC_PORT_BLOCKED', |
| 277 | } |
| 278 | |
| 279 | # Identifiers from group ofp_config_flags |
| 280 | OFPC_FRAG_NORMAL = 0 |
| 281 | OFPC_FRAG_DROP = 1 |
| 282 | OFPC_FRAG_REASM = 2 |
| 283 | OFPC_FRAG_MASK = 3 |
| 284 | OFPC_INVALID_TTL_TO_CONTROLLER = 4 |
| 285 | |
| 286 | ofp_config_flags_map = { |
| 287 | 0: 'OFPC_FRAG_NORMAL', |
| 288 | 1: 'OFPC_FRAG_DROP', |
| 289 | 2: 'OFPC_FRAG_REASM', |
| 290 | 3: 'OFPC_FRAG_MASK', |
| 291 | 4: 'OFPC_INVALID_TTL_TO_CONTROLLER', |
| 292 | } |
| 293 | |
| 294 | # Identifiers from group ofp_controller_max_len |
| 295 | OFPCML_MAX = 65509 |
| 296 | OFPCML_NO_BUFFER = 65535 |
| 297 | |
| 298 | ofp_controller_max_len_map = { |
| 299 | 65509: 'OFPCML_MAX', |
| 300 | 65535: 'OFPCML_NO_BUFFER', |
| 301 | } |
| 302 | |
| 303 | # Identifiers from group ofp_controller_role |
| 304 | OFPCR_ROLE_NOCHANGE = 0 |
| 305 | OFPCR_ROLE_EQUAL = 1 |
| 306 | OFPCR_ROLE_MASTER = 2 |
| 307 | OFPCR_ROLE_SLAVE = 3 |
| 308 | |
| 309 | ofp_controller_role_map = { |
| 310 | 0: 'OFPCR_ROLE_NOCHANGE', |
| 311 | 1: 'OFPCR_ROLE_EQUAL', |
| 312 | 2: 'OFPCR_ROLE_MASTER', |
| 313 | 3: 'OFPCR_ROLE_SLAVE', |
| 314 | } |
| 315 | |
| 316 | # Identifiers from group ofp_error_type |
| 317 | OFPET_HELLO_FAILED = 0 |
| 318 | OFPET_BAD_REQUEST = 1 |
| 319 | OFPET_BAD_ACTION = 2 |
| 320 | OFPET_BAD_INSTRUCTION = 3 |
| 321 | OFPET_BAD_MATCH = 4 |
| 322 | OFPET_FLOW_MOD_FAILED = 5 |
| 323 | OFPET_GROUP_MOD_FAILED = 6 |
| 324 | OFPET_PORT_MOD_FAILED = 7 |
| 325 | OFPET_TABLE_MOD_FAILED = 8 |
| 326 | OFPET_QUEUE_OP_FAILED = 9 |
| 327 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 328 | OFPET_ROLE_REQUEST_FAILED = 11 |
| 329 | OFPET_EXPERIMENTER = 65535 |
| 330 | |
| 331 | ofp_error_type_map = { |
| 332 | 0: 'OFPET_HELLO_FAILED', |
| 333 | 1: 'OFPET_BAD_REQUEST', |
| 334 | 2: 'OFPET_BAD_ACTION', |
| 335 | 3: 'OFPET_BAD_INSTRUCTION', |
| 336 | 4: 'OFPET_BAD_MATCH', |
| 337 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 338 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 339 | 7: 'OFPET_PORT_MOD_FAILED', |
| 340 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 341 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 342 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 343 | 11: 'OFPET_ROLE_REQUEST_FAILED', |
| 344 | 65535: 'OFPET_EXPERIMENTER', |
| 345 | } |
| 346 | |
| 347 | # Identifiers from group ofp_flow_mod_command |
| 348 | OFPFC_ADD = 0 |
| 349 | OFPFC_MODIFY = 1 |
| 350 | OFPFC_MODIFY_STRICT = 2 |
| 351 | OFPFC_DELETE = 3 |
| 352 | OFPFC_DELETE_STRICT = 4 |
| 353 | |
| 354 | ofp_flow_mod_command_map = { |
| 355 | 0: 'OFPFC_ADD', |
| 356 | 1: 'OFPFC_MODIFY', |
| 357 | 2: 'OFPFC_MODIFY_STRICT', |
| 358 | 3: 'OFPFC_DELETE', |
| 359 | 4: 'OFPFC_DELETE_STRICT', |
| 360 | } |
| 361 | |
| 362 | # Identifiers from group ofp_flow_mod_failed_code |
| 363 | OFPFMFC_UNKNOWN = 0 |
| 364 | OFPFMFC_TABLE_FULL = 1 |
| 365 | OFPFMFC_BAD_TABLE_ID = 2 |
| 366 | OFPFMFC_OVERLAP = 3 |
| 367 | OFPFMFC_EPERM = 4 |
| 368 | OFPFMFC_BAD_TIMEOUT = 5 |
| 369 | OFPFMFC_BAD_COMMAND = 6 |
| 370 | OFPFMFC_BAD_FLAGS = 7 |
| 371 | |
| 372 | ofp_flow_mod_failed_code_map = { |
| 373 | 0: 'OFPFMFC_UNKNOWN', |
| 374 | 1: 'OFPFMFC_TABLE_FULL', |
| 375 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 376 | 3: 'OFPFMFC_OVERLAP', |
| 377 | 4: 'OFPFMFC_EPERM', |
| 378 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 379 | 6: 'OFPFMFC_BAD_COMMAND', |
| 380 | 7: 'OFPFMFC_BAD_FLAGS', |
| 381 | } |
| 382 | |
| 383 | # Identifiers from group ofp_flow_mod_flags |
| 384 | OFPFF_SEND_FLOW_REM = 1 |
| 385 | OFPFF_CHECK_OVERLAP = 2 |
| 386 | OFPFF_RESET_COUNTS = 4 |
| 387 | |
| 388 | ofp_flow_mod_flags_map = { |
| 389 | 1: 'OFPFF_SEND_FLOW_REM', |
| 390 | 2: 'OFPFF_CHECK_OVERLAP', |
| 391 | 4: 'OFPFF_RESET_COUNTS', |
| 392 | } |
| 393 | |
| 394 | # Identifiers from group ofp_flow_removed_reason |
| 395 | OFPRR_IDLE_TIMEOUT = 0 |
| 396 | OFPRR_HARD_TIMEOUT = 1 |
| 397 | OFPRR_DELETE = 2 |
| 398 | OFPRR_GROUP_DELETE = 3 |
| 399 | |
| 400 | ofp_flow_removed_reason_map = { |
| 401 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 402 | 1: 'OFPRR_HARD_TIMEOUT', |
| 403 | 2: 'OFPRR_DELETE', |
| 404 | 3: 'OFPRR_GROUP_DELETE', |
| 405 | } |
| 406 | |
| 407 | # Identifiers from group ofp_group |
| 408 | OFPG_MAX = 4294967040 |
| 409 | OFPG_ALL = 4294967292 |
| 410 | OFPG_ANY = 4294967295 |
| 411 | |
| 412 | ofp_group_map = { |
| 413 | 4294967040: 'OFPG_MAX', |
| 414 | 4294967292: 'OFPG_ALL', |
| 415 | 4294967295: 'OFPG_ANY', |
| 416 | } |
| 417 | |
| 418 | # Identifiers from group ofp_group_capabilities |
| 419 | OFPGFC_SELECT_WEIGHT = 1 |
| 420 | OFPGFC_SELECT_LIVENESS = 2 |
| 421 | OFPGFC_CHAINING = 4 |
| 422 | OFPGFC_CHAINING_CHECKS = 8 |
| 423 | |
| 424 | ofp_group_capabilities_map = { |
| 425 | 1: 'OFPGFC_SELECT_WEIGHT', |
| 426 | 2: 'OFPGFC_SELECT_LIVENESS', |
| 427 | 4: 'OFPGFC_CHAINING', |
| 428 | 8: 'OFPGFC_CHAINING_CHECKS', |
| 429 | } |
| 430 | |
| 431 | # Identifiers from group ofp_group_mod_command |
| 432 | OFPGC_ADD = 0 |
| 433 | OFPGC_MODIFY = 1 |
| 434 | OFPGC_DELETE = 2 |
| 435 | |
| 436 | ofp_group_mod_command_map = { |
| 437 | 0: 'OFPGC_ADD', |
| 438 | 1: 'OFPGC_MODIFY', |
| 439 | 2: 'OFPGC_DELETE', |
| 440 | } |
| 441 | |
| 442 | # Identifiers from group ofp_group_mod_failed_code |
| 443 | OFPGMFC_GROUP_EXISTS = 0 |
| 444 | OFPGMFC_INVALID_GROUP = 1 |
| 445 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 446 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 447 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 448 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 449 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 450 | OFPGMFC_LOOP = 7 |
| 451 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 452 | OFPGMFC_CHAINED_GROUP = 9 |
| 453 | OFPGMFC_BAD_TYPE = 10 |
| 454 | OFPGMFC_BAD_COMMAND = 11 |
| 455 | OFPGMFC_BAD_BUCKET = 12 |
| 456 | OFPGMFC_BAD_WATCH = 13 |
| 457 | OFPGMFC_EPERM = 14 |
| 458 | |
| 459 | ofp_group_mod_failed_code_map = { |
| 460 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 461 | 1: 'OFPGMFC_INVALID_GROUP', |
| 462 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 463 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 464 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 465 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 466 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 467 | 7: 'OFPGMFC_LOOP', |
| 468 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 469 | 9: 'OFPGMFC_CHAINED_GROUP', |
| 470 | 10: 'OFPGMFC_BAD_TYPE', |
| 471 | 11: 'OFPGMFC_BAD_COMMAND', |
| 472 | 12: 'OFPGMFC_BAD_BUCKET', |
| 473 | 13: 'OFPGMFC_BAD_WATCH', |
| 474 | 14: 'OFPGMFC_EPERM', |
| 475 | } |
| 476 | |
| 477 | # Identifiers from group ofp_group_type |
| 478 | OFPGT_ALL = 0 |
| 479 | OFPGT_SELECT = 1 |
| 480 | OFPGT_INDIRECT = 2 |
| 481 | OFPGT_FF = 3 |
| 482 | |
| 483 | ofp_group_type_map = { |
| 484 | 0: 'OFPGT_ALL', |
| 485 | 1: 'OFPGT_SELECT', |
| 486 | 2: 'OFPGT_INDIRECT', |
| 487 | 3: 'OFPGT_FF', |
| 488 | } |
| 489 | |
| 490 | # Identifiers from group ofp_hello_failed_code |
| 491 | OFPHFC_INCOMPATIBLE = 0 |
| 492 | OFPHFC_EPERM = 1 |
| 493 | |
| 494 | ofp_hello_failed_code_map = { |
| 495 | 0: 'OFPHFC_INCOMPATIBLE', |
| 496 | 1: 'OFPHFC_EPERM', |
| 497 | } |
| 498 | |
| 499 | # Identifiers from group ofp_instruction_type |
| 500 | OFPIT_GOTO_TABLE = 1 |
| 501 | OFPIT_WRITE_METADATA = 2 |
| 502 | OFPIT_WRITE_ACTIONS = 3 |
| 503 | OFPIT_APPLY_ACTIONS = 4 |
| 504 | OFPIT_CLEAR_ACTIONS = 5 |
| 505 | OFPIT_EXPERIMENTER = 65535 |
| 506 | |
| 507 | ofp_instruction_type_map = { |
| 508 | 1: 'OFPIT_GOTO_TABLE', |
| 509 | 2: 'OFPIT_WRITE_METADATA', |
| 510 | 3: 'OFPIT_WRITE_ACTIONS', |
| 511 | 4: 'OFPIT_APPLY_ACTIONS', |
| 512 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 513 | 65535: 'OFPIT_EXPERIMENTER', |
| 514 | } |
| 515 | |
| 516 | # Identifiers from group ofp_match_type |
| 517 | OFPMT_STANDARD = 0 |
| 518 | OFPMT_OXM = 1 |
| 519 | |
| 520 | ofp_match_type_map = { |
| 521 | 0: 'OFPMT_STANDARD', |
| 522 | 1: 'OFPMT_OXM', |
| 523 | } |
| 524 | |
| 525 | # Identifiers from group ofp_oxm_class |
| 526 | OFPXMC_NXM_0 = 0 |
| 527 | OFPXMC_NXM_1 = 1 |
| 528 | OFPXMC_OPENFLOW_BASIC = 32768 |
| 529 | OFPXMC_EXPERIMENTER = 65535 |
| 530 | |
| 531 | ofp_oxm_class_map = { |
| 532 | 0: 'OFPXMC_NXM_0', |
| 533 | 1: 'OFPXMC_NXM_1', |
| 534 | 32768: 'OFPXMC_OPENFLOW_BASIC', |
| 535 | 65535: 'OFPXMC_EXPERIMENTER', |
| 536 | } |
| 537 | |
| 538 | # Identifiers from group ofp_packet_in_reason |
| 539 | OFPR_NO_MATCH = 0 |
| 540 | OFPR_ACTION = 1 |
| 541 | OFPR_INVALID_TTL = 2 |
| 542 | |
| 543 | ofp_packet_in_reason_map = { |
| 544 | 0: 'OFPR_NO_MATCH', |
| 545 | 1: 'OFPR_ACTION', |
| 546 | 2: 'OFPR_INVALID_TTL', |
| 547 | } |
| 548 | |
| 549 | # Identifiers from group ofp_port |
| 550 | OFPP_MAX = 4294967040 |
| 551 | OFPP_IN_PORT = 4294967288 |
| 552 | OFPP_TABLE = 4294967289 |
| 553 | OFPP_NORMAL = 4294967290 |
| 554 | OFPP_FLOOD = 4294967291 |
| 555 | OFPP_ALL = 4294967292 |
| 556 | OFPP_CONTROLLER = 4294967293 |
| 557 | OFPP_LOCAL = 4294967294 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 558 | OFPP_ANY = 4294967295 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 559 | |
| 560 | ofp_port_map = { |
| 561 | 4294967040: 'OFPP_MAX', |
| 562 | 4294967288: 'OFPP_IN_PORT', |
| 563 | 4294967289: 'OFPP_TABLE', |
| 564 | 4294967290: 'OFPP_NORMAL', |
| 565 | 4294967291: 'OFPP_FLOOD', |
| 566 | 4294967292: 'OFPP_ALL', |
| 567 | 4294967293: 'OFPP_CONTROLLER', |
| 568 | 4294967294: 'OFPP_LOCAL', |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 569 | 4294967295: 'OFPP_ANY', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 570 | } |
| 571 | |
| 572 | # Identifiers from group ofp_port_config |
| 573 | OFPPC_PORT_DOWN = 1 |
| 574 | OFPPC_NO_RECV = 4 |
| 575 | OFPPC_NO_FWD = 32 |
| 576 | OFPPC_NO_PACKET_IN = 64 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 577 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 578 | |
| 579 | ofp_port_config_map = { |
| 580 | 1: 'OFPPC_PORT_DOWN', |
| 581 | 4: 'OFPPC_NO_RECV', |
| 582 | 32: 'OFPPC_NO_FWD', |
| 583 | 64: 'OFPPC_NO_PACKET_IN', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 584 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 585 | } |
| 586 | |
| 587 | # Identifiers from group ofp_port_features |
| 588 | OFPPF_10MB_HD = 1 |
| 589 | OFPPF_10MB_FD = 2 |
| 590 | OFPPF_100MB_HD = 4 |
| 591 | OFPPF_100MB_FD = 8 |
| 592 | OFPPF_1GB_HD = 16 |
| 593 | OFPPF_1GB_FD = 32 |
| 594 | OFPPF_10GB_FD = 64 |
| 595 | OFPPF_40GB_FD = 128 |
| 596 | OFPPF_100GB_FD = 256 |
| 597 | OFPPF_1TB_FD = 512 |
| 598 | OFPPF_OTHER = 1024 |
| 599 | OFPPF_COPPER = 2048 |
| 600 | OFPPF_FIBER = 4096 |
| 601 | OFPPF_AUTONEG = 8192 |
| 602 | OFPPF_PAUSE = 16384 |
| 603 | OFPPF_PAUSE_ASYM = 32768 |
| 604 | |
| 605 | ofp_port_features_map = { |
| 606 | 1: 'OFPPF_10MB_HD', |
| 607 | 2: 'OFPPF_10MB_FD', |
| 608 | 4: 'OFPPF_100MB_HD', |
| 609 | 8: 'OFPPF_100MB_FD', |
| 610 | 16: 'OFPPF_1GB_HD', |
| 611 | 32: 'OFPPF_1GB_FD', |
| 612 | 64: 'OFPPF_10GB_FD', |
| 613 | 128: 'OFPPF_40GB_FD', |
| 614 | 256: 'OFPPF_100GB_FD', |
| 615 | 512: 'OFPPF_1TB_FD', |
| 616 | 1024: 'OFPPF_OTHER', |
| 617 | 2048: 'OFPPF_COPPER', |
| 618 | 4096: 'OFPPF_FIBER', |
| 619 | 8192: 'OFPPF_AUTONEG', |
| 620 | 16384: 'OFPPF_PAUSE', |
| 621 | 32768: 'OFPPF_PAUSE_ASYM', |
| 622 | } |
| 623 | |
| 624 | # Identifiers from group ofp_port_mod_failed_code |
| 625 | OFPPMFC_BAD_PORT = 0 |
| 626 | OFPPMFC_BAD_HW_ADDR = 1 |
| 627 | OFPPMFC_BAD_CONFIG = 2 |
| 628 | OFPPMFC_BAD_ADVERTISE = 3 |
| 629 | OFPPMFC_EPERM = 4 |
| 630 | |
| 631 | ofp_port_mod_failed_code_map = { |
| 632 | 0: 'OFPPMFC_BAD_PORT', |
| 633 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 634 | 2: 'OFPPMFC_BAD_CONFIG', |
| 635 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 636 | 4: 'OFPPMFC_EPERM', |
| 637 | } |
| 638 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 639 | # Identifiers from group ofp_port_reason |
| 640 | OFPPR_ADD = 0 |
| 641 | OFPPR_DELETE = 1 |
| 642 | OFPPR_MODIFY = 2 |
| 643 | |
| 644 | ofp_port_reason_map = { |
| 645 | 0: 'OFPPR_ADD', |
| 646 | 1: 'OFPPR_DELETE', |
| 647 | 2: 'OFPPR_MODIFY', |
| 648 | } |
| 649 | |
| 650 | # Identifiers from group ofp_port_state |
| 651 | OFPPS_LINK_DOWN = 1 |
| 652 | OFPPS_BLOCKED = 2 |
| 653 | OFPPS_LIVE = 4 |
| 654 | |
| 655 | ofp_port_state_map = { |
| 656 | 1: 'OFPPS_LINK_DOWN', |
| 657 | 2: 'OFPPS_BLOCKED', |
| 658 | 4: 'OFPPS_LIVE', |
| 659 | } |
| 660 | |
| 661 | # Identifiers from group ofp_queue_op_failed_code |
| 662 | OFPQOFC_BAD_PORT = 0 |
| 663 | OFPQOFC_BAD_QUEUE = 1 |
| 664 | OFPQOFC_EPERM = 2 |
| 665 | |
| 666 | ofp_queue_op_failed_code_map = { |
| 667 | 0: 'OFPQOFC_BAD_PORT', |
| 668 | 1: 'OFPQOFC_BAD_QUEUE', |
| 669 | 2: 'OFPQOFC_EPERM', |
| 670 | } |
| 671 | |
| 672 | # Identifiers from group ofp_queue_properties |
| 673 | OFPQT_MIN_RATE = 1 |
| 674 | OFPQT_MAX_RATE = 2 |
| 675 | OFPQT_EXPERIMENTER = 65535 |
| 676 | |
| 677 | ofp_queue_properties_map = { |
| 678 | 1: 'OFPQT_MIN_RATE', |
| 679 | 2: 'OFPQT_MAX_RATE', |
| 680 | 65535: 'OFPQT_EXPERIMENTER', |
| 681 | } |
| 682 | |
| 683 | # Identifiers from group ofp_role_request_failed_code |
| 684 | OFPRRFC_STALE = 0 |
| 685 | OFPRRFC_UNSUP = 1 |
| 686 | OFPRRFC_BAD_ROLE = 2 |
| 687 | |
| 688 | ofp_role_request_failed_code_map = { |
| 689 | 0: 'OFPRRFC_STALE', |
| 690 | 1: 'OFPRRFC_UNSUP', |
| 691 | 2: 'OFPRRFC_BAD_ROLE', |
| 692 | } |
| 693 | |
| 694 | # Identifiers from group ofp_stats_reply_flags |
| 695 | OFPSF_REPLY_MORE = 1 |
| 696 | |
| 697 | ofp_stats_reply_flags_map = { |
| 698 | 1: 'OFPSF_REPLY_MORE', |
| 699 | } |
| 700 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 701 | # Identifiers from group ofp_stats_request_flags |
| 702 | |
| 703 | ofp_stats_request_flags_map = { |
| 704 | } |
| 705 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 706 | # Identifiers from group ofp_stats_type |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 707 | OFPST_DESC = 0 |
| 708 | OFPST_FLOW = 1 |
| 709 | OFPST_AGGREGATE = 2 |
| 710 | OFPST_TABLE = 3 |
| 711 | OFPST_PORT = 4 |
| 712 | OFPST_QUEUE = 5 |
| 713 | OFPST_GROUP = 6 |
| 714 | OFPST_GROUP_DESC = 7 |
| 715 | OFPST_GROUP_FEATURES = 8 |
| 716 | OFPST_EXPERIMENTER = 65535 |
| 717 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 718 | ofp_stats_type_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 719 | 0: 'OFPST_DESC', |
| 720 | 1: 'OFPST_FLOW', |
| 721 | 2: 'OFPST_AGGREGATE', |
| 722 | 3: 'OFPST_TABLE', |
| 723 | 4: 'OFPST_PORT', |
| 724 | 5: 'OFPST_QUEUE', |
| 725 | 6: 'OFPST_GROUP', |
| 726 | 7: 'OFPST_GROUP_DESC', |
| 727 | 8: 'OFPST_GROUP_FEATURES', |
| 728 | 65535: 'OFPST_EXPERIMENTER', |
| 729 | } |
| 730 | |
| 731 | # Identifiers from group ofp_switch_config_failed_code |
| 732 | OFPSCFC_BAD_FLAGS = 0 |
| 733 | OFPSCFC_BAD_LEN = 1 |
| 734 | OFPSCFC_EPERM = 2 |
| 735 | |
| 736 | ofp_switch_config_failed_code_map = { |
| 737 | 0: 'OFPSCFC_BAD_FLAGS', |
| 738 | 1: 'OFPSCFC_BAD_LEN', |
| 739 | 2: 'OFPSCFC_EPERM', |
| 740 | } |
| 741 | |
| 742 | # Identifiers from group ofp_table |
| 743 | OFPTT_MAX = 254 |
| 744 | OFPTT_ALL = 255 |
| 745 | |
| 746 | ofp_table_map = { |
| 747 | 254: 'OFPTT_MAX', |
| 748 | 255: 'OFPTT_ALL', |
| 749 | } |
| 750 | |
| 751 | # Identifiers from group ofp_table_config |
| 752 | OFPTC_TABLE_MISS_CONTROLLER = 0 |
| 753 | OFPTC_TABLE_MISS_CONTINUE = 1 |
| 754 | OFPTC_TABLE_MISS_DROP = 2 |
| 755 | OFPTC_TABLE_MISS_MASK = 3 |
| 756 | |
| 757 | ofp_table_config_map = { |
| 758 | 0: 'OFPTC_TABLE_MISS_CONTROLLER', |
| 759 | 1: 'OFPTC_TABLE_MISS_CONTINUE', |
| 760 | 2: 'OFPTC_TABLE_MISS_DROP', |
| 761 | 3: 'OFPTC_TABLE_MISS_MASK', |
| 762 | } |
| 763 | |
| 764 | # Identifiers from group ofp_table_mod_failed_code |
| 765 | OFPTMFC_BAD_TABLE = 0 |
| 766 | OFPTMFC_BAD_CONFIG = 1 |
| 767 | OFPTMFC_EPERM = 2 |
| 768 | |
| 769 | ofp_table_mod_failed_code_map = { |
| 770 | 0: 'OFPTMFC_BAD_TABLE', |
| 771 | 1: 'OFPTMFC_BAD_CONFIG', |
| 772 | 2: 'OFPTMFC_EPERM', |
| 773 | } |
| 774 | |
| 775 | # Identifiers from group ofp_type |
| 776 | OFPT_HELLO = 0 |
| 777 | OFPT_ERROR = 1 |
| 778 | OFPT_ECHO_REQUEST = 2 |
| 779 | OFPT_ECHO_REPLY = 3 |
| 780 | OFPT_EXPERIMENTER = 4 |
| 781 | OFPT_FEATURES_REQUEST = 5 |
| 782 | OFPT_FEATURES_REPLY = 6 |
| 783 | OFPT_GET_CONFIG_REQUEST = 7 |
| 784 | OFPT_GET_CONFIG_REPLY = 8 |
| 785 | OFPT_SET_CONFIG = 9 |
| 786 | OFPT_PACKET_IN = 10 |
| 787 | OFPT_FLOW_REMOVED = 11 |
| 788 | OFPT_PORT_STATUS = 12 |
| 789 | OFPT_PACKET_OUT = 13 |
| 790 | OFPT_FLOW_MOD = 14 |
| 791 | OFPT_GROUP_MOD = 15 |
| 792 | OFPT_PORT_MOD = 16 |
| 793 | OFPT_TABLE_MOD = 17 |
| 794 | OFPT_STATS_REQUEST = 18 |
| 795 | OFPT_STATS_REPLY = 19 |
| 796 | OFPT_BARRIER_REQUEST = 20 |
| 797 | OFPT_BARRIER_REPLY = 21 |
| 798 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 799 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 800 | OFPT_ROLE_REQUEST = 24 |
| 801 | OFPT_ROLE_REPLY = 25 |
| 802 | |
| 803 | ofp_type_map = { |
| 804 | 0: 'OFPT_HELLO', |
| 805 | 1: 'OFPT_ERROR', |
| 806 | 2: 'OFPT_ECHO_REQUEST', |
| 807 | 3: 'OFPT_ECHO_REPLY', |
| 808 | 4: 'OFPT_EXPERIMENTER', |
| 809 | 5: 'OFPT_FEATURES_REQUEST', |
| 810 | 6: 'OFPT_FEATURES_REPLY', |
| 811 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 812 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 813 | 9: 'OFPT_SET_CONFIG', |
| 814 | 10: 'OFPT_PACKET_IN', |
| 815 | 11: 'OFPT_FLOW_REMOVED', |
| 816 | 12: 'OFPT_PORT_STATUS', |
| 817 | 13: 'OFPT_PACKET_OUT', |
| 818 | 14: 'OFPT_FLOW_MOD', |
| 819 | 15: 'OFPT_GROUP_MOD', |
| 820 | 16: 'OFPT_PORT_MOD', |
| 821 | 17: 'OFPT_TABLE_MOD', |
| 822 | 18: 'OFPT_STATS_REQUEST', |
| 823 | 19: 'OFPT_STATS_REPLY', |
| 824 | 20: 'OFPT_BARRIER_REQUEST', |
| 825 | 21: 'OFPT_BARRIER_REPLY', |
| 826 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 827 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 828 | 24: 'OFPT_ROLE_REQUEST', |
| 829 | 25: 'OFPT_ROLE_REPLY', |
| 830 | } |
| 831 | |
| 832 | # Identifiers from group ofp_vlan_id |
| 833 | OFPVID_NONE = 0 |
| 834 | OFPVID_PRESENT = 4096 |
| 835 | |
| 836 | ofp_vlan_id_map = { |
| 837 | 0: 'OFPVID_NONE', |
| 838 | 4096: 'OFPVID_PRESENT', |
| 839 | } |
| 840 | |