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 | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 5 | |
| 6 | # Automatically generated by LOXI from template const.py |
| 7 | # Do not modify |
| 8 | |
| 9 | OFP_VERSION = 1 |
| 10 | |
| 11 | # Identifiers from group macro_definitions |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -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 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 18 | OFP_VLAN_NONE = 65535 |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 19 | OFPFW_ICMP_TYPE = 64 |
| 20 | OFPFW_ICMP_CODE = 128 |
| 21 | OFP_DL_TYPE_ETH2_CUTOFF = 1536 |
| 22 | OFP_DL_TYPE_NOT_ETH_TYPE = 1535 |
| 23 | OFP_FLOW_PERMANENT = 0 |
| 24 | OFP_DEFAULT_PRIORITY = 32768 |
| 25 | DESC_STR_LEN = 256 |
| 26 | SERIAL_NUM_LEN = 32 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 27 | OFPQ_ALL = 4294967295 |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 28 | OFPQ_MIN_RATE_UNCFG = 65535 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 29 | |
Rich Lane | 2e079da | 2014-10-29 15:30:24 -0700 | [diff] [blame] | 30 | # Identifiers from group of_bsn_pdu_slot_num |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 31 | BSN_PDU_SLOT_NUM_ANY = 255 |
| 32 | |
Rich Lane | 2e079da | 2014-10-29 15:30:24 -0700 | [diff] [blame] | 33 | of_bsn_pdu_slot_num_map = { |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 34 | 255: 'BSN_PDU_SLOT_NUM_ANY', |
| 35 | } |
| 36 | |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 37 | # Identifiers from group ofp_action_type |
| 38 | OFPAT_OUTPUT = 0 |
| 39 | OFPAT_SET_VLAN_VID = 1 |
| 40 | OFPAT_SET_VLAN_PCP = 2 |
| 41 | OFPAT_STRIP_VLAN = 3 |
| 42 | OFPAT_SET_DL_SRC = 4 |
| 43 | OFPAT_SET_DL_DST = 5 |
| 44 | OFPAT_SET_NW_SRC = 6 |
| 45 | OFPAT_SET_NW_DST = 7 |
| 46 | OFPAT_SET_NW_TOS = 8 |
| 47 | OFPAT_SET_TP_SRC = 9 |
| 48 | OFPAT_SET_TP_DST = 10 |
| 49 | OFPAT_ENQUEUE = 11 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 50 | OFPAT_EXPERIMENTER = 65535 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 51 | |
| 52 | ofp_action_type_map = { |
| 53 | 0: 'OFPAT_OUTPUT', |
| 54 | 1: 'OFPAT_SET_VLAN_VID', |
| 55 | 2: 'OFPAT_SET_VLAN_PCP', |
| 56 | 3: 'OFPAT_STRIP_VLAN', |
| 57 | 4: 'OFPAT_SET_DL_SRC', |
| 58 | 5: 'OFPAT_SET_DL_DST', |
| 59 | 6: 'OFPAT_SET_NW_SRC', |
| 60 | 7: 'OFPAT_SET_NW_DST', |
| 61 | 8: 'OFPAT_SET_NW_TOS', |
| 62 | 9: 'OFPAT_SET_TP_SRC', |
| 63 | 10: 'OFPAT_SET_TP_DST', |
| 64 | 11: 'OFPAT_ENQUEUE', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 65 | 65535: 'OFPAT_EXPERIMENTER', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 66 | } |
| 67 | |
| 68 | # Identifiers from group ofp_bad_action_code |
| 69 | OFPBAC_BAD_TYPE = 0 |
| 70 | OFPBAC_BAD_LEN = 1 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 71 | OFPBAC_BAD_EXPERIMENTER = 2 |
| 72 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 73 | OFPBAC_BAD_OUT_PORT = 4 |
| 74 | OFPBAC_BAD_ARGUMENT = 5 |
| 75 | OFPBAC_EPERM = 6 |
| 76 | OFPBAC_TOO_MANY = 7 |
| 77 | OFPBAC_BAD_QUEUE = 8 |
| 78 | |
| 79 | ofp_bad_action_code_map = { |
| 80 | 0: 'OFPBAC_BAD_TYPE', |
| 81 | 1: 'OFPBAC_BAD_LEN', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 82 | 2: 'OFPBAC_BAD_EXPERIMENTER', |
| 83 | 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 84 | 4: 'OFPBAC_BAD_OUT_PORT', |
| 85 | 5: 'OFPBAC_BAD_ARGUMENT', |
| 86 | 6: 'OFPBAC_EPERM', |
| 87 | 7: 'OFPBAC_TOO_MANY', |
| 88 | 8: 'OFPBAC_BAD_QUEUE', |
| 89 | } |
| 90 | |
| 91 | # Identifiers from group ofp_bad_request_code |
| 92 | OFPBRC_BAD_VERSION = 0 |
| 93 | OFPBRC_BAD_TYPE = 1 |
| 94 | OFPBRC_BAD_STAT = 2 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 95 | OFPBRC_BAD_EXPERIMENTER = 3 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 96 | OFPBRC_BAD_SUBTYPE = 4 |
| 97 | OFPBRC_EPERM = 5 |
| 98 | OFPBRC_BAD_LEN = 6 |
| 99 | OFPBRC_BUFFER_EMPTY = 7 |
| 100 | OFPBRC_BUFFER_UNKNOWN = 8 |
| 101 | |
| 102 | ofp_bad_request_code_map = { |
| 103 | 0: 'OFPBRC_BAD_VERSION', |
| 104 | 1: 'OFPBRC_BAD_TYPE', |
| 105 | 2: 'OFPBRC_BAD_STAT', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 106 | 3: 'OFPBRC_BAD_EXPERIMENTER', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 107 | 4: 'OFPBRC_BAD_SUBTYPE', |
| 108 | 5: 'OFPBRC_EPERM', |
| 109 | 6: 'OFPBRC_BAD_LEN', |
| 110 | 7: 'OFPBRC_BUFFER_EMPTY', |
| 111 | 8: 'OFPBRC_BUFFER_UNKNOWN', |
| 112 | } |
| 113 | |
Rich Lane | 93b3313 | 2014-04-21 12:20:58 -0700 | [diff] [blame] | 114 | # Identifiers from group ofp_bsn_vport_l2gre_flags |
| 115 | OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1 |
| 116 | OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2 |
| 117 | OF_BSN_VPORT_L2GRE_DSCP_COPY = 4 |
Rich Lane | 5587ab1 | 2014-06-30 11:19:09 -0700 | [diff] [blame] | 118 | OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8 |
Rich Lane | f9530c4 | 2014-09-15 09:59:43 -0700 | [diff] [blame] | 119 | OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16 |
Rich Lane | 93b3313 | 2014-04-21 12:20:58 -0700 | [diff] [blame] | 120 | |
| 121 | ofp_bsn_vport_l2gre_flags_map = { |
| 122 | 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID', |
| 123 | 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN', |
| 124 | 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY', |
Rich Lane | 5587ab1 | 2014-06-30 11:19:09 -0700 | [diff] [blame] | 125 | 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID', |
Rich Lane | f9530c4 | 2014-09-15 09:59:43 -0700 | [diff] [blame] | 126 | 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID', |
Rich Lane | 93b3313 | 2014-04-21 12:20:58 -0700 | [diff] [blame] | 127 | } |
| 128 | |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 129 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 130 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 131 | |
| 132 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 133 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 134 | } |
| 135 | |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 136 | # Identifiers from group ofp_bsn_vport_status |
| 137 | OF_BSN_VPORT_STATUS_OK = 0 |
| 138 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 139 | |
| 140 | ofp_bsn_vport_status_map = { |
| 141 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 142 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 143 | } |
| 144 | |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 145 | # Identifiers from group ofp_capabilities |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 146 | OFPC_FLOW_STATS = 1 |
| 147 | OFPC_TABLE_STATS = 2 |
| 148 | OFPC_PORT_STATS = 4 |
| 149 | OFPC_STP = 8 |
| 150 | OFPC_RESERVED = 16 |
| 151 | OFPC_IP_REASM = 32 |
| 152 | OFPC_QUEUE_STATS = 64 |
| 153 | OFPC_ARP_MATCH_IP = 128 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 154 | |
| 155 | ofp_capabilities_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 156 | 1: 'OFPC_FLOW_STATS', |
| 157 | 2: 'OFPC_TABLE_STATS', |
| 158 | 4: 'OFPC_PORT_STATS', |
| 159 | 8: 'OFPC_STP', |
| 160 | 16: 'OFPC_RESERVED', |
| 161 | 32: 'OFPC_IP_REASM', |
| 162 | 64: 'OFPC_QUEUE_STATS', |
| 163 | 128: 'OFPC_ARP_MATCH_IP', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | # Identifiers from group ofp_config_flags |
| 167 | OFPC_FRAG_NORMAL = 0 |
| 168 | OFPC_FRAG_DROP = 1 |
| 169 | OFPC_FRAG_REASM = 2 |
| 170 | OFPC_FRAG_MASK = 3 |
| 171 | |
| 172 | ofp_config_flags_map = { |
| 173 | 0: 'OFPC_FRAG_NORMAL', |
| 174 | 1: 'OFPC_FRAG_DROP', |
| 175 | 2: 'OFPC_FRAG_REASM', |
| 176 | 3: 'OFPC_FRAG_MASK', |
| 177 | } |
| 178 | |
| 179 | # Identifiers from group ofp_error_type |
| 180 | OFPET_HELLO_FAILED = 0 |
| 181 | OFPET_BAD_REQUEST = 1 |
| 182 | OFPET_BAD_ACTION = 2 |
| 183 | OFPET_FLOW_MOD_FAILED = 3 |
| 184 | OFPET_PORT_MOD_FAILED = 4 |
| 185 | OFPET_QUEUE_OP_FAILED = 5 |
| 186 | |
| 187 | ofp_error_type_map = { |
| 188 | 0: 'OFPET_HELLO_FAILED', |
| 189 | 1: 'OFPET_BAD_REQUEST', |
| 190 | 2: 'OFPET_BAD_ACTION', |
| 191 | 3: 'OFPET_FLOW_MOD_FAILED', |
| 192 | 4: 'OFPET_PORT_MOD_FAILED', |
| 193 | 5: 'OFPET_QUEUE_OP_FAILED', |
| 194 | } |
| 195 | |
| 196 | # Identifiers from group ofp_flow_mod_command |
| 197 | OFPFC_ADD = 0 |
| 198 | OFPFC_MODIFY = 1 |
| 199 | OFPFC_MODIFY_STRICT = 2 |
| 200 | OFPFC_DELETE = 3 |
| 201 | OFPFC_DELETE_STRICT = 4 |
| 202 | |
| 203 | ofp_flow_mod_command_map = { |
| 204 | 0: 'OFPFC_ADD', |
| 205 | 1: 'OFPFC_MODIFY', |
| 206 | 2: 'OFPFC_MODIFY_STRICT', |
| 207 | 3: 'OFPFC_DELETE', |
| 208 | 4: 'OFPFC_DELETE_STRICT', |
| 209 | } |
| 210 | |
| 211 | # Identifiers from group ofp_flow_mod_failed_code |
| 212 | OFPFMFC_ALL_TABLES_FULL = 0 |
| 213 | OFPFMFC_OVERLAP = 1 |
| 214 | OFPFMFC_EPERM = 2 |
| 215 | OFPFMFC_BAD_EMERG_TIMEOUT = 3 |
| 216 | OFPFMFC_BAD_COMMAND = 4 |
| 217 | OFPFMFC_UNSUPPORTED = 5 |
| 218 | |
| 219 | ofp_flow_mod_failed_code_map = { |
| 220 | 0: 'OFPFMFC_ALL_TABLES_FULL', |
| 221 | 1: 'OFPFMFC_OVERLAP', |
| 222 | 2: 'OFPFMFC_EPERM', |
| 223 | 3: 'OFPFMFC_BAD_EMERG_TIMEOUT', |
| 224 | 4: 'OFPFMFC_BAD_COMMAND', |
| 225 | 5: 'OFPFMFC_UNSUPPORTED', |
| 226 | } |
| 227 | |
| 228 | # Identifiers from group ofp_flow_mod_flags |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 229 | OFPFF_SEND_FLOW_REM = 1 |
| 230 | OFPFF_CHECK_OVERLAP = 2 |
| 231 | OFPFF_EMERG = 4 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 232 | |
| 233 | ofp_flow_mod_flags_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 234 | 1: 'OFPFF_SEND_FLOW_REM', |
| 235 | 2: 'OFPFF_CHECK_OVERLAP', |
| 236 | 4: 'OFPFF_EMERG', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 237 | } |
| 238 | |
| 239 | # Identifiers from group ofp_flow_removed_reason |
| 240 | OFPRR_IDLE_TIMEOUT = 0 |
| 241 | OFPRR_HARD_TIMEOUT = 1 |
| 242 | OFPRR_DELETE = 2 |
| 243 | |
| 244 | ofp_flow_removed_reason_map = { |
| 245 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 246 | 1: 'OFPRR_HARD_TIMEOUT', |
| 247 | 2: 'OFPRR_DELETE', |
| 248 | } |
| 249 | |
| 250 | # Identifiers from group ofp_flow_wildcards |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 251 | OFPFW_IN_PORT = 1 |
| 252 | OFPFW_DL_VLAN = 2 |
| 253 | OFPFW_DL_SRC = 4 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 254 | OFPFW_NW_DST_BITS = 6 |
| 255 | OFPFW_NW_SRC_BITS = 6 |
| 256 | OFPFW_NW_SRC_SHIFT = 8 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 257 | OFPFW_DL_DST = 8 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 258 | OFPFW_NW_DST_SHIFT = 14 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 259 | OFPFW_DL_TYPE = 16 |
| 260 | OFPFW_NW_PROTO = 32 |
| 261 | OFPFW_TP_SRC = 64 |
| 262 | OFPFW_TP_DST = 128 |
| 263 | OFPFW_NW_SRC_ALL = 8192 |
| 264 | OFPFW_NW_SRC_MASK = 16128 |
| 265 | OFPFW_NW_DST_ALL = 524288 |
| 266 | OFPFW_NW_DST_MASK = 1032192 |
| 267 | OFPFW_DL_VLAN_PCP = 1048576 |
| 268 | OFPFW_NW_TOS = 2097152 |
| 269 | OFPFW_ALL = 4194303 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 270 | |
| 271 | ofp_flow_wildcards_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 272 | 1: 'OFPFW_IN_PORT', |
| 273 | 2: 'OFPFW_DL_VLAN', |
| 274 | 4: 'OFPFW_DL_SRC', |
| 275 | 8: 'OFPFW_DL_DST', |
| 276 | 16: 'OFPFW_DL_TYPE', |
| 277 | 32: 'OFPFW_NW_PROTO', |
| 278 | 64: 'OFPFW_TP_SRC', |
| 279 | 128: 'OFPFW_TP_DST', |
| 280 | 1048576: 'OFPFW_DL_VLAN_PCP', |
| 281 | 2097152: 'OFPFW_NW_TOS', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 282 | } |
| 283 | |
| 284 | # Identifiers from group ofp_hello_failed_code |
| 285 | OFPHFC_INCOMPATIBLE = 0 |
| 286 | OFPHFC_EPERM = 1 |
| 287 | |
| 288 | ofp_hello_failed_code_map = { |
| 289 | 0: 'OFPHFC_INCOMPATIBLE', |
| 290 | 1: 'OFPHFC_EPERM', |
| 291 | } |
| 292 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 293 | # Identifiers from group ofp_nicira_controller_role |
| 294 | NX_ROLE_OTHER = 0 |
| 295 | NX_ROLE_MASTER = 1 |
| 296 | NX_ROLE_SLAVE = 2 |
| 297 | |
| 298 | ofp_nicira_controller_role_map = { |
| 299 | 0: 'NX_ROLE_OTHER', |
| 300 | 1: 'NX_ROLE_MASTER', |
| 301 | 2: 'NX_ROLE_SLAVE', |
| 302 | } |
| 303 | |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 304 | # Identifiers from group ofp_packet_in_reason |
| 305 | OFPR_NO_MATCH = 0 |
| 306 | OFPR_ACTION = 1 |
| 307 | |
| 308 | ofp_packet_in_reason_map = { |
| 309 | 0: 'OFPR_NO_MATCH', |
| 310 | 1: 'OFPR_ACTION', |
| 311 | } |
| 312 | |
| 313 | # Identifiers from group ofp_port |
| 314 | OFPP_MAX = 0xff00 |
| 315 | OFPP_IN_PORT = 0xfff8 |
| 316 | OFPP_TABLE = 0xfff9 |
| 317 | OFPP_NORMAL = 0xfffa |
| 318 | OFPP_FLOOD = 0xfffb |
| 319 | OFPP_ALL = 0xfffc |
| 320 | OFPP_CONTROLLER = 0xfffd |
| 321 | OFPP_LOCAL = 0xfffe |
| 322 | OFPP_NONE = 0xffff |
| 323 | |
| 324 | ofp_port_map = { |
| 325 | 0xff00: 'OFPP_MAX', |
| 326 | 0xfff8: 'OFPP_IN_PORT', |
| 327 | 0xfff9: 'OFPP_TABLE', |
| 328 | 0xfffa: 'OFPP_NORMAL', |
| 329 | 0xfffb: 'OFPP_FLOOD', |
| 330 | 0xfffc: 'OFPP_ALL', |
| 331 | 0xfffd: 'OFPP_CONTROLLER', |
| 332 | 0xfffe: 'OFPP_LOCAL', |
| 333 | 0xffff: 'OFPP_NONE', |
| 334 | } |
| 335 | |
| 336 | # Identifiers from group ofp_port_config |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 337 | OFPPC_PORT_DOWN = 1 |
| 338 | OFPPC_NO_STP = 2 |
| 339 | OFPPC_NO_RECV = 4 |
| 340 | OFPPC_NO_RECV_STP = 8 |
| 341 | OFPPC_NO_FLOOD = 16 |
| 342 | OFPPC_NO_FWD = 32 |
| 343 | OFPPC_NO_PACKET_IN = 64 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 344 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 345 | |
| 346 | ofp_port_config_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 347 | 1: 'OFPPC_PORT_DOWN', |
| 348 | 2: 'OFPPC_NO_STP', |
| 349 | 4: 'OFPPC_NO_RECV', |
| 350 | 8: 'OFPPC_NO_RECV_STP', |
| 351 | 16: 'OFPPC_NO_FLOOD', |
| 352 | 32: 'OFPPC_NO_FWD', |
| 353 | 64: 'OFPPC_NO_PACKET_IN', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 354 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 355 | } |
| 356 | |
| 357 | # Identifiers from group ofp_port_features |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 358 | OFPPF_10MB_HD = 1 |
| 359 | OFPPF_10MB_FD = 2 |
| 360 | OFPPF_100MB_HD = 4 |
| 361 | OFPPF_100MB_FD = 8 |
| 362 | OFPPF_1GB_HD = 16 |
| 363 | OFPPF_1GB_FD = 32 |
| 364 | OFPPF_10GB_FD = 64 |
| 365 | OFPPF_COPPER = 128 |
| 366 | OFPPF_FIBER = 256 |
| 367 | OFPPF_AUTONEG = 512 |
| 368 | OFPPF_PAUSE = 1024 |
| 369 | OFPPF_PAUSE_ASYM = 2048 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 370 | |
| 371 | ofp_port_features_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 372 | 1: 'OFPPF_10MB_HD', |
| 373 | 2: 'OFPPF_10MB_FD', |
| 374 | 4: 'OFPPF_100MB_HD', |
| 375 | 8: 'OFPPF_100MB_FD', |
| 376 | 16: 'OFPPF_1GB_HD', |
| 377 | 32: 'OFPPF_1GB_FD', |
| 378 | 64: 'OFPPF_10GB_FD', |
| 379 | 128: 'OFPPF_COPPER', |
| 380 | 256: 'OFPPF_FIBER', |
| 381 | 512: 'OFPPF_AUTONEG', |
| 382 | 1024: 'OFPPF_PAUSE', |
| 383 | 2048: 'OFPPF_PAUSE_ASYM', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 384 | } |
| 385 | |
| 386 | # Identifiers from group ofp_port_mod_failed_code |
| 387 | OFPPMFC_BAD_PORT = 0 |
| 388 | OFPPMFC_BAD_HW_ADDR = 1 |
| 389 | |
| 390 | ofp_port_mod_failed_code_map = { |
| 391 | 0: 'OFPPMFC_BAD_PORT', |
| 392 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 393 | } |
| 394 | |
| 395 | # Identifiers from group ofp_port_reason |
| 396 | OFPPR_ADD = 0 |
| 397 | OFPPR_DELETE = 1 |
| 398 | OFPPR_MODIFY = 2 |
| 399 | |
| 400 | ofp_port_reason_map = { |
| 401 | 0: 'OFPPR_ADD', |
| 402 | 1: 'OFPPR_DELETE', |
| 403 | 2: 'OFPPR_MODIFY', |
| 404 | } |
| 405 | |
| 406 | # Identifiers from group ofp_port_state |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 407 | OFPPS_LINK_DOWN = 1 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 408 | OFPPS_STP_LISTEN = 0 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 409 | OFPPS_STP_LEARN = 256 |
| 410 | OFPPS_STP_FORWARD = 512 |
| 411 | OFPPS_STP_BLOCK = 768 |
| 412 | OFPPS_STP_MASK = 768 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 413 | |
| 414 | ofp_port_state_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 415 | 1: 'OFPPS_LINK_DOWN', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 416 | 0: 'OFPPS_STP_LISTEN', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 417 | 256: 'OFPPS_STP_LEARN', |
| 418 | 512: 'OFPPS_STP_FORWARD', |
| 419 | 768: 'OFPPS_STP_BLOCK', |
| 420 | 768: 'OFPPS_STP_MASK', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 421 | } |
| 422 | |
| 423 | # Identifiers from group ofp_queue_op_failed_code |
| 424 | OFPQOFC_BAD_PORT = 0 |
| 425 | OFPQOFC_BAD_QUEUE = 1 |
| 426 | OFPQOFC_EPERM = 2 |
| 427 | |
| 428 | ofp_queue_op_failed_code_map = { |
| 429 | 0: 'OFPQOFC_BAD_PORT', |
| 430 | 1: 'OFPQOFC_BAD_QUEUE', |
| 431 | 2: 'OFPQOFC_EPERM', |
| 432 | } |
| 433 | |
| 434 | # Identifiers from group ofp_queue_properties |
| 435 | OFPQT_NONE = 0 |
| 436 | OFPQT_MIN_RATE = 1 |
| 437 | |
| 438 | ofp_queue_properties_map = { |
| 439 | 0: 'OFPQT_NONE', |
| 440 | 1: 'OFPQT_MIN_RATE', |
| 441 | } |
| 442 | |
| 443 | # Identifiers from group ofp_stats_reply_flags |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 444 | OFPSF_REPLY_MORE = 1 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 445 | |
| 446 | ofp_stats_reply_flags_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 447 | 1: 'OFPSF_REPLY_MORE', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 448 | } |
| 449 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 450 | # Identifiers from group ofp_stats_request_flags |
| 451 | |
| 452 | ofp_stats_request_flags_map = { |
| 453 | } |
| 454 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 455 | # Identifiers from group ofp_stats_type |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 456 | OFPST_DESC = 0 |
| 457 | OFPST_FLOW = 1 |
| 458 | OFPST_AGGREGATE = 2 |
| 459 | OFPST_TABLE = 3 |
| 460 | OFPST_PORT = 4 |
| 461 | OFPST_QUEUE = 5 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 462 | OFPST_EXPERIMENTER = 65535 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 463 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 464 | ofp_stats_type_map = { |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 465 | 0: 'OFPST_DESC', |
| 466 | 1: 'OFPST_FLOW', |
| 467 | 2: 'OFPST_AGGREGATE', |
| 468 | 3: 'OFPST_TABLE', |
| 469 | 4: 'OFPST_PORT', |
| 470 | 5: 'OFPST_QUEUE', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 471 | 65535: 'OFPST_EXPERIMENTER', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 472 | } |
| 473 | |
| 474 | # Identifiers from group ofp_type |
| 475 | OFPT_HELLO = 0 |
| 476 | OFPT_ERROR = 1 |
| 477 | OFPT_ECHO_REQUEST = 2 |
| 478 | OFPT_ECHO_REPLY = 3 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 479 | OFPT_EXPERIMENTER = 4 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 480 | OFPT_FEATURES_REQUEST = 5 |
| 481 | OFPT_FEATURES_REPLY = 6 |
| 482 | OFPT_GET_CONFIG_REQUEST = 7 |
| 483 | OFPT_GET_CONFIG_REPLY = 8 |
| 484 | OFPT_SET_CONFIG = 9 |
| 485 | OFPT_PACKET_IN = 10 |
| 486 | OFPT_FLOW_REMOVED = 11 |
| 487 | OFPT_PORT_STATUS = 12 |
| 488 | OFPT_PACKET_OUT = 13 |
| 489 | OFPT_FLOW_MOD = 14 |
| 490 | OFPT_PORT_MOD = 15 |
| 491 | OFPT_STATS_REQUEST = 16 |
| 492 | OFPT_STATS_REPLY = 17 |
| 493 | OFPT_BARRIER_REQUEST = 18 |
| 494 | OFPT_BARRIER_REPLY = 19 |
| 495 | OFPT_QUEUE_GET_CONFIG_REQUEST = 20 |
| 496 | OFPT_QUEUE_GET_CONFIG_REPLY = 21 |
| 497 | |
| 498 | ofp_type_map = { |
| 499 | 0: 'OFPT_HELLO', |
| 500 | 1: 'OFPT_ERROR', |
| 501 | 2: 'OFPT_ECHO_REQUEST', |
| 502 | 3: 'OFPT_ECHO_REPLY', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 503 | 4: 'OFPT_EXPERIMENTER', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 504 | 5: 'OFPT_FEATURES_REQUEST', |
| 505 | 6: 'OFPT_FEATURES_REPLY', |
| 506 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 507 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 508 | 9: 'OFPT_SET_CONFIG', |
| 509 | 10: 'OFPT_PACKET_IN', |
| 510 | 11: 'OFPT_FLOW_REMOVED', |
| 511 | 12: 'OFPT_PORT_STATUS', |
| 512 | 13: 'OFPT_PACKET_OUT', |
| 513 | 14: 'OFPT_FLOW_MOD', |
| 514 | 15: 'OFPT_PORT_MOD', |
| 515 | 16: 'OFPT_STATS_REQUEST', |
| 516 | 17: 'OFPT_STATS_REPLY', |
| 517 | 18: 'OFPT_BARRIER_REQUEST', |
| 518 | 19: 'OFPT_BARRIER_REPLY', |
| 519 | 20: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 520 | 21: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 521 | } |
| 522 | |