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 | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 189 | # Identifiers from group ofp_capabilities |
| 190 | OFPC_FLOW_STATS = 1 |
| 191 | OFPC_TABLE_STATS = 2 |
| 192 | OFPC_PORT_STATS = 4 |
| 193 | OFPC_GROUP_STATS = 8 |
| 194 | OFPC_IP_REASM = 32 |
| 195 | OFPC_QUEUE_STATS = 64 |
| 196 | OFPC_ARP_MATCH_IP = 128 |
| 197 | |
| 198 | ofp_capabilities_map = { |
| 199 | 1: 'OFPC_FLOW_STATS', |
| 200 | 2: 'OFPC_TABLE_STATS', |
| 201 | 4: 'OFPC_PORT_STATS', |
| 202 | 8: 'OFPC_GROUP_STATS', |
| 203 | 32: 'OFPC_IP_REASM', |
| 204 | 64: 'OFPC_QUEUE_STATS', |
| 205 | 128: 'OFPC_ARP_MATCH_IP', |
| 206 | } |
| 207 | |
| 208 | # Identifiers from group ofp_config_flags |
| 209 | OFPC_FRAG_NORMAL = 0 |
| 210 | OFPC_FRAG_DROP = 1 |
| 211 | OFPC_FRAG_REASM = 2 |
| 212 | OFPC_FRAG_MASK = 3 |
| 213 | OFPC_INVALID_TTL_TO_CONTROLLER = 4 |
| 214 | |
| 215 | ofp_config_flags_map = { |
| 216 | 0: 'OFPC_FRAG_NORMAL', |
| 217 | 1: 'OFPC_FRAG_DROP', |
| 218 | 2: 'OFPC_FRAG_REASM', |
| 219 | 3: 'OFPC_FRAG_MASK', |
| 220 | 4: 'OFPC_INVALID_TTL_TO_CONTROLLER', |
| 221 | } |
| 222 | |
| 223 | # Identifiers from group ofp_error_type |
| 224 | OFPET_HELLO_FAILED = 0 |
| 225 | OFPET_BAD_REQUEST = 1 |
| 226 | OFPET_BAD_ACTION = 2 |
| 227 | OFPET_BAD_INSTRUCTION = 3 |
| 228 | OFPET_BAD_MATCH = 4 |
| 229 | OFPET_FLOW_MOD_FAILED = 5 |
| 230 | OFPET_GROUP_MOD_FAILED = 6 |
| 231 | OFPET_PORT_MOD_FAILED = 7 |
| 232 | OFPET_TABLE_MOD_FAILED = 8 |
| 233 | OFPET_QUEUE_OP_FAILED = 9 |
| 234 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 235 | |
| 236 | ofp_error_type_map = { |
| 237 | 0: 'OFPET_HELLO_FAILED', |
| 238 | 1: 'OFPET_BAD_REQUEST', |
| 239 | 2: 'OFPET_BAD_ACTION', |
| 240 | 3: 'OFPET_BAD_INSTRUCTION', |
| 241 | 4: 'OFPET_BAD_MATCH', |
| 242 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 243 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 244 | 7: 'OFPET_PORT_MOD_FAILED', |
| 245 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 246 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 247 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 248 | } |
| 249 | |
| 250 | # Identifiers from group ofp_flow_mod_command |
| 251 | OFPFC_ADD = 0 |
| 252 | OFPFC_MODIFY = 1 |
| 253 | OFPFC_MODIFY_STRICT = 2 |
| 254 | OFPFC_DELETE = 3 |
| 255 | OFPFC_DELETE_STRICT = 4 |
| 256 | |
| 257 | ofp_flow_mod_command_map = { |
| 258 | 0: 'OFPFC_ADD', |
| 259 | 1: 'OFPFC_MODIFY', |
| 260 | 2: 'OFPFC_MODIFY_STRICT', |
| 261 | 3: 'OFPFC_DELETE', |
| 262 | 4: 'OFPFC_DELETE_STRICT', |
| 263 | } |
| 264 | |
| 265 | # Identifiers from group ofp_flow_mod_failed_code |
| 266 | OFPFMFC_UNKNOWN = 0 |
| 267 | OFPFMFC_TABLE_FULL = 1 |
| 268 | OFPFMFC_BAD_TABLE_ID = 2 |
| 269 | OFPFMFC_OVERLAP = 3 |
| 270 | OFPFMFC_EPERM = 4 |
| 271 | OFPFMFC_BAD_TIMEOUT = 5 |
| 272 | OFPFMFC_BAD_COMMAND = 6 |
| 273 | |
| 274 | ofp_flow_mod_failed_code_map = { |
| 275 | 0: 'OFPFMFC_UNKNOWN', |
| 276 | 1: 'OFPFMFC_TABLE_FULL', |
| 277 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 278 | 3: 'OFPFMFC_OVERLAP', |
| 279 | 4: 'OFPFMFC_EPERM', |
| 280 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 281 | 6: 'OFPFMFC_BAD_COMMAND', |
| 282 | } |
| 283 | |
| 284 | # Identifiers from group ofp_flow_mod_flags |
| 285 | OFPFF_SEND_FLOW_REM = 1 |
| 286 | OFPFF_CHECK_OVERLAP = 2 |
| 287 | |
| 288 | ofp_flow_mod_flags_map = { |
| 289 | 1: 'OFPFF_SEND_FLOW_REM', |
| 290 | 2: 'OFPFF_CHECK_OVERLAP', |
| 291 | } |
| 292 | |
| 293 | # Identifiers from group ofp_flow_removed_reason |
| 294 | OFPRR_IDLE_TIMEOUT = 0 |
| 295 | OFPRR_HARD_TIMEOUT = 1 |
| 296 | OFPRR_DELETE = 2 |
| 297 | OFPRR_GROUP_DELETE = 3 |
| 298 | |
| 299 | ofp_flow_removed_reason_map = { |
| 300 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 301 | 1: 'OFPRR_HARD_TIMEOUT', |
| 302 | 2: 'OFPRR_DELETE', |
| 303 | 3: 'OFPRR_GROUP_DELETE', |
| 304 | } |
| 305 | |
| 306 | # Identifiers from group ofp_flow_wildcards |
| 307 | OFPFW_IN_PORT = 1 |
| 308 | OFPFW_DL_VLAN = 2 |
| 309 | OFPFW_DL_VLAN_PCP = 4 |
| 310 | OFPFW_DL_TYPE = 8 |
| 311 | OFPFW_NW_TOS = 16 |
| 312 | OFPFW_NW_PROTO = 32 |
| 313 | OFPFW_TP_SRC = 64 |
| 314 | OFPFW_TP_DST = 128 |
| 315 | OFPFW_MPLS_LABEL = 256 |
| 316 | OFPFW_MPLS_TC = 512 |
| 317 | OFPFW_ALL = 1023 |
| 318 | |
| 319 | ofp_flow_wildcards_map = { |
| 320 | 1: 'OFPFW_IN_PORT', |
| 321 | 2: 'OFPFW_DL_VLAN', |
| 322 | 4: 'OFPFW_DL_VLAN_PCP', |
| 323 | 8: 'OFPFW_DL_TYPE', |
| 324 | 16: 'OFPFW_NW_TOS', |
| 325 | 32: 'OFPFW_NW_PROTO', |
| 326 | 64: 'OFPFW_TP_SRC', |
| 327 | 128: 'OFPFW_TP_DST', |
| 328 | 256: 'OFPFW_MPLS_LABEL', |
| 329 | 512: 'OFPFW_MPLS_TC', |
| 330 | } |
| 331 | |
| 332 | # Identifiers from group ofp_group |
| 333 | OFPG_MAX = 4294967040 |
| 334 | OFPG_ALL = 4294967292 |
| 335 | OFPG_ANY = 4294967295 |
| 336 | |
| 337 | ofp_group_map = { |
| 338 | 4294967040: 'OFPG_MAX', |
| 339 | 4294967292: 'OFPG_ALL', |
| 340 | 4294967295: 'OFPG_ANY', |
| 341 | } |
| 342 | |
| 343 | # Identifiers from group ofp_group_mod_command |
| 344 | OFPGC_ADD = 0 |
| 345 | OFPGC_MODIFY = 1 |
| 346 | OFPGC_DELETE = 2 |
| 347 | |
| 348 | ofp_group_mod_command_map = { |
| 349 | 0: 'OFPGC_ADD', |
| 350 | 1: 'OFPGC_MODIFY', |
| 351 | 2: 'OFPGC_DELETE', |
| 352 | } |
| 353 | |
| 354 | # Identifiers from group ofp_group_mod_failed_code |
| 355 | OFPGMFC_GROUP_EXISTS = 0 |
| 356 | OFPGMFC_INVALID_GROUP = 1 |
| 357 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 358 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 359 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 360 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 361 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 362 | OFPGMFC_LOOP = 7 |
| 363 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 364 | |
| 365 | ofp_group_mod_failed_code_map = { |
| 366 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 367 | 1: 'OFPGMFC_INVALID_GROUP', |
| 368 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 369 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 370 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 371 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 372 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 373 | 7: 'OFPGMFC_LOOP', |
| 374 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 375 | } |
| 376 | |
| 377 | # Identifiers from group ofp_group_type |
| 378 | OFPGT_ALL = 0 |
| 379 | OFPGT_SELECT = 1 |
| 380 | OFPGT_INDIRECT = 2 |
| 381 | OFPGT_FF = 3 |
| 382 | |
| 383 | ofp_group_type_map = { |
| 384 | 0: 'OFPGT_ALL', |
| 385 | 1: 'OFPGT_SELECT', |
| 386 | 2: 'OFPGT_INDIRECT', |
| 387 | 3: 'OFPGT_FF', |
| 388 | } |
| 389 | |
| 390 | # Identifiers from group ofp_hello_failed_code |
| 391 | OFPHFC_INCOMPATIBLE = 0 |
| 392 | OFPHFC_EPERM = 1 |
| 393 | |
| 394 | ofp_hello_failed_code_map = { |
| 395 | 0: 'OFPHFC_INCOMPATIBLE', |
| 396 | 1: 'OFPHFC_EPERM', |
| 397 | } |
| 398 | |
| 399 | # Identifiers from group ofp_instruction_type |
| 400 | OFPIT_GOTO_TABLE = 1 |
| 401 | OFPIT_WRITE_METADATA = 2 |
| 402 | OFPIT_WRITE_ACTIONS = 3 |
| 403 | OFPIT_APPLY_ACTIONS = 4 |
| 404 | OFPIT_CLEAR_ACTIONS = 5 |
| 405 | OFPIT_EXPERIMENTER = 65535 |
| 406 | |
| 407 | ofp_instruction_type_map = { |
| 408 | 1: 'OFPIT_GOTO_TABLE', |
| 409 | 2: 'OFPIT_WRITE_METADATA', |
| 410 | 3: 'OFPIT_WRITE_ACTIONS', |
| 411 | 4: 'OFPIT_APPLY_ACTIONS', |
| 412 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 413 | 65535: 'OFPIT_EXPERIMENTER', |
| 414 | } |
| 415 | |
| 416 | # Identifiers from group ofp_match_type |
| 417 | OFPMT_STANDARD = 0 |
| 418 | |
| 419 | ofp_match_type_map = { |
| 420 | 0: 'OFPMT_STANDARD', |
| 421 | } |
| 422 | |
| 423 | # Identifiers from group ofp_packet_in_reason |
| 424 | OFPR_NO_MATCH = 0 |
| 425 | OFPR_ACTION = 1 |
| 426 | |
| 427 | ofp_packet_in_reason_map = { |
| 428 | 0: 'OFPR_NO_MATCH', |
| 429 | 1: 'OFPR_ACTION', |
| 430 | } |
| 431 | |
| 432 | # Identifiers from group ofp_port |
| 433 | OFPP_MAX = 4294967040 |
| 434 | OFPP_IN_PORT = 4294967288 |
| 435 | OFPP_TABLE = 4294967289 |
| 436 | OFPP_NORMAL = 4294967290 |
| 437 | OFPP_FLOOD = 4294967291 |
| 438 | OFPP_ALL = 4294967292 |
| 439 | OFPP_CONTROLLER = 4294967293 |
| 440 | OFPP_LOCAL = 4294967294 |
| 441 | |
| 442 | ofp_port_map = { |
| 443 | 4294967040: 'OFPP_MAX', |
| 444 | 4294967288: 'OFPP_IN_PORT', |
| 445 | 4294967289: 'OFPP_TABLE', |
| 446 | 4294967290: 'OFPP_NORMAL', |
| 447 | 4294967291: 'OFPP_FLOOD', |
| 448 | 4294967292: 'OFPP_ALL', |
| 449 | 4294967293: 'OFPP_CONTROLLER', |
| 450 | 4294967294: 'OFPP_LOCAL', |
| 451 | } |
| 452 | |
| 453 | # Identifiers from group ofp_port_config |
| 454 | OFPPC_PORT_DOWN = 1 |
| 455 | OFPPC_NO_RECV = 4 |
| 456 | OFPPC_NO_FWD = 32 |
| 457 | OFPPC_NO_PACKET_IN = 64 |
| 458 | |
| 459 | ofp_port_config_map = { |
| 460 | 1: 'OFPPC_PORT_DOWN', |
| 461 | 4: 'OFPPC_NO_RECV', |
| 462 | 32: 'OFPPC_NO_FWD', |
| 463 | 64: 'OFPPC_NO_PACKET_IN', |
| 464 | } |
| 465 | |
| 466 | # Identifiers from group ofp_port_features |
| 467 | OFPPF_10MB_HD = 1 |
| 468 | OFPPF_10MB_FD = 2 |
| 469 | OFPPF_100MB_HD = 4 |
| 470 | OFPPF_100MB_FD = 8 |
| 471 | OFPPF_1GB_HD = 16 |
| 472 | OFPPF_1GB_FD = 32 |
| 473 | OFPPF_10GB_FD = 64 |
| 474 | OFPPF_40GB_FD = 128 |
| 475 | OFPPF_100GB_FD = 256 |
| 476 | OFPPF_1TB_FD = 512 |
| 477 | OFPPF_OTHER = 1024 |
| 478 | OFPPF_COPPER = 2048 |
| 479 | OFPPF_FIBER = 4096 |
| 480 | OFPPF_AUTONEG = 8192 |
| 481 | OFPPF_PAUSE = 16384 |
| 482 | OFPPF_PAUSE_ASYM = 32768 |
| 483 | |
| 484 | ofp_port_features_map = { |
| 485 | 1: 'OFPPF_10MB_HD', |
| 486 | 2: 'OFPPF_10MB_FD', |
| 487 | 4: 'OFPPF_100MB_HD', |
| 488 | 8: 'OFPPF_100MB_FD', |
| 489 | 16: 'OFPPF_1GB_HD', |
| 490 | 32: 'OFPPF_1GB_FD', |
| 491 | 64: 'OFPPF_10GB_FD', |
| 492 | 128: 'OFPPF_40GB_FD', |
| 493 | 256: 'OFPPF_100GB_FD', |
| 494 | 512: 'OFPPF_1TB_FD', |
| 495 | 1024: 'OFPPF_OTHER', |
| 496 | 2048: 'OFPPF_COPPER', |
| 497 | 4096: 'OFPPF_FIBER', |
| 498 | 8192: 'OFPPF_AUTONEG', |
| 499 | 16384: 'OFPPF_PAUSE', |
| 500 | 32768: 'OFPPF_PAUSE_ASYM', |
| 501 | } |
| 502 | |
| 503 | # Identifiers from group ofp_port_mod_failed_code |
| 504 | OFPPMFC_BAD_PORT = 0 |
| 505 | OFPPMFC_BAD_HW_ADDR = 1 |
| 506 | OFPPMFC_BAD_CONFIG = 2 |
| 507 | OFPPMFC_BAD_ADVERTISE = 3 |
| 508 | |
| 509 | ofp_port_mod_failed_code_map = { |
| 510 | 0: 'OFPPMFC_BAD_PORT', |
| 511 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 512 | 2: 'OFPPMFC_BAD_CONFIG', |
| 513 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 514 | } |
| 515 | |
| 516 | # Identifiers from group ofp_port_no |
| 517 | OFPP_ANY = 4294967295 |
| 518 | |
| 519 | ofp_port_no_map = { |
| 520 | 4294967295: 'OFPP_ANY', |
| 521 | } |
| 522 | |
| 523 | # Identifiers from group ofp_port_reason |
| 524 | OFPPR_ADD = 0 |
| 525 | OFPPR_DELETE = 1 |
| 526 | OFPPR_MODIFY = 2 |
| 527 | |
| 528 | ofp_port_reason_map = { |
| 529 | 0: 'OFPPR_ADD', |
| 530 | 1: 'OFPPR_DELETE', |
| 531 | 2: 'OFPPR_MODIFY', |
| 532 | } |
| 533 | |
| 534 | # Identifiers from group ofp_port_state |
| 535 | OFPPS_LINK_DOWN = 1 |
| 536 | OFPPS_BLOCKED = 2 |
| 537 | OFPPS_LIVE = 4 |
| 538 | |
| 539 | ofp_port_state_map = { |
| 540 | 1: 'OFPPS_LINK_DOWN', |
| 541 | 2: 'OFPPS_BLOCKED', |
| 542 | 4: 'OFPPS_LIVE', |
| 543 | } |
| 544 | |
| 545 | # Identifiers from group ofp_queue_op_failed_code |
| 546 | OFPQOFC_BAD_PORT = 0 |
| 547 | OFPQOFC_BAD_QUEUE = 1 |
| 548 | OFPQOFC_EPERM = 2 |
| 549 | |
| 550 | ofp_queue_op_failed_code_map = { |
| 551 | 0: 'OFPQOFC_BAD_PORT', |
| 552 | 1: 'OFPQOFC_BAD_QUEUE', |
| 553 | 2: 'OFPQOFC_EPERM', |
| 554 | } |
| 555 | |
| 556 | # Identifiers from group ofp_queue_properties |
| 557 | OFPQT_NONE = 0 |
| 558 | OFPQT_MIN_RATE = 1 |
| 559 | |
| 560 | ofp_queue_properties_map = { |
| 561 | 0: 'OFPQT_NONE', |
| 562 | 1: 'OFPQT_MIN_RATE', |
| 563 | } |
| 564 | |
| 565 | # Identifiers from group ofp_stats_reply_flags |
| 566 | OFPSF_REPLY_MORE = 1 |
| 567 | |
| 568 | ofp_stats_reply_flags_map = { |
| 569 | 1: 'OFPSF_REPLY_MORE', |
| 570 | } |
| 571 | |
| 572 | # Identifiers from group ofp_stats_types |
| 573 | OFPST_DESC = 0 |
| 574 | OFPST_FLOW = 1 |
| 575 | OFPST_AGGREGATE = 2 |
| 576 | OFPST_TABLE = 3 |
| 577 | OFPST_PORT = 4 |
| 578 | OFPST_QUEUE = 5 |
| 579 | OFPST_GROUP = 6 |
| 580 | OFPST_GROUP_DESC = 7 |
| 581 | OFPST_EXPERIMENTER = 65535 |
| 582 | |
| 583 | ofp_stats_types_map = { |
| 584 | 0: 'OFPST_DESC', |
| 585 | 1: 'OFPST_FLOW', |
| 586 | 2: 'OFPST_AGGREGATE', |
| 587 | 3: 'OFPST_TABLE', |
| 588 | 4: 'OFPST_PORT', |
| 589 | 5: 'OFPST_QUEUE', |
| 590 | 6: 'OFPST_GROUP', |
| 591 | 7: 'OFPST_GROUP_DESC', |
| 592 | 65535: 'OFPST_EXPERIMENTER', |
| 593 | } |
| 594 | |
| 595 | # Identifiers from group ofp_switch_config_failed_code |
| 596 | OFPSCFC_BAD_FLAGS = 0 |
| 597 | OFPSCFC_BAD_LEN = 1 |
| 598 | |
| 599 | ofp_switch_config_failed_code_map = { |
| 600 | 0: 'OFPSCFC_BAD_FLAGS', |
| 601 | 1: 'OFPSCFC_BAD_LEN', |
| 602 | } |
| 603 | |
| 604 | # Identifiers from group ofp_table_config |
| 605 | OFPTC_TABLE_MISS_CONTROLLER = 0 |
| 606 | OFPTC_TABLE_MISS_CONTINUE = 1 |
| 607 | OFPTC_TABLE_MISS_DROP = 2 |
| 608 | OFPTC_TABLE_MISS_MASK = 3 |
| 609 | |
| 610 | ofp_table_config_map = { |
| 611 | 0: 'OFPTC_TABLE_MISS_CONTROLLER', |
| 612 | 1: 'OFPTC_TABLE_MISS_CONTINUE', |
| 613 | 2: 'OFPTC_TABLE_MISS_DROP', |
| 614 | 3: 'OFPTC_TABLE_MISS_MASK', |
| 615 | } |
| 616 | |
| 617 | # Identifiers from group ofp_table_mod_failed_code |
| 618 | OFPTMFC_BAD_TABLE = 0 |
| 619 | OFPTMFC_BAD_CONFIG = 1 |
| 620 | |
| 621 | ofp_table_mod_failed_code_map = { |
| 622 | 0: 'OFPTMFC_BAD_TABLE', |
| 623 | 1: 'OFPTMFC_BAD_CONFIG', |
| 624 | } |
| 625 | |
| 626 | # Identifiers from group ofp_type |
| 627 | OFPT_HELLO = 0 |
| 628 | OFPT_ERROR = 1 |
| 629 | OFPT_ECHO_REQUEST = 2 |
| 630 | OFPT_ECHO_REPLY = 3 |
| 631 | OFPT_EXPERIMENTER = 4 |
| 632 | OFPT_FEATURES_REQUEST = 5 |
| 633 | OFPT_FEATURES_REPLY = 6 |
| 634 | OFPT_GET_CONFIG_REQUEST = 7 |
| 635 | OFPT_GET_CONFIG_REPLY = 8 |
| 636 | OFPT_SET_CONFIG = 9 |
| 637 | OFPT_PACKET_IN = 10 |
| 638 | OFPT_FLOW_REMOVED = 11 |
| 639 | OFPT_PORT_STATUS = 12 |
| 640 | OFPT_PACKET_OUT = 13 |
| 641 | OFPT_FLOW_MOD = 14 |
| 642 | OFPT_GROUP_MOD = 15 |
| 643 | OFPT_PORT_MOD = 16 |
| 644 | OFPT_TABLE_MOD = 17 |
| 645 | OFPT_STATS_REQUEST = 18 |
| 646 | OFPT_STATS_REPLY = 19 |
| 647 | OFPT_BARRIER_REQUEST = 20 |
| 648 | OFPT_BARRIER_REPLY = 21 |
| 649 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 650 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 651 | |
| 652 | ofp_type_map = { |
| 653 | 0: 'OFPT_HELLO', |
| 654 | 1: 'OFPT_ERROR', |
| 655 | 2: 'OFPT_ECHO_REQUEST', |
| 656 | 3: 'OFPT_ECHO_REPLY', |
| 657 | 4: 'OFPT_EXPERIMENTER', |
| 658 | 5: 'OFPT_FEATURES_REQUEST', |
| 659 | 6: 'OFPT_FEATURES_REPLY', |
| 660 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 661 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 662 | 9: 'OFPT_SET_CONFIG', |
| 663 | 10: 'OFPT_PACKET_IN', |
| 664 | 11: 'OFPT_FLOW_REMOVED', |
| 665 | 12: 'OFPT_PORT_STATUS', |
| 666 | 13: 'OFPT_PACKET_OUT', |
| 667 | 14: 'OFPT_FLOW_MOD', |
| 668 | 15: 'OFPT_GROUP_MOD', |
| 669 | 16: 'OFPT_PORT_MOD', |
| 670 | 17: 'OFPT_TABLE_MOD', |
| 671 | 18: 'OFPT_STATS_REQUEST', |
| 672 | 19: 'OFPT_STATS_REPLY', |
| 673 | 20: 'OFPT_BARRIER_REQUEST', |
| 674 | 21: 'OFPT_BARRIER_REPLY', |
| 675 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 676 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 677 | } |
| 678 | |
| 679 | # Identifiers from group ofp_vlan_id |
| 680 | OFPVID_ANY = 65534 |
| 681 | OFPVID_NONE = 65535 |
| 682 | |
| 683 | ofp_vlan_id_map = { |
| 684 | 65534: 'OFPVID_ANY', |
| 685 | 65535: 'OFPVID_NONE', |
| 686 | } |
| 687 | |