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 | 7b69e79 | 2015-03-31 11:12:50 -0700 | [diff] [blame^] | 339 | OFP_BSN_PKTIN_FLAG_ARP_TARGET = 8192 |
Rich Lane | ccd32ed | 2014-11-10 17:48:24 -0800 | [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', |
| 352 | 1024: 'OFP_BSN_PKTIN_FLAG_INGRESS_ACL', |
| 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 | ccd32ed | 2014-11-10 17:48:24 -0800 | [diff] [blame] | 356 | } |
| 357 | |
| 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 |
| 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 |
| 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 |
| 386 | |
| 387 | ofp_bsn_port_counter_map = { |
| 388 | 0: 'OFP_BSN_PORT_COUNTER_RX_BYTES', |
| 389 | 1: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST', |
| 390 | 2: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST', |
| 391 | 3: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST', |
| 392 | 4: 'OFP_BSN_PORT_COUNTER_RX_DROPPED', |
| 393 | 5: 'OFP_BSN_PORT_COUNTER_RX_ERRORS', |
| 394 | 6: 'OFP_BSN_PORT_COUNTER_TX_BYTES', |
| 395 | 7: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST', |
| 396 | 8: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST', |
| 397 | 9: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST', |
| 398 | 10: 'OFP_BSN_PORT_COUNTER_TX_DROPPED', |
| 399 | 11: 'OFP_BSN_PORT_COUNTER_TX_ERRORS', |
| 400 | 12: 'OFP_BSN_PORT_COUNTER_RX_RUNTS', |
| 401 | 13: 'OFP_BSN_PORT_COUNTER_RX_GIANTS', |
| 402 | 14: 'OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS', |
| 403 | 15: 'OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS', |
| 404 | 16: 'OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS', |
| 405 | 17: 'OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT', |
| 406 | 18: 'OFP_BSN_PORT_COUNTER_TX_COLLISIONS', |
| 407 | 19: 'OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS', |
| 408 | 20: 'OFP_BSN_PORT_COUNTER_TX_DEFERRED', |
| 409 | 21: 'OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT', |
| 410 | 22: 'OFP_BSN_PORT_COUNTER_RX_PACKETS', |
| 411 | 23: 'OFP_BSN_PORT_COUNTER_TX_PACKETS', |
| 412 | 24: 'OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS', |
| 413 | 25: 'OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS', |
| 414 | 26: 'OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS', |
| 415 | } |
| 416 | |
| 417 | # Identifiers from group ofp_bsn_tcp_flag |
| 418 | OFP_BSN_TCP_FLAG_FIN = 1 |
| 419 | OFP_BSN_TCP_FLAG_SYN = 2 |
| 420 | OFP_BSN_TCP_FLAG_RST = 4 |
| 421 | OFP_BSN_TCP_FLAG_PSH = 8 |
| 422 | OFP_BSN_TCP_FLAG_ACK = 16 |
| 423 | OFP_BSN_TCP_FLAG_URG = 32 |
| 424 | OFP_BSN_TCP_FLAG_ECE = 64 |
| 425 | OFP_BSN_TCP_FLAG_CWR = 128 |
| 426 | OFP_BSN_TCP_FLAG_NS = 256 |
| 427 | |
| 428 | ofp_bsn_tcp_flag_map = { |
| 429 | 1: 'OFP_BSN_TCP_FLAG_FIN', |
| 430 | 2: 'OFP_BSN_TCP_FLAG_SYN', |
| 431 | 4: 'OFP_BSN_TCP_FLAG_RST', |
| 432 | 8: 'OFP_BSN_TCP_FLAG_PSH', |
| 433 | 16: 'OFP_BSN_TCP_FLAG_ACK', |
| 434 | 32: 'OFP_BSN_TCP_FLAG_URG', |
| 435 | 64: 'OFP_BSN_TCP_FLAG_ECE', |
| 436 | 128: 'OFP_BSN_TCP_FLAG_CWR', |
| 437 | 256: 'OFP_BSN_TCP_FLAG_NS', |
| 438 | } |
| 439 | |
| 440 | # Identifiers from group ofp_bsn_udf_anchor |
| 441 | OFP_BSN_UDF_ANCHOR_PACKET_START = 0 |
| 442 | OFP_BSN_UDF_ANCHOR_L3_HEADER_START = 1 |
| 443 | OFP_BSN_UDF_ANCHOR_L4_HEADER_START = 2 |
| 444 | |
| 445 | ofp_bsn_udf_anchor_map = { |
| 446 | 0: 'OFP_BSN_UDF_ANCHOR_PACKET_START', |
| 447 | 1: 'OFP_BSN_UDF_ANCHOR_L3_HEADER_START', |
| 448 | 2: 'OFP_BSN_UDF_ANCHOR_L4_HEADER_START', |
| 449 | } |
| 450 | |
| 451 | # Identifiers from group ofp_bsn_vlan_counter_constants |
| 452 | OFP_BSN_VLAN_ALL = 65535 |
| 453 | |
| 454 | ofp_bsn_vlan_counter_constants_map = { |
| 455 | 65535: 'OFP_BSN_VLAN_ALL', |
| 456 | } |
| 457 | |
Rich Lane | 2e079da | 2014-10-29 15:30:24 -0700 | [diff] [blame] | 458 | # Identifiers from group ofp_bsn_vport_l2gre_flags |
| 459 | OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1 |
| 460 | OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2 |
| 461 | OF_BSN_VPORT_L2GRE_DSCP_COPY = 4 |
| 462 | OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8 |
| 463 | OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16 |
| 464 | |
| 465 | ofp_bsn_vport_l2gre_flags_map = { |
| 466 | 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID', |
| 467 | 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN', |
| 468 | 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY', |
| 469 | 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID', |
| 470 | 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID', |
| 471 | } |
| 472 | |
| 473 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 474 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 475 | |
| 476 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 477 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 478 | } |
| 479 | |
| 480 | # Identifiers from group ofp_bsn_vport_status |
| 481 | OF_BSN_VPORT_STATUS_OK = 0 |
| 482 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 483 | |
| 484 | ofp_bsn_vport_status_map = { |
| 485 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 486 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 487 | } |
| 488 | |
Rich Lane | ccd32ed | 2014-11-10 17:48:24 -0800 | [diff] [blame] | 489 | # Identifiers from group ofp_bsn_vrf_counter_constants |
| 490 | OFP_BSN_VRF_ALL = 4294967295 |
| 491 | |
| 492 | ofp_bsn_vrf_counter_constants_map = { |
| 493 | 4294967295: 'OFP_BSN_VRF_ALL', |
| 494 | } |
| 495 | |
Rich Lane | 2e079da | 2014-10-29 15:30:24 -0700 | [diff] [blame] | 496 | # Identifiers from group ofp_bundle_ctrl_type |
| 497 | OFPBCT_OPEN_REQUEST = 0 |
| 498 | OFPBCT_OPEN_REPLY = 1 |
| 499 | OFPBCT_CLOSE_REQUEST = 2 |
| 500 | OFPBCT_CLOSE_REPLY = 3 |
| 501 | OFPBCT_COMMIT_REQUEST = 4 |
| 502 | OFPBCT_COMMIT_REPLY = 5 |
| 503 | OFPBCT_DISCARD_REQUEST = 6 |
| 504 | OFPBCT_DISCARD_REPLY = 7 |
| 505 | |
| 506 | ofp_bundle_ctrl_type_map = { |
| 507 | 0: 'OFPBCT_OPEN_REQUEST', |
| 508 | 1: 'OFPBCT_OPEN_REPLY', |
| 509 | 2: 'OFPBCT_CLOSE_REQUEST', |
| 510 | 3: 'OFPBCT_CLOSE_REPLY', |
| 511 | 4: 'OFPBCT_COMMIT_REQUEST', |
| 512 | 5: 'OFPBCT_COMMIT_REPLY', |
| 513 | 6: 'OFPBCT_DISCARD_REQUEST', |
| 514 | 7: 'OFPBCT_DISCARD_REPLY', |
| 515 | } |
| 516 | |
| 517 | # Identifiers from group ofp_bundle_failed_code |
| 518 | OFPBFC_UNKNOWN = 0 |
| 519 | OFPBFC_EPERM = 1 |
| 520 | OFPBFC_BAD_ID = 2 |
| 521 | OFPBFC_BUNDLE_EXIST = 3 |
| 522 | OFPBFC_BUNDLE_CLOSED = 4 |
| 523 | OFPBFC_OUT_OF_BUNDLES = 5 |
| 524 | OFPBFC_BAD_TYPE = 6 |
| 525 | OFPBFC_BAD_FLAGS = 7 |
| 526 | OFPBFC_MSG_BAD_LEN = 8 |
| 527 | OFPBFC_MSG_BAD_XID = 9 |
| 528 | OFPBFC_MSG_UNSUP = 10 |
| 529 | OFPBFC_MSG_CONFLICT = 11 |
| 530 | OFPBFC_MSG_TOO_MANY = 12 |
| 531 | OFPBFC_MSG_FAILED = 13 |
| 532 | OFPBFC_TIMEOUT = 14 |
| 533 | OFPBFC_BUNDLE_IN_PROGRESS = 15 |
| 534 | |
| 535 | ofp_bundle_failed_code_map = { |
| 536 | 0: 'OFPBFC_UNKNOWN', |
| 537 | 1: 'OFPBFC_EPERM', |
| 538 | 2: 'OFPBFC_BAD_ID', |
| 539 | 3: 'OFPBFC_BUNDLE_EXIST', |
| 540 | 4: 'OFPBFC_BUNDLE_CLOSED', |
| 541 | 5: 'OFPBFC_OUT_OF_BUNDLES', |
| 542 | 6: 'OFPBFC_BAD_TYPE', |
| 543 | 7: 'OFPBFC_BAD_FLAGS', |
| 544 | 8: 'OFPBFC_MSG_BAD_LEN', |
| 545 | 9: 'OFPBFC_MSG_BAD_XID', |
| 546 | 10: 'OFPBFC_MSG_UNSUP', |
| 547 | 11: 'OFPBFC_MSG_CONFLICT', |
| 548 | 12: 'OFPBFC_MSG_TOO_MANY', |
| 549 | 13: 'OFPBFC_MSG_FAILED', |
| 550 | 14: 'OFPBFC_TIMEOUT', |
| 551 | 15: 'OFPBFC_BUNDLE_IN_PROGRESS', |
| 552 | } |
| 553 | |
| 554 | # Identifiers from group ofp_bundle_flags |
| 555 | OFPBF_ATOMIC = 1 |
| 556 | OFPBF_ORDERED = 2 |
| 557 | |
| 558 | ofp_bundle_flags_map = { |
| 559 | 1: 'OFPBF_ATOMIC', |
| 560 | 2: 'OFPBF_ORDERED', |
| 561 | } |
| 562 | |
| 563 | # Identifiers from group ofp_capabilities |
| 564 | OFPC_FLOW_STATS = 1 |
| 565 | OFPC_TABLE_STATS = 2 |
| 566 | OFPC_PORT_STATS = 4 |
| 567 | OFPC_GROUP_STATS = 8 |
| 568 | OFPC_IP_REASM = 32 |
| 569 | OFPC_QUEUE_STATS = 64 |
| 570 | OFPC_PORT_BLOCKED = 256 |
| 571 | |
| 572 | ofp_capabilities_map = { |
| 573 | 1: 'OFPC_FLOW_STATS', |
| 574 | 2: 'OFPC_TABLE_STATS', |
| 575 | 4: 'OFPC_PORT_STATS', |
| 576 | 8: 'OFPC_GROUP_STATS', |
| 577 | 32: 'OFPC_IP_REASM', |
| 578 | 64: 'OFPC_QUEUE_STATS', |
| 579 | 256: 'OFPC_PORT_BLOCKED', |
| 580 | } |
| 581 | |
| 582 | # Identifiers from group ofp_config_flags |
| 583 | OFPC_FRAG_NORMAL = 0 |
| 584 | OFPC_FRAG_DROP = 1 |
| 585 | OFPC_FRAG_REASM = 2 |
| 586 | OFPC_FRAG_MASK = 3 |
| 587 | |
| 588 | ofp_config_flags_map = { |
| 589 | 0: 'OFPC_FRAG_NORMAL', |
| 590 | 1: 'OFPC_FRAG_DROP', |
| 591 | 2: 'OFPC_FRAG_REASM', |
| 592 | 3: 'OFPC_FRAG_MASK', |
| 593 | } |
| 594 | |
| 595 | # Identifiers from group ofp_controller_max_len |
| 596 | OFPCML_MAX = 65509 |
| 597 | OFPCML_NO_BUFFER = 65535 |
| 598 | |
| 599 | ofp_controller_max_len_map = { |
| 600 | 65509: 'OFPCML_MAX', |
| 601 | 65535: 'OFPCML_NO_BUFFER', |
| 602 | } |
| 603 | |
| 604 | # Identifiers from group ofp_controller_role |
| 605 | OFPCR_ROLE_NOCHANGE = 0 |
| 606 | OFPCR_ROLE_EQUAL = 1 |
| 607 | OFPCR_ROLE_MASTER = 2 |
| 608 | OFPCR_ROLE_SLAVE = 3 |
| 609 | |
| 610 | ofp_controller_role_map = { |
| 611 | 0: 'OFPCR_ROLE_NOCHANGE', |
| 612 | 1: 'OFPCR_ROLE_EQUAL', |
| 613 | 2: 'OFPCR_ROLE_MASTER', |
| 614 | 3: 'OFPCR_ROLE_SLAVE', |
| 615 | } |
| 616 | |
| 617 | # Identifiers from group ofp_controller_role_reason |
| 618 | OFPCRR_MASTER_REQUEST = 0 |
| 619 | OFPCRR_CONFIG = 1 |
| 620 | OFPCRR_EXPERIMENTER = 2 |
| 621 | |
| 622 | ofp_controller_role_reason_map = { |
| 623 | 0: 'OFPCRR_MASTER_REQUEST', |
| 624 | 1: 'OFPCRR_CONFIG', |
| 625 | 2: 'OFPCRR_EXPERIMENTER', |
| 626 | } |
| 627 | |
| 628 | # Identifiers from group ofp_error_type |
| 629 | OFPET_HELLO_FAILED = 0 |
| 630 | OFPET_BAD_REQUEST = 1 |
| 631 | OFPET_BAD_ACTION = 2 |
| 632 | OFPET_BAD_INSTRUCTION = 3 |
| 633 | OFPET_BAD_MATCH = 4 |
| 634 | OFPET_FLOW_MOD_FAILED = 5 |
| 635 | OFPET_GROUP_MOD_FAILED = 6 |
| 636 | OFPET_PORT_MOD_FAILED = 7 |
| 637 | OFPET_TABLE_MOD_FAILED = 8 |
| 638 | OFPET_QUEUE_OP_FAILED = 9 |
| 639 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 640 | OFPET_ROLE_REQUEST_FAILED = 11 |
| 641 | OFPET_METER_MOD_FAILED = 12 |
| 642 | OFPET_TABLE_FEATURES_FAILED = 13 |
| 643 | OFPET_BAD_PROPERTY = 14 |
| 644 | OFPET_ASYNC_CONFIG_FAILED = 15 |
| 645 | OFPET_FLOW_MONITOR_FAILED = 16 |
| 646 | OFPET_BUNDLE_FAILED = 17 |
| 647 | OFPET_EXPERIMENTER = 65535 |
| 648 | |
| 649 | ofp_error_type_map = { |
| 650 | 0: 'OFPET_HELLO_FAILED', |
| 651 | 1: 'OFPET_BAD_REQUEST', |
| 652 | 2: 'OFPET_BAD_ACTION', |
| 653 | 3: 'OFPET_BAD_INSTRUCTION', |
| 654 | 4: 'OFPET_BAD_MATCH', |
| 655 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 656 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 657 | 7: 'OFPET_PORT_MOD_FAILED', |
| 658 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 659 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 660 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 661 | 11: 'OFPET_ROLE_REQUEST_FAILED', |
| 662 | 12: 'OFPET_METER_MOD_FAILED', |
| 663 | 13: 'OFPET_TABLE_FEATURES_FAILED', |
| 664 | 14: 'OFPET_BAD_PROPERTY', |
| 665 | 15: 'OFPET_ASYNC_CONFIG_FAILED', |
| 666 | 16: 'OFPET_FLOW_MONITOR_FAILED', |
| 667 | 17: 'OFPET_BUNDLE_FAILED', |
| 668 | 65535: 'OFPET_EXPERIMENTER', |
| 669 | } |
| 670 | |
| 671 | # Identifiers from group ofp_flow_mod_command |
| 672 | OFPFC_ADD = 0 |
| 673 | OFPFC_MODIFY = 1 |
| 674 | OFPFC_MODIFY_STRICT = 2 |
| 675 | OFPFC_DELETE = 3 |
| 676 | OFPFC_DELETE_STRICT = 4 |
| 677 | |
| 678 | ofp_flow_mod_command_map = { |
| 679 | 0: 'OFPFC_ADD', |
| 680 | 1: 'OFPFC_MODIFY', |
| 681 | 2: 'OFPFC_MODIFY_STRICT', |
| 682 | 3: 'OFPFC_DELETE', |
| 683 | 4: 'OFPFC_DELETE_STRICT', |
| 684 | } |
| 685 | |
| 686 | # Identifiers from group ofp_flow_mod_failed_code |
| 687 | OFPFMFC_UNKNOWN = 0 |
| 688 | OFPFMFC_TABLE_FULL = 1 |
| 689 | OFPFMFC_BAD_TABLE_ID = 2 |
| 690 | OFPFMFC_OVERLAP = 3 |
| 691 | OFPFMFC_EPERM = 4 |
| 692 | OFPFMFC_BAD_TIMEOUT = 5 |
| 693 | OFPFMFC_BAD_COMMAND = 6 |
| 694 | OFPFMFC_BAD_FLAGS = 7 |
| 695 | OFPFMFC_CANT_SYNC = 8 |
| 696 | OFPFMFC_BAD_PRIORITY = 9 |
| 697 | |
| 698 | ofp_flow_mod_failed_code_map = { |
| 699 | 0: 'OFPFMFC_UNKNOWN', |
| 700 | 1: 'OFPFMFC_TABLE_FULL', |
| 701 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 702 | 3: 'OFPFMFC_OVERLAP', |
| 703 | 4: 'OFPFMFC_EPERM', |
| 704 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 705 | 6: 'OFPFMFC_BAD_COMMAND', |
| 706 | 7: 'OFPFMFC_BAD_FLAGS', |
| 707 | 8: 'OFPFMFC_CANT_SYNC', |
| 708 | 9: 'OFPFMFC_BAD_PRIORITY', |
| 709 | } |
| 710 | |
| 711 | # Identifiers from group ofp_flow_mod_flags |
| 712 | OFPFF_SEND_FLOW_REM = 1 |
| 713 | OFPFF_CHECK_OVERLAP = 2 |
| 714 | OFPFF_RESET_COUNTS = 4 |
| 715 | OFPFF_NO_PKT_COUNTS = 8 |
| 716 | OFPFF_NO_BYT_COUNTS = 16 |
| 717 | OFPFF_BSN_SEND_IDLE = 128 |
| 718 | |
| 719 | ofp_flow_mod_flags_map = { |
| 720 | 1: 'OFPFF_SEND_FLOW_REM', |
| 721 | 2: 'OFPFF_CHECK_OVERLAP', |
| 722 | 4: 'OFPFF_RESET_COUNTS', |
| 723 | 8: 'OFPFF_NO_PKT_COUNTS', |
| 724 | 16: 'OFPFF_NO_BYT_COUNTS', |
| 725 | 128: 'OFPFF_BSN_SEND_IDLE', |
| 726 | } |
| 727 | |
| 728 | # Identifiers from group ofp_flow_monitor_failed_code |
| 729 | OFPMOFC_UNKNOWN = 0 |
| 730 | OFPMOFC_MONITOR_EXISTS = 1 |
| 731 | OFPMOFC_INVALID_MONITOR = 2 |
| 732 | OFPMOFC_UNKNOWN_MONITOR = 3 |
| 733 | OFPMOFC_BAD_COMMAND = 4 |
| 734 | OFPMOFC_BAD_FLAGS = 5 |
| 735 | OFPMOFC_BAD_TABLE_ID = 6 |
| 736 | OFPMOFC_BAD_OUT = 7 |
| 737 | |
| 738 | ofp_flow_monitor_failed_code_map = { |
| 739 | 0: 'OFPMOFC_UNKNOWN', |
| 740 | 1: 'OFPMOFC_MONITOR_EXISTS', |
| 741 | 2: 'OFPMOFC_INVALID_MONITOR', |
| 742 | 3: 'OFPMOFC_UNKNOWN_MONITOR', |
| 743 | 4: 'OFPMOFC_BAD_COMMAND', |
| 744 | 5: 'OFPMOFC_BAD_FLAGS', |
| 745 | 6: 'OFPMOFC_BAD_TABLE_ID', |
| 746 | 7: 'OFPMOFC_BAD_OUT', |
| 747 | } |
| 748 | |
| 749 | # Identifiers from group ofp_flow_removed_reason |
| 750 | OFPRR_IDLE_TIMEOUT = 0 |
| 751 | OFPRR_HARD_TIMEOUT = 1 |
| 752 | OFPRR_DELETE = 2 |
| 753 | OFPRR_GROUP_DELETE = 3 |
| 754 | OFPRR_METER_DELETE = 4 |
| 755 | OFPRR_EVICTION = 5 |
| 756 | |
| 757 | ofp_flow_removed_reason_map = { |
| 758 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 759 | 1: 'OFPRR_HARD_TIMEOUT', |
| 760 | 2: 'OFPRR_DELETE', |
| 761 | 3: 'OFPRR_GROUP_DELETE', |
| 762 | 4: 'OFPRR_METER_DELETE', |
| 763 | 5: 'OFPRR_EVICTION', |
| 764 | } |
| 765 | |
| 766 | # Identifiers from group ofp_group |
| 767 | OFPG_MAX = 4294967040 |
| 768 | OFPG_ALL = 4294967292 |
| 769 | OFPG_ANY = 4294967295 |
| 770 | |
| 771 | ofp_group_map = { |
| 772 | 4294967040: 'OFPG_MAX', |
| 773 | 4294967292: 'OFPG_ALL', |
| 774 | 4294967295: 'OFPG_ANY', |
| 775 | } |
| 776 | |
| 777 | # Identifiers from group ofp_group_capabilities |
| 778 | OFPGFC_SELECT_WEIGHT = 1 |
| 779 | OFPGFC_SELECT_LIVENESS = 2 |
| 780 | OFPGFC_CHAINING = 4 |
| 781 | OFPGFC_CHAINING_CHECKS = 8 |
| 782 | |
| 783 | ofp_group_capabilities_map = { |
| 784 | 1: 'OFPGFC_SELECT_WEIGHT', |
| 785 | 2: 'OFPGFC_SELECT_LIVENESS', |
| 786 | 4: 'OFPGFC_CHAINING', |
| 787 | 8: 'OFPGFC_CHAINING_CHECKS', |
| 788 | } |
| 789 | |
| 790 | # Identifiers from group ofp_group_mod_command |
| 791 | OFPGC_ADD = 0 |
| 792 | OFPGC_MODIFY = 1 |
| 793 | OFPGC_DELETE = 2 |
| 794 | |
| 795 | ofp_group_mod_command_map = { |
| 796 | 0: 'OFPGC_ADD', |
| 797 | 1: 'OFPGC_MODIFY', |
| 798 | 2: 'OFPGC_DELETE', |
| 799 | } |
| 800 | |
| 801 | # Identifiers from group ofp_group_mod_failed_code |
| 802 | OFPGMFC_GROUP_EXISTS = 0 |
| 803 | OFPGMFC_INVALID_GROUP = 1 |
| 804 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 805 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 806 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 807 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 808 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 809 | OFPGMFC_LOOP = 7 |
| 810 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 811 | OFPGMFC_CHAINED_GROUP = 9 |
| 812 | OFPGMFC_BAD_TYPE = 10 |
| 813 | OFPGMFC_BAD_COMMAND = 11 |
| 814 | OFPGMFC_BAD_BUCKET = 12 |
| 815 | OFPGMFC_BAD_WATCH = 13 |
| 816 | OFPGMFC_EPERM = 14 |
| 817 | |
| 818 | ofp_group_mod_failed_code_map = { |
| 819 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 820 | 1: 'OFPGMFC_INVALID_GROUP', |
| 821 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 822 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 823 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 824 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 825 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 826 | 7: 'OFPGMFC_LOOP', |
| 827 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 828 | 9: 'OFPGMFC_CHAINED_GROUP', |
| 829 | 10: 'OFPGMFC_BAD_TYPE', |
| 830 | 11: 'OFPGMFC_BAD_COMMAND', |
| 831 | 12: 'OFPGMFC_BAD_BUCKET', |
| 832 | 13: 'OFPGMFC_BAD_WATCH', |
| 833 | 14: 'OFPGMFC_EPERM', |
| 834 | } |
| 835 | |
| 836 | # Identifiers from group ofp_group_type |
| 837 | OFPGT_ALL = 0 |
| 838 | OFPGT_SELECT = 1 |
| 839 | OFPGT_INDIRECT = 2 |
| 840 | OFPGT_FF = 3 |
| 841 | |
| 842 | ofp_group_type_map = { |
| 843 | 0: 'OFPGT_ALL', |
| 844 | 1: 'OFPGT_SELECT', |
| 845 | 2: 'OFPGT_INDIRECT', |
| 846 | 3: 'OFPGT_FF', |
| 847 | } |
| 848 | |
| 849 | # Identifiers from group ofp_hello_elem_type |
| 850 | OFPHET_VERSIONBITMAP = 1 |
| 851 | |
| 852 | ofp_hello_elem_type_map = { |
| 853 | 1: 'OFPHET_VERSIONBITMAP', |
| 854 | } |
| 855 | |
| 856 | # Identifiers from group ofp_hello_failed_code |
| 857 | OFPHFC_INCOMPATIBLE = 0 |
| 858 | OFPHFC_EPERM = 1 |
| 859 | |
| 860 | ofp_hello_failed_code_map = { |
| 861 | 0: 'OFPHFC_INCOMPATIBLE', |
| 862 | 1: 'OFPHFC_EPERM', |
| 863 | } |
| 864 | |
| 865 | # Identifiers from group ofp_instruction_type |
| 866 | OFPIT_GOTO_TABLE = 1 |
| 867 | OFPIT_WRITE_METADATA = 2 |
| 868 | OFPIT_WRITE_ACTIONS = 3 |
| 869 | OFPIT_APPLY_ACTIONS = 4 |
| 870 | OFPIT_CLEAR_ACTIONS = 5 |
| 871 | OFPIT_METER = 6 |
| 872 | OFPIT_EXPERIMENTER = 65535 |
| 873 | |
| 874 | ofp_instruction_type_map = { |
| 875 | 1: 'OFPIT_GOTO_TABLE', |
| 876 | 2: 'OFPIT_WRITE_METADATA', |
| 877 | 3: 'OFPIT_WRITE_ACTIONS', |
| 878 | 4: 'OFPIT_APPLY_ACTIONS', |
| 879 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 880 | 6: 'OFPIT_METER', |
| 881 | 65535: 'OFPIT_EXPERIMENTER', |
| 882 | } |
| 883 | |
| 884 | # Identifiers from group ofp_ipv6exthdr_flags |
| 885 | OFPIEH_NONEXT = 1 |
| 886 | OFPIEH_ESP = 2 |
| 887 | OFPIEH_AUTH = 4 |
| 888 | OFPIEH_DEST = 8 |
| 889 | OFPIEH_FRAG = 16 |
| 890 | OFPIEH_ROUTER = 32 |
| 891 | OFPIEH_HOP = 64 |
| 892 | OFPIEH_UNREP = 128 |
| 893 | OFPIEH_UNSEQ = 256 |
| 894 | |
| 895 | ofp_ipv6exthdr_flags_map = { |
| 896 | 1: 'OFPIEH_NONEXT', |
| 897 | 2: 'OFPIEH_ESP', |
| 898 | 4: 'OFPIEH_AUTH', |
| 899 | 8: 'OFPIEH_DEST', |
| 900 | 16: 'OFPIEH_FRAG', |
| 901 | 32: 'OFPIEH_ROUTER', |
| 902 | 64: 'OFPIEH_HOP', |
| 903 | 128: 'OFPIEH_UNREP', |
| 904 | 256: 'OFPIEH_UNSEQ', |
| 905 | } |
| 906 | |
| 907 | # Identifiers from group ofp_match_type |
| 908 | OFPMT_STANDARD = 0 |
| 909 | OFPMT_OXM = 1 |
| 910 | |
| 911 | ofp_match_type_map = { |
| 912 | 0: 'OFPMT_STANDARD', |
| 913 | 1: 'OFPMT_OXM', |
| 914 | } |
| 915 | |
| 916 | # Identifiers from group ofp_meter |
| 917 | OFPM_MAX = 4294901760 |
| 918 | OFPM_SLOWPATH = 4294967293 |
| 919 | OFPM_CONTROLLER = 4294967294 |
| 920 | OFPM_ALL = 4294967295 |
| 921 | |
| 922 | ofp_meter_map = { |
| 923 | 4294901760: 'OFPM_MAX', |
| 924 | 4294967293: 'OFPM_SLOWPATH', |
| 925 | 4294967294: 'OFPM_CONTROLLER', |
| 926 | 4294967295: 'OFPM_ALL', |
| 927 | } |
| 928 | |
| 929 | # Identifiers from group ofp_meter_band_type |
| 930 | OFPMBT_DROP = 1 |
| 931 | OFPMBT_DSCP_REMARK = 2 |
| 932 | OFPMBT_EXPERIMENTER = 65535 |
| 933 | |
| 934 | ofp_meter_band_type_map = { |
| 935 | 1: 'OFPMBT_DROP', |
| 936 | 2: 'OFPMBT_DSCP_REMARK', |
| 937 | 65535: 'OFPMBT_EXPERIMENTER', |
| 938 | } |
| 939 | |
| 940 | # Identifiers from group ofp_meter_flags |
| 941 | OFPMF_KBPS = 1 |
| 942 | OFPMF_PKTPS = 2 |
| 943 | OFPMF_BURST = 4 |
| 944 | OFPMF_STATS = 8 |
| 945 | |
| 946 | ofp_meter_flags_map = { |
| 947 | 1: 'OFPMF_KBPS', |
| 948 | 2: 'OFPMF_PKTPS', |
| 949 | 4: 'OFPMF_BURST', |
| 950 | 8: 'OFPMF_STATS', |
| 951 | } |
| 952 | |
| 953 | # Identifiers from group ofp_meter_mod_command |
| 954 | OFPMC_ADD = 0 |
| 955 | OFPMC_MODIFY = 1 |
| 956 | OFPMC_DELETE = 2 |
| 957 | |
| 958 | ofp_meter_mod_command_map = { |
| 959 | 0: 'OFPMC_ADD', |
| 960 | 1: 'OFPMC_MODIFY', |
| 961 | 2: 'OFPMC_DELETE', |
| 962 | } |
| 963 | |
| 964 | # Identifiers from group ofp_meter_mod_failed_code |
| 965 | OFPMMFC_UNKNOWN = 0 |
| 966 | OFPMMFC_METER_EXISTS = 1 |
| 967 | OFPMMFC_INVALID_METER = 2 |
| 968 | OFPMMFC_UNKNOWN_METER = 3 |
| 969 | OFPMMFC_BAD_COMMAND = 4 |
| 970 | OFPMMFC_BAD_FLAGS = 5 |
| 971 | OFPMMFC_BAD_RATE = 6 |
| 972 | OFPMMFC_BAD_BURST = 7 |
| 973 | OFPMMFC_BAD_BAND = 8 |
| 974 | OFPMMFC_BAD_BAND_VALUE = 9 |
| 975 | OFPMMFC_OUT_OF_METERS = 10 |
| 976 | OFPMMFC_OUT_OF_BANDS = 11 |
| 977 | |
| 978 | ofp_meter_mod_failed_code_map = { |
| 979 | 0: 'OFPMMFC_UNKNOWN', |
| 980 | 1: 'OFPMMFC_METER_EXISTS', |
| 981 | 2: 'OFPMMFC_INVALID_METER', |
| 982 | 3: 'OFPMMFC_UNKNOWN_METER', |
| 983 | 4: 'OFPMMFC_BAD_COMMAND', |
| 984 | 5: 'OFPMMFC_BAD_FLAGS', |
| 985 | 6: 'OFPMMFC_BAD_RATE', |
| 986 | 7: 'OFPMMFC_BAD_BURST', |
| 987 | 8: 'OFPMMFC_BAD_BAND', |
| 988 | 9: 'OFPMMFC_BAD_BAND_VALUE', |
| 989 | 10: 'OFPMMFC_OUT_OF_METERS', |
| 990 | 11: 'OFPMMFC_OUT_OF_BANDS', |
| 991 | } |
| 992 | |
| 993 | # Identifiers from group ofp_optical_port_features |
| 994 | OFPOPF_RX_TUNE = 1 |
| 995 | OFPOPF_TX_TUNE = 2 |
| 996 | OFPOPF_TX_PWR = 4 |
| 997 | OFPOPF_USE_FREQ = 8 |
| 998 | |
| 999 | ofp_optical_port_features_map = { |
| 1000 | 1: 'OFPOPF_RX_TUNE', |
| 1001 | 2: 'OFPOPF_TX_TUNE', |
| 1002 | 4: 'OFPOPF_TX_PWR', |
| 1003 | 8: 'OFPOPF_USE_FREQ', |
| 1004 | } |
| 1005 | |
| 1006 | # Identifiers from group ofp_oxm_class |
| 1007 | OFPXMC_NXM_0 = 0 |
| 1008 | OFPXMC_NXM_1 = 1 |
| 1009 | OFPXMC_OPENFLOW_BASIC = 32768 |
| 1010 | OFPXMC_EXPERIMENTER = 65535 |
| 1011 | |
| 1012 | ofp_oxm_class_map = { |
| 1013 | 0: 'OFPXMC_NXM_0', |
| 1014 | 1: 'OFPXMC_NXM_1', |
| 1015 | 32768: 'OFPXMC_OPENFLOW_BASIC', |
| 1016 | 65535: 'OFPXMC_EXPERIMENTER', |
| 1017 | } |
| 1018 | |
| 1019 | # Identifiers from group ofp_packet_in_reason |
| 1020 | OFPR_NO_MATCH = 0 |
| 1021 | OFPR_ACTION = 1 |
| 1022 | OFPR_INVALID_TTL = 2 |
| 1023 | OFPR_ACTION_SET = 3 |
| 1024 | OFPR_GROUP = 4 |
| 1025 | OFPR_PACKET_OUT = 5 |
| 1026 | OFPR_BSN_NEW_HOST = 128 |
| 1027 | OFPR_BSN_STATION_MOVE = 129 |
| 1028 | OFPR_BSN_BAD_VLAN = 130 |
| 1029 | OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131 |
| 1030 | OFPR_BSN_NO_ROUTE = 132 |
| 1031 | OFPR_BSN_ICMP_ECHO_REQUEST = 133 |
| 1032 | OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134 |
| 1033 | OFPR_BSN_DEST_HOST_UNREACHABLE = 135 |
| 1034 | OFPR_BSN_DEST_PORT_UNREACHABLE = 136 |
| 1035 | OFPR_BSN_FRAGMENTATION_REQUIRED = 137 |
| 1036 | OFPR_BSN_ARP = 139 |
| 1037 | OFPR_BSN_DHCP = 140 |
| 1038 | OFPR_BSN_DEBUG = 141 |
| 1039 | OFPR_BSN_PACKET_OF_DEATH = 142 |
| 1040 | |
| 1041 | ofp_packet_in_reason_map = { |
| 1042 | 0: 'OFPR_NO_MATCH', |
| 1043 | 1: 'OFPR_ACTION', |
| 1044 | 2: 'OFPR_INVALID_TTL', |
| 1045 | 3: 'OFPR_ACTION_SET', |
| 1046 | 4: 'OFPR_GROUP', |
| 1047 | 5: 'OFPR_PACKET_OUT', |
| 1048 | 128: 'OFPR_BSN_NEW_HOST', |
| 1049 | 129: 'OFPR_BSN_STATION_MOVE', |
| 1050 | 130: 'OFPR_BSN_BAD_VLAN', |
| 1051 | 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE', |
| 1052 | 132: 'OFPR_BSN_NO_ROUTE', |
| 1053 | 133: 'OFPR_BSN_ICMP_ECHO_REQUEST', |
| 1054 | 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE', |
| 1055 | 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE', |
| 1056 | 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE', |
| 1057 | 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED', |
| 1058 | 139: 'OFPR_BSN_ARP', |
| 1059 | 140: 'OFPR_BSN_DHCP', |
| 1060 | 141: 'OFPR_BSN_DEBUG', |
| 1061 | 142: 'OFPR_BSN_PACKET_OF_DEATH', |
| 1062 | } |
| 1063 | |
| 1064 | # Identifiers from group ofp_port |
| 1065 | OFPP_MAX = 4294967040 |
| 1066 | OFPP_IN_PORT = 4294967288 |
| 1067 | OFPP_TABLE = 4294967289 |
| 1068 | OFPP_NORMAL = 4294967290 |
| 1069 | OFPP_FLOOD = 4294967291 |
| 1070 | OFPP_ALL = 4294967292 |
| 1071 | OFPP_CONTROLLER = 4294967293 |
| 1072 | OFPP_LOCAL = 4294967294 |
| 1073 | OFPP_ANY = 4294967295 |
| 1074 | |
| 1075 | ofp_port_map = { |
| 1076 | 4294967040: 'OFPP_MAX', |
| 1077 | 4294967288: 'OFPP_IN_PORT', |
| 1078 | 4294967289: 'OFPP_TABLE', |
| 1079 | 4294967290: 'OFPP_NORMAL', |
| 1080 | 4294967291: 'OFPP_FLOOD', |
| 1081 | 4294967292: 'OFPP_ALL', |
| 1082 | 4294967293: 'OFPP_CONTROLLER', |
| 1083 | 4294967294: 'OFPP_LOCAL', |
| 1084 | 4294967295: 'OFPP_ANY', |
| 1085 | } |
| 1086 | |
| 1087 | # Identifiers from group ofp_port_config |
| 1088 | OFPPC_PORT_DOWN = 1 |
| 1089 | OFPPC_NO_RECV = 4 |
| 1090 | OFPPC_NO_FWD = 32 |
| 1091 | OFPPC_NO_PACKET_IN = 64 |
| 1092 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
| 1093 | |
| 1094 | ofp_port_config_map = { |
| 1095 | 1: 'OFPPC_PORT_DOWN', |
| 1096 | 4: 'OFPPC_NO_RECV', |
| 1097 | 32: 'OFPPC_NO_FWD', |
| 1098 | 64: 'OFPPC_NO_PACKET_IN', |
| 1099 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
| 1100 | } |
| 1101 | |
| 1102 | # Identifiers from group ofp_port_features |
| 1103 | OFPPF_10MB_HD = 1 |
| 1104 | OFPPF_10MB_FD = 2 |
| 1105 | OFPPF_100MB_HD = 4 |
| 1106 | OFPPF_100MB_FD = 8 |
| 1107 | OFPPF_1GB_HD = 16 |
| 1108 | OFPPF_1GB_FD = 32 |
| 1109 | OFPPF_10GB_FD = 64 |
| 1110 | OFPPF_40GB_FD = 128 |
| 1111 | OFPPF_100GB_FD = 256 |
| 1112 | OFPPF_1TB_FD = 512 |
| 1113 | OFPPF_OTHER = 1024 |
| 1114 | OFPPF_COPPER = 2048 |
| 1115 | OFPPF_FIBER = 4096 |
| 1116 | OFPPF_AUTONEG = 8192 |
| 1117 | OFPPF_PAUSE = 16384 |
| 1118 | OFPPF_PAUSE_ASYM = 32768 |
Rich Lane | cb18dbd | 2014-12-18 10:02:29 -0800 | [diff] [blame] | 1119 | OFPPF_BSN_BREAKOUT_CAPABLE = 2147483648 |
Rich Lane | 2e079da | 2014-10-29 15:30:24 -0700 | [diff] [blame] | 1120 | |
| 1121 | ofp_port_features_map = { |
| 1122 | 1: 'OFPPF_10MB_HD', |
| 1123 | 2: 'OFPPF_10MB_FD', |
| 1124 | 4: 'OFPPF_100MB_HD', |
| 1125 | 8: 'OFPPF_100MB_FD', |
| 1126 | 16: 'OFPPF_1GB_HD', |
| 1127 | 32: 'OFPPF_1GB_FD', |
| 1128 | 64: 'OFPPF_10GB_FD', |
| 1129 | 128: 'OFPPF_40GB_FD', |
| 1130 | 256: 'OFPPF_100GB_FD', |
| 1131 | 512: 'OFPPF_1TB_FD', |
| 1132 | 1024: 'OFPPF_OTHER', |
| 1133 | 2048: 'OFPPF_COPPER', |
| 1134 | 4096: 'OFPPF_FIBER', |
| 1135 | 8192: 'OFPPF_AUTONEG', |
| 1136 | 16384: 'OFPPF_PAUSE', |
| 1137 | 32768: 'OFPPF_PAUSE_ASYM', |
Rich Lane | cb18dbd | 2014-12-18 10:02:29 -0800 | [diff] [blame] | 1138 | 2147483648: 'OFPPF_BSN_BREAKOUT_CAPABLE', |
Rich Lane | 2e079da | 2014-10-29 15:30:24 -0700 | [diff] [blame] | 1139 | } |
| 1140 | |
| 1141 | # Identifiers from group ofp_port_mod_failed_code |
| 1142 | OFPPMFC_BAD_PORT = 0 |
| 1143 | OFPPMFC_BAD_HW_ADDR = 1 |
| 1144 | OFPPMFC_BAD_CONFIG = 2 |
| 1145 | OFPPMFC_BAD_ADVERTISE = 3 |
| 1146 | OFPPMFC_EPERM = 4 |
| 1147 | |
| 1148 | ofp_port_mod_failed_code_map = { |
| 1149 | 0: 'OFPPMFC_BAD_PORT', |
| 1150 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 1151 | 2: 'OFPPMFC_BAD_CONFIG', |
| 1152 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 1153 | 4: 'OFPPMFC_EPERM', |
| 1154 | } |
| 1155 | |
| 1156 | # Identifiers from group ofp_port_reason |
| 1157 | OFPPR_ADD = 0 |
| 1158 | OFPPR_DELETE = 1 |
| 1159 | OFPPR_MODIFY = 2 |
| 1160 | |
| 1161 | ofp_port_reason_map = { |
| 1162 | 0: 'OFPPR_ADD', |
| 1163 | 1: 'OFPPR_DELETE', |
| 1164 | 2: 'OFPPR_MODIFY', |
| 1165 | } |
| 1166 | |
| 1167 | # Identifiers from group ofp_port_state |
| 1168 | OFPPS_LINK_DOWN = 1 |
| 1169 | OFPPS_BLOCKED = 2 |
| 1170 | OFPPS_LIVE = 4 |
| 1171 | |
| 1172 | ofp_port_state_map = { |
| 1173 | 1: 'OFPPS_LINK_DOWN', |
| 1174 | 2: 'OFPPS_BLOCKED', |
| 1175 | 4: 'OFPPS_LIVE', |
| 1176 | } |
| 1177 | |
| 1178 | # Identifiers from group ofp_port_stats_optical_flags |
| 1179 | OFPOSF_RX_TUNE = 1 |
| 1180 | OFPOSF_TX_TUNE = 2 |
| 1181 | OFPOSF_TX_PWR = 4 |
| 1182 | OFPOSF_RX_PWR = 16 |
| 1183 | OFPOSF_TX_BIAS = 32 |
| 1184 | OFPOSF_TX_TEMP = 64 |
| 1185 | |
| 1186 | ofp_port_stats_optical_flags_map = { |
| 1187 | 1: 'OFPOSF_RX_TUNE', |
| 1188 | 2: 'OFPOSF_TX_TUNE', |
| 1189 | 4: 'OFPOSF_TX_PWR', |
| 1190 | 16: 'OFPOSF_RX_PWR', |
| 1191 | 32: 'OFPOSF_TX_BIAS', |
| 1192 | 64: 'OFPOSF_TX_TEMP', |
| 1193 | } |
| 1194 | |
| 1195 | # Identifiers from group ofp_port_stats_prop_type |
| 1196 | OFPPSPT_ETHERNET = 0 |
| 1197 | OFPPSPT_OPTICAL = 1 |
| 1198 | OFPPSPT_EXPERIMENTER = 65535 |
| 1199 | |
| 1200 | ofp_port_stats_prop_type_map = { |
| 1201 | 0: 'OFPPSPT_ETHERNET', |
| 1202 | 1: 'OFPPSPT_OPTICAL', |
| 1203 | 65535: 'OFPPSPT_EXPERIMENTER', |
| 1204 | } |
| 1205 | |
| 1206 | # Identifiers from group ofp_queue_op_failed_code |
| 1207 | OFPQOFC_BAD_PORT = 0 |
| 1208 | OFPQOFC_BAD_QUEUE = 1 |
| 1209 | OFPQOFC_EPERM = 2 |
| 1210 | |
| 1211 | ofp_queue_op_failed_code_map = { |
| 1212 | 0: 'OFPQOFC_BAD_PORT', |
| 1213 | 1: 'OFPQOFC_BAD_QUEUE', |
| 1214 | 2: 'OFPQOFC_EPERM', |
| 1215 | } |
| 1216 | |
| 1217 | # Identifiers from group ofp_requestforward_reason |
| 1218 | OFPRFR_GROUP_MOD = 0 |
| 1219 | OFPRFR_METER_MOD = 1 |
| 1220 | |
| 1221 | ofp_requestforward_reason_map = { |
| 1222 | 0: 'OFPRFR_GROUP_MOD', |
| 1223 | 1: 'OFPRFR_METER_MOD', |
| 1224 | } |
| 1225 | |
| 1226 | # Identifiers from group ofp_role_request_failed_code |
| 1227 | OFPRRFC_STALE = 0 |
| 1228 | OFPRRFC_UNSUP = 1 |
| 1229 | OFPRRFC_BAD_ROLE = 2 |
| 1230 | |
| 1231 | ofp_role_request_failed_code_map = { |
| 1232 | 0: 'OFPRRFC_STALE', |
| 1233 | 1: 'OFPRRFC_UNSUP', |
| 1234 | 2: 'OFPRRFC_BAD_ROLE', |
| 1235 | } |
| 1236 | |
| 1237 | # Identifiers from group ofp_stats_reply_flags |
| 1238 | OFPSF_REPLY_MORE = 1 |
| 1239 | |
| 1240 | ofp_stats_reply_flags_map = { |
| 1241 | 1: 'OFPSF_REPLY_MORE', |
| 1242 | } |
| 1243 | |
| 1244 | # Identifiers from group ofp_stats_request_flags |
| 1245 | OFPSF_REQ_MORE = 1 |
| 1246 | |
| 1247 | ofp_stats_request_flags_map = { |
| 1248 | 1: 'OFPSF_REQ_MORE', |
| 1249 | } |
| 1250 | |
| 1251 | # Identifiers from group ofp_stats_type |
| 1252 | OFPST_DESC = 0 |
| 1253 | OFPST_FLOW = 1 |
| 1254 | OFPST_AGGREGATE = 2 |
| 1255 | OFPST_TABLE = 3 |
| 1256 | OFPST_PORT = 4 |
| 1257 | OFPST_QUEUE = 5 |
| 1258 | OFPST_GROUP = 6 |
| 1259 | OFPST_GROUP_DESC = 7 |
| 1260 | OFPST_GROUP_FEATURES = 8 |
| 1261 | OFPST_METER = 9 |
| 1262 | OFPST_METER_CONFIG = 10 |
| 1263 | OFPST_METER_FEATURES = 11 |
| 1264 | OFPST_TABLE_FEATURES = 12 |
| 1265 | OFPST_PORT_DESC = 13 |
| 1266 | OFPMP_TABLE_DESC = 14 |
| 1267 | OFPMP_QUEUE_DESC = 15 |
| 1268 | OFPMP_FLOW_MONITOR = 16 |
| 1269 | OFPST_EXPERIMENTER = 65535 |
| 1270 | |
| 1271 | ofp_stats_type_map = { |
| 1272 | 0: 'OFPST_DESC', |
| 1273 | 1: 'OFPST_FLOW', |
| 1274 | 2: 'OFPST_AGGREGATE', |
| 1275 | 3: 'OFPST_TABLE', |
| 1276 | 4: 'OFPST_PORT', |
| 1277 | 5: 'OFPST_QUEUE', |
| 1278 | 6: 'OFPST_GROUP', |
| 1279 | 7: 'OFPST_GROUP_DESC', |
| 1280 | 8: 'OFPST_GROUP_FEATURES', |
| 1281 | 9: 'OFPST_METER', |
| 1282 | 10: 'OFPST_METER_CONFIG', |
| 1283 | 11: 'OFPST_METER_FEATURES', |
| 1284 | 12: 'OFPST_TABLE_FEATURES', |
| 1285 | 13: 'OFPST_PORT_DESC', |
| 1286 | 14: 'OFPMP_TABLE_DESC', |
| 1287 | 15: 'OFPMP_QUEUE_DESC', |
| 1288 | 16: 'OFPMP_FLOW_MONITOR', |
| 1289 | 65535: 'OFPST_EXPERIMENTER', |
| 1290 | } |
| 1291 | |
| 1292 | # Identifiers from group ofp_switch_config_failed_code |
| 1293 | OFPSCFC_BAD_FLAGS = 0 |
| 1294 | OFPSCFC_BAD_LEN = 1 |
| 1295 | OFPSCFC_EPERM = 2 |
| 1296 | |
| 1297 | ofp_switch_config_failed_code_map = { |
| 1298 | 0: 'OFPSCFC_BAD_FLAGS', |
| 1299 | 1: 'OFPSCFC_BAD_LEN', |
| 1300 | 2: 'OFPSCFC_EPERM', |
| 1301 | } |
| 1302 | |
| 1303 | # Identifiers from group ofp_table |
| 1304 | OFPTT_MAX = 254 |
| 1305 | OFPTT_ALL = 255 |
| 1306 | |
| 1307 | ofp_table_map = { |
| 1308 | 254: 'OFPTT_MAX', |
| 1309 | 255: 'OFPTT_ALL', |
| 1310 | } |
| 1311 | |
| 1312 | # Identifiers from group ofp_table_config |
| 1313 | OFPTC_DEPRECATED_MASK = 3 |
| 1314 | OFPTC_EVICTION = 4 |
| 1315 | OFPTC_VACANCY_EVENTS = 8 |
| 1316 | |
| 1317 | ofp_table_config_map = { |
| 1318 | 3: 'OFPTC_DEPRECATED_MASK', |
| 1319 | 4: 'OFPTC_EVICTION', |
| 1320 | 8: 'OFPTC_VACANCY_EVENTS', |
| 1321 | } |
| 1322 | |
| 1323 | # Identifiers from group ofp_table_feature_prop_type |
| 1324 | OFPTFPT_INSTRUCTIONS = 0 |
| 1325 | OFPTFPT_INSTRUCTIONS_MISS = 1 |
| 1326 | OFPTFPT_NEXT_TABLES = 2 |
| 1327 | OFPTFPT_NEXT_TABLES_MISS = 3 |
| 1328 | OFPTFPT_WRITE_ACTIONS = 4 |
| 1329 | OFPTFPT_WRITE_ACTIONS_MISS = 5 |
| 1330 | OFPTFPT_APPLY_ACTIONS = 6 |
| 1331 | OFPTFPT_APPLY_ACTIONS_MISS = 7 |
| 1332 | OFPTFPT_MATCH = 8 |
| 1333 | OFPTFPT_WILDCARDS = 10 |
| 1334 | OFPTFPT_WRITE_SETFIELD = 12 |
| 1335 | OFPTFPT_WRITE_SETFIELD_MISS = 13 |
| 1336 | OFPTFPT_APPLY_SETFIELD = 14 |
| 1337 | OFPTFPT_APPLY_SETFIELD_MISS = 15 |
| 1338 | OFPTFPT_TABLE_SYNC_FROM = 16 |
| 1339 | OFPTFPT_EXPERIMENTER = 65534 |
| 1340 | OFPTFPT_EXPERIMENTER_MISS = 65535 |
| 1341 | |
| 1342 | ofp_table_feature_prop_type_map = { |
| 1343 | 0: 'OFPTFPT_INSTRUCTIONS', |
| 1344 | 1: 'OFPTFPT_INSTRUCTIONS_MISS', |
| 1345 | 2: 'OFPTFPT_NEXT_TABLES', |
| 1346 | 3: 'OFPTFPT_NEXT_TABLES_MISS', |
| 1347 | 4: 'OFPTFPT_WRITE_ACTIONS', |
| 1348 | 5: 'OFPTFPT_WRITE_ACTIONS_MISS', |
| 1349 | 6: 'OFPTFPT_APPLY_ACTIONS', |
| 1350 | 7: 'OFPTFPT_APPLY_ACTIONS_MISS', |
| 1351 | 8: 'OFPTFPT_MATCH', |
| 1352 | 10: 'OFPTFPT_WILDCARDS', |
| 1353 | 12: 'OFPTFPT_WRITE_SETFIELD', |
| 1354 | 13: 'OFPTFPT_WRITE_SETFIELD_MISS', |
| 1355 | 14: 'OFPTFPT_APPLY_SETFIELD', |
| 1356 | 15: 'OFPTFPT_APPLY_SETFIELD_MISS', |
| 1357 | 16: 'OFPTFPT_TABLE_SYNC_FROM', |
| 1358 | 65534: 'OFPTFPT_EXPERIMENTER', |
| 1359 | 65535: 'OFPTFPT_EXPERIMENTER_MISS', |
| 1360 | } |
| 1361 | |
| 1362 | # Identifiers from group ofp_table_features_failed_code |
| 1363 | OFPTFFC_BAD_TABLE = 0 |
| 1364 | OFPTFFC_BAD_METADATA = 1 |
| 1365 | OFPTFFC_EPERM = 5 |
| 1366 | |
| 1367 | ofp_table_features_failed_code_map = { |
| 1368 | 0: 'OFPTFFC_BAD_TABLE', |
| 1369 | 1: 'OFPTFFC_BAD_METADATA', |
| 1370 | 5: 'OFPTFFC_EPERM', |
| 1371 | } |
| 1372 | |
| 1373 | # Identifiers from group ofp_table_mod_failed_code |
| 1374 | OFPTMFC_BAD_TABLE = 0 |
| 1375 | OFPTMFC_BAD_CONFIG = 1 |
| 1376 | OFPTMFC_EPERM = 2 |
| 1377 | |
| 1378 | ofp_table_mod_failed_code_map = { |
| 1379 | 0: 'OFPTMFC_BAD_TABLE', |
| 1380 | 1: 'OFPTMFC_BAD_CONFIG', |
| 1381 | 2: 'OFPTMFC_EPERM', |
| 1382 | } |
| 1383 | |
| 1384 | # Identifiers from group ofp_table_mod_prop_eviction_flag |
| 1385 | OFPTMPEF_OTHER = 1 |
| 1386 | OFPTMPEF_IMPORTANCE = 2 |
| 1387 | OFPTMPEF_LIFETIME = 4 |
| 1388 | |
| 1389 | ofp_table_mod_prop_eviction_flag_map = { |
| 1390 | 1: 'OFPTMPEF_OTHER', |
| 1391 | 2: 'OFPTMPEF_IMPORTANCE', |
| 1392 | 4: 'OFPTMPEF_LIFETIME', |
| 1393 | } |
| 1394 | |
| 1395 | # Identifiers from group ofp_table_reason |
| 1396 | OFPTR_VACANCY_DOWN = 3 |
| 1397 | OFPTR_VACANCY_UP = 4 |
| 1398 | |
| 1399 | ofp_table_reason_map = { |
| 1400 | 3: 'OFPTR_VACANCY_DOWN', |
| 1401 | 4: 'OFPTR_VACANCY_UP', |
| 1402 | } |
| 1403 | |
| 1404 | # Identifiers from group ofp_type |
| 1405 | OFPT_HELLO = 0 |
| 1406 | OFPT_ERROR = 1 |
| 1407 | OFPT_ECHO_REQUEST = 2 |
| 1408 | OFPT_ECHO_REPLY = 3 |
| 1409 | OFPT_EXPERIMENTER = 4 |
| 1410 | OFPT_FEATURES_REQUEST = 5 |
| 1411 | OFPT_FEATURES_REPLY = 6 |
| 1412 | OFPT_GET_CONFIG_REQUEST = 7 |
| 1413 | OFPT_GET_CONFIG_REPLY = 8 |
| 1414 | OFPT_SET_CONFIG = 9 |
| 1415 | OFPT_PACKET_IN = 10 |
| 1416 | OFPT_FLOW_REMOVED = 11 |
| 1417 | OFPT_PORT_STATUS = 12 |
| 1418 | OFPT_PACKET_OUT = 13 |
| 1419 | OFPT_FLOW_MOD = 14 |
| 1420 | OFPT_GROUP_MOD = 15 |
| 1421 | OFPT_PORT_MOD = 16 |
| 1422 | OFPT_TABLE_MOD = 17 |
| 1423 | OFPT_STATS_REQUEST = 18 |
| 1424 | OFPT_STATS_REPLY = 19 |
| 1425 | OFPT_BARRIER_REQUEST = 20 |
| 1426 | OFPT_BARRIER_REPLY = 21 |
| 1427 | OFPT_ROLE_REQUEST = 24 |
| 1428 | OFPT_ROLE_REPLY = 25 |
| 1429 | OFPT_GET_ASYNC_REQUEST = 26 |
| 1430 | OFPT_GET_ASYNC_REPLY = 27 |
| 1431 | OFPT_SET_ASYNC = 28 |
| 1432 | OFPT_METER_MOD = 29 |
| 1433 | OFPT_ROLE_STATUS = 30 |
| 1434 | OFPT_TABLE_STATUS = 31 |
| 1435 | OFPT_REQUESTFORWARD = 32 |
| 1436 | OFPT_BUNDLE_CONTROL = 33 |
| 1437 | OFPT_BUNDLE_ADD_MESSAGE = 34 |
| 1438 | |
| 1439 | ofp_type_map = { |
| 1440 | 0: 'OFPT_HELLO', |
| 1441 | 1: 'OFPT_ERROR', |
| 1442 | 2: 'OFPT_ECHO_REQUEST', |
| 1443 | 3: 'OFPT_ECHO_REPLY', |
| 1444 | 4: 'OFPT_EXPERIMENTER', |
| 1445 | 5: 'OFPT_FEATURES_REQUEST', |
| 1446 | 6: 'OFPT_FEATURES_REPLY', |
| 1447 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 1448 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 1449 | 9: 'OFPT_SET_CONFIG', |
| 1450 | 10: 'OFPT_PACKET_IN', |
| 1451 | 11: 'OFPT_FLOW_REMOVED', |
| 1452 | 12: 'OFPT_PORT_STATUS', |
| 1453 | 13: 'OFPT_PACKET_OUT', |
| 1454 | 14: 'OFPT_FLOW_MOD', |
| 1455 | 15: 'OFPT_GROUP_MOD', |
| 1456 | 16: 'OFPT_PORT_MOD', |
| 1457 | 17: 'OFPT_TABLE_MOD', |
| 1458 | 18: 'OFPT_STATS_REQUEST', |
| 1459 | 19: 'OFPT_STATS_REPLY', |
| 1460 | 20: 'OFPT_BARRIER_REQUEST', |
| 1461 | 21: 'OFPT_BARRIER_REPLY', |
| 1462 | 24: 'OFPT_ROLE_REQUEST', |
| 1463 | 25: 'OFPT_ROLE_REPLY', |
| 1464 | 26: 'OFPT_GET_ASYNC_REQUEST', |
| 1465 | 27: 'OFPT_GET_ASYNC_REPLY', |
| 1466 | 28: 'OFPT_SET_ASYNC', |
| 1467 | 29: 'OFPT_METER_MOD', |
| 1468 | 30: 'OFPT_ROLE_STATUS', |
| 1469 | 31: 'OFPT_TABLE_STATUS', |
| 1470 | 32: 'OFPT_REQUESTFORWARD', |
| 1471 | 33: 'OFPT_BUNDLE_CONTROL', |
| 1472 | 34: 'OFPT_BUNDLE_ADD_MESSAGE', |
| 1473 | } |
| 1474 | |
| 1475 | # Identifiers from group ofp_vlan_id |
| 1476 | OFPVID_NONE = 0 |
| 1477 | OFPVID_PRESENT = 4096 |
| 1478 | |
| 1479 | ofp_vlan_id_map = { |
| 1480 | 0: 'OFPVID_NONE', |
| 1481 | 4096: 'OFPVID_PRESENT', |
| 1482 | } |
| 1483 | |