From 3859e15bc63bb9505798d039fea59610d7608c43 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 2 Mar 2009 12:50:54 -0800 Subject: [PATCH] Add new "union ofp_action" to make working with actions easier. --- include/openflow/openflow.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/openflow/openflow.h b/include/openflow/openflow.h index e001e1dd..0a6d7874 100644 --- a/include/openflow/openflow.h +++ b/include/openflow/openflow.h @@ -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; -- 2.30.2