pyloxi: move remaining basic serialization tests to datafiles
diff --git a/test_data/of13/TODO b/test_data/of13/TODO
new file mode 100644
index 0000000..a232b54
--- /dev/null
+++ b/test_data/of13/TODO
@@ -0,0 +1,52 @@
+# This list is not complete.
+
+flow_modify
+flow_modify_strict
+flow_delete
+flow_delete_strict
+
+port_mod
+table_mod
+
+desc_stats_request
+desc_stats_reply
+flow_stats_request
+flow_stats_reply
+aggregate_stats_request
+aggregate_stats_reply
+port_stats_request
+port_stats_reply
+queue_stats_request
+queue_stats_reply
+group_stats_request
+group_desc_stats_request
+group_features_stats_request
+group_features_stats_reply
+meter_stats_request
+meter_config_stats_request
+meter_features_stats_request
+table_features_stats_request
+table_features_stats_reply
+port_desc_stats_request
+port_desc_stats_reply
+
+barrier_request
+barrier_reply
+queue_get_config_request
+queue_get_config_reply
+role_request
+role_reply
+get_async_request
+get_async_reply
+set_async
+meter_mod
+
+# TODO test experimenter messages
+
+instruction_write_metadata
+instruction_write_actions
+instruction_apply_actions
+instruction_clear_actions
+instruction_meter
+
+# TODO test experimenter instructions
diff --git a/test_data/of13/echo_reply.data b/test_data/of13/echo_reply.data
new file mode 100644
index 0000000..4d9156d
--- /dev/null
+++ b/test_data/of13/echo_reply.data
@@ -0,0 +1,9 @@
+-- binary
+04 03 # version, type
+00 0b # length
+12 34 56 78 # xid
+61 62 63 # data
+-- python
+ofp.message.echo_reply(
+    xid=0x12345678,
+    data="abc")
diff --git a/test_data/of13/echo_request.data b/test_data/of13/echo_request.data
new file mode 100644
index 0000000..4cedbc7
--- /dev/null
+++ b/test_data/of13/echo_request.data
@@ -0,0 +1,9 @@
+-- binary
+04 02 # version, type
+00 0b # length
+12 34 56 78 # xid
+61 62 63 # data
+-- python
+ofp.message.echo_request(
+    xid=0x12345678,
+    data="abc")
diff --git a/test_data/of13/error.data b/test_data/of13/error.data
new file mode 100644
index 0000000..fcb0c1c
--- /dev/null
+++ b/test_data/of13/error.data
@@ -0,0 +1,13 @@
+-- binary
+04 01 # version / type
+00 0f # length
+12 34 56 78 # xid
+00 04 # err_type
+00 08 # code
+61 62 63 # data
+-- python
+ofp.message.error_msg(
+    xid=0x12345678,
+    err_type=ofp.OFPET_BAD_MATCH,
+    code=ofp.OFPBMC_BAD_MASK,
+    data="abc")
diff --git a/test_data/of13/features_reply.data b/test_data/of13/features_reply.data
new file mode 100644
index 0000000..6daf046
--- /dev/null
+++ b/test_data/of13/features_reply.data
@@ -0,0 +1,20 @@
+-- binary
+04 06 # version, type
+00 20 # length
+12 34 56 78 # xid
+fe dc ba 98 76 54 32 10 # datapath_id
+00 00 00 40 # n_buffers
+c8 # n_tables
+05 # auxiliary_id
+00 00 # pad
+00 00 01 01 # capabilities
+00 00 00 00 # reserved
+-- python
+ofp.message.features_reply(
+    xid=0x12345678,
+    datapath_id=0xFEDCBA9876543210,
+    n_buffers=64,
+    n_tables=200,
+    auxiliary_id=5,
+    capabilities=ofp.OFPC_FLOW_STATS|ofp.OFPC_PORT_BLOCKED,
+    reserved=0)
diff --git a/test_data/of13/features_request.data b/test_data/of13/features_request.data
new file mode 100644
index 0000000..2f85f16
--- /dev/null
+++ b/test_data/of13/features_request.data
@@ -0,0 +1,6 @@
+-- binary
+04 05 # version, type
+00 08 # length
+12 34 56 78 # xid
+-- python
+ofp.message.features_request(xid=0x12345678)
diff --git a/test_data/of13/flow_add.data b/test_data/of13/flow_add.data
new file mode 100644
index 0000000..c66518f
--- /dev/null
+++ b/test_data/of13/flow_add.data
@@ -0,0 +1,52 @@
+-- binary
+04 0e # version, type
+00 48 # length
+12 34 56 78 # xid
+
+fe dc ba 98 76 54 32 10 # cookie
+
+ff 00 ff 00 ff 00 ff 00 # cookie_mask
+
+03 # table_id
+00 # _command
+00 05 # idle_timeout
+00 0a # hard_timeout
+17 70 # priority
+
+00 00 00 32 # buffer_id
+00 00 00 06 # out_port
+
+00 00 00 08 # out_group
+00 00 # flags
+00 00 # pad
+
+00 01 # match.type
+00 04 # match.length
+00 00 00 00 # pad
+
+00 01 # instructions[0].type
+00 08 # instructions[0].length
+04 # instructions[0].table_id
+00 00 00 # pad
+
+00 01 # instructions[1].type
+00 08 # instructions[1].length
+07 # instructions[1].table_id
+00 00 00 # pad
+-- python
+ofp.message.flow_add(
+    xid=0x12345678,
+    cookie=0xFEDCBA9876543210,
+    cookie_mask=0xFF00FF00FF00FF00,
+    table_id=3,
+    idle_timeout=5,
+    hard_timeout=10,
+    priority=6000,
+    buffer_id=50,
+    out_port=6,
+    out_group=8,
+    flags=0,
+    match=ofp.match(oxm_list=[]),
+    instructions=[
+        ofp.instruction.goto_table(table_id=4),
+        ofp.instruction.goto_table(table_id=7)])
diff --git a/test_data/of13/flow_removed.data b/test_data/of13/flow_removed.data
new file mode 100644
index 0000000..0a24993
--- /dev/null
+++ b/test_data/of13/flow_removed.data
@@ -0,0 +1,38 @@
+-- binary
+04 0b # version, type
+00 48 # length
+12 34 56 78 # xid
+fe dc ba 98 76 54 32 10 # cookie
+42 68 # priority
+02 # reason
+14 # table_id
+00 00 00 0a # duration_sec
+00 00 03 e8 # duration_nsec
+00 05 # idle_timeout
+00 1e # hard_timeout
+00 00 00 00 00 00 00 01 # packet_count
+00 00 00 00 00 00 00 02 # byte_count
+00 01 # match.type
+00 16 # match.length
+80 00 2A 02 # match.oxm_list[0].type_len
+00 01 # match.oxm_list[0].value
+80 00 01 08 # match.oxm_list[1].type_len
+00 00 00 04 # match.oxm_list[1].value
+00 00 00 05 # match.oxm_list[1].mask
+00 00 # match.pad
+-- python
+ofp.message.flow_removed(
+    xid=0x12345678,
+    cookie=0xFEDCBA9876543210,
+    priority=17000,
+    reason=ofp.OFPRR_DELETE,
+    table_id=20,
+    duration_sec=10,
+    duration_nsec=1000,
+    idle_timeout=5,
+    hard_timeout=30,
+    packet_count=1,
+    byte_count=2,
+    match=ofp.match(oxm_list=[
+        ofp.oxm.arp_op(value=1),
+        ofp.oxm.in_port_masked(value=4, value_mask=5)]))
diff --git a/test_data/of13/get_config_reply.data b/test_data/of13/get_config_reply.data
new file mode 100644
index 0000000..111ac61
--- /dev/null
+++ b/test_data/of13/get_config_reply.data
@@ -0,0 +1,11 @@
+-- binary
+04 08 # version, type
+00 0c # length
+12 34 56 78 # xid
+00 02 # flags
+ff ff # miss_send_len
+-- python
+ofp.message.get_config_reply(
+    xid=0x12345678,
+    flags=ofp.OFPC_FRAG_REASM,
+    miss_send_len=0xffff)
diff --git a/test_data/of13/get_config_request.data b/test_data/of13/get_config_request.data
new file mode 100644
index 0000000..8361a6b
--- /dev/null
+++ b/test_data/of13/get_config_request.data
@@ -0,0 +1,6 @@
+-- binary
+04 07 # version, type
+00 08 # length
+12 34 56 78 # xid
+-- python
+ofp.message.get_config_request(xid=0x12345678)
diff --git a/test_data/of13/group_desc_stats_reply.data b/test_data/of13/group_desc_stats_reply.data
new file mode 100644
index 0000000..34c0d50
--- /dev/null
+++ b/test_data/of13/group_desc_stats_reply.data
@@ -0,0 +1,69 @@
+-- binary
+04 13 # version, type
+00 80 # length
+12 34 56 78 # xid
+00 07 # stats_type
+00 00 # flags
+00 00 00 00 # pad
+00 68 # entries[0].length
+03 # entries[0].group_type
+00 # entries[0].pad
+00 00 00 01 # entries[0].group_id
+00 30 # entries[0].buckets[0].len
+00 01 # entries[0].buckets[0].weight
+00 00 00 05 # entries[0].buckets[0].watch_port
+ff ff ff ff # entries[0].buckets[0].watch_group
+00 00 00 00 # entries[0].pad
+00 00 # entries[0].buckets[0].actions[0].type
+00 10 # entries[0].buckets[0].actions[0].len
+00 00 00 05 # entries[0].buckets[0].actions[0].port
+00 00 # entries[0].buckets[0].actions[0].max_len
+00 00 00 00 00 00 # entries[0].pad
+00 00 # entries[0].buckets[0].actions[1].type
+00 10 # entries[0].buckets[0].actions[1].len
+00 00 00 06 # entries[0].buckets[0].actions[1].port
+00 00 # entries[0].buckets[0].actions[1].max_len
+00 00 00 00 00 00 # entries[0].pad
+00 30 # entries[0].buckets[1].len
+00 01 # entries[0].buckets[1].weight
+00 00 00 06 # entries[0].buckets[1].watch_port
+ff ff ff ff # entries[0].buckets[1].watch_group
+00 00 00 00 # entries[0].pad
+00 00 # entries[0].buckets[1].actions[0].type
+00 10 # entries[0].buckets[1].actions[0].len
+00 00 00 05 # entries[0].buckets[1].actions[0].port
+00 00 # entries[0].buckets[1].actions[0].max_len
+00 00 00 00 00 00 # entries[0].pad
+00 00 # entries[0].buckets[1].actions[1].type
+00 10 # entries[0].buckets[1].actions[1].len
+00 00 00 06 # entries[0].buckets[1].actions[1].port
+00 00 # entries[0].buckets[1].actions[1].max_len
+00 00 00 00 00 00 # entries[0].pad
+00 08 # entries[1].length
+03 # entries[1].group_type
+00 # entries[1].pad
+00 00 00 02 # entries[1].group_id
+-- python
+ofp.message.group_desc_stats_reply(
+    xid=0x12345678,
+    flags=0,
+    entries=[
+        ofp.group_desc_stats_entry(
+            type=ofp.OFPGT_FF,
+            group_id=1,
+            buckets=[
+                ofp.bucket(
+                    weight=1,
+                    watch_port=5,
+                    watch_group=0xffffffff,
+                    actions=[
+                        ofp.action.output(port=5, max_len=0),
+                        ofp.action.output(port=6, max_len=0)]),
+                ofp.bucket(
+                    weight=1,
+                    watch_port=6,
+                    watch_group=0xffffffff,
+                    actions=[
+                        ofp.action.output(port=5, max_len=0),
+                        ofp.action.output(port=6, max_len=0)])]),
+        ofp.group_desc_stats_entry(type=ofp.OFPGT_FF, group_id=2, buckets=[])])
diff --git a/test_data/of13/group_mod.data b/test_data/of13/group_mod.data
new file mode 100644
index 0000000..8f25b57
--- /dev/null
+++ b/test_data/of13/group_mod.data
@@ -0,0 +1,59 @@
+-- binary
+04 0f # version, type
+00 70 # length
+12 34 56 78 # xid
+00 01 # command
+03 # group_type
+00 # pad
+00 00 00 05 # group_id
+00 30 # buckets[0].len
+00 01 # buckets[0].weight
+00 00 00 05 # buckets[0].watch_port
+ff ff ff ff # buckets[0].watch_group
+00 00 00 00 # pad
+00 00 # buckets[0].actions[0].type
+00 10 # buckets[0].actions[0].len
+00 00 00 05 # buckets[0].actions[0].port
+00 00 # buckets[0].actions[0].max_len
+00 00 00 00 00 00 # pad
+00 00 # buckets[0].actions[1].type
+00 10 # buckets[0].actions[1].len
+00 00 00 06 # buckets[0].actions[1].port
+00 00 # buckets[0].actions[1].max_len
+00 00 00 00 00 00 # pad
+00 30 # buckets[1].len
+00 01 # buckets[1].weight
+00 00 00 06 # buckets[1].watch_port
+ff ff ff ff # buckets[1].watch_group
+00 00 00 00 # pad
+00 00 # buckets[1].actions[0].type
+00 10 # buckets[1].actions[0].len
+00 00 00 05 # buckets[1].actions[0].port
+00 00 # buckets[1].actions[0].max_len
+00 00 00 00 00 00 # pad
+00 00 # buckets[1].actions[1].type
+00 10 # buckets[1].actions[1].len
+00 00 00 06 # buckets[1].actions[1].port
+00 00 # buckets[1].actions[1].max_len
+00 00 00 00 00 00 # pad
+-- python
+ofp.message.group_mod(
+    xid=0x12345678,
+    command=ofp.OFPGC_MODIFY,
+    group_type=ofp.OFPGT_FF,
+    group_id=5,
+    buckets=[
+        ofp.bucket(
+            weight=1,
+            watch_port=5,
+            watch_group=0xffffffff,
+            actions=[
+                ofp.action.output(port=5, max_len=0),
+                ofp.action.output(port=6, max_len=0)]),
+        ofp.bucket(
+            weight=1,
+            watch_port=6,
+            watch_group=0xffffffff,
+            actions=[
+                ofp.action.output(port=5, max_len=0),
+                ofp.action.output(port=6, max_len=0)])])
diff --git a/test_data/of13/group_stats_reply.data b/test_data/of13/group_stats_reply.data
new file mode 100644
index 0000000..b14eb74
--- /dev/null
+++ b/test_data/of13/group_stats_reply.data
@@ -0,0 +1,52 @@
+-- binary
+04 13 # version, type
+00 80 # length
+12 34 56 78 # xid
+00 06 # stats_type
+00 00 # flags
+00 00 00 00 # pad
+00 48 # entries[0].length
+00 00 # pad
+00 00 00 01 # entries[0].group_id
+00 00 00 08 # entries[0].ref_count
+00 00 00 00 # pad
+00 00 00 00 00 00 00 10 # entries[0].packet_count
+00 00 00 00 00 00 00 20 # entries[0].byte_count
+00 00 00 14 # entries[0].duration_sec
+00 00 00 64 # entries[0].duration_nsec
+00 00 00 00 00 00 00 01 # entries[0].bucket_stats[0].packet_count
+00 00 00 00 00 00 00 02 # entries[0].bucket_stats[0].byte_count
+00 00 00 00 00 00 00 03 # entries[0].bucket_stats[1].packet_count
+00 00 00 00 00 00 00 04 # entries[0].bucket_stats[1].byte_count
+00 28 # entries[0].length
+00 00 # pad
+00 00 00 01 # entries[0].group_id
+00 00 00 08 # entries[0].ref_count
+00 00 00 00 # pad
+00 00 00 00 00 00 00 10 # entries[0].packet_count
+00 00 00 00 00 00 00 20 # entries[0].byte_count
+00 00 00 14 # entries[0].duration_sec
+00 00 00 64 # entries[0].duration_nsec
+-- python
+ofp.message.group_stats_reply(
+    xid=0x12345678,
+    flags=0,
+    entries=[
+        ofp.group_stats_entry(
+            group_id=1,
+            ref_count=8,
+            packet_count=16,
+            byte_count=32,
+            duration_sec=20,
+            duration_nsec=100,
+            bucket_stats=[
+                ofp.bucket_counter(packet_count=1, byte_count=2),
+                ofp.bucket_counter(packet_count=3, byte_count=4)]),
+        ofp.group_stats_entry(
+            group_id=1,
+            ref_count=8,
+            packet_count=16,
+            byte_count=32,
+            duration_sec=20,
+            duration_nsec=100,
+            bucket_stats=[])])
diff --git a/test_data/of13/hello.data b/test_data/of13/hello.data
new file mode 100644
index 0000000..94be823
--- /dev/null
+++ b/test_data/of13/hello.data
@@ -0,0 +1,20 @@
+-- binary
+04 00 # version, type
+00 20 # length
+12 34 56 78 # xid
+00 01 # elements[0].type
+00 0c # elements[0].length
+00 00 00 01 # elements[0].bitmaps[0]
+00 00 00 02 # elements[0].bitmaps[1]
+00 01 # elements[1].type
+00 0c # elements[1].length
+00 00 00 03 # elements[1].bitmaps[0]
+00 00 00 04 # elements[1].bitmaps[1]
+-- python
+ofp.message.hello(
+    xid=0x12345678,
+    elements=[
+        ofp.hello_elem_versionbitmap(
+            bitmaps=[ofp.uint32(1), ofp.uint32(2)]),
+        ofp.hello_elem_versionbitmap(
+            bitmaps=[ofp.uint32(3), ofp.uint32(4)])])
diff --git a/test_data/of13/hello_elem_versionbitmap.data b/test_data/of13/hello_elem_versionbitmap.data
new file mode 100644
index 0000000..230f7db
--- /dev/null
+++ b/test_data/of13/hello_elem_versionbitmap.data
@@ -0,0 +1,10 @@
+-- binary
+00 01 # type
+00 0c # length
+01 23 45 67 # bitmaps[0]
+89 ab cd ef # bitmaps[1]
+-- python
+ofp.hello_elem_versionbitmap(
+    bitmaps=[
+        ofp.uint32(0x01234567),
+        ofp.uint32(0x89abcdef)])
diff --git a/test_data/of13/instruction_goto_table.data b/test_data/of13/instruction_goto_table.data
new file mode 100644
index 0000000..6d0e32d
--- /dev/null
+++ b/test_data/of13/instruction_goto_table.data
@@ -0,0 +1,7 @@
+-- binary
+00 01 # type
+00 08 # length
+05 # table_id
+00 00 00 # pad
+-- python
+ofp.instruction.goto_table(table_id=5)
diff --git a/test_data/of13/meter_config_stats_reply.data b/test_data/of13/meter_config_stats_reply.data
new file mode 100644
index 0000000..940e4f5
--- /dev/null
+++ b/test_data/of13/meter_config_stats_reply.data
@@ -0,0 +1,25 @@
+-- binary
+04 13 # version, type
+00 30 # length
+12 34 56 78 # xid
+00 0a # stats_type
+00 00 # flags
+00 00 00 00 # pad
+00 01 # entries[0].type
+00 10 # entries[0].length
+00 00 00 01 # entries[0].rate
+00 00 00 02 # entries[0].burst_size
+00 00 00 00 # pad
+00 02 # entries[1].type
+00 10 # entries[1].length
+00 00 00 03 # entries[1].rate
+00 00 00 04 # entries[1].burst_size
+05 # entries[1].prec_level
+00 00 00 # pad
+-- python
+ofp.message.meter_config_stats_reply(
+    xid=0x12345678,
+    flags=0,
+    entries=[
+        ofp.meter_band.drop(rate=1, burst_size=2),
+        ofp.meter_band.dscp_remark(rate=3, burst_size=4, prec_level=5)])
diff --git a/test_data/of13/meter_feature_stats_reply.data b/test_data/of13/meter_feature_stats_reply.data
new file mode 100644
index 0000000..4a1b9bf
--- /dev/null
+++ b/test_data/of13/meter_feature_stats_reply.data
@@ -0,0 +1,23 @@
+-- binary
+04 13 # version, type
+00 20 # length
+12 34 56 78 # xid
+00 0b # stats_type
+00 00 # flags
+00 00 00 00 # pad
+00 00 00 05 # max_meter
+00 00 00 03 # band_types
+00 00 00 09 # capabilities
+0a # max_bands
+07 # max_color
+00 00 # pad
+-- python
+ofp.message.meter_features_stats_reply(
+    xid=0x12345678,
+    flags=0,
+    features=ofp.meter_features(
+        max_meter=5,
+        band_types=ofp.OFPMBT_DROP|ofp.OFPMBT_DSCP_REMARK,
+        capabilities=ofp.OFPMF_KBPS|ofp.OFPMF_STATS,
+        max_bands=10,
+        max_color=7))
diff --git a/test_data/of13/meter_stats_reply.data b/test_data/of13/meter_stats_reply.data
new file mode 100644
index 0000000..04f1fe8
--- /dev/null
+++ b/test_data/of13/meter_stats_reply.data
@@ -0,0 +1,50 @@
+-- binary
+04 13 # version, type
+00 80 # length
+12 34 56 78 # xid
+00 09 # stats_type
+00 00 # flags
+00 00 00 00 # pad
+00 00 00 01 # entries[0].meter_id
+00 48 # entries[0].len
+00 00 00 00 00 00 # pad
+00 00 00 08 # entries[0].flow_count
+00 00 00 00 00 00 00 10 # entries[0].packet_in_count
+00 00 00 00 00 00 00 20 # entries[0].byte_in_count
+00 00 00 14 # entries[0].duration_sec
+00 00 00 64 # entries[0].duration_nsec
+00 00 00 00 00 00 00 01 # entries[0].band_stats[0].packet_band_count
+00 00 00 00 00 00 00 02 # entries[0].band_stats[0].byte_band_count
+00 00 00 00 00 00 00 03 # entries[0].band_stats[1].packet_band_count
+00 00 00 00 00 00 00 04 # entries[0].band_stats[1].byte_band_count
+00 00 00 02 # entries[1].meter_id
+00 28 # entries[1].len
+00 00 00 00 00 00 # pad
+00 00 00 08 # entries[1].flow_count
+00 00 00 00 00 00 00 10 # entries[1].packet_in_count
+00 00 00 00 00 00 00 20 # entries[1].byte_in_count
+00 00 00 14 # entries[1].duration_sec
+00 00 00 64 # entries[1].duration_nsec
+-- python
+ofp.message.meter_stats_reply(
+    xid=0x12345678,
+    flags=0,
+    entries=[
+        ofp.meter_stats(
+            meter_id=1,
+            flow_count=8,
+            packet_in_count=16,
+            byte_in_count=32,
+            duration_sec=20,
+            duration_nsec=100,
+            band_stats=[
+                ofp.meter_band_stats(packet_band_count=1, byte_band_count=2),
+                ofp.meter_band_stats(packet_band_count=3, byte_band_count=4)]),
+        ofp.meter_stats(
+            meter_id=2,
+            flow_count=8,
+            packet_in_count=16,
+            byte_in_count=32,
+            duration_sec=20,
+            duration_nsec=100,
+            band_stats=[])])
diff --git a/test_data/of13/oxm_in_phy_port.data b/test_data/of13/oxm_in_phy_port.data
new file mode 100644
index 0000000..32ac1ea
--- /dev/null
+++ b/test_data/of13/oxm_in_phy_port.data
@@ -0,0 +1,7 @@
+-- binary
+80 00 # class
+02 # type/masked
+04 # length
+00 00 00 2a # value
+-- python
+ofp.oxm.in_phy_port(value=42)
diff --git a/test_data/of13/oxm_in_phy_port_masked.data b/test_data/of13/oxm_in_phy_port_masked.data
new file mode 100644
index 0000000..99b0ad3
--- /dev/null
+++ b/test_data/of13/oxm_in_phy_port_masked.data
@@ -0,0 +1,8 @@
+-- binary
+80 00 # class
+03 # type/masked
+08 # length
+00 00 00 2a # value
+aa bb cc dd # mask
+-- python
+ofp.oxm.in_phy_port_masked(value=42, value_mask=0xaabbccdd)
diff --git a/test_data/of13/oxm_ipv6_dst.data b/test_data/of13/oxm_ipv6_dst.data
new file mode 100644
index 0000000..23c8fb5
--- /dev/null
+++ b/test_data/of13/oxm_ipv6_dst.data
@@ -0,0 +1,8 @@
+-- binary
+80 00 # class
+36 # type/masked
+10 # length
+00 01 02 03 04 05 06 07 # value
+08 09 0a 0b 0c 0d 0e 0f # ...
+-- python
+ofp.oxm.ipv6_dst('\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f')
diff --git a/test_data/of13/packet_in.data b/test_data/of13/packet_in.data
new file mode 100644
index 0000000..e7d602a
--- /dev/null
+++ b/test_data/of13/packet_in.data
@@ -0,0 +1,31 @@
+-- binary
+04 0a # version, type
+00 35 # length
+12 34 56 78 # xid
+00 00 00 64 # buffer_id
+42 68 # total_len
+01 # reason
+14 # table_id
+fe dc ba 98 76 54 32 10 # cookie
+00 01 # match.type
+00 16 # match.length
+80 00 2A 02 # match.oxm_list[0].type_len
+00 01 # match.oxm_list[0].value
+80 00 01 08 # match.oxm_list[1].type_len
+00 00 00 04 # match.oxm_list[1].value
+00 00 00 05 # match.oxm_list[1].mask
+00 00 # match.pad
+00 00 # pad
+61 62 63 # data
+-- python
+ofp.message.packet_in(
+    xid=0x12345678,
+    buffer_id=100,
+    total_len=17000,
+    reason=ofp.OFPR_ACTION,
+    table_id=20,
+    cookie=0xFEDCBA9876543210,
+    match=ofp.match(oxm_list=[
+        ofp.oxm.arp_op(value=1),
+        ofp.oxm.in_port_masked(value=4, value_mask=5)]),
+    data="abc")
diff --git a/test_data/of13/packet_out.data b/test_data/of13/packet_out.data
new file mode 100644
index 0000000..ae8fa64
--- /dev/null
+++ b/test_data/of13/packet_out.data
@@ -0,0 +1,26 @@
+-- binary
+04 0d # version, type
+00 33 # length
+12 34 56 78 # xid
+00 00 00 64 # buffer_id
+00 00 00 04 # in_port
+00 18 # actions_len
+00 00 00 00 00 00 # pad
+00 00 # actions[0].type
+00 10 # actions[0].length
+00 00 00 02 # actions[0].port
+ff ff # actions[0].max_len
+00 00 00 00 00 00 # pad
+00 18 # actions[1].type
+00 08 # actions[1].length
+00 00 00 00 # pad
+61 62 63 # data
+-- python
+ofp.message.packet_out(
+    xid=0x12345678,
+    buffer_id=100,
+    in_port=4,
+    actions=[
+        ofp.action.output(port=2, max_len=0xffff),
+        ofp.action.dec_nw_ttl()],
+    data="abc")
diff --git a/test_data/of13/port_status.data b/test_data/of13/port_status.data
new file mode 100644
index 0000000..10f7c16
--- /dev/null
+++ b/test_data/of13/port_status.data
@@ -0,0 +1,36 @@
+-- binary
+04 0c # version, type
+00 50 # length
+12 34 56 78 # xid
+02 # reason
+00 00 00 00 00 00 00 # pad
+00 00 00 04 # port_no
+00 00 00 00 # pad
+01 02 03 04 05 06 # hw_addr
+00 00 # pad
+66 6f 6f 00 00 00 00 00 # name
+00 00 00 00 00 00 00 00 # ...
+00 00 00 24 # config
+00 00 00 02 # state
+00 00 00 01 # curr
+00 00 00 02 # advertised
+00 00 00 04 # supported
+00 00 00 08 # peer
+00 00 00 0a # curr_speed
+00 00 00 14 # max_speed
+-- python
+ofp.message.port_status(
+    xid=0x12345678,
+    reason=ofp.OFPPR_MODIFY,
+    desc=ofp.port_desc(
+        port_no=4,
+        hw_addr=[1,2,3,4,5,6],
+        name="foo",
+        config=ofp.OFPPC_NO_FWD|ofp.OFPPC_NO_RECV,
+        state=ofp.OFPPS_BLOCKED,
+        curr=ofp.OFPPF_10MB_HD,
+        advertised=ofp.OFPPF_10MB_FD,
+        supported=ofp.OFPPF_100MB_HD,
+        peer=ofp.OFPPF_100MB_FD,
+        curr_speed=10,
+        max_speed=20))
diff --git a/test_data/of13/set_config.data b/test_data/of13/set_config.data
new file mode 100644
index 0000000..49c5be0
--- /dev/null
+++ b/test_data/of13/set_config.data
@@ -0,0 +1,11 @@
+-- binary
+04 09 # version, type
+00 0c # length
+12 34 56 78 # xid
+00 02 # flags
+ff ff # miss_send_len
+-- python
+ofp.message.set_config(
+    xid=0x12345678,
+    flags=ofp.OFPC_FRAG_REASM,
+    miss_send_len=0xffff)