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