Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -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 | |
| 5 | # Automatically generated by LOXI from template const.py |
| 6 | # Do not modify |
| 7 | |
| 8 | OFP_VERSION = 2 |
| 9 | |
| 10 | # Identifiers from group macro_definitions |
| 11 | OFP_VLAN_NONE = 0 |
| 12 | OFP_FLOW_PERMANENT = 0 |
| 13 | OFP_ETH_ALEN = 6 |
| 14 | OFP_MAX_PORT_NAME_LEN = 16 |
| 15 | OFP_MAX_TABLE_NAME_LEN = 32 |
| 16 | SERIAL_NUM_LEN = 32 |
| 17 | OFPFW_ICMP_TYPE = 64 |
| 18 | OFPMT_STANDARD_LENGTH = 88 |
| 19 | OFP_DEFAULT_MISS_SEND_LEN = 128 |
| 20 | OFPFW_ICMP_CODE = 128 |
| 21 | DESC_STR_LEN = 256 |
| 22 | OFP_DL_TYPE_NOT_ETH_TYPE = 1535 |
| 23 | OFP_DL_TYPE_ETH2_CUTOFF = 1536 |
| 24 | OFP_TCP_PORT = 6633 |
| 25 | OFP_SSL_PORT = 6633 |
| 26 | OFP_DEFAULT_PRIORITY = 32768 |
| 27 | OFPQ_MIN_RATE_UNCFG = 65535 |
| 28 | OFPQ_ALL = 4294967295 |
| 29 | |
| 30 | # Identifiers from group ofp_action_type |
| 31 | OFPAT_OUTPUT = 0 |
| 32 | OFPAT_SET_VLAN_VID = 1 |
| 33 | OFPAT_SET_VLAN_PCP = 2 |
| 34 | OFPAT_SET_DL_SRC = 3 |
| 35 | OFPAT_SET_DL_DST = 4 |
| 36 | OFPAT_SET_NW_SRC = 5 |
| 37 | OFPAT_SET_NW_DST = 6 |
| 38 | OFPAT_SET_NW_TOS = 7 |
| 39 | OFPAT_SET_NW_ECN = 8 |
| 40 | OFPAT_SET_TP_SRC = 9 |
| 41 | OFPAT_SET_TP_DST = 10 |
| 42 | OFPAT_COPY_TTL_OUT = 11 |
| 43 | OFPAT_COPY_TTL_IN = 12 |
| 44 | OFPAT_SET_MPLS_LABEL = 13 |
| 45 | OFPAT_SET_MPLS_TC = 14 |
| 46 | OFPAT_SET_MPLS_TTL = 15 |
| 47 | OFPAT_DEC_MPLS_TTL = 16 |
| 48 | OFPAT_PUSH_VLAN = 17 |
| 49 | OFPAT_POP_VLAN = 18 |
| 50 | OFPAT_PUSH_MPLS = 19 |
| 51 | OFPAT_POP_MPLS = 20 |
| 52 | OFPAT_SET_QUEUE = 21 |
| 53 | OFPAT_GROUP = 22 |
| 54 | OFPAT_SET_NW_TTL = 23 |
| 55 | OFPAT_DEC_NW_TTL = 24 |
| 56 | OFPAT_EXPERIMENTER = 65535 |
| 57 | |
| 58 | ofp_action_type_map = { |
| 59 | 0: 'OFPAT_OUTPUT', |
| 60 | 1: 'OFPAT_SET_VLAN_VID', |
| 61 | 2: 'OFPAT_SET_VLAN_PCP', |
| 62 | 3: 'OFPAT_SET_DL_SRC', |
| 63 | 4: 'OFPAT_SET_DL_DST', |
| 64 | 5: 'OFPAT_SET_NW_SRC', |
| 65 | 6: 'OFPAT_SET_NW_DST', |
| 66 | 7: 'OFPAT_SET_NW_TOS', |
| 67 | 8: 'OFPAT_SET_NW_ECN', |
| 68 | 9: 'OFPAT_SET_TP_SRC', |
| 69 | 10: 'OFPAT_SET_TP_DST', |
| 70 | 11: 'OFPAT_COPY_TTL_OUT', |
| 71 | 12: 'OFPAT_COPY_TTL_IN', |
| 72 | 13: 'OFPAT_SET_MPLS_LABEL', |
| 73 | 14: 'OFPAT_SET_MPLS_TC', |
| 74 | 15: 'OFPAT_SET_MPLS_TTL', |
| 75 | 16: 'OFPAT_DEC_MPLS_TTL', |
| 76 | 17: 'OFPAT_PUSH_VLAN', |
| 77 | 18: 'OFPAT_POP_VLAN', |
| 78 | 19: 'OFPAT_PUSH_MPLS', |
| 79 | 20: 'OFPAT_POP_MPLS', |
| 80 | 21: 'OFPAT_SET_QUEUE', |
| 81 | 22: 'OFPAT_GROUP', |
| 82 | 23: 'OFPAT_SET_NW_TTL', |
| 83 | 24: 'OFPAT_DEC_NW_TTL', |
| 84 | 65535: 'OFPAT_EXPERIMENTER', |
| 85 | } |
| 86 | |
| 87 | # Identifiers from group ofp_bad_action_code |
| 88 | OFPBAC_BAD_TYPE = 0 |
| 89 | OFPBAC_BAD_LEN = 1 |
| 90 | OFPBAC_BAD_EXPERIMENTER = 2 |
| 91 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3 |
| 92 | OFPBAC_BAD_OUT_PORT = 4 |
| 93 | OFPBAC_BAD_ARGUMENT = 5 |
| 94 | OFPBAC_EPERM = 6 |
| 95 | OFPBAC_TOO_MANY = 7 |
| 96 | OFPBAC_BAD_QUEUE = 8 |
| 97 | OFPBAC_BAD_OUT_GROUP = 9 |
| 98 | OFPBAC_MATCH_INCONSISTENT = 10 |
| 99 | OFPBAC_UNSUPPORTED_ORDER = 11 |
| 100 | OFPBAC_BAD_TAG = 12 |
| 101 | |
| 102 | ofp_bad_action_code_map = { |
| 103 | 0: 'OFPBAC_BAD_TYPE', |
| 104 | 1: 'OFPBAC_BAD_LEN', |
| 105 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
| 106 | 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE', |
| 107 | 4: 'OFPBAC_BAD_OUT_PORT', |
| 108 | 5: 'OFPBAC_BAD_ARGUMENT', |
| 109 | 6: 'OFPBAC_EPERM', |
| 110 | 7: 'OFPBAC_TOO_MANY', |
| 111 | 8: 'OFPBAC_BAD_QUEUE', |
| 112 | 9: 'OFPBAC_BAD_OUT_GROUP', |
| 113 | 10: 'OFPBAC_MATCH_INCONSISTENT', |
| 114 | 11: 'OFPBAC_UNSUPPORTED_ORDER', |
| 115 | 12: 'OFPBAC_BAD_TAG', |
| 116 | } |
| 117 | |
| 118 | # Identifiers from group ofp_bad_instruction_code |
| 119 | OFPBIC_UNKNOWN_INST = 0 |
| 120 | OFPBIC_UNSUP_INST = 1 |
| 121 | OFPBIC_BAD_TABLE_ID = 2 |
| 122 | OFPBIC_UNSUP_METADATA = 3 |
| 123 | OFPBIC_UNSUP_METADATA_MASK = 4 |
| 124 | OFPBIC_UNSUP_EXP_INST = 5 |
| 125 | |
| 126 | ofp_bad_instruction_code_map = { |
| 127 | 0: 'OFPBIC_UNKNOWN_INST', |
| 128 | 1: 'OFPBIC_UNSUP_INST', |
| 129 | 2: 'OFPBIC_BAD_TABLE_ID', |
| 130 | 3: 'OFPBIC_UNSUP_METADATA', |
| 131 | 4: 'OFPBIC_UNSUP_METADATA_MASK', |
| 132 | 5: 'OFPBIC_UNSUP_EXP_INST', |
| 133 | } |
| 134 | |
| 135 | # Identifiers from group ofp_bad_match_code |
| 136 | OFPBMC_BAD_TYPE = 0 |
| 137 | OFPBMC_BAD_LEN = 1 |
| 138 | OFPBMC_BAD_TAG = 2 |
| 139 | OFPBMC_BAD_DL_ADDR_MASK = 3 |
| 140 | OFPBMC_BAD_NW_ADDR_MASK = 4 |
| 141 | OFPBMC_BAD_WILDCARDS = 5 |
| 142 | OFPBMC_BAD_FIELD = 6 |
| 143 | OFPBMC_BAD_VALUE = 7 |
| 144 | |
| 145 | ofp_bad_match_code_map = { |
| 146 | 0: 'OFPBMC_BAD_TYPE', |
| 147 | 1: 'OFPBMC_BAD_LEN', |
| 148 | 2: 'OFPBMC_BAD_TAG', |
| 149 | 3: 'OFPBMC_BAD_DL_ADDR_MASK', |
| 150 | 4: 'OFPBMC_BAD_NW_ADDR_MASK', |
| 151 | 5: 'OFPBMC_BAD_WILDCARDS', |
| 152 | 6: 'OFPBMC_BAD_FIELD', |
| 153 | 7: 'OFPBMC_BAD_VALUE', |
| 154 | } |
| 155 | |
| 156 | # Identifiers from group ofp_bad_request_code |
| 157 | OFPBRC_BAD_VERSION = 0 |
| 158 | OFPBRC_BAD_TYPE = 1 |
| 159 | OFPBRC_BAD_STAT = 2 |
| 160 | OFPBRC_BAD_EXPERIMENTER = 3 |
| 161 | OFPBRC_BAD_SUBTYPE = 4 |
| 162 | OFPBRC_EPERM = 5 |
| 163 | OFPBRC_BAD_LEN = 6 |
| 164 | OFPBRC_BUFFER_EMPTY = 7 |
| 165 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 166 | OFPBRC_BAD_TABLE_ID = 9 |
| 167 | |
| 168 | ofp_bad_request_code_map = { |
| 169 | 0: 'OFPBRC_BAD_VERSION', |
| 170 | 1: 'OFPBRC_BAD_TYPE', |
| 171 | 2: 'OFPBRC_BAD_STAT', |
| 172 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
| 173 | 4: 'OFPBRC_BAD_SUBTYPE', |
| 174 | 5: 'OFPBRC_EPERM', |
| 175 | 6: 'OFPBRC_BAD_LEN', |
| 176 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 177 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 178 | 9: 'OFPBRC_BAD_TABLE_ID', |
| 179 | } |
| 180 | |
| 181 | # Identifiers from group ofp_capabilities |
| 182 | OFPC_FLOW_STATS = 1 |
| 183 | OFPC_TABLE_STATS = 2 |
| 184 | OFPC_PORT_STATS = 4 |
| 185 | OFPC_GROUP_STATS = 8 |
| 186 | OFPC_IP_REASM = 32 |
| 187 | OFPC_QUEUE_STATS = 64 |
| 188 | OFPC_ARP_MATCH_IP = 128 |
| 189 | |
| 190 | ofp_capabilities_map = { |
| 191 | 1: 'OFPC_FLOW_STATS', |
| 192 | 2: 'OFPC_TABLE_STATS', |
| 193 | 4: 'OFPC_PORT_STATS', |
| 194 | 8: 'OFPC_GROUP_STATS', |
| 195 | 32: 'OFPC_IP_REASM', |
| 196 | 64: 'OFPC_QUEUE_STATS', |
| 197 | 128: 'OFPC_ARP_MATCH_IP', |
| 198 | } |
| 199 | |
| 200 | # Identifiers from group ofp_config_flags |
| 201 | OFPC_FRAG_NORMAL = 0 |
| 202 | OFPC_FRAG_DROP = 1 |
| 203 | OFPC_FRAG_REASM = 2 |
| 204 | OFPC_FRAG_MASK = 3 |
| 205 | OFPC_INVALID_TTL_TO_CONTROLLER = 4 |
| 206 | |
| 207 | ofp_config_flags_map = { |
| 208 | 0: 'OFPC_FRAG_NORMAL', |
| 209 | 1: 'OFPC_FRAG_DROP', |
| 210 | 2: 'OFPC_FRAG_REASM', |
| 211 | 3: 'OFPC_FRAG_MASK', |
| 212 | 4: 'OFPC_INVALID_TTL_TO_CONTROLLER', |
| 213 | } |
| 214 | |
| 215 | # Identifiers from group ofp_error_type |
| 216 | OFPET_HELLO_FAILED = 0 |
| 217 | OFPET_BAD_REQUEST = 1 |
| 218 | OFPET_BAD_ACTION = 2 |
| 219 | OFPET_BAD_INSTRUCTION = 3 |
| 220 | OFPET_BAD_MATCH = 4 |
| 221 | OFPET_FLOW_MOD_FAILED = 5 |
| 222 | OFPET_GROUP_MOD_FAILED = 6 |
| 223 | OFPET_PORT_MOD_FAILED = 7 |
| 224 | OFPET_TABLE_MOD_FAILED = 8 |
| 225 | OFPET_QUEUE_OP_FAILED = 9 |
| 226 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 227 | |
| 228 | ofp_error_type_map = { |
| 229 | 0: 'OFPET_HELLO_FAILED', |
| 230 | 1: 'OFPET_BAD_REQUEST', |
| 231 | 2: 'OFPET_BAD_ACTION', |
| 232 | 3: 'OFPET_BAD_INSTRUCTION', |
| 233 | 4: 'OFPET_BAD_MATCH', |
| 234 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 235 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 236 | 7: 'OFPET_PORT_MOD_FAILED', |
| 237 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 238 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 239 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 240 | } |
| 241 | |
| 242 | # Identifiers from group ofp_flow_mod_command |
| 243 | OFPFC_ADD = 0 |
| 244 | OFPFC_MODIFY = 1 |
| 245 | OFPFC_MODIFY_STRICT = 2 |
| 246 | OFPFC_DELETE = 3 |
| 247 | OFPFC_DELETE_STRICT = 4 |
| 248 | |
| 249 | ofp_flow_mod_command_map = { |
| 250 | 0: 'OFPFC_ADD', |
| 251 | 1: 'OFPFC_MODIFY', |
| 252 | 2: 'OFPFC_MODIFY_STRICT', |
| 253 | 3: 'OFPFC_DELETE', |
| 254 | 4: 'OFPFC_DELETE_STRICT', |
| 255 | } |
| 256 | |
| 257 | # Identifiers from group ofp_flow_mod_failed_code |
| 258 | OFPFMFC_UNKNOWN = 0 |
| 259 | OFPFMFC_TABLE_FULL = 1 |
| 260 | OFPFMFC_BAD_TABLE_ID = 2 |
| 261 | OFPFMFC_OVERLAP = 3 |
| 262 | OFPFMFC_EPERM = 4 |
| 263 | OFPFMFC_BAD_TIMEOUT = 5 |
| 264 | OFPFMFC_BAD_COMMAND = 6 |
| 265 | |
| 266 | ofp_flow_mod_failed_code_map = { |
| 267 | 0: 'OFPFMFC_UNKNOWN', |
| 268 | 1: 'OFPFMFC_TABLE_FULL', |
| 269 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 270 | 3: 'OFPFMFC_OVERLAP', |
| 271 | 4: 'OFPFMFC_EPERM', |
| 272 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 273 | 6: 'OFPFMFC_BAD_COMMAND', |
| 274 | } |
| 275 | |
| 276 | # Identifiers from group ofp_flow_mod_flags |
| 277 | OFPFF_SEND_FLOW_REM = 1 |
| 278 | OFPFF_CHECK_OVERLAP = 2 |
| 279 | |
| 280 | ofp_flow_mod_flags_map = { |
| 281 | 1: 'OFPFF_SEND_FLOW_REM', |
| 282 | 2: 'OFPFF_CHECK_OVERLAP', |
| 283 | } |
| 284 | |
| 285 | # Identifiers from group ofp_flow_removed_reason |
| 286 | OFPRR_IDLE_TIMEOUT = 0 |
| 287 | OFPRR_HARD_TIMEOUT = 1 |
| 288 | OFPRR_DELETE = 2 |
| 289 | OFPRR_GROUP_DELETE = 3 |
| 290 | |
| 291 | ofp_flow_removed_reason_map = { |
| 292 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 293 | 1: 'OFPRR_HARD_TIMEOUT', |
| 294 | 2: 'OFPRR_DELETE', |
| 295 | 3: 'OFPRR_GROUP_DELETE', |
| 296 | } |
| 297 | |
| 298 | # Identifiers from group ofp_flow_wildcards |
| 299 | OFPFW_IN_PORT = 1 |
| 300 | OFPFW_DL_VLAN = 2 |
| 301 | OFPFW_DL_VLAN_PCP = 4 |
| 302 | OFPFW_DL_TYPE = 8 |
| 303 | OFPFW_NW_TOS = 16 |
| 304 | OFPFW_NW_PROTO = 32 |
| 305 | OFPFW_TP_SRC = 64 |
| 306 | OFPFW_TP_DST = 128 |
| 307 | OFPFW_MPLS_LABEL = 256 |
| 308 | OFPFW_MPLS_TC = 512 |
| 309 | OFPFW_ALL = 1023 |
| 310 | |
| 311 | ofp_flow_wildcards_map = { |
| 312 | 1: 'OFPFW_IN_PORT', |
| 313 | 2: 'OFPFW_DL_VLAN', |
| 314 | 4: 'OFPFW_DL_VLAN_PCP', |
| 315 | 8: 'OFPFW_DL_TYPE', |
| 316 | 16: 'OFPFW_NW_TOS', |
| 317 | 32: 'OFPFW_NW_PROTO', |
| 318 | 64: 'OFPFW_TP_SRC', |
| 319 | 128: 'OFPFW_TP_DST', |
| 320 | 256: 'OFPFW_MPLS_LABEL', |
| 321 | 512: 'OFPFW_MPLS_TC', |
| 322 | } |
| 323 | |
| 324 | # Identifiers from group ofp_group |
| 325 | OFPG_MAX = 4294967040 |
| 326 | OFPG_ALL = 4294967292 |
| 327 | OFPG_ANY = 4294967295 |
| 328 | |
| 329 | ofp_group_map = { |
| 330 | 4294967040: 'OFPG_MAX', |
| 331 | 4294967292: 'OFPG_ALL', |
| 332 | 4294967295: 'OFPG_ANY', |
| 333 | } |
| 334 | |
| 335 | # Identifiers from group ofp_group_mod_command |
| 336 | OFPGC_ADD = 0 |
| 337 | OFPGC_MODIFY = 1 |
| 338 | OFPGC_DELETE = 2 |
| 339 | |
| 340 | ofp_group_mod_command_map = { |
| 341 | 0: 'OFPGC_ADD', |
| 342 | 1: 'OFPGC_MODIFY', |
| 343 | 2: 'OFPGC_DELETE', |
| 344 | } |
| 345 | |
| 346 | # Identifiers from group ofp_group_mod_failed_code |
| 347 | OFPGMFC_GROUP_EXISTS = 0 |
| 348 | OFPGMFC_INVALID_GROUP = 1 |
| 349 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 350 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 351 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 352 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 353 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 354 | OFPGMFC_LOOP = 7 |
| 355 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 356 | |
| 357 | ofp_group_mod_failed_code_map = { |
| 358 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 359 | 1: 'OFPGMFC_INVALID_GROUP', |
| 360 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 361 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 362 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 363 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 364 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 365 | 7: 'OFPGMFC_LOOP', |
| 366 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 367 | } |
| 368 | |
| 369 | # Identifiers from group ofp_group_type |
| 370 | OFPGT_ALL = 0 |
| 371 | OFPGT_SELECT = 1 |
| 372 | OFPGT_INDIRECT = 2 |
| 373 | OFPGT_FF = 3 |
| 374 | |
| 375 | ofp_group_type_map = { |
| 376 | 0: 'OFPGT_ALL', |
| 377 | 1: 'OFPGT_SELECT', |
| 378 | 2: 'OFPGT_INDIRECT', |
| 379 | 3: 'OFPGT_FF', |
| 380 | } |
| 381 | |
| 382 | # Identifiers from group ofp_hello_failed_code |
| 383 | OFPHFC_INCOMPATIBLE = 0 |
| 384 | OFPHFC_EPERM = 1 |
| 385 | |
| 386 | ofp_hello_failed_code_map = { |
| 387 | 0: 'OFPHFC_INCOMPATIBLE', |
| 388 | 1: 'OFPHFC_EPERM', |
| 389 | } |
| 390 | |
| 391 | # Identifiers from group ofp_instruction_type |
| 392 | OFPIT_GOTO_TABLE = 1 |
| 393 | OFPIT_WRITE_METADATA = 2 |
| 394 | OFPIT_WRITE_ACTIONS = 3 |
| 395 | OFPIT_APPLY_ACTIONS = 4 |
| 396 | OFPIT_CLEAR_ACTIONS = 5 |
| 397 | OFPIT_EXPERIMENTER = 65535 |
| 398 | |
| 399 | ofp_instruction_type_map = { |
| 400 | 1: 'OFPIT_GOTO_TABLE', |
| 401 | 2: 'OFPIT_WRITE_METADATA', |
| 402 | 3: 'OFPIT_WRITE_ACTIONS', |
| 403 | 4: 'OFPIT_APPLY_ACTIONS', |
| 404 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 405 | 65535: 'OFPIT_EXPERIMENTER', |
| 406 | } |
| 407 | |
| 408 | # Identifiers from group ofp_match_type |
| 409 | OFPMT_STANDARD = 0 |
| 410 | |
| 411 | ofp_match_type_map = { |
| 412 | 0: 'OFPMT_STANDARD', |
| 413 | } |
| 414 | |
| 415 | # Identifiers from group ofp_packet_in_reason |
| 416 | OFPR_NO_MATCH = 0 |
| 417 | OFPR_ACTION = 1 |
| 418 | |
| 419 | ofp_packet_in_reason_map = { |
| 420 | 0: 'OFPR_NO_MATCH', |
| 421 | 1: 'OFPR_ACTION', |
| 422 | } |
| 423 | |
| 424 | # Identifiers from group ofp_port |
| 425 | OFPP_MAX = 4294967040 |
| 426 | OFPP_IN_PORT = 4294967288 |
| 427 | OFPP_TABLE = 4294967289 |
| 428 | OFPP_NORMAL = 4294967290 |
| 429 | OFPP_FLOOD = 4294967291 |
| 430 | OFPP_ALL = 4294967292 |
| 431 | OFPP_CONTROLLER = 4294967293 |
| 432 | OFPP_LOCAL = 4294967294 |
| 433 | |
| 434 | ofp_port_map = { |
| 435 | 4294967040: 'OFPP_MAX', |
| 436 | 4294967288: 'OFPP_IN_PORT', |
| 437 | 4294967289: 'OFPP_TABLE', |
| 438 | 4294967290: 'OFPP_NORMAL', |
| 439 | 4294967291: 'OFPP_FLOOD', |
| 440 | 4294967292: 'OFPP_ALL', |
| 441 | 4294967293: 'OFPP_CONTROLLER', |
| 442 | 4294967294: 'OFPP_LOCAL', |
| 443 | } |
| 444 | |
| 445 | # Identifiers from group ofp_port_config |
| 446 | OFPPC_PORT_DOWN = 1 |
| 447 | OFPPC_NO_RECV = 4 |
| 448 | OFPPC_NO_FWD = 32 |
| 449 | OFPPC_NO_PACKET_IN = 64 |
| 450 | |
| 451 | ofp_port_config_map = { |
| 452 | 1: 'OFPPC_PORT_DOWN', |
| 453 | 4: 'OFPPC_NO_RECV', |
| 454 | 32: 'OFPPC_NO_FWD', |
| 455 | 64: 'OFPPC_NO_PACKET_IN', |
| 456 | } |
| 457 | |
| 458 | # Identifiers from group ofp_port_features |
| 459 | OFPPF_10MB_HD = 1 |
| 460 | OFPPF_10MB_FD = 2 |
| 461 | OFPPF_100MB_HD = 4 |
| 462 | OFPPF_100MB_FD = 8 |
| 463 | OFPPF_1GB_HD = 16 |
| 464 | OFPPF_1GB_FD = 32 |
| 465 | OFPPF_10GB_FD = 64 |
| 466 | OFPPF_40GB_FD = 128 |
| 467 | OFPPF_100GB_FD = 256 |
| 468 | OFPPF_1TB_FD = 512 |
| 469 | OFPPF_OTHER = 1024 |
| 470 | OFPPF_COPPER = 2048 |
| 471 | OFPPF_FIBER = 4096 |
| 472 | OFPPF_AUTONEG = 8192 |
| 473 | OFPPF_PAUSE = 16384 |
| 474 | OFPPF_PAUSE_ASYM = 32768 |
| 475 | |
| 476 | ofp_port_features_map = { |
| 477 | 1: 'OFPPF_10MB_HD', |
| 478 | 2: 'OFPPF_10MB_FD', |
| 479 | 4: 'OFPPF_100MB_HD', |
| 480 | 8: 'OFPPF_100MB_FD', |
| 481 | 16: 'OFPPF_1GB_HD', |
| 482 | 32: 'OFPPF_1GB_FD', |
| 483 | 64: 'OFPPF_10GB_FD', |
| 484 | 128: 'OFPPF_40GB_FD', |
| 485 | 256: 'OFPPF_100GB_FD', |
| 486 | 512: 'OFPPF_1TB_FD', |
| 487 | 1024: 'OFPPF_OTHER', |
| 488 | 2048: 'OFPPF_COPPER', |
| 489 | 4096: 'OFPPF_FIBER', |
| 490 | 8192: 'OFPPF_AUTONEG', |
| 491 | 16384: 'OFPPF_PAUSE', |
| 492 | 32768: 'OFPPF_PAUSE_ASYM', |
| 493 | } |
| 494 | |
| 495 | # Identifiers from group ofp_port_mod_failed_code |
| 496 | OFPPMFC_BAD_PORT = 0 |
| 497 | OFPPMFC_BAD_HW_ADDR = 1 |
| 498 | OFPPMFC_BAD_CONFIG = 2 |
| 499 | OFPPMFC_BAD_ADVERTISE = 3 |
| 500 | |
| 501 | ofp_port_mod_failed_code_map = { |
| 502 | 0: 'OFPPMFC_BAD_PORT', |
| 503 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 504 | 2: 'OFPPMFC_BAD_CONFIG', |
| 505 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 506 | } |
| 507 | |
| 508 | # Identifiers from group ofp_port_no |
| 509 | OFPP_ANY = 4294967295 |
| 510 | |
| 511 | ofp_port_no_map = { |
| 512 | 4294967295: 'OFPP_ANY', |
| 513 | } |
| 514 | |
| 515 | # Identifiers from group ofp_port_reason |
| 516 | OFPPR_ADD = 0 |
| 517 | OFPPR_DELETE = 1 |
| 518 | OFPPR_MODIFY = 2 |
| 519 | |
| 520 | ofp_port_reason_map = { |
| 521 | 0: 'OFPPR_ADD', |
| 522 | 1: 'OFPPR_DELETE', |
| 523 | 2: 'OFPPR_MODIFY', |
| 524 | } |
| 525 | |
| 526 | # Identifiers from group ofp_port_state |
| 527 | OFPPS_LINK_DOWN = 1 |
| 528 | OFPPS_BLOCKED = 2 |
| 529 | OFPPS_LIVE = 4 |
| 530 | |
| 531 | ofp_port_state_map = { |
| 532 | 1: 'OFPPS_LINK_DOWN', |
| 533 | 2: 'OFPPS_BLOCKED', |
| 534 | 4: 'OFPPS_LIVE', |
| 535 | } |
| 536 | |
| 537 | # Identifiers from group ofp_queue_op_failed_code |
| 538 | OFPQOFC_BAD_PORT = 0 |
| 539 | OFPQOFC_BAD_QUEUE = 1 |
| 540 | OFPQOFC_EPERM = 2 |
| 541 | |
| 542 | ofp_queue_op_failed_code_map = { |
| 543 | 0: 'OFPQOFC_BAD_PORT', |
| 544 | 1: 'OFPQOFC_BAD_QUEUE', |
| 545 | 2: 'OFPQOFC_EPERM', |
| 546 | } |
| 547 | |
| 548 | # Identifiers from group ofp_queue_properties |
| 549 | OFPQT_NONE = 0 |
| 550 | OFPQT_MIN_RATE = 1 |
| 551 | |
| 552 | ofp_queue_properties_map = { |
| 553 | 0: 'OFPQT_NONE', |
| 554 | 1: 'OFPQT_MIN_RATE', |
| 555 | } |
| 556 | |
| 557 | # Identifiers from group ofp_stats_reply_flags |
| 558 | OFPSF_REPLY_MORE = 1 |
| 559 | |
| 560 | ofp_stats_reply_flags_map = { |
| 561 | 1: 'OFPSF_REPLY_MORE', |
| 562 | } |
| 563 | |
| 564 | # Identifiers from group ofp_stats_types |
| 565 | OFPST_DESC = 0 |
| 566 | OFPST_FLOW = 1 |
| 567 | OFPST_AGGREGATE = 2 |
| 568 | OFPST_TABLE = 3 |
| 569 | OFPST_PORT = 4 |
| 570 | OFPST_QUEUE = 5 |
| 571 | OFPST_GROUP = 6 |
| 572 | OFPST_GROUP_DESC = 7 |
| 573 | OFPST_EXPERIMENTER = 65535 |
| 574 | |
| 575 | ofp_stats_types_map = { |
| 576 | 0: 'OFPST_DESC', |
| 577 | 1: 'OFPST_FLOW', |
| 578 | 2: 'OFPST_AGGREGATE', |
| 579 | 3: 'OFPST_TABLE', |
| 580 | 4: 'OFPST_PORT', |
| 581 | 5: 'OFPST_QUEUE', |
| 582 | 6: 'OFPST_GROUP', |
| 583 | 7: 'OFPST_GROUP_DESC', |
| 584 | 65535: 'OFPST_EXPERIMENTER', |
| 585 | } |
| 586 | |
| 587 | # Identifiers from group ofp_switch_config_failed_code |
| 588 | OFPSCFC_BAD_FLAGS = 0 |
| 589 | OFPSCFC_BAD_LEN = 1 |
| 590 | |
| 591 | ofp_switch_config_failed_code_map = { |
| 592 | 0: 'OFPSCFC_BAD_FLAGS', |
| 593 | 1: 'OFPSCFC_BAD_LEN', |
| 594 | } |
| 595 | |
| 596 | # Identifiers from group ofp_table_config |
| 597 | OFPTC_TABLE_MISS_CONTROLLER = 0 |
| 598 | OFPTC_TABLE_MISS_CONTINUE = 1 |
| 599 | OFPTC_TABLE_MISS_DROP = 2 |
| 600 | OFPTC_TABLE_MISS_MASK = 3 |
| 601 | |
| 602 | ofp_table_config_map = { |
| 603 | 0: 'OFPTC_TABLE_MISS_CONTROLLER', |
| 604 | 1: 'OFPTC_TABLE_MISS_CONTINUE', |
| 605 | 2: 'OFPTC_TABLE_MISS_DROP', |
| 606 | 3: 'OFPTC_TABLE_MISS_MASK', |
| 607 | } |
| 608 | |
| 609 | # Identifiers from group ofp_table_mod_failed_code |
| 610 | OFPTMFC_BAD_TABLE = 0 |
| 611 | OFPTMFC_BAD_CONFIG = 1 |
| 612 | |
| 613 | ofp_table_mod_failed_code_map = { |
| 614 | 0: 'OFPTMFC_BAD_TABLE', |
| 615 | 1: 'OFPTMFC_BAD_CONFIG', |
| 616 | } |
| 617 | |
| 618 | # Identifiers from group ofp_type |
| 619 | OFPT_HELLO = 0 |
| 620 | OFPT_ERROR = 1 |
| 621 | OFPT_ECHO_REQUEST = 2 |
| 622 | OFPT_ECHO_REPLY = 3 |
| 623 | OFPT_EXPERIMENTER = 4 |
| 624 | OFPT_FEATURES_REQUEST = 5 |
| 625 | OFPT_FEATURES_REPLY = 6 |
| 626 | OFPT_GET_CONFIG_REQUEST = 7 |
| 627 | OFPT_GET_CONFIG_REPLY = 8 |
| 628 | OFPT_SET_CONFIG = 9 |
| 629 | OFPT_PACKET_IN = 10 |
| 630 | OFPT_FLOW_REMOVED = 11 |
| 631 | OFPT_PORT_STATUS = 12 |
| 632 | OFPT_PACKET_OUT = 13 |
| 633 | OFPT_FLOW_MOD = 14 |
| 634 | OFPT_GROUP_MOD = 15 |
| 635 | OFPT_PORT_MOD = 16 |
| 636 | OFPT_TABLE_MOD = 17 |
| 637 | OFPT_STATS_REQUEST = 18 |
| 638 | OFPT_STATS_REPLY = 19 |
| 639 | OFPT_BARRIER_REQUEST = 20 |
| 640 | OFPT_BARRIER_REPLY = 21 |
| 641 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 642 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 643 | |
| 644 | ofp_type_map = { |
| 645 | 0: 'OFPT_HELLO', |
| 646 | 1: 'OFPT_ERROR', |
| 647 | 2: 'OFPT_ECHO_REQUEST', |
| 648 | 3: 'OFPT_ECHO_REPLY', |
| 649 | 4: 'OFPT_EXPERIMENTER', |
| 650 | 5: 'OFPT_FEATURES_REQUEST', |
| 651 | 6: 'OFPT_FEATURES_REPLY', |
| 652 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 653 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 654 | 9: 'OFPT_SET_CONFIG', |
| 655 | 10: 'OFPT_PACKET_IN', |
| 656 | 11: 'OFPT_FLOW_REMOVED', |
| 657 | 12: 'OFPT_PORT_STATUS', |
| 658 | 13: 'OFPT_PACKET_OUT', |
| 659 | 14: 'OFPT_FLOW_MOD', |
| 660 | 15: 'OFPT_GROUP_MOD', |
| 661 | 16: 'OFPT_PORT_MOD', |
| 662 | 17: 'OFPT_TABLE_MOD', |
| 663 | 18: 'OFPT_STATS_REQUEST', |
| 664 | 19: 'OFPT_STATS_REPLY', |
| 665 | 20: 'OFPT_BARRIER_REQUEST', |
| 666 | 21: 'OFPT_BARRIER_REPLY', |
| 667 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 668 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 669 | } |
| 670 | |
| 671 | # Identifiers from group ofp_vlan_id |
| 672 | OFPVID_ANY = 65534 |
| 673 | OFPVID_NONE = 65535 |
| 674 | |
| 675 | ofp_vlan_id_map = { |
| 676 | 65534: 'OFPVID_ANY', |
| 677 | 65535: 'OFPVID_NONE', |
| 678 | } |
| 679 | |