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