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