summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYuichi Ito <ito.yuichi0@gmail.com>2013-12-11 17:15:57 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-12-13 17:27:49 +0900
commit40e88be11e240148a698d7fa35ba1dbb36de6420 (patch)
tree4ec71343d43c742227273c281e43e2bfb11f3f5f
parent4b7da3a3691cb4122ba7fc1cf285ba4188f60698 (diff)
test tool: add default test files (action with set-field only)
What this patch implements: This patch implements the test files for the test tool. These test files aim to examine 'set-field action' of FlowMod message. Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp> Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/03_ETH_DST.json187
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/04_ETH_SRC.json187
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/05_ETH_TYPE.json187
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/06_VLAN_VID.json193
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/07_VLAN_PCP.json211
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/08_IP_DSCP_IPv4.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/08_IP_DSCP_IPv6.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/09_IP_ECN_IPv4.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/09_IP_ECN_IPv6.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/10_IP_PROTO_IPv4.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/10_IP_PROTO_IPv6.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/11_IPV4_SRC.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/12_IPV4_DST.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/13_TCP_SRC_IPv4.json348
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/13_TCP_SRC_IPv6.json348
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/14_TCP_DST_IPv4.json348
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/14_TCP_DST_IPv6.json348
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/15_UDP_SRC_IPv4.json348
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/15_UDP_SRC_IPv6.json348
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/16_UDP_DST_IPv4.json348
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/16_UDP_DST_IPv6.json348
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/17_SCTP_SRC_IPv4.json340
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/17_SCTP_SRC_IPv6.json340
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/18_SCTP_DST_IPv4.json340
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/18_SCTP_DST_IPv6.json340
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/19_ICMPV4_TYPE.json340
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/20_ICMPV4_CODE.json340
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/21_ARP_OP.json316
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/22_ARP_SPA.json316
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/23_ARP_TPA.json316
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/24_ARP_SHA.json316
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/25_ARP_THA.json316
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/26_IPV6_SRC.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/27_IPV6_DST.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/28_IPV6_FLABEL.json324
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/29_ICMPV6_TYPE.json340
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/30_ICMPV6_CODE.json340
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/31_IPV6_ND_TARGET.json364
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/32_IPV6_ND_SLL.json364
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/33_IPV6_ND_TLL.json364
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/34_MPLS_LABEL.json211
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/35_MPLS_TC.json211
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/36_MPLS_BOS.json211
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/37_PBB_ISID.json235
-rw-r--r--ryu/tests/switch/of13/action/25_SET_FIELD/38_TUNNEL_ID.json280
45 files changed, 13853 insertions, 0 deletions
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/03_ETH_DST.json b/ryu/tests/switch/of13/action/25_SET_FIELD/03_ETH_DST.json
new file mode 100644
index 00000000..ca13af94
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/03_ETH_DST.json
@@ -0,0 +1,187 @@
+[
+ "action: set_field: 03_ETH_DST",
+ {
+ "description": "ethernet(dst='22:22:22:22:22:22')/ipv4/tcp-->'eth_dst=22:22:22:22:22:22,actions=set_field:bb:bb:bb:bb:bb:bb->eth_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_dst",
+ "value":"22:22:22:22:22:22"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"eth_dst",
+ "value":"bb:bb:bb:bb:bb:bb"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='bb:bb:bb:bb:bb:bb', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet(dst='22:22:22:22:22:22')/ipv6/tcp-->'eth_dst=22:22:22:22:22:22,actions=set_field:bb:bb:bb:bb:bb:bb->eth_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_dst",
+ "value":"22:22:22:22:22:22"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"eth_dst",
+ "value":"bb:bb:bb:bb:bb:bb"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='bb:bb:bb:bb:bb:bb', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet(dst='22:22:22:22:22:22')/arp-->'eth_dst=22:22:22:22:22:22,actions=set_field:bb:bb:bb:bb:bb:bb->eth_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_dst",
+ "value":"22:22:22:22:22:22"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"eth_dst",
+ "value":"bb:bb:bb:bb:bb:bb"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='bb:bb:bb:bb:bb:bb', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/04_ETH_SRC.json b/ryu/tests/switch/of13/action/25_SET_FIELD/04_ETH_SRC.json
new file mode 100644
index 00000000..80459947
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/04_ETH_SRC.json
@@ -0,0 +1,187 @@
+[
+ "action: set_field: 04_ETH_SRC",
+ {
+ "description": "ethernet(src='22:22:22:22:22:22')/ipv4/tcp-->'eth_src=22:22:22:22:22:22,actions=set_field:bb:bb:bb:bb:bb:bb->eth_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_src",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"eth_src",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='aa:aa:aa:aa:aa:aa', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet(src='22:22:22:22:22:22')/ipv6/tcp-->'eth_src=22:22:22:22:22:22,actions=set_field:bb:bb:bb:bb:bb:bb->eth_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_src",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"eth_src",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='aa:aa:aa:aa:aa:aa', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet(src='22:22:22:22:22:22')/arp-->'eth_src=22:22:22:22:22:22,actions=set_field:bb:bb:bb:bb:bb:bb->eth_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_src",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"eth_src",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='aa:aa:aa:aa:aa:aa', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/05_ETH_TYPE.json b/ryu/tests/switch/of13/action/25_SET_FIELD/05_ETH_TYPE.json
new file mode 100644
index 00000000..53260f22
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/05_ETH_TYPE.json
@@ -0,0 +1,187 @@
+[
+ "action: set_field: 05_ETH_TYPE",
+ {
+ "description": "ethernet(ethertype=0x0800)/ipv4/tcp-->'eth_type=0x0800,actions=set_field:0x8848->eth_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34888
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34888)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet(ethertype=0x86dd)/ipv6/tcp-->'eth_type=0x86dd,actions=set_field:0x8848->eth_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34888
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34888)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet(ethertype=0x0806)/arp-->'eth_type=0x0806,actions=set_field:0x8848->eth_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34888
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34888)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/06_VLAN_VID.json b/ryu/tests/switch/of13/action/25_SET_FIELD/06_VLAN_VID.json
new file mode 100644
index 00000000..284c271d
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/06_VLAN_VID.json
@@ -0,0 +1,193 @@
+[
+ "action: set_field: 06_VLAN_VID",
+ {
+ "description": "ethernet/vlan(vid=100)/ipv4/tcp-->'vlan_vid=100,actions=set_field:203->vlan_vid,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"vlan_vid",
+ "value":4196
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"vlan_vid",
+ "value":4299
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=203, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan(vid=100)/ipv6/tcp-->'vlan_vid=100,actions=set_field:203->vlan_vid,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"vlan_vid",
+ "value":4196
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"vlan_vid",
+ "value":4299
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=203, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan(vid=100)/arp-->'vlan_vid=100,actions=set_field:203->vlan_vid,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"vlan_vid",
+ "value":4196
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"vlan_vid",
+ "value":4299
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=203, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/07_VLAN_PCP.json b/ryu/tests/switch/of13/action/25_SET_FIELD/07_VLAN_PCP.json
new file mode 100644
index 00000000..61709c66
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/07_VLAN_PCP.json
@@ -0,0 +1,211 @@
+[
+ "action: set_field: 07_VLAN_PCP",
+ {
+ "description": "ethernet/vlan(pcp=3)/ipv4/tcp-->'vlan_pcp=3,actions=set_field:5->vlan_pcp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"vlan_vid",
+ "value":4196
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"vlan_pcp",
+ "value":3
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"vlan_pcp",
+ "value":5
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=5, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan(pcp=3)/ipv6/tcp-->'vlan_pcp=3,actions=set_field:5->vlan_pcp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"vlan_vid",
+ "value":4196
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"vlan_pcp",
+ "value":3
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"vlan_pcp",
+ "value":5
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=5, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan(pcp=3)/arp-->'vlan_pcp=3,actions=set_field:5->vlan_pcp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"vlan_vid",
+ "value":4196
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"vlan_pcp",
+ "value":3
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"vlan_pcp",
+ "value":5
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=5, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/08_IP_DSCP_IPv4.json b/ryu/tests/switch/of13/action/25_SET_FIELD/08_IP_DSCP_IPv4.json
new file mode 100644
index 00000000..263af008
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/08_IP_DSCP_IPv4.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 08_IP_DSCP (IPv4)",
+ {
+ "description": "ethernet/ipv4(tos=32)/tcp-->'ip_dscp=8,actions=set_field:16->ip_dscp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=64, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4(tos=32)/tcp-->'ip_dscp=8,actions=set_field:16->ip_dscp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=64, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4(tos=32)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_dscp=8,actions=set_field:16->ip_dscp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=64, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4(tos=32)/tcp-->'ip_dscp=8,actions=set_field:16->ip_dscp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=64, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/08_IP_DSCP_IPv6.json b/ryu/tests/switch/of13/action/25_SET_FIELD/08_IP_DSCP_IPv6.json
new file mode 100644
index 00000000..bd3fd4b6
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/08_IP_DSCP_IPv6.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 08_IP_DSCP (IPv6)",
+ {
+ "description": "ethernet/ipv6(traffic_class=32)/tcp-->'ip_dscp=8,actions=set_field:16->ip_dscp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6(traffic_class=32)/tcp-->'ip_dscp=8,actions=set_field:16->ip_dscp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6(traffic_class=32)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_dscp=8,actions=set_field:16->ip_dscp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6(traffic_class=32)/tcp-->'ip_dscp=8,actions=set_field:16->ip_dscp,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/09_IP_ECN_IPv4.json b/ryu/tests/switch/of13/action/25_SET_FIELD/09_IP_ECN_IPv4.json
new file mode 100644
index 00000000..1760c3ac
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/09_IP_ECN_IPv4.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 09_IP_ECN (IPv4)",
+ {
+ "description": "ethernet/ipv4(tos=32)/tcp-->'ip_ecn=0,actions=set_field:1->ip_ecn,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=33, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4(tos=32)/tcp-->'ip_ecn=0,actions=set_field:1->ip_ecn,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=33, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4(tos=32)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_ecn=0,actions=set_field:1->ip_ecn,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=33, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4(tos=32)/tcp-->'ip_ecn=0,actions=set_field:1->ip_ecn,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=33, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/09_IP_ECN_IPv6.json b/ryu/tests/switch/of13/action/25_SET_FIELD/09_IP_ECN_IPv6.json
new file mode 100644
index 00000000..cba6f0d5
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/09_IP_ECN_IPv6.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 09_IP_ECN (IPv6)",
+ {
+ "description": "ethernet/ipv6(traffic_class=32)/tcp-->'ip_ecn=0,actions=set_field:1->ip_ecn,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=33)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6(traffic_class=32)/tcp-->'ip_ecn=0,actions=set_field:1->ip_ecn,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=33)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6(traffic_class=32)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_ecn=0,actions=set_field:1->ip_ecn,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=33)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6(traffic_class=32)/tcp-->'ip_ecn=0,actions=set_field:1->ip_ecn,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_ecn",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=33)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/10_IP_PROTO_IPv4.json b/ryu/tests/switch/of13/action/25_SET_FIELD/10_IP_PROTO_IPv4.json
new file mode 100644
index 00000000..2ea5fddf
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/10_IP_PROTO_IPv4.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 10_IP_PROTO (IPv4)",
+ {
+ "description": "ethernet/ipv4(proto=6)/tcp-->'ip_proto=6,actions=set_field:17->ip_proto,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4(proto=6)/tcp-->'ip_proto=6,actions=set_field:17->ip_proto,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4(proto=6)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_proto=6,actions=set_field:17->ip_proto,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4(proto=6)/tcp-->'ip_proto=6,actions=set_field:17->ip_proto,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/10_IP_PROTO_IPv6.json b/ryu/tests/switch/of13/action/25_SET_FIELD/10_IP_PROTO_IPv6.json
new file mode 100644
index 00000000..6f608b91
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/10_IP_PROTO_IPv6.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 10_IP_PROTO (IPv6)",
+ {
+ "description": "ethernet/ipv6(nxt=6)/tcp-->'ip_proto=6,actions=set_field:17->ip_proto,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6(nxt=6)/tcp-->'ip_proto=6,actions=set_field:17->ip_proto,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6(nxt=6)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_proto=6,actions=set_field:17->ip_proto,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6(nxt=6)/tcp-->'ip_proto=6,actions=set_field:17->ip_proto,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/11_IPV4_SRC.json b/ryu/tests/switch/of13/action/25_SET_FIELD/11_IPV4_SRC.json
new file mode 100644
index 00000000..dcc8cc4c
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/11_IPV4_SRC.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 11_IPV4_SRC",
+ {
+ "description": "ethernet/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=set_field:10.10.10.10->ipv4_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv4_src",
+ "value":"192.168.10.10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv4_src",
+ "value":"10.10.10.10"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='10.10.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=set_field:10.10.10.10->ipv4_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv4_src",
+ "value":"192.168.10.10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv4_src",
+ "value":"10.10.10.10"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='10.10.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4(src='192.168.10.10')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_src=192.168.10.10,actions=set_field:10.10.10.10->ipv4_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv4_src",
+ "value":"192.168.10.10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv4_src",
+ "value":"10.10.10.10"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='10.10.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=set_field:10.10.10.10->ipv4_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv4_src",
+ "value":"192.168.10.10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv4_src",
+ "value":"10.10.10.10"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='10.10.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/12_IPV4_DST.json b/ryu/tests/switch/of13/action/25_SET_FIELD/12_IPV4_DST.json
new file mode 100644
index 00000000..66ccece2
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/12_IPV4_DST.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 12_IPV4_DST",
+ {
+ "description": "ethernet/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.20.20,actions=set_field:10.10.20.20->ipv4_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv4_dst",
+ "value":"192.168.20.20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv4_dst",
+ "value":"10.10.20.20"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='10.10.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.20.20,actions=set_field:10.10.20.20->ipv4_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv4_dst",
+ "value":"192.168.20.20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv4_dst",
+ "value":"10.10.20.20"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='10.10.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_dst=192.168.20.20,actions=set_field:10.10.20.20->ipv4_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv4_dst",
+ "value":"192.168.20.20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv4_dst",
+ "value":"10.10.20.20"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='10.10.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.20.20,actions=set_field:10.10.20.20->ipv4_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv4_dst",
+ "value":"192.168.20.20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv4_dst",
+ "value":"10.10.20.20"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='10.10.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/13_TCP_SRC_IPv4.json b/ryu/tests/switch/of13/action/25_SET_FIELD/13_TCP_SRC_IPv4.json
new file mode 100644
index 00000000..a4ce6cf6
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/13_TCP_SRC_IPv4.json
@@ -0,0 +1,348 @@
+[
+ "action: set_field: 13_TCP_SRC (IPv4)",
+ {
+ "description": "ethernet/ipv4/tcp(src_port=11111)-->'tcp_src=11111,actions=set_field:12345->tcp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4/tcp(src_port=11111)-->'tcp_src=11111,actions=set_field:12345->tcp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4/tcp(src_port=11111)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,tcp_src=11111,actions=set_field:12345->tcp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4/tcp(src_port=11111)-->'tcp_src=11111,actions=set_field:12345->tcp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/13_TCP_SRC_IPv6.json b/ryu/tests/switch/of13/action/25_SET_FIELD/13_TCP_SRC_IPv6.json
new file mode 100644
index 00000000..29b4f88e
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/13_TCP_SRC_IPv6.json
@@ -0,0 +1,348 @@
+[
+ "action: set_field: 13_TCP_SRC (IPv6)",
+ {
+ "description": "ethernet/ipv6/tcp(src_port=11111)-->'tcp_src=11111,actions=set_field:12345->tcp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/tcp(src_port=11111)-->'tcp_src=11111,actions=set_field:12345->tcp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/tcp(src_port=11111)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,tcp_src=11111,actions=set_field:12345->tcp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/tcp(src_port=11111)-->'tcp_src=11111,actions=set_field:12345->tcp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/14_TCP_DST_IPv4.json b/ryu/tests/switch/of13/action/25_SET_FIELD/14_TCP_DST_IPv4.json
new file mode 100644
index 00000000..ab291ea9
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/14_TCP_DST_IPv4.json
@@ -0,0 +1,348 @@
+[
+ "action: set_field: 14_TCP_DST (IPv4)",
+ {
+ "description": "ethernet/ipv4/tcp(dst_port=2222)-->'tcp_dst=2222,actions=set_field:6789->tcp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=6789, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4/tcp(dst_port=2222)-->'tcp_dst=2222,actions=set_field:6789->tcp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=6789, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4/tcp(dst_port=2222)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,tcp_dst=2222,actions=set_field:6789->tcp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=6789, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4/tcp(dst_port=2222)-->'tcp_dst=2222,actions=set_field:6789->tcp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=6789, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/14_TCP_DST_IPv6.json b/ryu/tests/switch/of13/action/25_SET_FIELD/14_TCP_DST_IPv6.json
new file mode 100644
index 00000000..c04926ef
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/14_TCP_DST_IPv6.json
@@ -0,0 +1,348 @@
+[
+ "action: set_field: 14_TCP_DST (IPv6)",
+ {
+ "description": "ethernet/ipv6/tcp(dst_port=2222)-->'tcp_dst=2222,actions=set_field:6789->tcp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=6789, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/tcp(dst_port=2222)-->'tcp_dst=2222,actions=set_field:6789->tcp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=6789, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/tcp(dst_port=2222)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,tcp_dst=2222,actions=set_field:6789->tcp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=6789, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/tcp(dst_port=2222)-->'tcp_dst=2222,actions=set_field:6789->tcp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":6
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tcp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=6789, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/15_UDP_SRC_IPv4.json b/ryu/tests/switch/of13/action/25_SET_FIELD/15_UDP_SRC_IPv4.json
new file mode 100644
index 00000000..8da63f6d
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/15_UDP_SRC_IPv4.json
@@ -0,0 +1,348 @@
+[
+ "action: set_field: 15_UDP_SRC (IPv4)",
+ {
+ "description": "ethernet/ipv4/udp(src_port=11111)-->'udp_src=11111,actions=set_field:12345->udp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4/udp(src_port=11111)-->'udp_src=11111,actions=set_field:12345->udp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4/udp(src_port=11111)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,udp_src=11111,actions=set_field:12345->udp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4/udp(src_port=11111)-->'udp_src=11111,actions=set_field:12345->udp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/15_UDP_SRC_IPv6.json b/ryu/tests/switch/of13/action/25_SET_FIELD/15_UDP_SRC_IPv6.json
new file mode 100644
index 00000000..7f5a91bb
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/15_UDP_SRC_IPv6.json
@@ -0,0 +1,348 @@
+[
+ "action: set_field: 15_UDP_SRC (IPv6)",
+ {
+ "description": "ethernet/ipv6/udp(src_port=11111)-->'udp_src=11111,actions=set_field:12345->udp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/udp(src_port=11111)-->'udp_src=11111,actions=set_field:12345->udp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/udp(src_port=11111)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,udp_src=11111,actions=set_field:12345->udp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/udp(src_port=11111)-->'udp_src=11111,actions=set_field:12345->udp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=12345)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/16_UDP_DST_IPv4.json b/ryu/tests/switch/of13/action/25_SET_FIELD/16_UDP_DST_IPv4.json
new file mode 100644
index 00000000..73fc1c8c
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/16_UDP_DST_IPv4.json
@@ -0,0 +1,348 @@
+[
+ "action: set_field: 16_UDP_DST (IPv4)",
+ {
+ "description": "ethernet/ipv4/udp(dst_port=2222)-->'udp_dst=2222,actions=set_field:6789->udp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=6789, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4/udp(dst_port=2222)-->'udp_dst=2222,actions=set_field:6789->udp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=6789, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4/udp(dst_port=2222)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,udp_dst=2222,actions=set_field:6789->udp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=6789, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4/udp(dst_port=2222)-->'udp_dst=2222,actions=set_field:6789->udp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "udp(dst_port=6789, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/16_UDP_DST_IPv6.json b/ryu/tests/switch/of13/action/25_SET_FIELD/16_UDP_DST_IPv6.json
new file mode 100644
index 00000000..15404dc5
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/16_UDP_DST_IPv6.json
@@ -0,0 +1,348 @@
+[
+ "action: set_field: 16_UDP_DST (IPv6)",
+ {
+ "description": "ethernet/ipv6/udp(dst_port=2222)-->'udp_dst=2222,actions=set_field:6789->udp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=6789, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/udp(dst_port=2222)-->'udp_dst=2222,actions=set_field:6789->udp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=6789, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/udp(dst_port=2222)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,udp_dst=2222,actions=set_field:6789->udp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=6789, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/udp(dst_port=2222)-->'udp_dst=2222,actions=set_field:6789->udp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":17
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"udp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=2222, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)",
+ "udp(dst_port=6789, src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/17_SCTP_SRC_IPv4.json b/ryu/tests/switch/of13/action/25_SET_FIELD/17_SCTP_SRC_IPv4.json
new file mode 100644
index 00000000..4d3d17a1
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/17_SCTP_SRC_IPv4.json
@@ -0,0 +1,340 @@
+[
+ "action: set_field: 17_SCTP_SRC (IPv4)",
+ {
+ "description": "ethernet/ipv4/sctp(src_port=11111)-->'sctp_src=11111,actions=set_field:12345->sctp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=12345)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4/sctp(src_port=11111)-->'sctp_src=11111,actions=set_field:12345->sctp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=12345)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4/sctp(src_port=11111)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,sctp_src=11111,actions=set_field:12345->sctp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=12345)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4/sctp(src_port=11111)-->'sctp_src=11111,actions=set_field:12345->sctp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=12345)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/17_SCTP_SRC_IPv6.json b/ryu/tests/switch/of13/action/25_SET_FIELD/17_SCTP_SRC_IPv6.json
new file mode 100644
index 00000000..6e6d23f8
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/17_SCTP_SRC_IPv6.json
@@ -0,0 +1,340 @@
+[
+ "action: set_field: 17_SCTP_SRC (IPv6)",
+ {
+ "description": "ethernet/ipv6/udp(sctp_port=11111)-->'sctp_src=11111,actions=set_field:12345->sctp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=12345)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/sctp(src_port=11111)-->'sctp_src=11111,actions=set_field:12345->sctp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=12345)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/sctp(src_port=11111)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,sctp_src=11111,actions=set_field:12345->sctp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=12345)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/sctp(src_port=11111)-->'sctp_src=11111,actions=set_field:12345->sctp_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":11111
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_src",
+ "value":12345
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=12345)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/18_SCTP_DST_IPv4.json b/ryu/tests/switch/of13/action/25_SET_FIELD/18_SCTP_DST_IPv4.json
new file mode 100644
index 00000000..9172cbf2
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/18_SCTP_DST_IPv4.json
@@ -0,0 +1,340 @@
+[
+ "action: set_field: 18_SCTP_DST (IPv4)",
+ {
+ "description": "ethernet/ipv4/sctp(dst_port=2222)-->'sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=6789, src_port=11111)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4/sctp(dst_port=2222)-->'sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=6789, src_port=11111)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4/sctp(dst_port=2222)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=6789, src_port=11111)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4/sctp(dst_port=2222)-->'sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=6789, src_port=11111)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/18_SCTP_DST_IPv6.json b/ryu/tests/switch/of13/action/25_SET_FIELD/18_SCTP_DST_IPv6.json
new file mode 100644
index 00000000..576f59f2
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/18_SCTP_DST_IPv6.json
@@ -0,0 +1,340 @@
+[
+ "action: set_field: 18_SCTP_DST (IPv6)",
+ {
+ "description": "ethernet/ipv6/sctp(dst_port=2222)-->'sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=6789, src_port=11111)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/sctp(dst_port=2222)-->'sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=6789, src_port=11111)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/sctp(dst_port=2222)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=6789, src_port=11111)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/sctp(dst_port=2222)-->'sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":132
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":2222
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"sctp_dst",
+ "value":6789
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)",
+ "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=6789, src_port=11111)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/19_ICMPV4_TYPE.json b/ryu/tests/switch/of13/action/25_SET_FIELD/19_ICMPV4_TYPE.json
new file mode 100644
index 00000000..92dfd58b
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/19_ICMPV4_TYPE.json
@@ -0,0 +1,340 @@
+[
+ "action: set_field: 19_ICMPV4_TYPE",
+ {
+ "description": "ethernet/ipv4/icmp(type=8)-->'icmpv4_type=8,actions=set_field:0->icmpv4_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":1
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv4_type",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv4_type",
+ "value":0
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=0)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4/icmp(type=8)-->'icmpv4_type=8,actions=set_field:0->icmpv4_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":1
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv4_type",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv4_type",
+ "value":0
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=0)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4/icmp(type=8)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,icmpv4_type=8,actions=set_field:0->icmpv4_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":1
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv4_type",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv4_type",
+ "value":0
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=0)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4/icmp(type=8)-->'icmpv4_type=8,actions=set_field:0->icmpv4_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":1
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv4_type",
+ "value":8
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv4_type",
+ "value":0
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=0)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/20_ICMPV4_CODE.json b/ryu/tests/switch/of13/action/25_SET_FIELD/20_ICMPV4_CODE.json
new file mode 100644
index 00000000..2fbce18f
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/20_ICMPV4_CODE.json
@@ -0,0 +1,340 @@
+[
+ "action: set_field: 20_ICMPV4_CODE",
+ {
+ "description": "ethernet/ipv4/icmp(code=0)-->'icmpv4_code=0,actions=set_field:10->icmpv4_code,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":1
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv4_code",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv4_code",
+ "value":10
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=10,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv4/icmp(code=0)-->'icmpv4_code=0,actions=set_field:10->icmpv4_code,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":1
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv4_code",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv4_code",
+ "value":10
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=10,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv4/icmp(code=0)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,icmpv4_code=0,actions=set_field:10->icmpv4_code,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2048
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":1
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv4_code",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv4_code",
+ "value":10
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=10,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv4/icmp(code=0)-->'icmpv4_code=0,actions=set_field:10->icmpv4_code,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":1
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv4_code",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv4_code",
+ "value":10
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "icmp(code=10,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/21_ARP_OP.json b/ryu/tests/switch/of13/action/25_SET_FIELD/21_ARP_OP.json
new file mode 100644
index 00000000..3fa05a5c
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/21_ARP_OP.json
@@ -0,0 +1,316 @@
+[
+ "action: set_field: 21_ARP_OP",
+ {
+ "description": "ethernet/arp(opcode=1)-->'arp_op=1,actions=set_field:2->arp_op,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_op",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_op",
+ "value":2
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=2, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/arp(opcode=1)-->'arp_op=1,actions=set_field:2->arp_op,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_op",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_op",
+ "value":2
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=2, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/arp(opcode=1)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,arp_op=1,actions=set_field:2->arp_op,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2054
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_op",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_op",
+ "value":2
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=2, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/arp(opcode=1)-->'arp_op=1,actions=set_field:2->arp_op,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_op",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_op",
+ "value":2
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=2, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/22_ARP_SPA.json b/ryu/tests/switch/of13/action/25_SET_FIELD/22_ARP_SPA.json
new file mode 100644
index 00000000..9110842a
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/22_ARP_SPA.json
@@ -0,0 +1,316 @@
+[
+ "action: set_field: 22_ARP_SPA",
+ {
+ "description": "ethernet/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.10,actions=set_field:10.10.10.10->arp_spa,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_spa",
+ "value":"192.168.10.10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_spa",
+ "value":"10.10.10.10"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='10.10.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.10,actions=set_field:10.10.10.10->arp_spa,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_spa",
+ "value":"192.168.10.10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_spa",
+ "value":"10.10.10.10"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='10.10.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/arp(src_ip='192.168.10.10')-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,arp_spa=192.168.10.10,actions=set_field:10.10.10.10->arp_spa,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2054
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_spa",
+ "value":"192.168.10.10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_spa",
+ "value":"10.10.10.10"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='10.10.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.10,actions=set_field:10.10.10.10->arp_spa,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_spa",
+ "value":"192.168.10.10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_spa",
+ "value":"10.10.10.10"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='10.10.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/23_ARP_TPA.json b/ryu/tests/switch/of13/action/25_SET_FIELD/23_ARP_TPA.json
new file mode 100644
index 00000000..294dc709
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/23_ARP_TPA.json
@@ -0,0 +1,316 @@
+[
+ "action: set_field: 23_ARP_TPA",
+ {
+ "description": "ethernet/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.20.20,actions=set_field:10.10.20.20->arp_tpa,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_tpa",
+ "value":"192.168.20.20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_tpa",
+ "value":"10.10.20.20"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='10.10.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.20.20,actions=set_field:10.10.20.20->arp_tpa,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_tpa",
+ "value":"192.168.20.20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_tpa",
+ "value":"10.10.20.20"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='10.10.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/arp(dst_ip='192.168.20.20')-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,arp_tpa=192.168.20.20,actions=set_field:10.10.20.20->arp_tpa,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2054
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_tpa",
+ "value":"192.168.20.20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_tpa",
+ "value":"10.10.20.20"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='10.10.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.20.20,actions=set_field:10.10.20.20->arp_tpa,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_tpa",
+ "value":"192.168.20.20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_tpa",
+ "value":"10.10.20.20"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='10.10.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/24_ARP_SHA.json b/ryu/tests/switch/of13/action/25_SET_FIELD/24_ARP_SHA.json
new file mode 100644
index 00000000..ecf0c9b9
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/24_ARP_SHA.json
@@ -0,0 +1,316 @@
+[
+ "action: set_field: 24_ARP_SHA",
+ {
+ "description": "ethernet/arp(src_mac='11:11:11:11:11:11')-->'arp_sha=11:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->arp_sha,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_sha",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_sha",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='aa:aa:aa:aa:aa:aa')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/arp(src_mac='11:11:11:11:11:11')-->'arp_sha=11:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->arp_sha,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_sha",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_sha",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='aa:aa:aa:aa:aa:aa')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/arp(src_mac='11:11:11:11:11:11')-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,arp_sha=11:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->arp_sha,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2054
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_sha",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_sha",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='aa:aa:aa:aa:aa:aa')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/arp(src_mac='11:11:11:11:11:11')-->'arp_sha=11:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->arp_sha,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_sha",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_sha",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='aa:aa:aa:aa:aa:aa')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/25_ARP_THA.json b/ryu/tests/switch/of13/action/25_SET_FIELD/25_ARP_THA.json
new file mode 100644
index 00000000..0c9a8b92
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/25_ARP_THA.json
@@ -0,0 +1,316 @@
+[
+ "action: set_field: 25_ARP_THA",
+ {
+ "description": "ethernet/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:22:22:22:22,actions=set_field:bb:bb:bb:bb:bb:bb->arp_tha,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_tha",
+ "value":"22:22:22:22:22:22"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_tha",
+ "value":"bb:bb:bb:bb:bb:bb"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='bb:bb:bb:bb:bb:bb', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:22:22:22:22,actions=set_field:bb:bb:bb:bb:bb:bb->arp_tha,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_tha",
+ "value":"22:22:22:22:22:22"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_tha",
+ "value":"bb:bb:bb:bb:bb:bb"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='bb:bb:bb:bb:bb:bb', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/arp(dst_mac='22:22:22:22:22:22')-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,arp_tha=22:22:22:22:22:22,actions=set_field:bb:bb:bb:bb:bb:bb->arp_tha,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":2054
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_tha",
+ "value":"22:22:22:22:22:22"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_tha",
+ "value":"bb:bb:bb:bb:bb:bb"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='bb:bb:bb:bb:bb:bb', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:22:22:22:22,actions=set_field:bb:bb:bb:bb:bb:bb->arp_tha,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2054
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"arp_tha",
+ "value":"22:22:22:22:22:22"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"arp_tha",
+ "value":"bb:bb:bb:bb:bb:bb"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='bb:bb:bb:bb:bb:bb', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/26_IPV6_SRC.json b/ryu/tests/switch/of13/action/25_SET_FIELD/26_IPV6_SRC.json
new file mode 100644
index 00000000..e914ce13
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/26_IPV6_SRC.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 26_IPV6_SRC",
+ {
+ "description": "ethernet/ipv6(src='10::10')/tcp-->'ipv6_src=10::10,actions=set_field:a0::a0->ipv6_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_src",
+ "value":"10::10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_src",
+ "value":"a0::a0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='a0::a0', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6(src='10::10')/tcp-->'ipv6_src=10::10,actions=set_field:a0::a0->ipv6_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_src",
+ "value":"10::10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_src",
+ "value":"a0::a0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='a0::a0', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6(src='10::10')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_src=10::10,actions=set_field:a0::a0->ipv6_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_src",
+ "value":"10::10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_src",
+ "value":"a0::a0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='a0::a0', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6(src='10::10')/tcp-->'ipv6_src=10::10,actions=set_field:a0::a0->ipv6_src,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_src",
+ "value":"10::10"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_src",
+ "value":"a0::a0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='a0::a0', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/27_IPV6_DST.json b/ryu/tests/switch/of13/action/25_SET_FIELD/27_IPV6_DST.json
new file mode 100644
index 00000000..e3fad6bc
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/27_IPV6_DST.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 27_IPV6_DST",
+ {
+ "description": "ethernet/ipv6(dst='20::20')/tcp-->'ipv6_dst=20::20,actions=set_field:b0::b0->ipv6_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_dst",
+ "value":"20::20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_dst",
+ "value":"b0::b0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='b0::b0', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6(dst='20::20')/tcp-->'ipv6_dst=20::20,actions=set_field:b0::b0->ipv6_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_dst",
+ "value":"20::20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_dst",
+ "value":"b0::b0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='b0::b0', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6(dst='20::20')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_dst=20::20,actions=set_field:b0::b0->ipv6_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_dst",
+ "value":"20::20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_dst",
+ "value":"b0::b0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='b0::b0', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6(dst='20::20')/tcp--->'ipv6_dst=20::20,actions=set_field:b0::b0->ipv6_dst,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_dst",
+ "value":"20::20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_dst",
+ "value":"b0::b0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='b0::b0', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/28_IPV6_FLABEL.json b/ryu/tests/switch/of13/action/25_SET_FIELD/28_IPV6_FLABEL.json
new file mode 100644
index 00000000..2b3a23ec
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/28_IPV6_FLABEL.json
@@ -0,0 +1,324 @@
+[
+ "action: set_field: 28_IPV6_FLABEL",
+ {
+ "description": "ethernet/ipv6(flow_label=100)/tcp-->'ipv6_flabel=100,actions=set_field:203->ipv6_flabel,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_flabel",
+ "value":100
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_flabel",
+ "value":203
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=203, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6(flow_label=100)/tcp-->'ipv6_flabel=100,actions=set_field:203->ipv6_flabel,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_flabel",
+ "value":100
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_flabel",
+ "value":203
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=203, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6(flow_label=100)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_flabel=100,actions=set_field:203->ipv6_flabel,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_flabel",
+ "value":100
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_flabel",
+ "value":203
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=203, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6(flow_label=100)/tcp-->'ipv6_flabel=100,actions=set_field:203->ipv6_flabel,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_flabel",
+ "value":100
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_flabel",
+ "value":203
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=203, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/29_ICMPV6_TYPE.json b/ryu/tests/switch/of13/action/25_SET_FIELD/29_ICMPV6_TYPE.json
new file mode 100644
index 00000000..93202201
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/29_ICMPV6_TYPE.json
@@ -0,0 +1,340 @@
+[
+ "action: set_field: 29_ICMPV6_TYPE",
+ {
+ "description": "ethernet/ipv6/icmpv6(type=128)-->'icmpv6_type=128,actions=set_field:135->icmpv6_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":128
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=135)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/icmpv6(type=128)-->'icmpv6_type=128,actions=set_field:135->icmpv6_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":128
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=135)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/icmpv6(type=128)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,icmpv6_type=128,actions=set_field:135->icmpv6_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":128
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=135)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/icmpv6(type=128)-->'icmpv6_type=128,actions=set_field:135->icmpv6_type,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":128
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=135)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/30_ICMPV6_CODE.json b/ryu/tests/switch/of13/action/25_SET_FIELD/30_ICMPV6_CODE.json
new file mode 100644
index 00000000..e367f1da
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/30_ICMPV6_CODE.json
@@ -0,0 +1,340 @@
+[
+ "action: set_field: 30_ICMPV6_CODE",
+ {
+ "description": "ethernet/ipv6/icmpv6(code=0)-->'icmpv6_code=0,actions=set_field:1->icmpv6_code,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_code",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv6_code",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=1,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/icmpv6(code=0)-->'icmpv6_code=0,actions=set_field:1->icmpv6_code,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_code",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv6_code",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=1,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/icmpv6(code=0)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,icmpv6_code=0,actions=set_field:1->icmpv6_code,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_code",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv6_code",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=1,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/icmpv6(code=0)-->'icmpv6_code=0,actions=set_field:1->icmpv6_code,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_code",
+ "value":0
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"icmpv6_code",
+ "value":1
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=1,data=echo(data='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&\\'()*+,-./0123'),type_=128)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/31_IPV6_ND_TARGET.json b/ryu/tests/switch/of13/action/25_SET_FIELD/31_IPV6_ND_TARGET.json
new file mode 100644
index 00000000..848a5329
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/31_IPV6_ND_TARGET.json
@@ -0,0 +1,364 @@
+[
+ "action: set_field: 31_IPV6_ND_TARGET",
+ {
+ "description": "ethernet/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'ipv6_nd_target=20::20,actions=set_field:a0::a0->ipv6_nd_target,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_target",
+ "value":"20::20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_target",
+ "value":"a0::a0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=135)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='a0::a0'),type_=135)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'ipv6_nd_target=20::20,actions=set_field:a0::a0->ipv6_nd_target,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_target",
+ "value":"20::20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_target",
+ "value":"a0::a0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=135)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='a0::a0'),type_=135)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_target=20::20,actions=set_field:a0::a0->ipv6_nd_target,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_target",
+ "value":"20::20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_target",
+ "value":"a0::a0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=135)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='a0::a0'),type_=135)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'ipv6_nd_target=20::20,actions=set_field:a0::a0->ipv6_nd_target,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_target",
+ "value":"20::20"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_target",
+ "value":"a0::a0"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=135)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='a0::a0'),type_=135)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/32_IPV6_ND_SLL.json b/ryu/tests/switch/of13/action/25_SET_FIELD/32_IPV6_ND_SLL.json
new file mode 100644
index 00000000..ba4e4332
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/32_IPV6_ND_SLL.json
@@ -0,0 +1,364 @@
+[
+ "action: set_field: 32_IPV6_ND_SLL",
+ {
+ "description": "ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11')))-->'ipv6_nd_sll=11:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->ipv6_nd_sll,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_sll",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_sll",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=135)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='20::20'),type_=135)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11')))-->'ipv6_nd_sll=11:11:11:111:11,actions=set_field:aa:aa:aa:aa:aa:aa->ipv6_nd_sll,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_sll",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_sll",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=135)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='20::20'),type_=135)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11')))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_sll=11:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->ipv6_nd_sll,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_sll",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_sll",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=135)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='20::20'),type_=135)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11')))-->'ipv6_nd_sll=11:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->ipv6_nd_sll,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":135
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_sll",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_sll",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=135)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='20::20'),type_=135)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/33_IPV6_ND_TLL.json b/ryu/tests/switch/of13/action/25_SET_FIELD/33_IPV6_ND_TLL.json
new file mode 100644
index 00000000..7516126e
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/33_IPV6_ND_TLL.json
@@ -0,0 +1,364 @@
+[
+ "action: set_field: 33_IPV6_ND_TLL",
+ {
+ "description": "ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='11:11:11:11:11:11')))-->'ipv6_nd_tll=11:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->ipv6_nd_tll,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":136
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_tll",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_tll",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=136)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa'),dst='20::20'),type_=136)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='11:11:11:11:11:11')))-->'ipv6_nd_tll=11:11:11:111:11,actions=set_field:aa:aa:aa:aa:aa:aa->ipv6_nd_tll,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":136
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_tll",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_tll",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=136)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=33024)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa'),dst='20::20'),type_=136)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='11:11:11:11:11:11')))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_tll=11:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->ipv6_nd_tll,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionPopMpls":{
+ "ethertype":34525
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":136
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_tll",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_tll",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=136)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa'),dst='20::20'),type_=136)"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag/ethernet/svlan/vlan/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='11:11:11:11:11:11')))-->'ipv6_nd_tll=11:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->ipv6_nd_tll,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_proto",
+ "value":58
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"icmpv6_type",
+ "value":136
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ipv6_nd_tll",
+ "value":"11:11:11:11:11:11"
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"ipv6_nd_tll",
+ "value":"aa:aa:aa:aa:aa:aa"
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='11:11:11:11:11:11'),dst='20::20'),type_=136)"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)",
+ "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa'),dst='20::20'),type_=136)"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/34_MPLS_LABEL.json b/ryu/tests/switch/of13/action/25_SET_FIELD/34_MPLS_LABEL.json
new file mode 100644
index 00000000..d4cd3011
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/34_MPLS_LABEL.json
@@ -0,0 +1,211 @@
+[
+ "action: set_field: 34_MPLS_LABEL",
+ {
+ "description": "ethernet/mpls(label=100)/ipv4/tcp-->'mpls_label=100,actions=set_field:203->mpls_label,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"mpls_label",
+ "value":100
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"mpls_label",
+ "value":203
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=203, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls(label=100)/ipv6/tcp-->'mpls_label=100,actions=set_field:203->mpls_label,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"mpls_label",
+ "value":100
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"mpls_label",
+ "value":203
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=203, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls(label=100)/arp-->'mpls_label=100,actions=set_field:203->mpls_label,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"mpls_label",
+ "value":100
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"mpls_label",
+ "value":203
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=203, exp=3, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/35_MPLS_TC.json b/ryu/tests/switch/of13/action/25_SET_FIELD/35_MPLS_TC.json
new file mode 100644
index 00000000..a2ac51a1
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/35_MPLS_TC.json
@@ -0,0 +1,211 @@
+[
+ "action: set_field: 35_MPLS_TC",
+ {
+ "description": "ethernet/mpls(exp=3)/ipv4/tcp-->'mpls_tc=3,actions=set_field:5->mpls_tc,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"mpls_tc",
+ "value":3
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"mpls_tc",
+ "value":5
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=5, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls(exp=3)/ipv6/tcp-->'mpls_tc=3,actions=set_field:5->mpls_tc,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"mpls_tc",
+ "value":3
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"mpls_tc",
+ "value":5
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=5, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls(exp=3)/arp-->'mpls_tc=3,actions=set_field:5->mpls_tc,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"mpls_tc",
+ "value":3
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"mpls_tc",
+ "value":5
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=5, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/36_MPLS_BOS.json b/ryu/tests/switch/of13/action/25_SET_FIELD/36_MPLS_BOS.json
new file mode 100644
index 00000000..791bc31d
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/36_MPLS_BOS.json
@@ -0,0 +1,211 @@
+[
+ "action: set_field: 36_MPLS_BOS",
+ {
+ "description": "ethernet/mpls(bsb=1)/ipv4/tcp-->'mpls_bos=1,actions=set_field:0->mpls_bos,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"mpls_bos",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"mpls_bos",
+ "value":0
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=0, label=100, exp=3, ttl=64)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls(bsb=1)/ipv6/tcp-->'mpls_bos=1,actions=set_field:0->mpls_bos,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"mpls_bos",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"mpls_bos",
+ "value":0
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=0, label=100, exp=3, ttl=64)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/mpls(bsb=1)/arp-->'mpls_bos=1,actions=set_field:0->mpls_bos,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34887
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"mpls_bos",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"mpls_bos",
+ "value":0
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=1, label=100, exp=3, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34887)",
+ "mpls(bsb=0, label=100, exp=3, ttl=64)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/37_PBB_ISID.json b/ryu/tests/switch/of13/action/25_SET_FIELD/37_PBB_ISID.json
new file mode 100644
index 00000000..31a9d09a
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/37_PBB_ISID.json
@@ -0,0 +1,235 @@
+[
+ "action: set_field: 37_PBB_ISID",
+ {
+ "description": "ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/ipv4/tcp-->'pbb_itag=100,actions=set_field:203->pbb_itag,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":35047
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"pbb_isid",
+ "value":100
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"pbb_isid",
+ "value":203
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=203)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/ipv6/tcp-->'pbb_itag=100,actions=set_field:203->pbb_itag,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":35047
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"pbb_isid",
+ "value":100
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"pbb_isid",
+ "value":203
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=203)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/arp-->'pbb_itag=100,actions=set_field:203->pbb_itag,output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":35047
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"pbb_isid",
+ "value":100
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"pbb_isid",
+ "value":203
+ }
+ }
+ }
+ },
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=100)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=35047, vid=10)",
+ "itag(sid=203)",
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34984)",
+ "svlan(ethertype=33024, vid=10)",
+ "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of13/action/25_SET_FIELD/38_TUNNEL_ID.json b/ryu/tests/switch/of13/action/25_SET_FIELD/38_TUNNEL_ID.json
new file mode 100644
index 00000000..a0ee50bc
--- /dev/null
+++ b/ryu/tests/switch/of13/action/25_SET_FIELD/38_TUNNEL_ID.json
@@ -0,0 +1,280 @@
+[
+ "action: set_field: 38_TUNNEL_ID",
+ {
+ "description": "ethernet/ipv4/tcp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tunnel_id",
+ "value":12345
+ }
+ }
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"tunnel_id",
+ "value":12345
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2048)",
+ "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/ipv6/tcp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tunnel_id",
+ "value":12345
+ }
+ }
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"tunnel_id",
+ "value":12345
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=34525)",
+ "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
+ "tcp(dst_port=2222, option='\\x00\\x00\\x00\\x00', src_port=11111)",
+ "'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
+ ]
+ }
+ ]
+ },
+ {
+ "description": "ethernet/arp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:2'",
+ "prerequisite":[
+ {
+ "OFPFlowMod":{
+ "table_id":0,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionSetField":{
+ "field":{
+ "OXMTlv":{
+ "field":"tunnel_id",
+ "value":12345
+ }
+ }
+ }
+ }
+ ],
+ "type":4
+ }
+ },
+ {
+ "OFPInstructionGotoTable":{
+ "table_id":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "table_id":1,
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"tunnel_id",
+ "value":12345
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ],
+ "egress":[
+ "ethernet(dst='22:22:22:22:22:22', src='11:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='11:11:11:11:11:11')",
+ "'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'"
+ ]
+ }
+ ]
+ }
+]