From d4b8bd609fda6ceb45d4dc9b9e0f48f3b1118ed2 Mon Sep 17 00:00:00 2001 From: Shinpei Muraoka Date: Mon, 22 Aug 2016 10:02:30 +0900 Subject: tests: Add tests for specifying Packet library for OFPPacketOut.data Signed-off-by: Shinpei Muraoka Signed-off-by: FUJITA Tomonori --- ...roto-OFP10-ofp_packet_out_packet_library.packet | Bin 0 -> 122 bytes ...roto-OFP12-ofp_packet_out_packet_library.packet | Bin 0 -> 138 bytes ...roto-OFP13-ofp_packet_out_packet_library.packet | Bin 0 -> 138 bytes ...roto-OFP14-ofp_packet_out_packet_library.packet | Bin 0 -> 138 bytes ...OFP10-ofp_packet_out_packet_library.packet.json | 58 ++++++++++++++++++++ ...OFP12-ofp_packet_out_packet_library.packet.json | 61 +++++++++++++++++++++ ...OFP13-ofp_packet_out_packet_library.packet.json | 61 +++++++++++++++++++++ ...OFP14-ofp_packet_out_packet_library.packet.json | 61 +++++++++++++++++++++ 8 files changed, 241 insertions(+) create mode 100644 ryu/tests/packet_data/of10/libofproto-OFP10-ofp_packet_out_packet_library.packet create mode 100644 ryu/tests/packet_data/of12/libofproto-OFP12-ofp_packet_out_packet_library.packet create mode 100644 ryu/tests/packet_data/of13/libofproto-OFP13-ofp_packet_out_packet_library.packet create mode 100644 ryu/tests/packet_data/of14/libofproto-OFP14-ofp_packet_out_packet_library.packet create mode 100644 ryu/tests/unit/ofproto/json/of10/libofproto-OFP10-ofp_packet_out_packet_library.packet.json create mode 100644 ryu/tests/unit/ofproto/json/of12/libofproto-OFP12-ofp_packet_out_packet_library.packet.json create mode 100644 ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-ofp_packet_out_packet_library.packet.json create mode 100644 ryu/tests/unit/ofproto/json/of14/libofproto-OFP14-ofp_packet_out_packet_library.packet.json diff --git a/ryu/tests/packet_data/of10/libofproto-OFP10-ofp_packet_out_packet_library.packet b/ryu/tests/packet_data/of10/libofproto-OFP10-ofp_packet_out_packet_library.packet new file mode 100644 index 00000000..8093e84c Binary files /dev/null and b/ryu/tests/packet_data/of10/libofproto-OFP10-ofp_packet_out_packet_library.packet differ diff --git a/ryu/tests/packet_data/of12/libofproto-OFP12-ofp_packet_out_packet_library.packet b/ryu/tests/packet_data/of12/libofproto-OFP12-ofp_packet_out_packet_library.packet new file mode 100644 index 00000000..a9ebe1ef Binary files /dev/null and b/ryu/tests/packet_data/of12/libofproto-OFP12-ofp_packet_out_packet_library.packet differ diff --git a/ryu/tests/packet_data/of13/libofproto-OFP13-ofp_packet_out_packet_library.packet b/ryu/tests/packet_data/of13/libofproto-OFP13-ofp_packet_out_packet_library.packet new file mode 100644 index 00000000..cf6689f8 Binary files /dev/null and b/ryu/tests/packet_data/of13/libofproto-OFP13-ofp_packet_out_packet_library.packet differ diff --git a/ryu/tests/packet_data/of14/libofproto-OFP14-ofp_packet_out_packet_library.packet b/ryu/tests/packet_data/of14/libofproto-OFP14-ofp_packet_out_packet_library.packet new file mode 100644 index 00000000..207712f1 Binary files /dev/null and b/ryu/tests/packet_data/of14/libofproto-OFP14-ofp_packet_out_packet_library.packet differ diff --git a/ryu/tests/unit/ofproto/json/of10/libofproto-OFP10-ofp_packet_out_packet_library.packet.json b/ryu/tests/unit/ofproto/json/of10/libofproto-OFP10-ofp_packet_out_packet_library.packet.json new file mode 100644 index 00000000..f8e38d71 --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of10/libofproto-OFP10-ofp_packet_out_packet_library.packet.json @@ -0,0 +1,58 @@ +{ + "OFPPacketOut": { + "actions": [ + { + "OFPActionOutput": { + "max_len": 65535, + "port": 65532 + } + } + ], + "buffer_id": 4294967295, + "data": { + "Packet": { + "protocols": [ + { + "ethernet": { + "dst": "f2:0b:a4:d0:3f:70", + "ethertype": 2048, + "src": "f2:0b:a4:7d:f8:ea" + } + }, + { + "ipv4": { + "csum": 44939, + "dst": "10.0.0.2", + "flags": 0, + "header_length": 5, + "identification": 63514, + "offset": 0, + "option": null, + "proto": 1, + "src": "10.0.0.1", + "tos": 0, + "total_length": 84, + "ttl": 255, + "version": 4 + } + }, + { + "icmp": { + "code": 0, + "csum": 520, + "data": { + "echo": { + "data": "MdYCAAAAAACrjS0xAAAAABAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vAAAAAAAAAAA=", + "id": 63328, + "seq": 0 + } + }, + "type": 8 + } + } + ] + } + }, + "in_port": 65533 + } +} diff --git a/ryu/tests/unit/ofproto/json/of12/libofproto-OFP12-ofp_packet_out_packet_library.packet.json b/ryu/tests/unit/ofproto/json/of12/libofproto-OFP12-ofp_packet_out_packet_library.packet.json new file mode 100644 index 00000000..b859650d --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of12/libofproto-OFP12-ofp_packet_out_packet_library.packet.json @@ -0,0 +1,61 @@ +{ + "OFPPacketOut": { + "actions": [ + { + "OFPActionOutput": { + "len": 16, + "max_len": 65535, + "port": 4294967292, + "type": 0 + } + } + ], + "actions_len": 16, + "buffer_id": 4294967295, + "data": { + "Packet": { + "protocols": [ + { + "ethernet": { + "dst": "f2:0b:a4:d0:3f:70", + "ethertype": 2048, + "src": "f2:0b:a4:7d:f8:ea" + } + }, + { + "ipv4": { + "csum": 44939, + "dst": "10.0.0.2", + "flags": 0, + "header_length": 5, + "identification": 63514, + "offset": 0, + "option": null, + "proto": 1, + "src": "10.0.0.1", + "tos": 0, + "total_length": 84, + "ttl": 255, + "version": 4 + } + }, + { + "icmp": { + "code": 0, + "csum": 520, + "data": { + "echo": { + "data": "MdYCAAAAAACrjS0xAAAAABAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vAAAAAAAAAAA=", + "id": 63328, + "seq": 0 + } + }, + "type": 8 + } + } + ] + } + }, + "in_port": 4294967293 + } +} diff --git a/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-ofp_packet_out_packet_library.packet.json b/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-ofp_packet_out_packet_library.packet.json new file mode 100644 index 00000000..4e8ad336 --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-ofp_packet_out_packet_library.packet.json @@ -0,0 +1,61 @@ +{ + "OFPPacketOut": { + "actions": [ + { + "OFPActionOutput": { + "len": 16, + "max_len": 65535, + "port": 4294967292, + "type": 0 + } + } + ], + "actions_len": 16, + "buffer_id": 4294967295, + "data": { + "Packet": { + "protocols": [ + { + "ethernet": { + "dst": "f2:0b:a4:d0:3f:70", + "ethertype": 2048, + "src": "f2:0b:a4:7d:f8:ea" + } + }, + { + "ipv4": { + "csum": 44939, + "dst": "10.0.0.2", + "flags": 0, + "header_length": 5, + "identification": 63514, + "offset": 0, + "option": null, + "proto": 1, + "src": "10.0.0.1", + "tos": 0, + "total_length": 84, + "ttl": 255, + "version": 4 + } + }, + { + "icmp": { + "code": 0, + "csum": 520, + "data": { + "echo": { + "data": "MdYCAAAAAACrjS0xAAAAABAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vAAAAAAAAAAA=", + "id": 63328, + "seq": 0 + } + }, + "type": 8 + } + } + ] + } + }, + "in_port": 4294967293 + } +} diff --git a/ryu/tests/unit/ofproto/json/of14/libofproto-OFP14-ofp_packet_out_packet_library.packet.json b/ryu/tests/unit/ofproto/json/of14/libofproto-OFP14-ofp_packet_out_packet_library.packet.json new file mode 100644 index 00000000..b859650d --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of14/libofproto-OFP14-ofp_packet_out_packet_library.packet.json @@ -0,0 +1,61 @@ +{ + "OFPPacketOut": { + "actions": [ + { + "OFPActionOutput": { + "len": 16, + "max_len": 65535, + "port": 4294967292, + "type": 0 + } + } + ], + "actions_len": 16, + "buffer_id": 4294967295, + "data": { + "Packet": { + "protocols": [ + { + "ethernet": { + "dst": "f2:0b:a4:d0:3f:70", + "ethertype": 2048, + "src": "f2:0b:a4:7d:f8:ea" + } + }, + { + "ipv4": { + "csum": 44939, + "dst": "10.0.0.2", + "flags": 0, + "header_length": 5, + "identification": 63514, + "offset": 0, + "option": null, + "proto": 1, + "src": "10.0.0.1", + "tos": 0, + "total_length": 84, + "ttl": 255, + "version": 4 + } + }, + { + "icmp": { + "code": 0, + "csum": 520, + "data": { + "echo": { + "data": "MdYCAAAAAACrjS0xAAAAABAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vAAAAAAAAAAA=", + "id": 63328, + "seq": 0 + } + }, + "type": 8 + } + } + ] + } + }, + "in_port": 4294967293 + } +} -- cgit v1.2.3