268
272
enum ofp_packet_in_reason {
269
273
OFPR_NO_MATCH, /* No matching flow. */
270
274
OFPR_ACTION, /* Action explicitly output to controller. */
271
OFPR_INVALID_TTL /* Packet has invalid TTL. */,
275
OFPR_INVALID_TTL, /* Packet has invalid TTL. */
276
OFPR_ACTION_SET, /* Output to controller in action set */
277
OFPR_GROUP, /* Output to controller in group bucket */
278
OFPR_PACKET_OUT, /* Output to controller in packet-out */
286
293
OFPFF_CHECK_OVERLAP = 1 << 1, /* Check for overlapping entries first. */
289
/* Action header for OFPAT10_VENDOR and OFPAT11_EXPERIMEMNTER.
290
* The rest of the body is vendor-defined. */
291
struct ofp_action_vendor_header {
292
ovs_be16 type; /* OFPAT10_VENDOR. */
293
ovs_be16 len; /* Length is a multiple of 8. */
294
ovs_be32 vendor; /* Vendor ID, which takes the same form
295
as in "struct ofp_vendor_header". */
297
OFP_ASSERT(sizeof(struct ofp_action_vendor_header) == 8);
299
/* Action header that is common to all actions. The length includes the
300
* header and any padding used to make the action 64-bit aligned.
301
* NB: The length of an action *must* always be a multiple of eight. */
302
struct ofp_action_header {
303
ovs_be16 type; /* One of OFPAT*. */
304
ovs_be16 len; /* Length of action, including this
305
header. This is the length of action,
306
including any padding to make it
310
OFP_ASSERT(sizeof(struct ofp_action_header) == 8);
312
/* Action structure for OFPAT10_SET_VLAN_VID and OFPAT11_SET_VLAN_VID. */
313
struct ofp_action_vlan_vid {
314
ovs_be16 type; /* Type. */
315
ovs_be16 len; /* Length is 8. */
316
ovs_be16 vlan_vid; /* VLAN id. */
319
OFP_ASSERT(sizeof(struct ofp_action_vlan_vid) == 8);
321
/* Action structure for OFPAT10_SET_VLAN_PCP and OFPAT11_SET_VLAN_PCP. */
322
struct ofp_action_vlan_pcp {
323
ovs_be16 type; /* Type. */
324
ovs_be16 len; /* Length is 8. */
325
uint8_t vlan_pcp; /* VLAN priority. */
328
OFP_ASSERT(sizeof(struct ofp_action_vlan_pcp) == 8);
330
/* Action structure for OFPAT10_SET_DL_SRC/DST and OFPAT11_SET_DL_SRC/DST. */
331
struct ofp_action_dl_addr {
332
ovs_be16 type; /* Type. */
333
ovs_be16 len; /* Length is 16. */
334
uint8_t dl_addr[OFP_ETH_ALEN]; /* Ethernet address. */
337
OFP_ASSERT(sizeof(struct ofp_action_dl_addr) == 16);
339
/* Action structure for OFPAT10_SET_NW_SRC/DST and OFPAT11_SET_NW_SRC/DST. */
340
struct ofp_action_nw_addr {
341
ovs_be16 type; /* Type. */
342
ovs_be16 len; /* Length is 8. */
343
ovs_be32 nw_addr; /* IP address. */
345
OFP_ASSERT(sizeof(struct ofp_action_nw_addr) == 8);
347
/* Action structure for OFPAT10_SET_NW_TOS and OFPAT11_SET_NW_TOS. */
348
struct ofp_action_nw_tos {
349
ovs_be16 type; /* Type.. */
350
ovs_be16 len; /* Length is 8. */
351
uint8_t nw_tos; /* DSCP in high 6 bits, rest ignored. */
354
OFP_ASSERT(sizeof(struct ofp_action_nw_tos) == 8);
356
/* Action structure for OFPAT10_SET_TP_SRC/DST and OFPAT11_SET_TP_SRC/DST. */
357
struct ofp_action_tp_port {
358
ovs_be16 type; /* Type. */
359
ovs_be16 len; /* Length is 8. */
360
ovs_be16 tp_port; /* TCP/UDP port. */
363
OFP_ASSERT(sizeof(struct ofp_action_tp_port) == 8);
365
296
/* Why was this flow removed? */
366
297
enum ofp_flow_removed_reason {
367
298
OFPRR_IDLE_TIMEOUT, /* Flow idle time exceeded idle_timeout. */