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 = 3 |
| 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 | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 14 | OFP_TCP_PORT = 6653 |
| 15 | OFP_SSL_PORT = 6653 |
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 | OFP_VLAN_NONE = 0 |
| 19 | OFP_FLOW_PERMANENT = 0 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 20 | OFP_DEFAULT_PRIORITY = 32768 |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 21 | OFP_NO_BUFFER = 4294967295 |
| 22 | DESC_STR_LEN = 256 |
| 23 | SERIAL_NUM_LEN = 32 |
| 24 | OFPQ_ALL = 4294967295 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 25 | OFPQ_MIN_RATE_UNCFG = 65535 |
| 26 | OFPQ_MAX_RATE_UNCFG = 65535 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 27 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 28 | # Identifiers from group of_bsn_pdu_slot_num_t |
| 29 | BSN_PDU_SLOT_NUM_ANY = 255 |
| 30 | |
| 31 | of_bsn_pdu_slot_num_t_map = { |
| 32 | 255: 'BSN_PDU_SLOT_NUM_ANY', |
| 33 | } |
| 34 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 35 | # Identifiers from group ofp_action_type |
| 36 | OFPAT_OUTPUT = 0 |
| 37 | OFPAT_COPY_TTL_OUT = 11 |
| 38 | OFPAT_COPY_TTL_IN = 12 |
| 39 | OFPAT_SET_MPLS_TTL = 15 |
| 40 | OFPAT_DEC_MPLS_TTL = 16 |
| 41 | OFPAT_PUSH_VLAN = 17 |
| 42 | OFPAT_POP_VLAN = 18 |
| 43 | OFPAT_PUSH_MPLS = 19 |
| 44 | OFPAT_POP_MPLS = 20 |
| 45 | OFPAT_SET_QUEUE = 21 |
| 46 | OFPAT_GROUP = 22 |
| 47 | OFPAT_SET_NW_TTL = 23 |
| 48 | OFPAT_DEC_NW_TTL = 24 |
| 49 | OFPAT_SET_FIELD = 25 |
| 50 | OFPAT_EXPERIMENTER = 65535 |
| 51 | |
| 52 | ofp_action_type_map = { |
| 53 | 0: 'OFPAT_OUTPUT', |
| 54 | 11: 'OFPAT_COPY_TTL_OUT', |
| 55 | 12: 'OFPAT_COPY_TTL_IN', |
| 56 | 15: 'OFPAT_SET_MPLS_TTL', |
| 57 | 16: 'OFPAT_DEC_MPLS_TTL', |
| 58 | 17: 'OFPAT_PUSH_VLAN', |
| 59 | 18: 'OFPAT_POP_VLAN', |
| 60 | 19: 'OFPAT_PUSH_MPLS', |
| 61 | 20: 'OFPAT_POP_MPLS', |
| 62 | 21: 'OFPAT_SET_QUEUE', |
| 63 | 22: 'OFPAT_GROUP', |
| 64 | 23: 'OFPAT_SET_NW_TTL', |
| 65 | 24: 'OFPAT_DEC_NW_TTL', |
| 66 | 25: 'OFPAT_SET_FIELD', |
| 67 | 65535: 'OFPAT_EXPERIMENTER', |
| 68 | } |
| 69 | |
| 70 | # Identifiers from group ofp_bad_action_code |
| 71 | OFPBAC_BAD_TYPE = 0 |
| 72 | OFPBAC_BAD_LEN = 1 |
| 73 | OFPBAC_BAD_EXPERIMENTER = 2 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 74 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 75 | OFPBAC_BAD_OUT_PORT = 4 |
| 76 | OFPBAC_BAD_ARGUMENT = 5 |
| 77 | OFPBAC_EPERM = 6 |
| 78 | OFPBAC_TOO_MANY = 7 |
| 79 | OFPBAC_BAD_QUEUE = 8 |
| 80 | OFPBAC_BAD_OUT_GROUP = 9 |
| 81 | OFPBAC_MATCH_INCONSISTENT = 10 |
| 82 | OFPBAC_UNSUPPORTED_ORDER = 11 |
| 83 | OFPBAC_BAD_TAG = 12 |
| 84 | OFPBAC_BAD_SET_TYPE = 13 |
| 85 | OFPBAC_BAD_SET_LEN = 14 |
| 86 | OFPBAC_BAD_SET_ARGUMENT = 15 |
| 87 | |
| 88 | ofp_bad_action_code_map = { |
| 89 | 0: 'OFPBAC_BAD_TYPE', |
| 90 | 1: 'OFPBAC_BAD_LEN', |
| 91 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 92 | 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 93 | 4: 'OFPBAC_BAD_OUT_PORT', |
| 94 | 5: 'OFPBAC_BAD_ARGUMENT', |
| 95 | 6: 'OFPBAC_EPERM', |
| 96 | 7: 'OFPBAC_TOO_MANY', |
| 97 | 8: 'OFPBAC_BAD_QUEUE', |
| 98 | 9: 'OFPBAC_BAD_OUT_GROUP', |
| 99 | 10: 'OFPBAC_MATCH_INCONSISTENT', |
| 100 | 11: 'OFPBAC_UNSUPPORTED_ORDER', |
| 101 | 12: 'OFPBAC_BAD_TAG', |
| 102 | 13: 'OFPBAC_BAD_SET_TYPE', |
| 103 | 14: 'OFPBAC_BAD_SET_LEN', |
| 104 | 15: 'OFPBAC_BAD_SET_ARGUMENT', |
| 105 | } |
| 106 | |
| 107 | # Identifiers from group ofp_bad_instruction_code |
| 108 | OFPBIC_UNKNOWN_INST = 0 |
| 109 | OFPBIC_UNSUP_INST = 1 |
| 110 | OFPBIC_BAD_TABLE_ID = 2 |
| 111 | OFPBIC_UNSUP_METADATA = 3 |
| 112 | OFPBIC_UNSUP_METADATA_MASK = 4 |
| 113 | OFPBIC_BAD_EXPERIMENTER = 5 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 114 | OFPBIC_BAD_EXPERIMENTER_TYPE = 6 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 115 | OFPBIC_BAD_LEN = 7 |
| 116 | OFPBIC_EPERM = 8 |
| 117 | |
| 118 | ofp_bad_instruction_code_map = { |
| 119 | 0: 'OFPBIC_UNKNOWN_INST', |
| 120 | 1: 'OFPBIC_UNSUP_INST', |
| 121 | 2: 'OFPBIC_BAD_TABLE_ID', |
| 122 | 3: 'OFPBIC_UNSUP_METADATA', |
| 123 | 4: 'OFPBIC_UNSUP_METADATA_MASK', |
| 124 | 5: 'OFPBIC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 125 | 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 126 | 7: 'OFPBIC_BAD_LEN', |
| 127 | 8: 'OFPBIC_EPERM', |
| 128 | } |
| 129 | |
| 130 | # Identifiers from group ofp_bad_match_code |
| 131 | OFPBMC_BAD_TYPE = 0 |
| 132 | OFPBMC_BAD_LEN = 1 |
| 133 | OFPBMC_BAD_TAG = 2 |
| 134 | OFPBMC_BAD_DL_ADDR_MASK = 3 |
| 135 | OFPBMC_BAD_NW_ADDR_MASK = 4 |
| 136 | OFPBMC_BAD_WILDCARDS = 5 |
| 137 | OFPBMC_BAD_FIELD = 6 |
| 138 | OFPBMC_BAD_VALUE = 7 |
| 139 | OFPBMC_BAD_MASK = 8 |
| 140 | OFPBMC_BAD_PREREQ = 9 |
| 141 | OFPBMC_DUP_FIELD = 10 |
| 142 | OFPBMC_EPERM = 11 |
| 143 | |
| 144 | ofp_bad_match_code_map = { |
| 145 | 0: 'OFPBMC_BAD_TYPE', |
| 146 | 1: 'OFPBMC_BAD_LEN', |
| 147 | 2: 'OFPBMC_BAD_TAG', |
| 148 | 3: 'OFPBMC_BAD_DL_ADDR_MASK', |
| 149 | 4: 'OFPBMC_BAD_NW_ADDR_MASK', |
| 150 | 5: 'OFPBMC_BAD_WILDCARDS', |
| 151 | 6: 'OFPBMC_BAD_FIELD', |
| 152 | 7: 'OFPBMC_BAD_VALUE', |
| 153 | 8: 'OFPBMC_BAD_MASK', |
| 154 | 9: 'OFPBMC_BAD_PREREQ', |
| 155 | 10: 'OFPBMC_DUP_FIELD', |
| 156 | 11: 'OFPBMC_EPERM', |
| 157 | } |
| 158 | |
| 159 | # Identifiers from group ofp_bad_request_code |
| 160 | OFPBRC_BAD_VERSION = 0 |
| 161 | OFPBRC_BAD_TYPE = 1 |
| 162 | OFPBRC_BAD_STAT = 2 |
| 163 | OFPBRC_BAD_EXPERIMENTER = 3 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 164 | OFPBRC_BAD_EXPERIMENTER_TYPE = 4 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 165 | OFPBRC_EPERM = 5 |
| 166 | OFPBRC_BAD_LEN = 6 |
| 167 | OFPBRC_BUFFER_EMPTY = 7 |
| 168 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 169 | OFPBRC_BAD_TABLE_ID = 9 |
| 170 | OFPBRC_IS_SLAVE = 10 |
| 171 | OFPBRC_BAD_PORT = 11 |
| 172 | OFPBRC_BAD_PACKET = 12 |
| 173 | |
| 174 | ofp_bad_request_code_map = { |
| 175 | 0: 'OFPBRC_BAD_VERSION', |
| 176 | 1: 'OFPBRC_BAD_TYPE', |
| 177 | 2: 'OFPBRC_BAD_STAT', |
| 178 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 179 | 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 180 | 5: 'OFPBRC_EPERM', |
| 181 | 6: 'OFPBRC_BAD_LEN', |
| 182 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 183 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 184 | 9: 'OFPBRC_BAD_TABLE_ID', |
| 185 | 10: 'OFPBRC_IS_SLAVE', |
| 186 | 11: 'OFPBRC_BAD_PORT', |
| 187 | 12: 'OFPBRC_BAD_PACKET', |
| 188 | } |
| 189 | |
Rich Lane | 93b3313 | 2014-04-21 12:20:58 -0700 | [diff] [blame] | 190 | # Identifiers from group ofp_bsn_vport_l2gre_flags |
| 191 | OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1 |
| 192 | OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2 |
| 193 | OF_BSN_VPORT_L2GRE_DSCP_COPY = 4 |
| 194 | |
| 195 | ofp_bsn_vport_l2gre_flags_map = { |
| 196 | 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID', |
| 197 | 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN', |
| 198 | 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY', |
| 199 | } |
| 200 | |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 201 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 202 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 203 | |
| 204 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 205 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 206 | } |
| 207 | |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 208 | # Identifiers from group ofp_bsn_vport_status |
| 209 | OF_BSN_VPORT_STATUS_OK = 0 |
| 210 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 211 | |
| 212 | ofp_bsn_vport_status_map = { |
| 213 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 214 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 215 | } |
| 216 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 217 | # Identifiers from group ofp_capabilities |
| 218 | OFPC_FLOW_STATS = 1 |
| 219 | OFPC_TABLE_STATS = 2 |
| 220 | OFPC_PORT_STATS = 4 |
| 221 | OFPC_GROUP_STATS = 8 |
| 222 | OFPC_IP_REASM = 32 |
| 223 | OFPC_QUEUE_STATS = 64 |
| 224 | OFPC_PORT_BLOCKED = 256 |
| 225 | |
| 226 | ofp_capabilities_map = { |
| 227 | 1: 'OFPC_FLOW_STATS', |
| 228 | 2: 'OFPC_TABLE_STATS', |
| 229 | 4: 'OFPC_PORT_STATS', |
| 230 | 8: 'OFPC_GROUP_STATS', |
| 231 | 32: 'OFPC_IP_REASM', |
| 232 | 64: 'OFPC_QUEUE_STATS', |
| 233 | 256: 'OFPC_PORT_BLOCKED', |
| 234 | } |
| 235 | |
| 236 | # Identifiers from group ofp_config_flags |
| 237 | OFPC_FRAG_NORMAL = 0 |
| 238 | OFPC_FRAG_DROP = 1 |
| 239 | OFPC_FRAG_REASM = 2 |
| 240 | OFPC_FRAG_MASK = 3 |
| 241 | OFPC_INVALID_TTL_TO_CONTROLLER = 4 |
| 242 | |
| 243 | ofp_config_flags_map = { |
| 244 | 0: 'OFPC_FRAG_NORMAL', |
| 245 | 1: 'OFPC_FRAG_DROP', |
| 246 | 2: 'OFPC_FRAG_REASM', |
| 247 | 3: 'OFPC_FRAG_MASK', |
| 248 | 4: 'OFPC_INVALID_TTL_TO_CONTROLLER', |
| 249 | } |
| 250 | |
| 251 | # Identifiers from group ofp_controller_max_len |
| 252 | OFPCML_MAX = 65509 |
| 253 | OFPCML_NO_BUFFER = 65535 |
| 254 | |
| 255 | ofp_controller_max_len_map = { |
| 256 | 65509: 'OFPCML_MAX', |
| 257 | 65535: 'OFPCML_NO_BUFFER', |
| 258 | } |
| 259 | |
| 260 | # Identifiers from group ofp_controller_role |
| 261 | OFPCR_ROLE_NOCHANGE = 0 |
| 262 | OFPCR_ROLE_EQUAL = 1 |
| 263 | OFPCR_ROLE_MASTER = 2 |
| 264 | OFPCR_ROLE_SLAVE = 3 |
| 265 | |
| 266 | ofp_controller_role_map = { |
| 267 | 0: 'OFPCR_ROLE_NOCHANGE', |
| 268 | 1: 'OFPCR_ROLE_EQUAL', |
| 269 | 2: 'OFPCR_ROLE_MASTER', |
| 270 | 3: 'OFPCR_ROLE_SLAVE', |
| 271 | } |
| 272 | |
| 273 | # Identifiers from group ofp_error_type |
| 274 | OFPET_HELLO_FAILED = 0 |
| 275 | OFPET_BAD_REQUEST = 1 |
| 276 | OFPET_BAD_ACTION = 2 |
| 277 | OFPET_BAD_INSTRUCTION = 3 |
| 278 | OFPET_BAD_MATCH = 4 |
| 279 | OFPET_FLOW_MOD_FAILED = 5 |
| 280 | OFPET_GROUP_MOD_FAILED = 6 |
| 281 | OFPET_PORT_MOD_FAILED = 7 |
| 282 | OFPET_TABLE_MOD_FAILED = 8 |
| 283 | OFPET_QUEUE_OP_FAILED = 9 |
| 284 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 285 | OFPET_ROLE_REQUEST_FAILED = 11 |
| 286 | OFPET_EXPERIMENTER = 65535 |
| 287 | |
| 288 | ofp_error_type_map = { |
| 289 | 0: 'OFPET_HELLO_FAILED', |
| 290 | 1: 'OFPET_BAD_REQUEST', |
| 291 | 2: 'OFPET_BAD_ACTION', |
| 292 | 3: 'OFPET_BAD_INSTRUCTION', |
| 293 | 4: 'OFPET_BAD_MATCH', |
| 294 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 295 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 296 | 7: 'OFPET_PORT_MOD_FAILED', |
| 297 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 298 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 299 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 300 | 11: 'OFPET_ROLE_REQUEST_FAILED', |
| 301 | 65535: 'OFPET_EXPERIMENTER', |
| 302 | } |
| 303 | |
| 304 | # Identifiers from group ofp_flow_mod_command |
| 305 | OFPFC_ADD = 0 |
| 306 | OFPFC_MODIFY = 1 |
| 307 | OFPFC_MODIFY_STRICT = 2 |
| 308 | OFPFC_DELETE = 3 |
| 309 | OFPFC_DELETE_STRICT = 4 |
| 310 | |
| 311 | ofp_flow_mod_command_map = { |
| 312 | 0: 'OFPFC_ADD', |
| 313 | 1: 'OFPFC_MODIFY', |
| 314 | 2: 'OFPFC_MODIFY_STRICT', |
| 315 | 3: 'OFPFC_DELETE', |
| 316 | 4: 'OFPFC_DELETE_STRICT', |
| 317 | } |
| 318 | |
| 319 | # Identifiers from group ofp_flow_mod_failed_code |
| 320 | OFPFMFC_UNKNOWN = 0 |
| 321 | OFPFMFC_TABLE_FULL = 1 |
| 322 | OFPFMFC_BAD_TABLE_ID = 2 |
| 323 | OFPFMFC_OVERLAP = 3 |
| 324 | OFPFMFC_EPERM = 4 |
| 325 | OFPFMFC_BAD_TIMEOUT = 5 |
| 326 | OFPFMFC_BAD_COMMAND = 6 |
| 327 | OFPFMFC_BAD_FLAGS = 7 |
| 328 | |
| 329 | ofp_flow_mod_failed_code_map = { |
| 330 | 0: 'OFPFMFC_UNKNOWN', |
| 331 | 1: 'OFPFMFC_TABLE_FULL', |
| 332 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 333 | 3: 'OFPFMFC_OVERLAP', |
| 334 | 4: 'OFPFMFC_EPERM', |
| 335 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 336 | 6: 'OFPFMFC_BAD_COMMAND', |
| 337 | 7: 'OFPFMFC_BAD_FLAGS', |
| 338 | } |
| 339 | |
| 340 | # Identifiers from group ofp_flow_mod_flags |
| 341 | OFPFF_SEND_FLOW_REM = 1 |
| 342 | OFPFF_CHECK_OVERLAP = 2 |
| 343 | OFPFF_RESET_COUNTS = 4 |
| 344 | |
| 345 | ofp_flow_mod_flags_map = { |
| 346 | 1: 'OFPFF_SEND_FLOW_REM', |
| 347 | 2: 'OFPFF_CHECK_OVERLAP', |
| 348 | 4: 'OFPFF_RESET_COUNTS', |
| 349 | } |
| 350 | |
| 351 | # Identifiers from group ofp_flow_removed_reason |
| 352 | OFPRR_IDLE_TIMEOUT = 0 |
| 353 | OFPRR_HARD_TIMEOUT = 1 |
| 354 | OFPRR_DELETE = 2 |
| 355 | OFPRR_GROUP_DELETE = 3 |
| 356 | |
| 357 | ofp_flow_removed_reason_map = { |
| 358 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 359 | 1: 'OFPRR_HARD_TIMEOUT', |
| 360 | 2: 'OFPRR_DELETE', |
| 361 | 3: 'OFPRR_GROUP_DELETE', |
| 362 | } |
| 363 | |
| 364 | # Identifiers from group ofp_group |
| 365 | OFPG_MAX = 4294967040 |
| 366 | OFPG_ALL = 4294967292 |
| 367 | OFPG_ANY = 4294967295 |
| 368 | |
| 369 | ofp_group_map = { |
| 370 | 4294967040: 'OFPG_MAX', |
| 371 | 4294967292: 'OFPG_ALL', |
| 372 | 4294967295: 'OFPG_ANY', |
| 373 | } |
| 374 | |
| 375 | # Identifiers from group ofp_group_capabilities |
| 376 | OFPGFC_SELECT_WEIGHT = 1 |
| 377 | OFPGFC_SELECT_LIVENESS = 2 |
| 378 | OFPGFC_CHAINING = 4 |
| 379 | OFPGFC_CHAINING_CHECKS = 8 |
| 380 | |
| 381 | ofp_group_capabilities_map = { |
| 382 | 1: 'OFPGFC_SELECT_WEIGHT', |
| 383 | 2: 'OFPGFC_SELECT_LIVENESS', |
| 384 | 4: 'OFPGFC_CHAINING', |
| 385 | 8: 'OFPGFC_CHAINING_CHECKS', |
| 386 | } |
| 387 | |
| 388 | # Identifiers from group ofp_group_mod_command |
| 389 | OFPGC_ADD = 0 |
| 390 | OFPGC_MODIFY = 1 |
| 391 | OFPGC_DELETE = 2 |
| 392 | |
| 393 | ofp_group_mod_command_map = { |
| 394 | 0: 'OFPGC_ADD', |
| 395 | 1: 'OFPGC_MODIFY', |
| 396 | 2: 'OFPGC_DELETE', |
| 397 | } |
| 398 | |
| 399 | # Identifiers from group ofp_group_mod_failed_code |
| 400 | OFPGMFC_GROUP_EXISTS = 0 |
| 401 | OFPGMFC_INVALID_GROUP = 1 |
| 402 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 403 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 404 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 405 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 406 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 407 | OFPGMFC_LOOP = 7 |
| 408 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 409 | OFPGMFC_CHAINED_GROUP = 9 |
| 410 | OFPGMFC_BAD_TYPE = 10 |
| 411 | OFPGMFC_BAD_COMMAND = 11 |
| 412 | OFPGMFC_BAD_BUCKET = 12 |
| 413 | OFPGMFC_BAD_WATCH = 13 |
| 414 | OFPGMFC_EPERM = 14 |
| 415 | |
| 416 | ofp_group_mod_failed_code_map = { |
| 417 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 418 | 1: 'OFPGMFC_INVALID_GROUP', |
| 419 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 420 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 421 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 422 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 423 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 424 | 7: 'OFPGMFC_LOOP', |
| 425 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 426 | 9: 'OFPGMFC_CHAINED_GROUP', |
| 427 | 10: 'OFPGMFC_BAD_TYPE', |
| 428 | 11: 'OFPGMFC_BAD_COMMAND', |
| 429 | 12: 'OFPGMFC_BAD_BUCKET', |
| 430 | 13: 'OFPGMFC_BAD_WATCH', |
| 431 | 14: 'OFPGMFC_EPERM', |
| 432 | } |
| 433 | |
| 434 | # Identifiers from group ofp_group_type |
| 435 | OFPGT_ALL = 0 |
| 436 | OFPGT_SELECT = 1 |
| 437 | OFPGT_INDIRECT = 2 |
| 438 | OFPGT_FF = 3 |
| 439 | |
| 440 | ofp_group_type_map = { |
| 441 | 0: 'OFPGT_ALL', |
| 442 | 1: 'OFPGT_SELECT', |
| 443 | 2: 'OFPGT_INDIRECT', |
| 444 | 3: 'OFPGT_FF', |
| 445 | } |
| 446 | |
| 447 | # Identifiers from group ofp_hello_failed_code |
| 448 | OFPHFC_INCOMPATIBLE = 0 |
| 449 | OFPHFC_EPERM = 1 |
| 450 | |
| 451 | ofp_hello_failed_code_map = { |
| 452 | 0: 'OFPHFC_INCOMPATIBLE', |
| 453 | 1: 'OFPHFC_EPERM', |
| 454 | } |
| 455 | |
| 456 | # Identifiers from group ofp_instruction_type |
| 457 | OFPIT_GOTO_TABLE = 1 |
| 458 | OFPIT_WRITE_METADATA = 2 |
| 459 | OFPIT_WRITE_ACTIONS = 3 |
| 460 | OFPIT_APPLY_ACTIONS = 4 |
| 461 | OFPIT_CLEAR_ACTIONS = 5 |
| 462 | OFPIT_EXPERIMENTER = 65535 |
| 463 | |
| 464 | ofp_instruction_type_map = { |
| 465 | 1: 'OFPIT_GOTO_TABLE', |
| 466 | 2: 'OFPIT_WRITE_METADATA', |
| 467 | 3: 'OFPIT_WRITE_ACTIONS', |
| 468 | 4: 'OFPIT_APPLY_ACTIONS', |
| 469 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 470 | 65535: 'OFPIT_EXPERIMENTER', |
| 471 | } |
| 472 | |
| 473 | # Identifiers from group ofp_match_type |
| 474 | OFPMT_STANDARD = 0 |
| 475 | OFPMT_OXM = 1 |
| 476 | |
| 477 | ofp_match_type_map = { |
| 478 | 0: 'OFPMT_STANDARD', |
| 479 | 1: 'OFPMT_OXM', |
| 480 | } |
| 481 | |
| 482 | # Identifiers from group ofp_oxm_class |
| 483 | OFPXMC_NXM_0 = 0 |
| 484 | OFPXMC_NXM_1 = 1 |
| 485 | OFPXMC_OPENFLOW_BASIC = 32768 |
| 486 | OFPXMC_EXPERIMENTER = 65535 |
| 487 | |
| 488 | ofp_oxm_class_map = { |
| 489 | 0: 'OFPXMC_NXM_0', |
| 490 | 1: 'OFPXMC_NXM_1', |
| 491 | 32768: 'OFPXMC_OPENFLOW_BASIC', |
| 492 | 65535: 'OFPXMC_EXPERIMENTER', |
| 493 | } |
| 494 | |
| 495 | # Identifiers from group ofp_packet_in_reason |
| 496 | OFPR_NO_MATCH = 0 |
| 497 | OFPR_ACTION = 1 |
| 498 | OFPR_INVALID_TTL = 2 |
| 499 | |
| 500 | ofp_packet_in_reason_map = { |
| 501 | 0: 'OFPR_NO_MATCH', |
| 502 | 1: 'OFPR_ACTION', |
| 503 | 2: 'OFPR_INVALID_TTL', |
| 504 | } |
| 505 | |
| 506 | # Identifiers from group ofp_port |
| 507 | OFPP_MAX = 4294967040 |
| 508 | OFPP_IN_PORT = 4294967288 |
| 509 | OFPP_TABLE = 4294967289 |
| 510 | OFPP_NORMAL = 4294967290 |
| 511 | OFPP_FLOOD = 4294967291 |
| 512 | OFPP_ALL = 4294967292 |
| 513 | OFPP_CONTROLLER = 4294967293 |
| 514 | OFPP_LOCAL = 4294967294 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 515 | OFPP_ANY = 4294967295 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 516 | |
| 517 | ofp_port_map = { |
| 518 | 4294967040: 'OFPP_MAX', |
| 519 | 4294967288: 'OFPP_IN_PORT', |
| 520 | 4294967289: 'OFPP_TABLE', |
| 521 | 4294967290: 'OFPP_NORMAL', |
| 522 | 4294967291: 'OFPP_FLOOD', |
| 523 | 4294967292: 'OFPP_ALL', |
| 524 | 4294967293: 'OFPP_CONTROLLER', |
| 525 | 4294967294: 'OFPP_LOCAL', |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 526 | 4294967295: 'OFPP_ANY', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 527 | } |
| 528 | |
| 529 | # Identifiers from group ofp_port_config |
| 530 | OFPPC_PORT_DOWN = 1 |
| 531 | OFPPC_NO_RECV = 4 |
| 532 | OFPPC_NO_FWD = 32 |
| 533 | OFPPC_NO_PACKET_IN = 64 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 534 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 535 | |
| 536 | ofp_port_config_map = { |
| 537 | 1: 'OFPPC_PORT_DOWN', |
| 538 | 4: 'OFPPC_NO_RECV', |
| 539 | 32: 'OFPPC_NO_FWD', |
| 540 | 64: 'OFPPC_NO_PACKET_IN', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 541 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 542 | } |
| 543 | |
| 544 | # Identifiers from group ofp_port_features |
| 545 | OFPPF_10MB_HD = 1 |
| 546 | OFPPF_10MB_FD = 2 |
| 547 | OFPPF_100MB_HD = 4 |
| 548 | OFPPF_100MB_FD = 8 |
| 549 | OFPPF_1GB_HD = 16 |
| 550 | OFPPF_1GB_FD = 32 |
| 551 | OFPPF_10GB_FD = 64 |
| 552 | OFPPF_40GB_FD = 128 |
| 553 | OFPPF_100GB_FD = 256 |
| 554 | OFPPF_1TB_FD = 512 |
| 555 | OFPPF_OTHER = 1024 |
| 556 | OFPPF_COPPER = 2048 |
| 557 | OFPPF_FIBER = 4096 |
| 558 | OFPPF_AUTONEG = 8192 |
| 559 | OFPPF_PAUSE = 16384 |
| 560 | OFPPF_PAUSE_ASYM = 32768 |
| 561 | |
| 562 | ofp_port_features_map = { |
| 563 | 1: 'OFPPF_10MB_HD', |
| 564 | 2: 'OFPPF_10MB_FD', |
| 565 | 4: 'OFPPF_100MB_HD', |
| 566 | 8: 'OFPPF_100MB_FD', |
| 567 | 16: 'OFPPF_1GB_HD', |
| 568 | 32: 'OFPPF_1GB_FD', |
| 569 | 64: 'OFPPF_10GB_FD', |
| 570 | 128: 'OFPPF_40GB_FD', |
| 571 | 256: 'OFPPF_100GB_FD', |
| 572 | 512: 'OFPPF_1TB_FD', |
| 573 | 1024: 'OFPPF_OTHER', |
| 574 | 2048: 'OFPPF_COPPER', |
| 575 | 4096: 'OFPPF_FIBER', |
| 576 | 8192: 'OFPPF_AUTONEG', |
| 577 | 16384: 'OFPPF_PAUSE', |
| 578 | 32768: 'OFPPF_PAUSE_ASYM', |
| 579 | } |
| 580 | |
| 581 | # Identifiers from group ofp_port_mod_failed_code |
| 582 | OFPPMFC_BAD_PORT = 0 |
| 583 | OFPPMFC_BAD_HW_ADDR = 1 |
| 584 | OFPPMFC_BAD_CONFIG = 2 |
| 585 | OFPPMFC_BAD_ADVERTISE = 3 |
| 586 | OFPPMFC_EPERM = 4 |
| 587 | |
| 588 | ofp_port_mod_failed_code_map = { |
| 589 | 0: 'OFPPMFC_BAD_PORT', |
| 590 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 591 | 2: 'OFPPMFC_BAD_CONFIG', |
| 592 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 593 | 4: 'OFPPMFC_EPERM', |
| 594 | } |
| 595 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 596 | # Identifiers from group ofp_port_reason |
| 597 | OFPPR_ADD = 0 |
| 598 | OFPPR_DELETE = 1 |
| 599 | OFPPR_MODIFY = 2 |
| 600 | |
| 601 | ofp_port_reason_map = { |
| 602 | 0: 'OFPPR_ADD', |
| 603 | 1: 'OFPPR_DELETE', |
| 604 | 2: 'OFPPR_MODIFY', |
| 605 | } |
| 606 | |
| 607 | # Identifiers from group ofp_port_state |
| 608 | OFPPS_LINK_DOWN = 1 |
| 609 | OFPPS_BLOCKED = 2 |
| 610 | OFPPS_LIVE = 4 |
| 611 | |
| 612 | ofp_port_state_map = { |
| 613 | 1: 'OFPPS_LINK_DOWN', |
| 614 | 2: 'OFPPS_BLOCKED', |
| 615 | 4: 'OFPPS_LIVE', |
| 616 | } |
| 617 | |
| 618 | # Identifiers from group ofp_queue_op_failed_code |
| 619 | OFPQOFC_BAD_PORT = 0 |
| 620 | OFPQOFC_BAD_QUEUE = 1 |
| 621 | OFPQOFC_EPERM = 2 |
| 622 | |
| 623 | ofp_queue_op_failed_code_map = { |
| 624 | 0: 'OFPQOFC_BAD_PORT', |
| 625 | 1: 'OFPQOFC_BAD_QUEUE', |
| 626 | 2: 'OFPQOFC_EPERM', |
| 627 | } |
| 628 | |
| 629 | # Identifiers from group ofp_queue_properties |
| 630 | OFPQT_MIN_RATE = 1 |
| 631 | OFPQT_MAX_RATE = 2 |
| 632 | OFPQT_EXPERIMENTER = 65535 |
| 633 | |
| 634 | ofp_queue_properties_map = { |
| 635 | 1: 'OFPQT_MIN_RATE', |
| 636 | 2: 'OFPQT_MAX_RATE', |
| 637 | 65535: 'OFPQT_EXPERIMENTER', |
| 638 | } |
| 639 | |
| 640 | # Identifiers from group ofp_role_request_failed_code |
| 641 | OFPRRFC_STALE = 0 |
| 642 | OFPRRFC_UNSUP = 1 |
| 643 | OFPRRFC_BAD_ROLE = 2 |
| 644 | |
| 645 | ofp_role_request_failed_code_map = { |
| 646 | 0: 'OFPRRFC_STALE', |
| 647 | 1: 'OFPRRFC_UNSUP', |
| 648 | 2: 'OFPRRFC_BAD_ROLE', |
| 649 | } |
| 650 | |
| 651 | # Identifiers from group ofp_stats_reply_flags |
| 652 | OFPSF_REPLY_MORE = 1 |
| 653 | |
| 654 | ofp_stats_reply_flags_map = { |
| 655 | 1: 'OFPSF_REPLY_MORE', |
| 656 | } |
| 657 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 658 | # Identifiers from group ofp_stats_request_flags |
| 659 | |
| 660 | ofp_stats_request_flags_map = { |
| 661 | } |
| 662 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 663 | # Identifiers from group ofp_stats_type |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 664 | OFPST_DESC = 0 |
| 665 | OFPST_FLOW = 1 |
| 666 | OFPST_AGGREGATE = 2 |
| 667 | OFPST_TABLE = 3 |
| 668 | OFPST_PORT = 4 |
| 669 | OFPST_QUEUE = 5 |
| 670 | OFPST_GROUP = 6 |
| 671 | OFPST_GROUP_DESC = 7 |
| 672 | OFPST_GROUP_FEATURES = 8 |
| 673 | OFPST_EXPERIMENTER = 65535 |
| 674 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 675 | ofp_stats_type_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 676 | 0: 'OFPST_DESC', |
| 677 | 1: 'OFPST_FLOW', |
| 678 | 2: 'OFPST_AGGREGATE', |
| 679 | 3: 'OFPST_TABLE', |
| 680 | 4: 'OFPST_PORT', |
| 681 | 5: 'OFPST_QUEUE', |
| 682 | 6: 'OFPST_GROUP', |
| 683 | 7: 'OFPST_GROUP_DESC', |
| 684 | 8: 'OFPST_GROUP_FEATURES', |
| 685 | 65535: 'OFPST_EXPERIMENTER', |
| 686 | } |
| 687 | |
| 688 | # Identifiers from group ofp_switch_config_failed_code |
| 689 | OFPSCFC_BAD_FLAGS = 0 |
| 690 | OFPSCFC_BAD_LEN = 1 |
| 691 | OFPSCFC_EPERM = 2 |
| 692 | |
| 693 | ofp_switch_config_failed_code_map = { |
| 694 | 0: 'OFPSCFC_BAD_FLAGS', |
| 695 | 1: 'OFPSCFC_BAD_LEN', |
| 696 | 2: 'OFPSCFC_EPERM', |
| 697 | } |
| 698 | |
| 699 | # Identifiers from group ofp_table |
| 700 | OFPTT_MAX = 254 |
| 701 | OFPTT_ALL = 255 |
| 702 | |
| 703 | ofp_table_map = { |
| 704 | 254: 'OFPTT_MAX', |
| 705 | 255: 'OFPTT_ALL', |
| 706 | } |
| 707 | |
| 708 | # Identifiers from group ofp_table_config |
| 709 | OFPTC_TABLE_MISS_CONTROLLER = 0 |
| 710 | OFPTC_TABLE_MISS_CONTINUE = 1 |
| 711 | OFPTC_TABLE_MISS_DROP = 2 |
| 712 | OFPTC_TABLE_MISS_MASK = 3 |
| 713 | |
| 714 | ofp_table_config_map = { |
| 715 | 0: 'OFPTC_TABLE_MISS_CONTROLLER', |
| 716 | 1: 'OFPTC_TABLE_MISS_CONTINUE', |
| 717 | 2: 'OFPTC_TABLE_MISS_DROP', |
| 718 | 3: 'OFPTC_TABLE_MISS_MASK', |
| 719 | } |
| 720 | |
| 721 | # Identifiers from group ofp_table_mod_failed_code |
| 722 | OFPTMFC_BAD_TABLE = 0 |
| 723 | OFPTMFC_BAD_CONFIG = 1 |
| 724 | OFPTMFC_EPERM = 2 |
| 725 | |
| 726 | ofp_table_mod_failed_code_map = { |
| 727 | 0: 'OFPTMFC_BAD_TABLE', |
| 728 | 1: 'OFPTMFC_BAD_CONFIG', |
| 729 | 2: 'OFPTMFC_EPERM', |
| 730 | } |
| 731 | |
| 732 | # Identifiers from group ofp_type |
| 733 | OFPT_HELLO = 0 |
| 734 | OFPT_ERROR = 1 |
| 735 | OFPT_ECHO_REQUEST = 2 |
| 736 | OFPT_ECHO_REPLY = 3 |
| 737 | OFPT_EXPERIMENTER = 4 |
| 738 | OFPT_FEATURES_REQUEST = 5 |
| 739 | OFPT_FEATURES_REPLY = 6 |
| 740 | OFPT_GET_CONFIG_REQUEST = 7 |
| 741 | OFPT_GET_CONFIG_REPLY = 8 |
| 742 | OFPT_SET_CONFIG = 9 |
| 743 | OFPT_PACKET_IN = 10 |
| 744 | OFPT_FLOW_REMOVED = 11 |
| 745 | OFPT_PORT_STATUS = 12 |
| 746 | OFPT_PACKET_OUT = 13 |
| 747 | OFPT_FLOW_MOD = 14 |
| 748 | OFPT_GROUP_MOD = 15 |
| 749 | OFPT_PORT_MOD = 16 |
| 750 | OFPT_TABLE_MOD = 17 |
| 751 | OFPT_STATS_REQUEST = 18 |
| 752 | OFPT_STATS_REPLY = 19 |
| 753 | OFPT_BARRIER_REQUEST = 20 |
| 754 | OFPT_BARRIER_REPLY = 21 |
| 755 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 756 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 757 | OFPT_ROLE_REQUEST = 24 |
| 758 | OFPT_ROLE_REPLY = 25 |
| 759 | |
| 760 | ofp_type_map = { |
| 761 | 0: 'OFPT_HELLO', |
| 762 | 1: 'OFPT_ERROR', |
| 763 | 2: 'OFPT_ECHO_REQUEST', |
| 764 | 3: 'OFPT_ECHO_REPLY', |
| 765 | 4: 'OFPT_EXPERIMENTER', |
| 766 | 5: 'OFPT_FEATURES_REQUEST', |
| 767 | 6: 'OFPT_FEATURES_REPLY', |
| 768 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 769 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 770 | 9: 'OFPT_SET_CONFIG', |
| 771 | 10: 'OFPT_PACKET_IN', |
| 772 | 11: 'OFPT_FLOW_REMOVED', |
| 773 | 12: 'OFPT_PORT_STATUS', |
| 774 | 13: 'OFPT_PACKET_OUT', |
| 775 | 14: 'OFPT_FLOW_MOD', |
| 776 | 15: 'OFPT_GROUP_MOD', |
| 777 | 16: 'OFPT_PORT_MOD', |
| 778 | 17: 'OFPT_TABLE_MOD', |
| 779 | 18: 'OFPT_STATS_REQUEST', |
| 780 | 19: 'OFPT_STATS_REPLY', |
| 781 | 20: 'OFPT_BARRIER_REQUEST', |
| 782 | 21: 'OFPT_BARRIER_REPLY', |
| 783 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 784 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 785 | 24: 'OFPT_ROLE_REQUEST', |
| 786 | 25: 'OFPT_ROLE_REPLY', |
| 787 | } |
| 788 | |
| 789 | # Identifiers from group ofp_vlan_id |
| 790 | OFPVID_NONE = 0 |
| 791 | OFPVID_PRESENT = 4096 |
| 792 | |
| 793 | ofp_vlan_id_map = { |
| 794 | 0: 'OFPVID_NONE', |
| 795 | 4096: 'OFPVID_PRESENT', |
| 796 | } |
| 797 | |