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 | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 30 | # Identifiers from group of_bsn_pdu_slot_num_t |
| 31 | BSN_PDU_SLOT_NUM_ANY = 255 |
| 32 | |
| 33 | of_bsn_pdu_slot_num_t_map = { |
| 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 | |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 114 | # Identifiers from group ofp_bsn_vport_q_in_q_untagged |
| 115 | OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535 |
| 116 | |
| 117 | ofp_bsn_vport_q_in_q_untagged_map = { |
| 118 | 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED', |
| 119 | } |
| 120 | |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 121 | # Identifiers from group ofp_bsn_vport_status |
| 122 | OF_BSN_VPORT_STATUS_OK = 0 |
| 123 | OF_BSN_VPORT_STATUS_FAILED = 1 |
| 124 | |
| 125 | ofp_bsn_vport_status_map = { |
| 126 | 0: 'OF_BSN_VPORT_STATUS_OK', |
| 127 | 1: 'OF_BSN_VPORT_STATUS_FAILED', |
| 128 | } |
| 129 | |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 130 | # Identifiers from group ofp_capabilities |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 131 | OFPC_FLOW_STATS = 1 |
| 132 | OFPC_TABLE_STATS = 2 |
| 133 | OFPC_PORT_STATS = 4 |
| 134 | OFPC_STP = 8 |
| 135 | OFPC_RESERVED = 16 |
| 136 | OFPC_IP_REASM = 32 |
| 137 | OFPC_QUEUE_STATS = 64 |
| 138 | OFPC_ARP_MATCH_IP = 128 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 139 | |
| 140 | ofp_capabilities_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 141 | 1: 'OFPC_FLOW_STATS', |
| 142 | 2: 'OFPC_TABLE_STATS', |
| 143 | 4: 'OFPC_PORT_STATS', |
| 144 | 8: 'OFPC_STP', |
| 145 | 16: 'OFPC_RESERVED', |
| 146 | 32: 'OFPC_IP_REASM', |
| 147 | 64: 'OFPC_QUEUE_STATS', |
| 148 | 128: 'OFPC_ARP_MATCH_IP', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | # Identifiers from group ofp_config_flags |
| 152 | OFPC_FRAG_NORMAL = 0 |
| 153 | OFPC_FRAG_DROP = 1 |
| 154 | OFPC_FRAG_REASM = 2 |
| 155 | OFPC_FRAG_MASK = 3 |
| 156 | |
| 157 | ofp_config_flags_map = { |
| 158 | 0: 'OFPC_FRAG_NORMAL', |
| 159 | 1: 'OFPC_FRAG_DROP', |
| 160 | 2: 'OFPC_FRAG_REASM', |
| 161 | 3: 'OFPC_FRAG_MASK', |
| 162 | } |
| 163 | |
| 164 | # Identifiers from group ofp_error_type |
| 165 | OFPET_HELLO_FAILED = 0 |
| 166 | OFPET_BAD_REQUEST = 1 |
| 167 | OFPET_BAD_ACTION = 2 |
| 168 | OFPET_FLOW_MOD_FAILED = 3 |
| 169 | OFPET_PORT_MOD_FAILED = 4 |
| 170 | OFPET_QUEUE_OP_FAILED = 5 |
| 171 | |
| 172 | ofp_error_type_map = { |
| 173 | 0: 'OFPET_HELLO_FAILED', |
| 174 | 1: 'OFPET_BAD_REQUEST', |
| 175 | 2: 'OFPET_BAD_ACTION', |
| 176 | 3: 'OFPET_FLOW_MOD_FAILED', |
| 177 | 4: 'OFPET_PORT_MOD_FAILED', |
| 178 | 5: 'OFPET_QUEUE_OP_FAILED', |
| 179 | } |
| 180 | |
| 181 | # Identifiers from group ofp_flow_mod_command |
| 182 | OFPFC_ADD = 0 |
| 183 | OFPFC_MODIFY = 1 |
| 184 | OFPFC_MODIFY_STRICT = 2 |
| 185 | OFPFC_DELETE = 3 |
| 186 | OFPFC_DELETE_STRICT = 4 |
| 187 | |
| 188 | ofp_flow_mod_command_map = { |
| 189 | 0: 'OFPFC_ADD', |
| 190 | 1: 'OFPFC_MODIFY', |
| 191 | 2: 'OFPFC_MODIFY_STRICT', |
| 192 | 3: 'OFPFC_DELETE', |
| 193 | 4: 'OFPFC_DELETE_STRICT', |
| 194 | } |
| 195 | |
| 196 | # Identifiers from group ofp_flow_mod_failed_code |
| 197 | OFPFMFC_ALL_TABLES_FULL = 0 |
| 198 | OFPFMFC_OVERLAP = 1 |
| 199 | OFPFMFC_EPERM = 2 |
| 200 | OFPFMFC_BAD_EMERG_TIMEOUT = 3 |
| 201 | OFPFMFC_BAD_COMMAND = 4 |
| 202 | OFPFMFC_UNSUPPORTED = 5 |
| 203 | |
| 204 | ofp_flow_mod_failed_code_map = { |
| 205 | 0: 'OFPFMFC_ALL_TABLES_FULL', |
| 206 | 1: 'OFPFMFC_OVERLAP', |
| 207 | 2: 'OFPFMFC_EPERM', |
| 208 | 3: 'OFPFMFC_BAD_EMERG_TIMEOUT', |
| 209 | 4: 'OFPFMFC_BAD_COMMAND', |
| 210 | 5: 'OFPFMFC_UNSUPPORTED', |
| 211 | } |
| 212 | |
| 213 | # Identifiers from group ofp_flow_mod_flags |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 214 | OFPFF_SEND_FLOW_REM = 1 |
| 215 | OFPFF_CHECK_OVERLAP = 2 |
| 216 | OFPFF_EMERG = 4 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 217 | |
| 218 | ofp_flow_mod_flags_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 219 | 1: 'OFPFF_SEND_FLOW_REM', |
| 220 | 2: 'OFPFF_CHECK_OVERLAP', |
| 221 | 4: 'OFPFF_EMERG', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 222 | } |
| 223 | |
| 224 | # Identifiers from group ofp_flow_removed_reason |
| 225 | OFPRR_IDLE_TIMEOUT = 0 |
| 226 | OFPRR_HARD_TIMEOUT = 1 |
| 227 | OFPRR_DELETE = 2 |
| 228 | |
| 229 | ofp_flow_removed_reason_map = { |
| 230 | 0: 'OFPRR_IDLE_TIMEOUT', |
| 231 | 1: 'OFPRR_HARD_TIMEOUT', |
| 232 | 2: 'OFPRR_DELETE', |
| 233 | } |
| 234 | |
| 235 | # Identifiers from group ofp_flow_wildcards |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 236 | OFPFW_IN_PORT = 1 |
| 237 | OFPFW_DL_VLAN = 2 |
| 238 | OFPFW_DL_SRC = 4 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 239 | OFPFW_NW_DST_BITS = 6 |
| 240 | OFPFW_NW_SRC_BITS = 6 |
| 241 | OFPFW_NW_SRC_SHIFT = 8 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 242 | OFPFW_DL_DST = 8 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 243 | OFPFW_NW_DST_SHIFT = 14 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 244 | OFPFW_DL_TYPE = 16 |
| 245 | OFPFW_NW_PROTO = 32 |
| 246 | OFPFW_TP_SRC = 64 |
| 247 | OFPFW_TP_DST = 128 |
| 248 | OFPFW_NW_SRC_ALL = 8192 |
| 249 | OFPFW_NW_SRC_MASK = 16128 |
| 250 | OFPFW_NW_DST_ALL = 524288 |
| 251 | OFPFW_NW_DST_MASK = 1032192 |
| 252 | OFPFW_DL_VLAN_PCP = 1048576 |
| 253 | OFPFW_NW_TOS = 2097152 |
| 254 | OFPFW_ALL = 4194303 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 255 | |
| 256 | ofp_flow_wildcards_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 257 | 1: 'OFPFW_IN_PORT', |
| 258 | 2: 'OFPFW_DL_VLAN', |
| 259 | 4: 'OFPFW_DL_SRC', |
| 260 | 8: 'OFPFW_DL_DST', |
| 261 | 16: 'OFPFW_DL_TYPE', |
| 262 | 32: 'OFPFW_NW_PROTO', |
| 263 | 64: 'OFPFW_TP_SRC', |
| 264 | 128: 'OFPFW_TP_DST', |
| 265 | 1048576: 'OFPFW_DL_VLAN_PCP', |
| 266 | 2097152: 'OFPFW_NW_TOS', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | # Identifiers from group ofp_hello_failed_code |
| 270 | OFPHFC_INCOMPATIBLE = 0 |
| 271 | OFPHFC_EPERM = 1 |
| 272 | |
| 273 | ofp_hello_failed_code_map = { |
| 274 | 0: 'OFPHFC_INCOMPATIBLE', |
| 275 | 1: 'OFPHFC_EPERM', |
| 276 | } |
| 277 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 278 | # Identifiers from group ofp_nicira_controller_role |
| 279 | NX_ROLE_OTHER = 0 |
| 280 | NX_ROLE_MASTER = 1 |
| 281 | NX_ROLE_SLAVE = 2 |
| 282 | |
| 283 | ofp_nicira_controller_role_map = { |
| 284 | 0: 'NX_ROLE_OTHER', |
| 285 | 1: 'NX_ROLE_MASTER', |
| 286 | 2: 'NX_ROLE_SLAVE', |
| 287 | } |
| 288 | |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 289 | # Identifiers from group ofp_packet_in_reason |
| 290 | OFPR_NO_MATCH = 0 |
| 291 | OFPR_ACTION = 1 |
| 292 | |
| 293 | ofp_packet_in_reason_map = { |
| 294 | 0: 'OFPR_NO_MATCH', |
| 295 | 1: 'OFPR_ACTION', |
| 296 | } |
| 297 | |
| 298 | # Identifiers from group ofp_port |
| 299 | OFPP_MAX = 0xff00 |
| 300 | OFPP_IN_PORT = 0xfff8 |
| 301 | OFPP_TABLE = 0xfff9 |
| 302 | OFPP_NORMAL = 0xfffa |
| 303 | OFPP_FLOOD = 0xfffb |
| 304 | OFPP_ALL = 0xfffc |
| 305 | OFPP_CONTROLLER = 0xfffd |
| 306 | OFPP_LOCAL = 0xfffe |
| 307 | OFPP_NONE = 0xffff |
| 308 | |
| 309 | ofp_port_map = { |
| 310 | 0xff00: 'OFPP_MAX', |
| 311 | 0xfff8: 'OFPP_IN_PORT', |
| 312 | 0xfff9: 'OFPP_TABLE', |
| 313 | 0xfffa: 'OFPP_NORMAL', |
| 314 | 0xfffb: 'OFPP_FLOOD', |
| 315 | 0xfffc: 'OFPP_ALL', |
| 316 | 0xfffd: 'OFPP_CONTROLLER', |
| 317 | 0xfffe: 'OFPP_LOCAL', |
| 318 | 0xffff: 'OFPP_NONE', |
| 319 | } |
| 320 | |
| 321 | # Identifiers from group ofp_port_config |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 322 | OFPPC_PORT_DOWN = 1 |
| 323 | OFPPC_NO_STP = 2 |
| 324 | OFPPC_NO_RECV = 4 |
| 325 | OFPPC_NO_RECV_STP = 8 |
| 326 | OFPPC_NO_FLOOD = 16 |
| 327 | OFPPC_NO_FWD = 32 |
| 328 | OFPPC_NO_PACKET_IN = 64 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 329 | OFPPC_BSN_MIRROR_DEST = 2147483648 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 330 | |
| 331 | ofp_port_config_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 332 | 1: 'OFPPC_PORT_DOWN', |
| 333 | 2: 'OFPPC_NO_STP', |
| 334 | 4: 'OFPPC_NO_RECV', |
| 335 | 8: 'OFPPC_NO_RECV_STP', |
| 336 | 16: 'OFPPC_NO_FLOOD', |
| 337 | 32: 'OFPPC_NO_FWD', |
| 338 | 64: 'OFPPC_NO_PACKET_IN', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 339 | 2147483648: 'OFPPC_BSN_MIRROR_DEST', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 340 | } |
| 341 | |
| 342 | # Identifiers from group ofp_port_features |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 343 | OFPPF_10MB_HD = 1 |
| 344 | OFPPF_10MB_FD = 2 |
| 345 | OFPPF_100MB_HD = 4 |
| 346 | OFPPF_100MB_FD = 8 |
| 347 | OFPPF_1GB_HD = 16 |
| 348 | OFPPF_1GB_FD = 32 |
| 349 | OFPPF_10GB_FD = 64 |
| 350 | OFPPF_COPPER = 128 |
| 351 | OFPPF_FIBER = 256 |
| 352 | OFPPF_AUTONEG = 512 |
| 353 | OFPPF_PAUSE = 1024 |
| 354 | OFPPF_PAUSE_ASYM = 2048 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 355 | |
| 356 | ofp_port_features_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 357 | 1: 'OFPPF_10MB_HD', |
| 358 | 2: 'OFPPF_10MB_FD', |
| 359 | 4: 'OFPPF_100MB_HD', |
| 360 | 8: 'OFPPF_100MB_FD', |
| 361 | 16: 'OFPPF_1GB_HD', |
| 362 | 32: 'OFPPF_1GB_FD', |
| 363 | 64: 'OFPPF_10GB_FD', |
| 364 | 128: 'OFPPF_COPPER', |
| 365 | 256: 'OFPPF_FIBER', |
| 366 | 512: 'OFPPF_AUTONEG', |
| 367 | 1024: 'OFPPF_PAUSE', |
| 368 | 2048: 'OFPPF_PAUSE_ASYM', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 369 | } |
| 370 | |
| 371 | # Identifiers from group ofp_port_mod_failed_code |
| 372 | OFPPMFC_BAD_PORT = 0 |
| 373 | OFPPMFC_BAD_HW_ADDR = 1 |
| 374 | |
| 375 | ofp_port_mod_failed_code_map = { |
| 376 | 0: 'OFPPMFC_BAD_PORT', |
| 377 | 1: 'OFPPMFC_BAD_HW_ADDR', |
| 378 | } |
| 379 | |
| 380 | # Identifiers from group ofp_port_reason |
| 381 | OFPPR_ADD = 0 |
| 382 | OFPPR_DELETE = 1 |
| 383 | OFPPR_MODIFY = 2 |
| 384 | |
| 385 | ofp_port_reason_map = { |
| 386 | 0: 'OFPPR_ADD', |
| 387 | 1: 'OFPPR_DELETE', |
| 388 | 2: 'OFPPR_MODIFY', |
| 389 | } |
| 390 | |
| 391 | # Identifiers from group ofp_port_state |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 392 | OFPPS_LINK_DOWN = 1 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 393 | OFPPS_STP_LISTEN = 0 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 394 | OFPPS_STP_LEARN = 256 |
| 395 | OFPPS_STP_FORWARD = 512 |
| 396 | OFPPS_STP_BLOCK = 768 |
| 397 | OFPPS_STP_MASK = 768 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 398 | |
| 399 | ofp_port_state_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 400 | 1: 'OFPPS_LINK_DOWN', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 401 | 0: 'OFPPS_STP_LISTEN', |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 402 | 256: 'OFPPS_STP_LEARN', |
| 403 | 512: 'OFPPS_STP_FORWARD', |
| 404 | 768: 'OFPPS_STP_BLOCK', |
| 405 | 768: 'OFPPS_STP_MASK', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 406 | } |
| 407 | |
| 408 | # Identifiers from group ofp_queue_op_failed_code |
| 409 | OFPQOFC_BAD_PORT = 0 |
| 410 | OFPQOFC_BAD_QUEUE = 1 |
| 411 | OFPQOFC_EPERM = 2 |
| 412 | |
| 413 | ofp_queue_op_failed_code_map = { |
| 414 | 0: 'OFPQOFC_BAD_PORT', |
| 415 | 1: 'OFPQOFC_BAD_QUEUE', |
| 416 | 2: 'OFPQOFC_EPERM', |
| 417 | } |
| 418 | |
| 419 | # Identifiers from group ofp_queue_properties |
| 420 | OFPQT_NONE = 0 |
| 421 | OFPQT_MIN_RATE = 1 |
| 422 | |
| 423 | ofp_queue_properties_map = { |
| 424 | 0: 'OFPQT_NONE', |
| 425 | 1: 'OFPQT_MIN_RATE', |
| 426 | } |
| 427 | |
| 428 | # Identifiers from group ofp_stats_reply_flags |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 429 | OFPSF_REPLY_MORE = 1 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 430 | |
| 431 | ofp_stats_reply_flags_map = { |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 432 | 1: 'OFPSF_REPLY_MORE', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 433 | } |
| 434 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 435 | # Identifiers from group ofp_stats_request_flags |
| 436 | |
| 437 | ofp_stats_request_flags_map = { |
| 438 | } |
| 439 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 440 | # Identifiers from group ofp_stats_type |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 441 | OFPST_DESC = 0 |
| 442 | OFPST_FLOW = 1 |
| 443 | OFPST_AGGREGATE = 2 |
| 444 | OFPST_TABLE = 3 |
| 445 | OFPST_PORT = 4 |
| 446 | OFPST_QUEUE = 5 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 447 | OFPST_EXPERIMENTER = 65535 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 448 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 449 | ofp_stats_type_map = { |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 450 | 0: 'OFPST_DESC', |
| 451 | 1: 'OFPST_FLOW', |
| 452 | 2: 'OFPST_AGGREGATE', |
| 453 | 3: 'OFPST_TABLE', |
| 454 | 4: 'OFPST_PORT', |
| 455 | 5: 'OFPST_QUEUE', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 456 | 65535: 'OFPST_EXPERIMENTER', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 457 | } |
| 458 | |
| 459 | # Identifiers from group ofp_type |
| 460 | OFPT_HELLO = 0 |
| 461 | OFPT_ERROR = 1 |
| 462 | OFPT_ECHO_REQUEST = 2 |
| 463 | OFPT_ECHO_REPLY = 3 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 464 | OFPT_EXPERIMENTER = 4 |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 465 | OFPT_FEATURES_REQUEST = 5 |
| 466 | OFPT_FEATURES_REPLY = 6 |
| 467 | OFPT_GET_CONFIG_REQUEST = 7 |
| 468 | OFPT_GET_CONFIG_REPLY = 8 |
| 469 | OFPT_SET_CONFIG = 9 |
| 470 | OFPT_PACKET_IN = 10 |
| 471 | OFPT_FLOW_REMOVED = 11 |
| 472 | OFPT_PORT_STATUS = 12 |
| 473 | OFPT_PACKET_OUT = 13 |
| 474 | OFPT_FLOW_MOD = 14 |
| 475 | OFPT_PORT_MOD = 15 |
| 476 | OFPT_STATS_REQUEST = 16 |
| 477 | OFPT_STATS_REPLY = 17 |
| 478 | OFPT_BARRIER_REQUEST = 18 |
| 479 | OFPT_BARRIER_REPLY = 19 |
| 480 | OFPT_QUEUE_GET_CONFIG_REQUEST = 20 |
| 481 | OFPT_QUEUE_GET_CONFIG_REPLY = 21 |
| 482 | |
| 483 | ofp_type_map = { |
| 484 | 0: 'OFPT_HELLO', |
| 485 | 1: 'OFPT_ERROR', |
| 486 | 2: 'OFPT_ECHO_REQUEST', |
| 487 | 3: 'OFPT_ECHO_REPLY', |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 488 | 4: 'OFPT_EXPERIMENTER', |
Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 489 | 5: 'OFPT_FEATURES_REQUEST', |
| 490 | 6: 'OFPT_FEATURES_REPLY', |
| 491 | 7: 'OFPT_GET_CONFIG_REQUEST', |
| 492 | 8: 'OFPT_GET_CONFIG_REPLY', |
| 493 | 9: 'OFPT_SET_CONFIG', |
| 494 | 10: 'OFPT_PACKET_IN', |
| 495 | 11: 'OFPT_FLOW_REMOVED', |
| 496 | 12: 'OFPT_PORT_STATUS', |
| 497 | 13: 'OFPT_PACKET_OUT', |
| 498 | 14: 'OFPT_FLOW_MOD', |
| 499 | 15: 'OFPT_PORT_MOD', |
| 500 | 16: 'OFPT_STATS_REQUEST', |
| 501 | 17: 'OFPT_STATS_REPLY', |
| 502 | 18: 'OFPT_BARRIER_REQUEST', |
| 503 | 19: 'OFPT_BARRIER_REPLY', |
| 504 | 20: 'OFPT_QUEUE_GET_CONFIG_REQUEST', |
| 505 | 21: 'OFPT_QUEUE_GET_CONFIG_REPLY', |
| 506 | } |
| 507 | |