diff --git a/src/python/oftest/base_tests.py b/src/python/oftest/base_tests.py
index 3b59bc1..a2b25ac 100644
--- a/src/python/oftest/base_tests.py
+++ b/src/python/oftest/base_tests.py
@@ -7,6 +7,7 @@
 
 import logging
 import unittest
+import os
 
 import oftest
 from oftest import config
@@ -103,6 +104,9 @@
         SimpleProtocol.setUp(self)
         self.dataplane = oftest.dataplane_instance
         self.dataplane.flush()
+        if config["log_dir"] != None:
+            filename = os.path.join(config["log_dir"], str(self)) + ".pcap"
+            self.dataplane.start_pcap(filename)
 
     def inheritSetup(self, parent):
         """
@@ -114,6 +118,8 @@
         self.dataplane = parent.dataplane
 
     def tearDown(self):
+        if config["log_dir"] != None:
+            self.dataplane.stop_pcap()
         SimpleProtocol.tearDown(self)
 
 class DataPlaneOnly(BaseTest):
@@ -125,6 +131,11 @@
         BaseTest.setUp(self)
         self.dataplane = oftest.dataplane_instance
         self.dataplane.flush()
+        if config["log_dir"] != None:
+            filename = os.path.join(config["log_dir"], str(self)) + ".pcap"
+            self.dataplane.start_pcap(filename)
 
     def tearDown(self):
+        if config["log_dir"] != None:
+            self.dataplane.stop_pcap()
         BaseTest.tearDown(self)
diff --git a/src/python/oftest/dataplane.py b/src/python/oftest/dataplane.py
index f70de6c..12dcfce 100644
--- a/src/python/oftest/dataplane.py
+++ b/src/python/oftest/dataplane.py
@@ -25,6 +25,7 @@
 from threading import Condition
 import ofutils
 import netutils
+from pcap_writer import PcapWriter
 
 have_pypcap = False
 try:
@@ -165,6 +166,7 @@
         self.killed = False
 
         self.logger = logging.getLogger("dataplane")
+        self.pcap_writer = None
 
         if config is None:
             self.config = {}
@@ -215,6 +217,8 @@
                         port_number = port._port_number
                         self.logger.debug("Pkt len %d in on port %d",
                                           len(pkt), port_number)
+                        if self.pcap_writer:
+                            self.pcap_writer.write(pkt, timestamp, port_number)
                         queue = self.packet_queues[port_number]
                         if len(queue) >= self.MAX_QUEUE_LEN:
                             # Queue full, throw away oldest
@@ -246,6 +250,8 @@
         """
         self.logger.debug("Sending %d bytes to port %d" %
                           (len(packet), port_number))
+        if self.pcap_writer:
+            self.pcap_writer.write(packet, time.time(), port_number)
         bytes = self.ports[port_number].send(packet)
         if bytes != len(packet):
             self.logger.error("Unhandled send error, length mismatch %d != %d" %
@@ -353,3 +359,12 @@
         """
         for port_number in self.packet_queues.keys():
             self.packet_queues[port_number] = []
+
+    def start_pcap(self, filename):
+        assert(self.pcap_writer == None)
+        self.pcap_writer = PcapWriter(filename)
+
+    def stop_pcap(self):
+        if self.pcap_writer:
+            self.pcap_writer.close()
+            self.pcap_writer = None
