Add new "union ofp_action" to make working with actions easier.
authorBen Pfaff <blp@nicira.com>
Mon, 2 Mar 2009 20:50:54 +0000 (12:50 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 2 Mar 2009 21:42:06 +0000 (13:42 -0800)
include/openflow/openflow.h

index e001e1dd45770ed9204dcfeb53a5df81fbbce56a..0a6d78749cb2fd7ad743d6b92add6a79e212f4eb 100644 (file)
@@ -418,6 +418,18 @@ struct ofp_action_header {
 };
 OFP_ASSERT(sizeof(struct ofp_action_header) == 8);
 
+union ofp_action {
+    uint16_t type;
+    struct ofp_action_header header;
+    struct ofp_action_vendor_header vendor;
+    struct ofp_action_output output;
+    struct ofp_action_vlan_vid vlan_vid;
+    struct ofp_action_vlan_pcp vlan_pcp;
+    struct ofp_action_nw_addr nw_addr;
+    struct ofp_action_tp_port tp_port;
+};
+OFP_ASSERT(sizeof(union ofp_action) == 8);
+
 /* Send packet (controller -> datapath). */
 struct ofp_packet_out {
     struct ofp_header header;