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