Index: Makefile
==================================================================
--- Makefile
+++ Makefile
@@ -29,11 +29,11 @@
 
 MSRCFILES = dbmod.scm rmtmod.scm commonmod.scm apimod.scm		\
 archivemod.scm clientmod.scm envmod.scm ezstepsmod.scm itemsmod.scm	\
 keysmod.scm launchmod.scm odsmod.scm processmod.scm runconfigmod.scm	\
 runsmod.scm servermod.scm subrunmod.scm tasksmod.scm testsmod.scm	\
-megamod.scm
+pkts.scm megamod.scm
 
 GMSRCFILES = dcommonmod.scm vgmod.scm treemod.scm 
 
 # Eggs to install (straightforward ones)
 
@@ -93,11 +93,11 @@
 odsmod.import.o runsmod.import.o testsmod.import.o		\
 archivemod.import.o keysmod.import.o processmod.import.o	\
 servermod.import.o clientmod.import.o envmod.import.o		\
 launchmod.import.o rmtmod.import.o subrunmod.import.o		\
 commonmod.import.o ezstepsmod.import.o megamod.import.o		\
-runconfigmod.import.o tasksmod.import.o
+runconfigmod.import.o tasksmod.import.o pkts.import.o
 
 all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut tcmt
 
 # why were the files  mofiles/ftail.o mofiles/rmtmod.o mofiles/commonmod.o listed on this target when MOFILES are there?
 # Removed non module .o files (i.e. $(OFILES)
@@ -218,10 +218,11 @@
    mofiles/runsmod.o \
    mofiles/servermod.o \
    mofiles/subrunmod.o \
    mofiles/tasksmod.o \
    mofiles/testsmod.o \
+   mofiles/pkts.o \
    *-inc.scm
 
 mofiles/dcommonmod.o : \
    mofiles/vgmod.o \
    mofiles/treemod.o \

Index: megamod.scm
==================================================================
--- megamod.scm
+++ megamod.scm
@@ -41,10 +41,11 @@
 ;; (declare (uses servermod))
 ;; (declare (uses subrunmod))
 ;; (declare (uses tasksmod))
 ;; (declare (uses testsmod))
 ;; (declare (uses vgmod))
+(declare (uses pkts))
 
 (module megamod
 	*
 	
 (import scheme chicken data-structures extras)
@@ -69,11 +70,11 @@
  irregex
  matchable
  md5
  message-digest
  pathname-expand
- pkts
+ ;; pkts
  ports
  posix
  ;; queue
  regex
  regex-case
@@ -124,10 +125,11 @@
 ;; (import servermod)
 ;; (import subrunmod)
 ;; (import tasksmod)
 ;; (import testsmod)
 ;; (import vgmod)
+(import pkts)
 
 (use (prefix ulex ulex:))
 
 (include "common_records.scm")
 (include "db_records.scm")

ADDED   pkts.scm
Index: pkts.scm
==================================================================
--- /dev/null
+++ pkts.scm
@@ -0,0 +1,23 @@
+;;======================================================================
+;; Copyright 2019, Matthew Welland.
+;; 
+;; This file is part of Megatest.
+;; 
+;;     Megatest is free software: you can redistribute it and/or modify
+;;     it under the terms of the GNU General Public License as published by
+;;     the Free Software Foundation, either version 3 of the License, or
+;;     (at your option) any later version.
+;; 
+;;     Megatest is distributed in the hope that it will be useful,
+;;     but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;     GNU General Public License for more details.
+;; 
+;;     You should have received a copy of the GNU General Public License
+;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.
+
+;;======================================================================
+
+(declare (unit pktsmod))
+
+(include "pkts/pkts.scm")