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 = 4 |
| 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 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 21 | OFP_NO_BUFFER = 4294967295 |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 22 | DESC_STR_LEN = 256 |
| 23 | SERIAL_NUM_LEN = 32 |
| 24 | OFPQ_ALL = 4294967295 |
| 25 | OFPQ_MAX_RATE_UNCFG = 65535 |
| 26 | OFPQ_MIN_RATE_UNCFG = 65535 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 27 | |
Rich Lane | 7b0f201 | 2013-11-22 14:15:26 -0800 | [diff] [blame] | 28 | # Identifiers from group of_bsn_lacp_convergence_status_t |
| 29 | LACP_SUCCESS = 0 |
| 30 | LACP_TIMEDOUT = 1 |
| 31 | LACP_OUT_OF_SYNC = 2 |
| 32 | |
| 33 | of_bsn_lacp_convergence_status_t_map = { |
| 34 | 0: 'LACP_SUCCESS', |
| 35 | 1: 'LACP_TIMEDOUT', |
| 36 | 2: 'LACP_OUT_OF_SYNC', |
| 37 | } |
| 38 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 39 | # Identifiers from group of_bsn_pdu_slot_num_t |
| 40 | BSN_PDU_SLOT_NUM_ANY = 255 |
| 41 | |
| 42 | of_bsn_pdu_slot_num_t_map = { |
| 43 | 255: 'BSN_PDU_SLOT_NUM_ANY', |
| 44 | } |
| 45 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 46 | # Identifiers from group ofp_action_type |
| 47 | OFPAT_OUTPUT = 0 |
| 48 | OFPAT_COPY_TTL_OUT = 11 |
| 49 | OFPAT_COPY_TTL_IN = 12 |
| 50 | OFPAT_SET_MPLS_TTL = 15 |
| 51 | OFPAT_DEC_MPLS_TTL = 16 |
| 52 | OFPAT_PUSH_VLAN = 17 |
| 53 | OFPAT_POP_VLAN = 18 |
| 54 | OFPAT_PUSH_MPLS = 19 |
| 55 | OFPAT_POP_MPLS = 20 |
| 56 | OFPAT_SET_QUEUE = 21 |
| 57 | OFPAT_GROUP = 22 |
| 58 | OFPAT_SET_NW_TTL = 23 |
| 59 | OFPAT_DEC_NW_TTL = 24 |
| 60 | OFPAT_SET_FIELD = 25 |
| 61 | OFPAT_PUSH_PBB = 26 |
| 62 | OFPAT_POP_PBB = 27 |
| 63 | OFPAT_EXPERIMENTER = 65535 |
| 64 | |
| 65 | ofp_action_type_map = { |
| 66 | 0: 'OFPAT_OUTPUT', |
| 67 | 11: 'OFPAT_COPY_TTL_OUT', |
| 68 | 12: 'OFPAT_COPY_TTL_IN', |
| 69 | 15: 'OFPAT_SET_MPLS_TTL', |
| 70 | 16: 'OFPAT_DEC_MPLS_TTL', |
| 71 | 17: 'OFPAT_PUSH_VLAN', |
| 72 | 18: 'OFPAT_POP_VLAN', |
| 73 | 19: 'OFPAT_PUSH_MPLS', |
| 74 | 20: 'OFPAT_POP_MPLS', |
| 75 | 21: 'OFPAT_SET_QUEUE', |
| 76 | 22: 'OFPAT_GROUP', |
| 77 | 23: 'OFPAT_SET_NW_TTL', |
| 78 | 24: 'OFPAT_DEC_NW_TTL', |
| 79 | 25: 'OFPAT_SET_FIELD', |
| 80 | 26: 'OFPAT_PUSH_PBB', |
| 81 | 27: 'OFPAT_POP_PBB', |
| 82 | 65535: 'OFPAT_EXPERIMENTER', |
| 83 | } |
| 84 | |
| 85 | # Identifiers from group ofp_bad_action_code |
| 86 | OFPBAC_BAD_TYPE = 0 |
| 87 | OFPBAC_BAD_LEN = 1 |
| 88 | OFPBAC_BAD_EXPERIMENTER = 2 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 89 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 90 | OFPBAC_BAD_OUT_PORT = 4 |
| 91 | OFPBAC_BAD_ARGUMENT = 5 |
| 92 | OFPBAC_EPERM = 6 |
| 93 | OFPBAC_TOO_MANY = 7 |
| 94 | OFPBAC_BAD_QUEUE = 8 |
| 95 | OFPBAC_BAD_OUT_GROUP = 9 |
| 96 | OFPBAC_MATCH_INCONSISTENT = 10 |
| 97 | OFPBAC_UNSUPPORTED_ORDER = 11 |
| 98 | OFPBAC_BAD_TAG = 12 |
| 99 | OFPBAC_BAD_SET_TYPE = 13 |
| 100 | OFPBAC_BAD_SET_LEN = 14 |
| 101 | OFPBAC_BAD_SET_ARGUMENT = 15 |
| 102 | |
| 103 | ofp_bad_action_code_map = { |
| 104 | 0: 'OFPBAC_BAD_TYPE', |
| 105 | 1: 'OFPBAC_BAD_LEN', |
| 106 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 107 | 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 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 | 13: 'OFPBAC_BAD_SET_TYPE', |
| 118 | 14: 'OFPBAC_BAD_SET_LEN', |
| 119 | 15: 'OFPBAC_BAD_SET_ARGUMENT', |
| 120 | } |
| 121 | |
| 122 | # Identifiers from group ofp_bad_instruction_code |
| 123 | OFPBIC_UNKNOWN_INST = 0 |
| 124 | OFPBIC_UNSUP_INST = 1 |
| 125 | OFPBIC_BAD_TABLE_ID = 2 |
| 126 | OFPBIC_UNSUP_METADATA = 3 |
| 127 | OFPBIC_UNSUP_METADATA_MASK = 4 |
| 128 | OFPBIC_BAD_EXPERIMENTER = 5 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 129 | OFPBIC_BAD_EXPERIMENTER_TYPE = 6 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 130 | OFPBIC_BAD_LEN = 7 |
| 131 | OFPBIC_EPERM = 8 |
| 132 | |
| 133 | ofp_bad_instruction_code_map = { |
| 134 | 0: 'OFPBIC_UNKNOWN_INST', |
| 135 | 1: 'OFPBIC_UNSUP_INST', |
| 136 | 2: 'OFPBIC_BAD_TABLE_ID', |
| 137 | 3: 'OFPBIC_UNSUP_METADATA', |
| 138 | 4: 'OFPBIC_UNSUP_METADATA_MASK', |
| 139 | 5: 'OFPBIC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 140 | 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 141 | 7: 'OFPBIC_BAD_LEN', |
| 142 | 8: 'OFPBIC_EPERM', |
| 143 | } |
| 144 | |
| 145 | # Identifiers from group ofp_bad_match_code |
| 146 | OFPBMC_BAD_TYPE = 0 |
| 147 | OFPBMC_BAD_LEN = 1 |
| 148 | OFPBMC_BAD_TAG = 2 |
| 149 | OFPBMC_BAD_DL_ADDR_MASK = 3 |
| 150 | OFPBMC_BAD_NW_ADDR_MASK = 4 |
| 151 | OFPBMC_BAD_WILDCARDS = 5 |
| 152 | OFPBMC_BAD_FIELD = 6 |
| 153 | OFPBMC_BAD_VALUE = 7 |
| 154 | OFPBMC_BAD_MASK = 8 |
| 155 | OFPBMC_BAD_PREREQ = 9 |
| 156 | OFPBMC_DUP_FIELD = 10 |
| 157 | OFPBMC_EPERM = 11 |
| 158 | |
| 159 | ofp_bad_match_code_map = { |
| 160 | 0: 'OFPBMC_BAD_TYPE', |
| 161 | 1: 'OFPBMC_BAD_LEN', |
| 162 | 2: 'OFPBMC_BAD_TAG', |
| 163 | 3: 'OFPBMC_BAD_DL_ADDR_MASK', |
| 164 | 4: 'OFPBMC_BAD_NW_ADDR_MASK', |
| 165 | 5: 'OFPBMC_BAD_WILDCARDS', |
| 166 | 6: 'OFPBMC_BAD_FIELD', |
| 167 | 7: 'OFPBMC_BAD_VALUE', |
| 168 | 8: 'OFPBMC_BAD_MASK', |
| 169 | 9: 'OFPBMC_BAD_PREREQ', |
| 170 | 10: 'OFPBMC_DUP_FIELD', |
| 171 | 11: 'OFPBMC_EPERM', |
| 172 | } |
| 173 | |
| 174 | # Identifiers from group ofp_bad_request_code |
| 175 | OFPBRC_BAD_VERSION = 0 |
| 176 | OFPBRC_BAD_TYPE = 1 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 177 | OFPBRC_BAD_STAT = 2 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 178 | OFPBRC_BAD_EXPERIMENTER = 3 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 179 | OFPBRC_BAD_EXPERIMENTER_TYPE = 4 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 180 | OFPBRC_EPERM = 5 |
| 181 | OFPBRC_BAD_LEN = 6 |
| 182 | OFPBRC_BUFFER_EMPTY = 7 |
| 183 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 184 | OFPBRC_BAD_TABLE_ID = 9 |
| 185 | OFPBRC_IS_SLAVE = 10 |
| 186 | OFPBRC_BAD_PORT = 11 |
| 187 | OFPBRC_BAD_PACKET = 12 |
| 188 | OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13 |
| 189 | |
| 190 | ofp_bad_request_code_map = { |
| 191 | 0: 'OFPBRC_BAD_VERSION', |
| 192 | 1: 'OFPBRC_BAD_TYPE', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 193 | 2: 'OFPBRC_BAD_STAT', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 194 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 195 | 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 196 | 5: 'OFPBRC_EPERM', |
| 197 | 6: 'OFPBRC_BAD_LEN', |
| 198 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 199 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 200 | 9: 'OFPBRC_BAD_TABLE_ID', |
| 201 | 10: 'OFPBRC_IS_SLAVE', |
| 202 | 11: 'OFPBRC_BAD_PORT', |
| 203 | 12: 'OFPBRC_BAD_PACKET', |
| 204 | 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW', |
| 205 | } |
| 206 | |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 207 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 208 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 209 | |
| 210 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 211 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 212 | } |
| 213 | |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 214 | # Identifiers from group ofp_bsn_vport_status |
| 215 | OF_BSN_VPORT_STATUS_OK = 0 |
| 216 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 217 | |
| 218 | ofp_bsn_vport_status_map = { |
| 219 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 220 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 221 | } |
| 222 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 223 | # Identifiers from group ofp_capabilities |
| 224 | OFPC_FLOW_STATS = 1 |
| 225 | OFPC_TABLE_STATS = 2 |
| 226 | OFPC_PORT_STATS = 4 |
| 227 | OFPC_GROUP_STATS = 8 |
| 228 | OFPC_IP_REASM = 32 |
| 229 | OFPC_QUEUE_STATS = 64 |
| 230 | OFPC_PORT_BLOCKED = 256 |
| 231 | |
| 232 | ofp_capabilities_map = { |
| 233 | 1: 'OFPC_FLOW_STATS', |
| 234 | 2: 'OFPC_TABLE_STATS', |
| 235 | 4: 'OFPC_PORT_STATS', |
| 236 | 8: 'OFPC_GROUP_STATS', |
| 237 | 32: 'OFPC_IP_REASM', |
| 238 | 64: 'OFPC_QUEUE_STATS', |
| 239 | 256: 'OFPC_PORT_BLOCKED', |
| 240 | } |
| 241 | |
| 242 | # Identifiers from group ofp_config_flags |
| 243 | OFPC_FRAG_NORMAL = 0 |
| 244 | OFPC_FRAG_DROP = 1 |
| 245 | OFPC_FRAG_REASM = 2 |
| 246 | OFPC_FRAG_MASK = 3 |
| 247 | |
| 248 | ofp_config_flags_map = { |
| 249 | 0: 'OFPC_FRAG_NORMAL', |
| 250 | 1: 'OFPC_FRAG_DROP', |
| 251 | 2: 'OFPC_FRAG_REASM', |
| 252 | 3: 'OFPC_FRAG_MASK', |
| 253 | } |
| 254 | |
| 255 | # Identifiers from group ofp_controller_max_len |
| 256 | OFPCML_MAX = 65509 |
| 257 | OFPCML_NO_BUFFER = 65535 |
| 258 | |
| 259 | ofp_controller_max_len_map = { |
| 260 | 65509: 'OFPCML_MAX', |
| 261 | 65535: 'OFPCML_NO_BUFFER', |
| 262 | } |
| 263 | |
| 264 | # Identifiers from group ofp_controller_role |
| 265 | OFPCR_ROLE_NOCHANGE = 0 |
| 266 | OFPCR_ROLE_EQUAL = 1 |
| 267 | OFPCR_ROLE_MASTER = 2 |
| 268 | OFPCR_ROLE_SLAVE = 3 |
| 269 | |
| 270 | ofp_controller_role_map = { |
| 271 | 0: 'OFPCR_ROLE_NOCHANGE', |
| 272 | 1: 'OFPCR_ROLE_EQUAL', |
| 273 | 2: 'OFPCR_ROLE_MASTER', |
| 274 | 3: 'OFPCR_ROLE_SLAVE', |
| 275 | } |
| 276 | |
| 277 | # Identifiers from group ofp_error_type |
| 278 | OFPET_HELLO_FAILED = 0 |
| 279 | OFPET_BAD_REQUEST = 1 |
| 280 | OFPET_BAD_ACTION = 2 |
| 281 | OFPET_BAD_INSTRUCTION = 3 |
| 282 | OFPET_BAD_MATCH = 4 |
| 283 | OFPET_FLOW_MOD_FAILED = 5 |
| 284 | OFPET_GROUP_MOD_FAILED = 6 |
| 285 | OFPET_PORT_MOD_FAILED = 7 |
| 286 | OFPET_TABLE_MOD_FAILED = 8 |
| 287 | OFPET_QUEUE_OP_FAILED = 9 |
| 288 | OFPET_SWITCH_CONFIG_FAILED = 10 |
| 289 | OFPET_ROLE_REQUEST_FAILED = 11 |
| 290 | OFPET_METER_MOD_FAILED = 12 |
| 291 | OFPET_TABLE_FEATURES_FAILED = 13 |
| 292 | OFPET_EXPERIMENTER = 65535 |
| 293 | |
| 294 | ofp_error_type_map = { |
| 295 | 0: 'OFPET_HELLO_FAILED', |
| 296 | 1: 'OFPET_BAD_REQUEST', |
| 297 | 2: 'OFPET_BAD_ACTION', |
| 298 | 3: 'OFPET_BAD_INSTRUCTION', |
| 299 | 4: 'OFPET_BAD_MATCH', |
| 300 | 5: 'OFPET_FLOW_MOD_FAILED', |
| 301 | 6: 'OFPET_GROUP_MOD_FAILED', |
| 302 | 7: 'OFPET_PORT_MOD_FAILED', |
| 303 | 8: 'OFPET_TABLE_MOD_FAILED', |
| 304 | 9: 'OFPET_QUEUE_OP_FAILED', |
| 305 | 10: 'OFPET_SWITCH_CONFIG_FAILED', |
| 306 | 11: 'OFPET_ROLE_REQUEST_FAILED', |
| 307 | 12: 'OFPET_METER_MOD_FAILED', |
| 308 | 13: 'OFPET_TABLE_FEATURES_FAILED', |
| 309 | 65535: 'OFPET_EXPERIMENTER', |
| 310 | } |
| 311 | |
| 312 | # Identifiers from group ofp_flow_mod_command |
| 313 | OFPFC_ADD = 0 |
| 314 | OFPFC_MODIFY = 1 |
| 315 | OFPFC_MODIFY_STRICT = 2 |
| 316 | OFPFC_DELETE = 3 |
| 317 | OFPFC_DELETE_STRICT = 4 |
| 318 | |
| 319 | ofp_flow_mod_command_map = { |
| 320 | 0: 'OFPFC_ADD', |
| 321 | 1: 'OFPFC_MODIFY', |
| 322 | 2: 'OFPFC_MODIFY_STRICT', |
| 323 | 3: 'OFPFC_DELETE', |
| 324 | 4: 'OFPFC_DELETE_STRICT', |
| 325 | } |
| 326 | |
| 327 | # Identifiers from group ofp_flow_mod_failed_code |
| 328 | OFPFMFC_UNKNOWN = 0 |
| 329 | OFPFMFC_TABLE_FULL = 1 |
| 330 | OFPFMFC_BAD_TABLE_ID = 2 |
| 331 | OFPFMFC_OVERLAP = 3 |
| 332 | OFPFMFC_EPERM = 4 |
| 333 | OFPFMFC_BAD_TIMEOUT = 5 |
| 334 | OFPFMFC_BAD_COMMAND = 6 |
| 335 | OFPFMFC_BAD_FLAGS = 7 |
| 336 | |
| 337 | ofp_flow_mod_failed_code_map = { |
| 338 | 0: 'OFPFMFC_UNKNOWN', |
| 339 | 1: 'OFPFMFC_TABLE_FULL', |
| 340 | 2: 'OFPFMFC_BAD_TABLE_ID', |
| 341 | 3: 'OFPFMFC_OVERLAP', |
| 342 | 4: 'OFPFMFC_EPERM', |
| 343 | 5: 'OFPFMFC_BAD_TIMEOUT', |
| 344 | 6: 'OFPFMFC_BAD_COMMAND', |
| 345 | 7: 'OFPFMFC_BAD_FLAGS', |
| 346 | } |
| 347 | |
| 348 | # Identifiers from group ofp_flow_mod_flags |
| 349 | OFPFF_SEND_FLOW_REM = 1 |
| 350 | OFPFF_CHECK_OVERLAP = 2 |
| 351 | OFPFF_RESET_COUNTS = 4 |
| 352 | OFPFF_NO_PKT_COUNTS = 8 |
| 353 | OFPFF_NO_BYT_COUNTS = 16 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 354 | OFPFF_BSN_SEND_IDLE = 128 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 355 | |
| 356 | ofp_flow_mod_flags_map = { |
| 357 | 1: 'OFPFF_SEND_FLOW_REM', |
| 358 | 2: 'OFPFF_CHECK_OVERLAP', |
| 359 | 4: 'OFPFF_RESET_COUNTS', |
| 360 | 8: 'OFPFF_NO_PKT_COUNTS', |
| 361 | 16: 'OFPFF_NO_BYT_COUNTS', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 362 | 128: 'OFPFF_BSN_SEND_IDLE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 363 | } |
| 364 | |
| 365 | # Identifiers from group ofp_flow_removed_reason |
| 366 | OFPRR_IDLE_TIMEOUT = 0 |
| 367 | OFPRR_HARD_TIMEOUT = 1 |
| 368 | OFPRR_DELETE = 2 |
| 369 | OFPRR_GROUP_DELETE = 3 |
| 370 | |
| 371 | ofp_flow_removed_reason_map = { |
| 372 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 373 | 1: 'OFPRR_HARD_TIMEOUT', |
| 374 | 2: 'OFPRR_DELETE', |
| 375 | 3: 'OFPRR_GROUP_DELETE', |
| 376 | } |
| 377 | |
| 378 | # Identifiers from group ofp_group |
| 379 | OFPG_MAX = 4294967040 |
| 380 | OFPG_ALL = 4294967292 |
| 381 | OFPG_ANY = 4294967295 |
| 382 | |
| 383 | ofp_group_map = { |
| 384 | 4294967040: 'OFPG_MAX', |
| 385 | 4294967292: 'OFPG_ALL', |
| 386 | 4294967295: 'OFPG_ANY', |
| 387 | } |
| 388 | |
| 389 | # Identifiers from group ofp_group_capabilities |
| 390 | OFPGFC_SELECT_WEIGHT = 1 |
| 391 | OFPGFC_SELECT_LIVENESS = 2 |
| 392 | OFPGFC_CHAINING = 4 |
| 393 | OFPGFC_CHAINING_CHECKS = 8 |
| 394 | |
| 395 | ofp_group_capabilities_map = { |
| 396 | 1: 'OFPGFC_SELECT_WEIGHT', |
| 397 | 2: 'OFPGFC_SELECT_LIVENESS', |
| 398 | 4: 'OFPGFC_CHAINING', |
| 399 | 8: 'OFPGFC_CHAINING_CHECKS', |
| 400 | } |
| 401 | |
| 402 | # Identifiers from group ofp_group_mod_command |
| 403 | OFPGC_ADD = 0 |
| 404 | OFPGC_MODIFY = 1 |
| 405 | OFPGC_DELETE = 2 |
| 406 | |
| 407 | ofp_group_mod_command_map = { |
| 408 | 0: 'OFPGC_ADD', |
| 409 | 1: 'OFPGC_MODIFY', |
| 410 | 2: 'OFPGC_DELETE', |
| 411 | } |
| 412 | |
| 413 | # Identifiers from group ofp_group_mod_failed_code |
| 414 | OFPGMFC_GROUP_EXISTS = 0 |
| 415 | OFPGMFC_INVALID_GROUP = 1 |
| 416 | OFPGMFC_WEIGHT_UNSUPPORTED = 2 |
| 417 | OFPGMFC_OUT_OF_GROUPS = 3 |
| 418 | OFPGMFC_OUT_OF_BUCKETS = 4 |
| 419 | OFPGMFC_CHAINING_UNSUPPORTED = 5 |
| 420 | OFPGMFC_WATCH_UNSUPPORTED = 6 |
| 421 | OFPGMFC_LOOP = 7 |
| 422 | OFPGMFC_UNKNOWN_GROUP = 8 |
| 423 | OFPGMFC_CHAINED_GROUP = 9 |
| 424 | OFPGMFC_BAD_TYPE = 10 |
| 425 | OFPGMFC_BAD_COMMAND = 11 |
| 426 | OFPGMFC_BAD_BUCKET = 12 |
| 427 | OFPGMFC_BAD_WATCH = 13 |
| 428 | OFPGMFC_EPERM = 14 |
| 429 | |
| 430 | ofp_group_mod_failed_code_map = { |
| 431 | 0: 'OFPGMFC_GROUP_EXISTS', |
| 432 | 1: 'OFPGMFC_INVALID_GROUP', |
| 433 | 2: 'OFPGMFC_WEIGHT_UNSUPPORTED', |
| 434 | 3: 'OFPGMFC_OUT_OF_GROUPS', |
| 435 | 4: 'OFPGMFC_OUT_OF_BUCKETS', |
| 436 | 5: 'OFPGMFC_CHAINING_UNSUPPORTED', |
| 437 | 6: 'OFPGMFC_WATCH_UNSUPPORTED', |
| 438 | 7: 'OFPGMFC_LOOP', |
| 439 | 8: 'OFPGMFC_UNKNOWN_GROUP', |
| 440 | 9: 'OFPGMFC_CHAINED_GROUP', |
| 441 | 10: 'OFPGMFC_BAD_TYPE', |
| 442 | 11: 'OFPGMFC_BAD_COMMAND', |
| 443 | 12: 'OFPGMFC_BAD_BUCKET', |
| 444 | 13: 'OFPGMFC_BAD_WATCH', |
| 445 | 14: 'OFPGMFC_EPERM', |
| 446 | } |
| 447 | |
| 448 | # Identifiers from group ofp_group_type |
| 449 | OFPGT_ALL = 0 |
| 450 | OFPGT_SELECT = 1 |
| 451 | OFPGT_INDIRECT = 2 |
| 452 | OFPGT_FF = 3 |
| 453 | |
| 454 | ofp_group_type_map = { |
| 455 | 0: 'OFPGT_ALL', |
| 456 | 1: 'OFPGT_SELECT', |
| 457 | 2: 'OFPGT_INDIRECT', |
| 458 | 3: 'OFPGT_FF', |
| 459 | } |
| 460 | |
| 461 | # Identifiers from group ofp_hello_elem_type |
| 462 | OFPHET_VERSIONBITMAP = 1 |
| 463 | |
| 464 | ofp_hello_elem_type_map = { |
| 465 | 1: 'OFPHET_VERSIONBITMAP', |
| 466 | } |
| 467 | |
| 468 | # Identifiers from group ofp_hello_failed_code |
| 469 | OFPHFC_INCOMPATIBLE = 0 |
| 470 | OFPHFC_EPERM = 1 |
| 471 | |
| 472 | ofp_hello_failed_code_map = { |
| 473 | 0: 'OFPHFC_INCOMPATIBLE', |
| 474 | 1: 'OFPHFC_EPERM', |
| 475 | } |
| 476 | |
| 477 | # Identifiers from group ofp_instruction_type |
| 478 | OFPIT_GOTO_TABLE = 1 |
| 479 | OFPIT_WRITE_METADATA = 2 |
| 480 | OFPIT_WRITE_ACTIONS = 3 |
| 481 | OFPIT_APPLY_ACTIONS = 4 |
| 482 | OFPIT_CLEAR_ACTIONS = 5 |
| 483 | OFPIT_METER = 6 |
| 484 | OFPIT_EXPERIMENTER = 65535 |
| 485 | |
| 486 | ofp_instruction_type_map = { |
| 487 | 1: 'OFPIT_GOTO_TABLE', |
| 488 | 2: 'OFPIT_WRITE_METADATA', |
| 489 | 3: 'OFPIT_WRITE_ACTIONS', |
| 490 | 4: 'OFPIT_APPLY_ACTIONS', |
| 491 | 5: 'OFPIT_CLEAR_ACTIONS', |
| 492 | 6: 'OFPIT_METER', |
| 493 | 65535: 'OFPIT_EXPERIMENTER', |
| 494 | } |
| 495 | |
| 496 | # Identifiers from group ofp_ipv6exthdr_flags |
| 497 | OFPIEH_NONEXT = 1 |
| 498 | OFPIEH_ESP = 2 |
| 499 | OFPIEH_AUTH = 4 |
| 500 | OFPIEH_DEST = 8 |
| 501 | OFPIEH_FRAG = 16 |
| 502 | OFPIEH_ROUTER = 32 |
| 503 | OFPIEH_HOP = 64 |
| 504 | OFPIEH_UNREP = 128 |
| 505 | OFPIEH_UNSEQ = 256 |
| 506 | |
| 507 | ofp_ipv6exthdr_flags_map = { |
| 508 | 1: 'OFPIEH_NONEXT', |
| 509 | 2: 'OFPIEH_ESP', |
| 510 | 4: 'OFPIEH_AUTH', |
| 511 | 8: 'OFPIEH_DEST', |
| 512 | 16: 'OFPIEH_FRAG', |
| 513 | 32: 'OFPIEH_ROUTER', |
| 514 | 64: 'OFPIEH_HOP', |
| 515 | 128: 'OFPIEH_UNREP', |
| 516 | 256: 'OFPIEH_UNSEQ', |
| 517 | } |
| 518 | |
| 519 | # Identifiers from group ofp_match_type |
| 520 | OFPMT_STANDARD = 0 |
| 521 | OFPMT_OXM = 1 |
| 522 | |
| 523 | ofp_match_type_map = { |
| 524 | 0: 'OFPMT_STANDARD', |
| 525 | 1: 'OFPMT_OXM', |
| 526 | } |
| 527 | |
| 528 | # Identifiers from group ofp_meter |
| 529 | OFPM_MAX = 4294901760 |
| 530 | OFPM_SLOWPATH = 4294967293 |
| 531 | OFPM_CONTROLLER = 4294967294 |
| 532 | OFPM_ALL = 4294967295 |
| 533 | |
| 534 | ofp_meter_map = { |
| 535 | 4294901760: 'OFPM_MAX', |
| 536 | 4294967293: 'OFPM_SLOWPATH', |
| 537 | 4294967294: 'OFPM_CONTROLLER', |
| 538 | 4294967295: 'OFPM_ALL', |
| 539 | } |
| 540 | |
| 541 | # Identifiers from group ofp_meter_band_type |
| 542 | OFPMBT_DROP = 1 |
| 543 | OFPMBT_DSCP_REMARK = 2 |
| 544 | OFPMBT_EXPERIMENTER = 65535 |
| 545 | |
| 546 | ofp_meter_band_type_map = { |
| 547 | 1: 'OFPMBT_DROP', |
| 548 | 2: 'OFPMBT_DSCP_REMARK', |
| 549 | 65535: 'OFPMBT_EXPERIMENTER', |
| 550 | } |
| 551 | |
| 552 | # Identifiers from group ofp_meter_flags |
| 553 | OFPMF_KBPS = 1 |
| 554 | OFPMF_PKTPS = 2 |
| 555 | OFPMF_BURST = 4 |
| 556 | OFPMF_STATS = 8 |
| 557 | |
| 558 | ofp_meter_flags_map = { |
| 559 | 1: 'OFPMF_KBPS', |
| 560 | 2: 'OFPMF_PKTPS', |
| 561 | 4: 'OFPMF_BURST', |
| 562 | 8: 'OFPMF_STATS', |
| 563 | } |
| 564 | |
| 565 | # Identifiers from group ofp_meter_mod_command |
| 566 | OFPMC_ADD = 0 |
| 567 | OFPMC_MODIFY = 1 |
| 568 | OFPMC_DELETE = 2 |
| 569 | |
| 570 | ofp_meter_mod_command_map = { |
| 571 | 0: 'OFPMC_ADD', |
| 572 | 1: 'OFPMC_MODIFY', |
| 573 | 2: 'OFPMC_DELETE', |
| 574 | } |
| 575 | |
| 576 | # Identifiers from group ofp_meter_mod_failed_code |
| 577 | OFPMMFC_UNKNOWN = 0 |
| 578 | OFPMMFC_METER_EXISTS = 1 |
| 579 | OFPMMFC_INVALID_METER = 2 |
| 580 | OFPMMFC_UNKNOWN_METER = 3 |
| 581 | OFPMMFC_BAD_COMMAND = 4 |
| 582 | OFPMMFC_BAD_FLAGS = 5 |
| 583 | OFPMMFC_BAD_RATE = 6 |
| 584 | OFPMMFC_BAD_BURST = 7 |
| 585 | OFPMMFC_BAD_BAND = 8 |
| 586 | OFPMMFC_BAD_BAND_VALUE = 9 |
| 587 | OFPMMFC_OUT_OF_METERS = 10 |
| 588 | OFPMMFC_OUT_OF_BANDS = 11 |
| 589 | |
| 590 | ofp_meter_mod_failed_code_map = { |
| 591 | 0: 'OFPMMFC_UNKNOWN', |
| 592 | 1: 'OFPMMFC_METER_EXISTS', |
| 593 | 2: 'OFPMMFC_INVALID_METER', |
| 594 | 3: 'OFPMMFC_UNKNOWN_METER', |
| 595 | 4: 'OFPMMFC_BAD_COMMAND', |
| 596 | 5: 'OFPMMFC_BAD_FLAGS', |
| 597 | 6: 'OFPMMFC_BAD_RATE', |
| 598 | 7: 'OFPMMFC_BAD_BURST', |
| 599 | 8: 'OFPMMFC_BAD_BAND', |
| 600 | 9: 'OFPMMFC_BAD_BAND_VALUE', |
| 601 | 10: 'OFPMMFC_OUT_OF_METERS', |
| 602 | 11: 'OFPMMFC_OUT_OF_BANDS', |
| 603 | } |
| 604 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 605 | # Identifiers from group ofp_oxm_class |
| 606 | OFPXMC_NXM_0 = 0 |
| 607 | OFPXMC_NXM_1 = 1 |
| 608 | OFPXMC_OPENFLOW_BASIC = 32768 |
| 609 | OFPXMC_EXPERIMENTER = 65535 |
| 610 | |
| 611 | ofp_oxm_class_map = { |
| 612 | 0: 'OFPXMC_NXM_0', |
| 613 | 1: 'OFPXMC_NXM_1', |
| 614 | 32768: 'OFPXMC_OPENFLOW_BASIC', |
| 615 | 65535: 'OFPXMC_EXPERIMENTER', |
| 616 | } |
| 617 | |
| 618 | # Identifiers from group ofp_packet_in_reason |
| 619 | OFPR_NO_MATCH = 0 |
| 620 | OFPR_ACTION = 1 |
| 621 | OFPR_INVALID_TTL = 2 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 622 | OFPR_BSN_NEW_HOST = 128 |
| 623 | OFPR_BSN_STATION_MOVE = 129 |
| 624 | OFPR_BSN_BAD_VLAN = 130 |
| 625 | OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 626 | |
| 627 | ofp_packet_in_reason_map = { |
| 628 | 0: 'OFPR_NO_MATCH', |
| 629 | 1: 'OFPR_ACTION', |
| 630 | 2: 'OFPR_INVALID_TTL', |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 631 | 128: 'OFPR_BSN_NEW_HOST', |
| 632 | 129: 'OFPR_BSN_STATION_MOVE', |
| 633 | 130: 'OFPR_BSN_BAD_VLAN', |
| 634 | 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 635 | } |
| 636 | |
| 637 | # Identifiers from group ofp_port |
| 638 | OFPP_MAX = 4294967040 |
| 639 | OFPP_IN_PORT = 4294967288 |
| 640 | OFPP_TABLE = 4294967289 |
| 641 | OFPP_NORMAL = 4294967290 |
| 642 | OFPP_FLOOD = 4294967291 |
| 643 | OFPP_ALL = 4294967292 |
| 644 | OFPP_CONTROLLER = 4294967293 |
| 645 | OFPP_LOCAL = 4294967294 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 646 | OFPP_ANY = 4294967295 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 647 | |
| 648 | ofp_port_map = { |
| 649 | 4294967040: 'OFPP_MAX', |
| 650 | 4294967288: 'OFPP_IN_PORT', |
| 651 | 4294967289: 'OFPP_TABLE', |
| 652 | 4294967290: 'OFPP_NORMAL', |
| 653 | 4294967291: 'OFPP_FLOOD', |
| 654 | 4294967292: 'OFPP_ALL', |
| 655 | 4294967293: 'OFPP_CONTROLLER', |
| 656 | 4294967294: 'OFPP_LOCAL', |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 657 | 4294967295: 'OFPP_ANY', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 658 | } |
| 659 | |
| 660 | # Identifiers from group ofp_port_config |
| 661 | OFPPC_PORT_DOWN = 1 |
| 662 | OFPPC_NO_RECV = 4 |
| 663 | OFPPC_NO_FWD = 32 |
| 664 | OFPPC_NO_PACKET_IN = 64 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 665 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 666 | |
| 667 | ofp_port_config_map = { |
| 668 | 1: 'OFPPC_PORT_DOWN', |
| 669 | 4: 'OFPPC_NO_RECV', |
| 670 | 32: 'OFPPC_NO_FWD', |
| 671 | 64: 'OFPPC_NO_PACKET_IN', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 672 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 673 | } |
| 674 | |
| 675 | # Identifiers from group ofp_port_features |
| 676 | OFPPF_10MB_HD = 1 |
| 677 | OFPPF_10MB_FD = 2 |
| 678 | OFPPF_100MB_HD = 4 |
| 679 | OFPPF_100MB_FD = 8 |
| 680 | OFPPF_1GB_HD = 16 |
| 681 | OFPPF_1GB_FD = 32 |
| 682 | OFPPF_10GB_FD = 64 |
| 683 | OFPPF_40GB_FD = 128 |
| 684 | OFPPF_100GB_FD = 256 |
| 685 | OFPPF_1TB_FD = 512 |
| 686 | OFPPF_OTHER = 1024 |
| 687 | OFPPF_COPPER = 2048 |
| 688 | OFPPF_FIBER = 4096 |
| 689 | OFPPF_AUTONEG = 8192 |
| 690 | OFPPF_PAUSE = 16384 |
| 691 | OFPPF_PAUSE_ASYM = 32768 |
| 692 | |
| 693 | ofp_port_features_map = { |
| 694 | 1: 'OFPPF_10MB_HD', |
| 695 | 2: 'OFPPF_10MB_FD', |
| 696 | 4: 'OFPPF_100MB_HD', |
| 697 | 8: 'OFPPF_100MB_FD', |
| 698 | 16: 'OFPPF_1GB_HD', |
| 699 | 32: 'OFPPF_1GB_FD', |
| 700 | 64: 'OFPPF_10GB_FD', |
| 701 | 128: 'OFPPF_40GB_FD', |
| 702 | 256: 'OFPPF_100GB_FD', |
| 703 | 512: 'OFPPF_1TB_FD', |
| 704 | 1024: 'OFPPF_OTHER', |
| 705 | 2048: 'OFPPF_COPPER', |
| 706 | 4096: 'OFPPF_FIBER', |
| 707 | 8192: 'OFPPF_AUTONEG', |
| 708 | 16384: 'OFPPF_PAUSE', |
| 709 | 32768: 'OFPPF_PAUSE_ASYM', |
| 710 | } |
| 711 | |
| 712 | # Identifiers from group ofp_port_mod_failed_code |
| 713 | OFPPMFC_BAD_PORT = 0 |
| 714 | OFPPMFC_BAD_HW_ADDR = 1 |
| 715 | OFPPMFC_BAD_CONFIG = 2 |
| 716 | OFPPMFC_BAD_ADVERTISE = 3 |
| 717 | OFPPMFC_EPERM = 4 |
| 718 | |
| 719 | ofp_port_mod_failed_code_map = { |
| 720 | 0: 'OFPPMFC_BAD_PORT', |
| 721 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 722 | 2: 'OFPPMFC_BAD_CONFIG', |
| 723 | 3: 'OFPPMFC_BAD_ADVERTISE', |
| 724 | 4: 'OFPPMFC_EPERM', |
| 725 | } |
| 726 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 727 | # Identifiers from group ofp_port_reason |
| 728 | OFPPR_ADD = 0 |
| 729 | OFPPR_DELETE = 1 |
| 730 | OFPPR_MODIFY = 2 |
| 731 | |
| 732 | ofp_port_reason_map = { |
| 733 | 0: 'OFPPR_ADD', |
| 734 | 1: 'OFPPR_DELETE', |
| 735 | 2: 'OFPPR_MODIFY', |
| 736 | } |
| 737 | |
| 738 | # Identifiers from group ofp_port_state |
| 739 | OFPPS_LINK_DOWN = 1 |
| 740 | OFPPS_BLOCKED = 2 |
| 741 | OFPPS_LIVE = 4 |
| 742 | |
| 743 | ofp_port_state_map = { |
| 744 | 1: 'OFPPS_LINK_DOWN', |
| 745 | 2: 'OFPPS_BLOCKED', |
| 746 | 4: 'OFPPS_LIVE', |
| 747 | } |
| 748 | |
| 749 | # Identifiers from group ofp_queue_op_failed_code |
| 750 | OFPQOFC_BAD_PORT = 0 |
| 751 | OFPQOFC_BAD_QUEUE = 1 |
| 752 | OFPQOFC_EPERM = 2 |
| 753 | |
| 754 | ofp_queue_op_failed_code_map = { |
| 755 | 0: 'OFPQOFC_BAD_PORT', |
| 756 | 1: 'OFPQOFC_BAD_QUEUE', |
| 757 | 2: 'OFPQOFC_EPERM', |
| 758 | } |
| 759 | |
| 760 | # Identifiers from group ofp_queue_properties |
| 761 | OFPQT_MIN_RATE = 1 |
| 762 | OFPQT_MAX_RATE = 2 |
| 763 | OFPQT_EXPERIMENTER = 65535 |
| 764 | |
| 765 | ofp_queue_properties_map = { |
| 766 | 1: 'OFPQT_MIN_RATE', |
| 767 | 2: 'OFPQT_MAX_RATE', |
| 768 | 65535: 'OFPQT_EXPERIMENTER', |
| 769 | } |
| 770 | |
| 771 | # Identifiers from group ofp_role_request_failed_code |
| 772 | OFPRRFC_STALE = 0 |
| 773 | OFPRRFC_UNSUP = 1 |
| 774 | OFPRRFC_BAD_ROLE = 2 |
| 775 | |
| 776 | ofp_role_request_failed_code_map = { |
| 777 | 0: 'OFPRRFC_STALE', |
| 778 | 1: 'OFPRRFC_UNSUP', |
| 779 | 2: 'OFPRRFC_BAD_ROLE', |
| 780 | } |
| 781 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 782 | # Identifiers from group ofp_stats_reply_flags |
| 783 | OFPSF_REPLY_MORE = 1 |
| 784 | |
| 785 | ofp_stats_reply_flags_map = { |
| 786 | 1: 'OFPSF_REPLY_MORE', |
| 787 | } |
| 788 | |
| 789 | # Identifiers from group ofp_stats_request_flags |
| 790 | OFPSF_REQ_MORE = 1 |
| 791 | |
| 792 | ofp_stats_request_flags_map = { |
| 793 | 1: 'OFPSF_REQ_MORE', |
| 794 | } |
| 795 | |
| 796 | # Identifiers from group ofp_stats_type |
| 797 | OFPST_DESC = 0 |
| 798 | OFPST_FLOW = 1 |
| 799 | OFPST_AGGREGATE = 2 |
| 800 | OFPST_TABLE = 3 |
| 801 | OFPST_PORT = 4 |
| 802 | OFPST_QUEUE = 5 |
| 803 | OFPST_GROUP = 6 |
| 804 | OFPST_GROUP_DESC = 7 |
| 805 | OFPST_GROUP_FEATURES = 8 |
| 806 | OFPST_METER = 9 |
| 807 | OFPST_METER_CONFIG = 10 |
| 808 | OFPST_METER_FEATURES = 11 |
| 809 | OFPST_TABLE_FEATURES = 12 |
| 810 | OFPST_PORT_DESC = 13 |
| 811 | OFPST_EXPERIMENTER = 65535 |
| 812 | |
| 813 | ofp_stats_type_map = { |
| 814 | 0: 'OFPST_DESC', |
| 815 | 1: 'OFPST_FLOW', |
| 816 | 2: 'OFPST_AGGREGATE', |
| 817 | 3: 'OFPST_TABLE', |
| 818 | 4: 'OFPST_PORT', |
| 819 | 5: 'OFPST_QUEUE', |
| 820 | 6: 'OFPST_GROUP', |
| 821 | 7: 'OFPST_GROUP_DESC', |
| 822 | 8: 'OFPST_GROUP_FEATURES', |
| 823 | 9: 'OFPST_METER', |
| 824 | 10: 'OFPST_METER_CONFIG', |
| 825 | 11: 'OFPST_METER_FEATURES', |
| 826 | 12: 'OFPST_TABLE_FEATURES', |
| 827 | 13: 'OFPST_PORT_DESC', |
| 828 | 65535: 'OFPST_EXPERIMENTER', |
| 829 | } |
| 830 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 831 | # Identifiers from group ofp_switch_config_failed_code |
| 832 | OFPSCFC_BAD_FLAGS = 0 |
| 833 | OFPSCFC_BAD_LEN = 1 |
| 834 | OFPSCFC_EPERM = 2 |
| 835 | |
| 836 | ofp_switch_config_failed_code_map = { |
| 837 | 0: 'OFPSCFC_BAD_FLAGS', |
| 838 | 1: 'OFPSCFC_BAD_LEN', |
| 839 | 2: 'OFPSCFC_EPERM', |
| 840 | } |
| 841 | |
| 842 | # Identifiers from group ofp_table |
| 843 | OFPTT_MAX = 254 |
| 844 | OFPTT_ALL = 255 |
| 845 | |
| 846 | ofp_table_map = { |
| 847 | 254: 'OFPTT_MAX', |
| 848 | 255: 'OFPTT_ALL', |
| 849 | } |
| 850 | |
| 851 | # Identifiers from group ofp_table_config |
| 852 | OFPTC_DEPRECATED_MASK = 3 |
| 853 | |
| 854 | ofp_table_config_map = { |
| 855 | 3: 'OFPTC_DEPRECATED_MASK', |
| 856 | } |
| 857 | |
| 858 | # Identifiers from group ofp_table_feature_prop_type |
| 859 | OFPTFPT_INSTRUCTIONS = 0 |
| 860 | OFPTFPT_INSTRUCTIONS_MISS = 1 |
| 861 | OFPTFPT_NEXT_TABLES = 2 |
| 862 | OFPTFPT_NEXT_TABLES_MISS = 3 |
| 863 | OFPTFPT_WRITE_ACTIONS = 4 |
| 864 | OFPTFPT_WRITE_ACTIONS_MISS = 5 |
| 865 | OFPTFPT_APPLY_ACTIONS = 6 |
| 866 | OFPTFPT_APPLY_ACTIONS_MISS = 7 |
| 867 | OFPTFPT_MATCH = 8 |
| 868 | OFPTFPT_WILDCARDS = 10 |
| 869 | OFPTFPT_WRITE_SETFIELD = 12 |
| 870 | OFPTFPT_WRITE_SETFIELD_MISS = 13 |
| 871 | OFPTFPT_APPLY_SETFIELD = 14 |
| 872 | OFPTFPT_APPLY_SETFIELD_MISS = 15 |
| 873 | OFPTFPT_EXPERIMENTER = 65534 |
| 874 | OFPTFPT_EXPERIMENTER_MISS = 65535 |
| 875 | |
| 876 | ofp_table_feature_prop_type_map = { |
| 877 | 0: 'OFPTFPT_INSTRUCTIONS', |
| 878 | 1: 'OFPTFPT_INSTRUCTIONS_MISS', |
| 879 | 2: 'OFPTFPT_NEXT_TABLES', |
| 880 | 3: 'OFPTFPT_NEXT_TABLES_MISS', |
| 881 | 4: 'OFPTFPT_WRITE_ACTIONS', |
| 882 | 5: 'OFPTFPT_WRITE_ACTIONS_MISS', |
| 883 | 6: 'OFPTFPT_APPLY_ACTIONS', |
| 884 | 7: 'OFPTFPT_APPLY_ACTIONS_MISS', |
| 885 | 8: 'OFPTFPT_MATCH', |
| 886 | 10: 'OFPTFPT_WILDCARDS', |
| 887 | 12: 'OFPTFPT_WRITE_SETFIELD', |
| 888 | 13: 'OFPTFPT_WRITE_SETFIELD_MISS', |
| 889 | 14: 'OFPTFPT_APPLY_SETFIELD', |
| 890 | 15: 'OFPTFPT_APPLY_SETFIELD_MISS', |
| 891 | 65534: 'OFPTFPT_EXPERIMENTER', |
| 892 | 65535: 'OFPTFPT_EXPERIMENTER_MISS', |
| 893 | } |
| 894 | |
| 895 | # Identifiers from group ofp_table_features_failed_code |
| 896 | OFPTFFC_BAD_TABLE = 0 |
| 897 | OFPTFFC_BAD_METADATA = 1 |
| 898 | OFPTFFC_BAD_TYPE = 2 |
| 899 | OFPTFFC_BAD_LEN = 3 |
| 900 | OFPTFFC_BAD_ARGUMENT = 4 |
| 901 | OFPTFFC_EPERM = 5 |
| 902 | |
| 903 | ofp_table_features_failed_code_map = { |
| 904 | 0: 'OFPTFFC_BAD_TABLE', |
| 905 | 1: 'OFPTFFC_BAD_METADATA', |
| 906 | 2: 'OFPTFFC_BAD_TYPE', |
| 907 | 3: 'OFPTFFC_BAD_LEN', |
| 908 | 4: 'OFPTFFC_BAD_ARGUMENT', |
| 909 | 5: 'OFPTFFC_EPERM', |
| 910 | } |
| 911 | |
| 912 | # Identifiers from group ofp_table_mod_failed_code |
| 913 | OFPTMFC_BAD_TABLE = 0 |
| 914 | OFPTMFC_BAD_CONFIG = 1 |
| 915 | OFPTMFC_EPERM = 2 |
| 916 | |
| 917 | ofp_table_mod_failed_code_map = { |
| 918 | 0: 'OFPTMFC_BAD_TABLE', |
| 919 | 1: 'OFPTMFC_BAD_CONFIG', |
| 920 | 2: 'OFPTMFC_EPERM', |
| 921 | } |
| 922 | |
| 923 | # Identifiers from group ofp_type |
| 924 | OFPT_HELLO = 0 |
| 925 | OFPT_ERROR = 1 |
| 926 | OFPT_ECHO_REQUEST = 2 |
| 927 | OFPT_ECHO_REPLY = 3 |
| 928 | OFPT_EXPERIMENTER = 4 |
| 929 | OFPT_FEATURES_REQUEST = 5 |
| 930 | OFPT_FEATURES_REPLY = 6 |
| 931 | OFPT_GET_CONFIG_REQUEST = 7 |
| 932 | OFPT_GET_CONFIG_REPLY = 8 |
| 933 | OFPT_SET_CONFIG = 9 |
| 934 | OFPT_PACKET_IN = 10 |
| 935 | OFPT_FLOW_REMOVED = 11 |
| 936 | OFPT_PORT_STATUS = 12 |
| 937 | OFPT_PACKET_OUT = 13 |
| 938 | OFPT_FLOW_MOD = 14 |
| 939 | OFPT_GROUP_MOD = 15 |
| 940 | OFPT_PORT_MOD = 16 |
| 941 | OFPT_TABLE_MOD = 17 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 942 | OFPT_STATS_REQUEST = 18 |
| 943 | OFPT_STATS_REPLY = 19 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 944 | OFPT_BARRIER_REQUEST = 20 |
| 945 | OFPT_BARRIER_REPLY = 21 |
| 946 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22 |
| 947 | OFPT_QUEUE_GET_CONFIG_REPLY = 23 |
| 948 | OFPT_ROLE_REQUEST = 24 |
| 949 | OFPT_ROLE_REPLY = 25 |
| 950 | OFPT_GET_ASYNC_REQUEST = 26 |
| 951 | OFPT_GET_ASYNC_REPLY = 27 |
| 952 | OFPT_SET_ASYNC = 28 |
| 953 | OFPT_METER_MOD = 29 |
| 954 | |
| 955 | ofp_type_map = { |
| 956 | 0: 'OFPT_HELLO', |
| 957 | 1: 'OFPT_ERROR', |
| 958 | 2: 'OFPT_ECHO_REQUEST', |
| 959 | 3: 'OFPT_ECHO_REPLY', |
| 960 | 4: 'OFPT_EXPERIMENTER', |
| 961 | 5: 'OFPT_FEATURES_REQUEST', |
| 962 | 6: 'OFPT_FEATURES_REPLY', |
| 963 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 964 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 965 | 9: 'OFPT_SET_CONFIG', |
| 966 | 10: 'OFPT_PACKET_IN', |
| 967 | 11: 'OFPT_FLOW_REMOVED', |
| 968 | 12: 'OFPT_PORT_STATUS', |
| 969 | 13: 'OFPT_PACKET_OUT', |
| 970 | 14: 'OFPT_FLOW_MOD', |
| 971 | 15: 'OFPT_GROUP_MOD', |
| 972 | 16: 'OFPT_PORT_MOD', |
| 973 | 17: 'OFPT_TABLE_MOD', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 974 | 18: 'OFPT_STATS_REQUEST', |
| 975 | 19: 'OFPT_STATS_REPLY', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 976 | 20: 'OFPT_BARRIER_REQUEST', |
| 977 | 21: 'OFPT_BARRIER_REPLY', |
| 978 | 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 979 | 23: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 980 | 24: 'OFPT_ROLE_REQUEST', |
| 981 | 25: 'OFPT_ROLE_REPLY', |
| 982 | 26: 'OFPT_GET_ASYNC_REQUEST', |
| 983 | 27: 'OFPT_GET_ASYNC_REPLY', |
| 984 | 28: 'OFPT_SET_ASYNC', |
| 985 | 29: 'OFPT_METER_MOD', |
| 986 | } |
| 987 | |
| 988 | # Identifiers from group ofp_vlan_id |
| 989 | OFPVID_NONE = 0 |
| 990 | OFPVID_PRESENT = 4096 |
| 991 | |
| 992 | ofp_vlan_id_map = { |
| 993 | 0: 'OFPVID_NONE', |
| 994 | 4096: 'OFPVID_PRESENT', |
| 995 | } |
| 996 | |