[hamradio-commits] [ax25-tools] 01/09: Import Upstream version 0.0.10-rc4

Dave Hibberd hibby-guest at moszumanska.debian.org
Mon Oct 30 00:12:12 UTC 2017


This is an automated email from the git hooks/post-receive script.

hibby-guest pushed a commit to branch master
in repository ax25-tools.

commit f0e0925caca30d3dce16513409cc6a706ced3b01
Author: hibby <d at vehibberd.com>
Date:   Sun Oct 29 23:04:11 2017 +0000

    Import Upstream version 0.0.10-rc4
---
 6pack/Makefile.am                |   20 +
 6pack/Makefile.in                |  601 +++
 6pack/m6pack.8                   |   57 +
 6pack/m6pack.c                   |  695 ++++
 AUTHORS                          |   28 +
 COPYING                          |  340 ++
 ChangeLog                        |   94 +
 INSTALL                          |  370 ++
 Makefile.am                      |   13 +
 Makefile.in                      |  745 ++++
 NEWS                             |    3 +
 README                           |   13 +
 aclocal.m4                       |  971 +++++
 ax25-tools.spec                  |  173 +
 ax25-tools.spec.in               |  173 +
 ax25/Makefile.am                 |   48 +
 ax25/Makefile.in                 | 1023 +++++
 ax25/access.c                    |  396 ++
 ax25/access.h                    |   20 +
 ax25/ax25.4                      |   77 +
 ax25/ax25.profile                |    1 +
 ax25/ax25d.8                     |   46 +
 ax25/ax25d.c                     | 1394 +++++++
 ax25/ax25d.conf                  |   47 +
 ax25/ax25d.conf.5                |  290 ++
 ax25/axctl.8                     |   67 +
 ax25/axctl.c                     |   94 +
 ax25/axgetput/Makefile.am        |   20 +
 ax25/axgetput/Makefile.in        |  648 ++++
 ax25/axgetput/README             |   11 +
 ax25/axgetput/TODO               |    3 +
 ax25/axgetput/axgetput.1         |   77 +
 ax25/axgetput/axgetput.c         |  393 ++
 ax25/axgetput/axgetput.h         |   45 +
 ax25/axgetput/includes.h         |   27 +
 ax25/axgetput/proto_bin.c        |  507 +++
 ax25/axgetput/proto_bin.h        |   32 +
 ax25/axgetput/util.c             |  208 +
 ax25/axgetput/util.h             |   18 +
 ax25/axparms.8                   |  123 +
 ax25/axparms.c                   |  443 +++
 ax25/axspawn.8                   |  125 +
 ax25/axspawn.c                   | 1918 ++++++++++
 ax25/axspawn.conf                |   50 +
 ax25/axspawn.conf.5              |  103 +
 ax25/axspawn.h                   |    8 +
 ax25/beacon.8                    |   52 +
 ax25/beacon.c                    |  172 +
 ax25/bpqparms.8                  |   37 +
 ax25/bpqparms.c                  |  143 +
 ax25/md5.c                       |  290 ++
 ax25/md5.h                       |   69 +
 ax25/mheard.1                    |   74 +
 ax25/mheard.c                    |  375 ++
 ax25/mheard.dat                  |    0
 ax25/mheardd.8                   |   48 +
 ax25/mheardd.c                   |  478 +++
 ax25/rxecho.8                    |   38 +
 ax25/rxecho.c                    |  510 +++
 ax25/rxecho.conf                 |   12 +
 ax25/rxecho.conf.5               |   22 +
 config.h.in                      |  158 +
 configure                        | 7702 ++++++++++++++++++++++++++++++++++++++
 configure.ac                     |   85 +
 depcomp                          |  708 ++++
 dmascc/Makefile.am               |   13 +
 dmascc/Makefile.in               |  615 +++
 dmascc/README.dmascc             |   94 +
 dmascc/dmascc_cfg.1              |  101 +
 dmascc/dmascc_cfg.c              |  341 ++
 hdlcutil/Makefile.am             |   25 +
 hdlcutil/Makefile.in             |  809 ++++
 hdlcutil/baycom.9                |   62 +
 hdlcutil/fl/Makefile.am          |   14 +
 hdlcutil/fl/Makefile.in          |  547 +++
 hdlcutil/fl/xfhdlcchpar.cxx      |   73 +
 hdlcutil/fl/xfhdlcchpar.h        |   25 +
 hdlcutil/fl/xfhdlcchpar_main.cxx |  136 +
 hdlcutil/fl/xfhdlcst.cxx         |  160 +
 hdlcutil/fl/xfhdlcst.h           |   31 +
 hdlcutil/fl/xfhdlcst_main.cxx    |  177 +
 hdlcutil/fl/xfsmdiag.cxx         |  124 +
 hdlcutil/fl/xfsmdiag.h           |   32 +
 hdlcutil/fl/xfsmdiag_main.cxx    |  412 ++
 hdlcutil/fl/xfsmdiag_main.h      |   70 +
 hdlcutil/fl/xfsmmixer.cxx        |  437 +++
 hdlcutil/fl/xfsmmixer.h          |   79 +
 hdlcutil/fl/xfsmmixer_main.cxx   |  462 +++
 hdlcutil/hdlcdrv.9               |  220 ++
 hdlcutil/hdrvcomm.c              |  717 ++++
 hdlcutil/hdrvcomm.h              |  116 +
 hdlcutil/sethdlc.8               |  282 ++
 hdlcutil/sethdlc.c               |  595 +++
 hdlcutil/smdiag.8                |   78 +
 hdlcutil/smdiag.c                |  431 +++
 hdlcutil/smmixer.8               |  164 +
 hdlcutil/smmixer.c               |  779 ++++
 hdlcutil/soundmodem.9            |   82 +
 hdlcutil/soundmodem.h            |   90 +
 hdlcutil/usersmdiag.h            |  118 +
 install-sh                       |  527 +++
 kiss/Makefile.am                 |   20 +
 kiss/Makefile.in                 |  634 ++++
 kiss/kissattach.8                |   72 +
 kiss/kissattach.c                |  391 ++
 kiss/kissnetd.8                  |   31 +
 kiss/kissnetd.c                  |  380 ++
 kiss/kissparms.8                 |   76 +
 kiss/kissparms.c                 |  257 ++
 kiss/mkiss.8                     |   82 +
 kiss/mkiss.c                     |  731 ++++
 kiss/net2kiss.8                  |   45 +
 kiss/net2kiss.c                  |  694 ++++
 kiss/spattach.8                  |    1 +
 missing                          |  331 ++
 netrom/Makefile.am               |   33 +
 netrom/Makefile.in               |  737 ++++
 netrom/netrom.4                  |   50 +
 netrom/netromd.8                 |   97 +
 netrom/netromd.c                 |  261 ++
 netrom/netromd.h                 |   41 +
 netrom/netromr.c                 |  246 ++
 netrom/netromt.c                 |  271 ++
 netrom/nodesave.8                |   39 +
 netrom/nodesave.c                |  160 +
 netrom/nrattach.8                |   39 +
 netrom/nrattach.c                |  244 ++
 netrom/nrbroadcast               |    8 +
 netrom/nrbroadcast.5             |   49 +
 netrom/nrparms.8                 |   75 +
 netrom/nrparms.c                 |  238 ++
 netrom/nrsdrv.8                  |   44 +
 netrom/nrsdrv.c                  |  457 +++
 pathnames.h                      |   28 +
 rose/Makefile.am                 |   19 +
 rose/Makefile.in                 |  712 ++++
 rose/rose.4                      |   43 +
 rose/rsattach.8                  |   33 +
 rose/rsattach.c                  |  222 ++
 rose/rsdwnlnk.8                  |   58 +
 rose/rsdwnlnk.c                  |  273 ++
 rose/rsmemsiz.c                  |  204 +
 rose/rsparms.8                   |   63 +
 rose/rsparms.c                   |  258 ++
 rose/rsuplnk.8                   |   63 +
 rose/rsuplnk.c                   |  289 ++
 rose/rsusers.sh                  |  128 +
 tcpip/Makefile.am                |   32 +
 tcpip/Makefile.in                |  686 ++++
 tcpip/rip98d.8                   |   59 +
 tcpip/rip98d.c                   |  365 ++
 tcpip/rip98d.conf                |    1 +
 tcpip/rip98d.conf.5              |   19 +
 tcpip/rip98d.h                   |   58 +
 tcpip/rip98r.c                   |  256 ++
 tcpip/rip98t.c                   |   76 +
 tcpip/ttylinkd.8                 |   56 +
 tcpip/ttylinkd.INSTALL           |   36 +
 tcpip/ttylinkd.README            |   34 +
 tcpip/ttylinkd.c                 |  723 ++++
 tcpip/ttylinkd.conf              |   10 +
 tcpip/ttylinkd.conf.5            |   22 +
 user_call/Makefile.am            |   30 +
 user_call/Makefile.in            |  661 ++++
 user_call/README.user_call       |   59 +
 user_call/ax25_call.8            |   69 +
 user_call/ax25_call.c            |  159 +
 user_call/netrom_call.8          |    1 +
 user_call/netrom_call.c          |  170 +
 user_call/rose_call.8            |    1 +
 user_call/rose_call.c            |  165 +
 user_call/tcp_call.8             |    1 +
 user_call/tcp_call.c             |  139 +
 user_call/user_io.c              |  219 ++
 user_call/user_io.h              |   12 +
 yamdrv/Makefile.am               |   13 +
 yamdrv/Makefile.in               |  559 +++
 yamdrv/README.yamdrv             |   92 +
 yamdrv/mcs2h.c                   |  106 +
 yamdrv/yam.h                     |   82 +
 yamdrv/yamcfg.c                  |  356 ++
 181 files changed, 47123 insertions(+)

diff --git a/6pack/Makefile.am b/6pack/Makefile.am
new file mode 100644
index 0000000..014cfe2
--- /dev/null
+++ b/6pack/Makefile.am
@@ -0,0 +1,20 @@
+
+installconf:
+
+sbin_PROGRAMS = m6pack
+
+LDADD= $(AX25_LIB)
+
+man_MANS = m6pack.8
+
+EXTRA_DIST = $(man_MANS)
+
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR=${sysconfdir}/ax25/
+AX25_LOCALSTATEDIR=${localstatedir}/ax25/
+
+install-exec-hook:
+	(cd $(DESTDIR)$(sbindir))
+
diff --git a/6pack/Makefile.in b/6pack/Makefile.in
new file mode 100644
index 0000000..b2b70a1
--- /dev/null
+++ b/6pack/Makefile.in
@@ -0,0 +1,601 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+sbin_PROGRAMS = m6pack$(EXEEXT)
+subdir = 6pack
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
+PROGRAMS = $(sbin_PROGRAMS)
+m6pack_SOURCES = m6pack.c
+m6pack_OBJECTS = m6pack.$(OBJEXT)
+m6pack_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+m6pack_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = m6pack.c
+DIST_SOURCES = m6pack.c
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+LDADD = $(AX25_LIB)
+man_MANS = m6pack.8
+EXTRA_DIST = $(man_MANS)
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR = ${sysconfdir}/ax25/
+AX25_LOCALSTATEDIR = ${localstatedir}/ax25/
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu 6pack/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu 6pack/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+m6pack$(EXEEXT): $(m6pack_OBJECTS) $(m6pack_DEPENDENCIES) $(EXTRA_m6pack_DEPENDENCIES) 
+	@rm -f m6pack$(EXEEXT)
+	$(LINK) $(m6pack_OBJECTS) $(m6pack_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/m6pack.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man8: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man8dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.8[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man8:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man8dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.8[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-man uninstall-sbinPROGRAMS
+
+uninstall-man: uninstall-man8
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-sbinPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-exec-hook install-html install-html-am \
+	install-info install-info-am install-man install-man8 \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-sbinPROGRAMS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-man uninstall-man8 \
+	uninstall-sbinPROGRAMS
+
+
+installconf:
+
+install-exec-hook:
+	(cd $(DESTDIR)$(sbindir))
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/6pack/m6pack.8 b/6pack/m6pack.8
new file mode 100644
index 0000000..7ed202c
--- /dev/null
+++ b/6pack/m6pack.8
@@ -0,0 +1,57 @@
+.TH M6PACK 8 "28 April 2002" Linux "Linux System Managers Manual"
+.SH NAME
+m6pack \- Attach multiples 6PACK interfaces
+.SH SYNOPSIS
+.B m6pack [-l] [-s speed] [-x n_ptmx] [-v] ttyinterface pty ..
+.SH DESCRIPTION
+.LP
+.B m6pack
+allows multiple 6PACK TNCs sharing the same serial port to be
+used with the Linux AX.25 kernel software. The AX.25 softare has no support
+for multiple TNCs sharing the same serial line. The
+different ports are addressed by encoding the port number in the control
+byte of every 6pack frame.
+.B m6pack
+watches a serial port, and routes 6pack frames to/from the pseudo ttys. The
+other side of the pseudo ttys are then attached with
+.B spattach
+as normal.
+.sp 1
+Statistics about the operation of
+.B m6pack
+may be obtained by sending the SIGUSR1 signal to the running program. On
+reception of such a signal
+.B m6pack
+will print a set of statistics to the system log if logging has been
+enabled.
+.sp 1
+Although mention is made of using pseudo ttys as the last arguments,
+these devices may be normal serial ports. However
+.B m6pack
+provides no way in which to set their speed, the speed must therefore be set
+by some other method.
+.SH OPTIONS
+.TP 10
+.BI \-l
+Enables system logging, the default is off.
+.TP 10
+.BI "\-s speed"
+Set the speed of the serial port.
+.TP 10
+.BI \-v
+Display the version.
+.TP 10
+.BI "\-x number"
+This option is for Unix98 PTYs. It allocates "number" ptys; their names are written to stdout. When -x is used, the pty arguments are optional.
+.SH "SEE ALSO"
+.BR spattach (8),
+.BR ifconfig (8),
+.BR kill (1).
+.SH AUTHORS
+I�aki Arenaza EB2EBU <iarenaza at escomposlinux.org>, based in the work by:
+.br
+Tomi Manninen OH2BNS <oh2bns at sral.fi>
+.br
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
+.br
+Kevin Uhlir N0BEL <kevinu at flochart.com>
diff --git a/6pack/m6pack.c b/6pack/m6pack.c
new file mode 100644
index 0000000..e5ee2ee
--- /dev/null
+++ b/6pack/m6pack.c
@@ -0,0 +1,695 @@
+/* Hey Emacs! this is -*- linux-c -*- 
+ * from /usr/src/linux/Documentation/CodingStyle
+ *
+ * m6pack.c
+ *
+ * Fake out AX.25 code into supporting 6pack TNC rings by routing serial
+ * port data to/from pseudo ttys.
+ *
+ * Author(s):
+ *
+ *	Iñaki Arenaza (EB2EBU) <iarenaza at escomposlinux.org>
+ *
+ *********************************************************************
+ *
+ * Quite a lot of stuff "stolen" from mkiss.c, written by
+ *
+ * 		Kevin Uhlir
+ * 		Ron Curry
+ *		Jonathan Naylor
+ *		Tomi Manninen
+ *
+ * Copyright (C) 1999 Iñaki Arenaza
+ * mkiss.c was GPLed, so I guess this one is GPLed too ;-)
+ *
+ *********************************************************************
+ *
+ * REMARK:
+ *
+ * See document '6pack.ps' by Matthias Welwarsky (DG2FEF), translated
+ * by Thomas Sailer (HB9JNX) found in ax25-doc-1.0.tgz for details about
+ * 6pack protocol specifications.
+ *
+ *********************************************************************
+ */
+
+#include <stdio.h>
+#define __USE_XOPEN
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <termios.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <ctype.h>
+#include <syslog.h>
+#include <limits.h>
+
+#include <netax25/ttyutils.h>
+#include <netax25/daemon.h>
+
+#include <config.h>
+
+typedef unsigned char __u8;
+typedef enum {data, command} frame_t;
+
+#define SIXP_MAX_ADDR   ((__u8) 8)
+#define	SIZE		4096
+#define MAX_PTYS	SIXP_MAX_ADDR  /* Max number of TNCs in a 6PACK ring */
+
+/*
+ * Keep these off the stack.
+ */
+static __u8 ibuf[SIZE];	/* buffer for input operations */
+static __u8 obuf[SIZE];	/* buffer for sixpack_tx() */
+
+static int invalid_ports = 0;
+
+static char *usage_string = "usage: m6pack [-l] [-s speed] [-x num_ptmx_devices] [-v] tyinterface pty ..\n";
+
+static int dump_report = FALSE;
+static int logging = FALSE;
+
+static struct iface *pty[MAX_PTYS];
+static struct iface *tty;
+static int numptys;
+
+struct iface
+{
+	char		*name;		/* Interface name (/dev/???)	*/
+	int		fd;		/* File descriptor		*/
+	int		pty_id;		/* 6pack address asigned to pty */
+	__u8		seof;		/* leading SEOF of this frame	*/
+	__u8		databuf[SIZE];	/* TX buffer (data frames)	*/
+	__u8		cmdbuf[1];	/* TX buffer (command frames)	*/
+	__u8		*optr;		/* Next byte to transmit	*/
+	unsigned int	sixp_cnt;	/* 6pack-coded octets count	*/
+	unsigned int	decod_cnt;	/* 6pack-decoded octets cont	*/
+	unsigned int	errors;		/* 6PACK frame error count	*/
+	unsigned int	rxpackets;	/* RX frames count		*/
+	unsigned int	txpackets;	/* TX frames count		*/
+	unsigned long	rxbytes;	/* RX bytes count		*/
+	unsigned long	txbytes;	/* TX bytes count		*/
+	char		namepts[PATH_MAX];  /* name of the unix98 pts slaves, which
+				       * the client has to use */
+};
+
+#define PTY_ID_TTY (-1)
+
+/* 6PACK "TNC Address" commands are special in that the address they
+ * carry is not the address of the destination TNC but the initial
+ * address for the firt TNC in the ring (when sent PC->TNC Ring), or
+ * the last TNC address+1 (when received TNC ring -> PC).  So we can't
+ * use the address in the command to select a pty to pass the
+ * command, and we have to keep track of what ptys have sent "TNC
+ * Address" commands to sent them back the response (until we modify
+ * the kernel 6pack driver to support multiple TNC's (i.e., network
+ * devices) on one serial port). We deliver the responses with a FIFO
+ * policy.
+ */
+static int cmd_addr_fifo[SIXP_MAX_ADDR];
+static int head; /* We retrieve from head position */
+static int tail; /* We insert at tail position */
+
+/* Masks to tell apart 6pack command and data frames
+ */
+#define SIXP_IS_DATA(x) ((((__u8)(x)) & (__u8)0xC0) == (__u8)0)
+#define SIXP_IS_CMD(x) !(SIXP_IS_DATA(x))
+
+/* Masks to split commands in opcode and TNC address
+ */
+#define SIXP_ADDR_MASK  ((__u8) (SIXP_MAX_ADDR-1))
+#define SIXP_CMD_MASK ((__u8) ~SIXP_ADDR_MASK)
+#define SIXP_CMD(x) (((__u8)x) & SIXP_CMD_MASK)
+#define SIXP_ADDR(x) (((__u8)x) & SIXP_ADDR_MASK)
+
+/* Macro to build a 6pack TNC command from opcode and TNC address
+ */
+#define SIXP_MAKE_CMD(opcode,addr) (((__u8)opcode) | ((__u8)addr))
+
+/* 6pack protocol commands (relevant bits only)
+ */
+#define SIXP_CMD_SEOF       ((__u8) 0x40)	/* start/end of 6pack frame */
+#define SIXP_CMD_TX_ORUN    ((__u8) 0x48)	/* transmit overrun */
+#define SIXP_CMD_RX_ORUN    ((__u8) 0x50)	/* receive overrun */
+#define SIXP_CMD_RX_BUF_OVL ((__u8) 0x58)	/* receive buffer overflow */
+#define SIXP_CMD_LED	    ((__u8) 0x60)	/* set LED status */
+#define SIXP_CMD_TX_1	    ((__u8) 0xA0)	/* TX counter + 1 */
+#define SIXP_CMD_RX_1	    ((__u8) 0x90)	/* RX counter + 1 */
+#define SIXP_CMD_DCD	    ((__u8) 0x88)	/* DCD state */
+#define SIXP_CMD_CAL	    ((__u8) 0xE0)	/* send calibration pattern */
+#define SIXP_CMD_ADDR	    ((__u8) 0xE8)	/* set TNC address */
+
+/* Valid checksum of a 6pack frame
+ */
+#define SIXP_CHKSUM ((__u8) 0xFF)
+
+static int sixpack_rx(struct iface *ifp, __u8 c, __u8 *tnc_addr, frame_t *type)
+{
+	int i, len;
+	__u8 checksum;
+	
+	/* Is it a data octect?
+	 */
+	if (SIXP_IS_DATA(c)) {
+		/* Decode the 6PACK octect and store the resultant
+		 * bits in the output buffer.
+		 */
+		switch (ifp->sixp_cnt % 4) {
+		case 0:
+			*ifp->optr = (c & 0x3F);
+			break;
+		case 1:
+			*ifp->optr++ |= (c & 0x30) << 2; 
+			*ifp->optr = (c & 0x0F);
+			break;
+		case 2:
+			*ifp->optr++ |= (c & 0x3C) << 2; 
+			*ifp->optr = (c & 0x03);
+			break;
+		default:
+			*ifp->optr++ |= (c & 0x3F) << 2; 
+		}
+		ifp->sixp_cnt++;
+		return 0;
+	}
+	
+	/* Nope, it's a command octect. See which kind of command.
+	 * Anything but a SEOF command is a one-octect command, so
+	 * process it immediately and return.
+	 */
+	if (SIXP_CMD(c) != SIXP_CMD_SEOF) {
+		if (SIXP_CMD(c) == SIXP_CMD_ADDR) {
+			/* 6PACK "TNC Address" commans are
+			 * "special". The address field must be
+			 * rewritten.
+			 */
+			if (PTY_ID_TTY == ifp->pty_id) {
+				/* TNC Ring -> pty
+				 * Dequeue a TNC Address request.
+				 */
+				*ifp->cmdbuf = SIXP_MAKE_CMD(SIXP_CMD(c),1);
+				*tnc_addr = cmd_addr_fifo[head];
+				head = (head + 1) % SIXP_MAX_ADDR;
+			}
+			else {
+				/* pty -> TNC Ring
+				 * Enqueue a TNC Address request.
+				 */
+				*ifp->cmdbuf = SIXP_MAKE_CMD(SIXP_CMD(c), 0);
+				*tnc_addr = 0;
+				cmd_addr_fifo[tail] = ifp->pty_id;
+				tail = (tail + 1) % SIXP_MAX_ADDR;
+			}
+		}
+		else {
+			/* We need a separate buffer here for 6PACK commands
+			 * as the protocol allows the transmission of command
+			 * frames in the middle of data frames. Don't touch
+			 * anything else! A data frame may be "en route".
+			 */
+			*ifp->cmdbuf = SIXP_CMD(c);
+			*tnc_addr = SIXP_ADDR(c);
+		}
+		/* Update statistics and return.
+		 */
+		ifp->rxpackets++;
+		ifp->rxbytes++;
+		*type = command;
+		return 1;
+	}
+	
+	/* We're dealing with a SEOF command.
+	 */
+	len = ifp->optr - ifp->databuf;
+	if (len > 0) {
+		if (len < 3) {
+			/* Data frames have at least 3 octets:
+			 *    TxDelay, Datum, CheckSum.
+			 * Signal error and reset state.
+			 */
+			goto error_reset_state;
+		}
+		
+		/* Now that we've decoded 6PACK octects,
+		 * check the checksum of the frame. 
+		 */
+		checksum = 0;
+		for (i = 0; i < len; i++) {
+			checksum += ifp->databuf[i];
+		}
+		/* Address of this frame must be taken from the
+		 * leading SEOF.
+		 */
+		*tnc_addr = SIXP_ADDR(ifp->seof);
+		checksum += *tnc_addr;
+		
+		if (checksum != SIXP_CHKSUM) {
+			/* Signal error and reset state.
+			 */
+			goto error_reset_state;
+		}
+		
+		/* Now remove checksum from the frame (this makes
+		 * sixpack_tx easier).
+		 */
+		len--;/* Minus Checksum */
+
+		/* Finally update statistics and return all
+		 * needed parameters
+		 */
+		ifp->rxpackets++;
+		ifp->rxbytes += len;
+		*type = data;
+	}
+
+	ifp->optr = ifp->databuf;
+	ifp->seof = c;
+	ifp->sixp_cnt = 0;
+	ifp->decod_cnt = 0;
+	return len;  
+	
+ error_reset_state:
+	ifp->errors++;
+	ifp->optr = ifp->databuf;
+	ifp->sixp_cnt = 0;
+	ifp->decod_cnt = 0;
+	return 0;
+}
+
+static void sixpack_tx(int fd, __u8 tnc_addr, __u8 *ibuf, int len, frame_t type)
+{
+	__u8 *ptr = obuf;
+	__u8 checksum;
+	int count, written;
+
+	if (type == command) {
+		if (SIXP_CMD(*ibuf) == SIXP_CMD_ADDR) {
+			/* 6PACK "TNC Address" commans are
+			 * "special". We must send them untouched here.
+			 */
+			*ptr++ = *ibuf;
+		}
+		else {
+			/* Commands, except SEOF, are 1 byte long.
+			 */
+			*ptr++ = SIXP_MAKE_CMD(SIXP_CMD(*ibuf), tnc_addr);
+		}
+	}
+	else {
+		*ptr++ = SIXP_MAKE_CMD(SIXP_CMD_SEOF, tnc_addr);
+		checksum = 0;
+		for (count = 0; count < len; count++) {
+			switch (count % 3) {
+			case 0:
+				*ptr++ = (ibuf[count] & 0x3F);
+				*ptr = (ibuf[count] & 0xC0) >> 2;
+				break;
+			case 1:
+				*ptr++ |= (ibuf[count] & 0x0F);
+				*ptr = (ibuf[count] & 0xF0) >> 2;
+				break;
+			default:
+				*ptr++ |= (ibuf[count] & 0x03);
+				*ptr++ = (ibuf[count] & 0xFC) >> 2;
+				break;
+			}
+			checksum += ibuf[count];
+		}
+
+		checksum += tnc_addr;
+		checksum = 0xFF - checksum;
+		switch (count % 3) {
+		case 0:
+			*ptr++ = (checksum & 0x3F);
+			*ptr++ = (checksum & 0xC0) >> 2;
+			break;
+		case 1:
+			*ptr++ |= (checksum & 0x0F);
+			*ptr++ = (checksum & 0xF0) >> 2;
+			break;
+		default:
+			*ptr++ |= (checksum & 0x03);
+			*ptr++ = (checksum & 0xFC) >> 2;
+			break;
+		}
+
+		/* Trailing SEOF doesn't carry TNC address
+		 */
+		*ptr++ = SIXP_MAKE_CMD(SIXP_CMD_SEOF, 0);
+	}
+
+	count = ptr - obuf;
+	written = 0;
+	ptr = obuf; 
+	while (count > 0) {
+		written = write (fd, ptr, count);
+		count -= written;
+		ptr += written;
+	}
+}
+
+static void sigterm_handler(int sig)
+{
+	int i;
+	
+	if (logging) {
+		syslog(LOG_INFO, "terminating on SIGTERM\n");
+		closelog();
+	}
+	
+	tty_unlock(tty->name);
+	close(tty->fd);
+	free(tty);
+	
+	for (i = 0; i < numptys; i++) {
+		tty_unlock(pty[i]->name);
+		close(pty[i]->fd);
+		free(pty[i]);
+	}
+
+	exit(0);
+}
+
+static void sigusr1_handler(int sig)
+{
+	signal(SIGUSR1, sigusr1_handler);
+	dump_report = TRUE;
+}
+
+static void report(struct iface *tty, struct iface **pty, int numptys)
+{
+	int i;
+	long t;
+
+	time(&t);
+	syslog(LOG_INFO, "version %s.", VERSION);
+	syslog(LOG_INFO, "Status report at %s", ctime(&t));
+	syslog(LOG_INFO, "ttyinterface is %s (fd=%d)", tty->name, tty->fd);
+	for (i = 0; i < numptys; i++)
+		syslog(LOG_INFO, "pty%d is %s (fd=%d)", i, pty[i]->name,
+			pty[i]->fd);
+	syslog(LOG_INFO, "Invalid ports: %d", invalid_ports);
+	syslog(LOG_INFO, "Interface   TX frames TX bytes  RX frames RX "
+	       "bytes  Errors");
+	syslog(LOG_INFO, "%-11s %-9u %-9lu %-9u %-9lu %u",
+	       tty->name,
+	       tty->txpackets, tty->txbytes,
+	       tty->rxpackets, tty->rxbytes,
+	       tty->errors);
+	for (i = 0; i < numptys; i++) {
+		syslog(LOG_INFO, "%-11s %-9u %-9lu %-9u %-9lu %u",
+		       pty[i]->name,
+		       pty[i]->txpackets, pty[i]->txbytes,
+		       pty[i]->rxpackets, pty[i]->rxbytes,
+		       pty[i]->errors);
+	}
+	return;
+}
+
+int main(int argc, char *argv[])
+{
+	__u8 *icp, tnc_addr;
+	int topfd;
+	fd_set readfd;
+	int retval, i, size, len;
+	int speed	= -1;
+	int ptmxdevices = 0;
+	char *npts;
+	int wrote_info = 0;
+	frame_t type;
+
+	head = tail = 0;
+	while ((size = getopt(argc, argv, "ls:vx:")) != -1) {
+		switch (size) {
+		case 'l':
+			logging = TRUE;
+			break;
+		case 's':
+			speed = atoi(optarg);
+			break;
+		case 'x':
+			ptmxdevices = atoi(optarg);
+			if (ptmxdevices < 1 || ptmxdevices > MAX_PTYS) {
+				fprintf(stderr, "m6pack: too %s devices\n", ptmxdevices < 1 ? "few" : "many");
+				return 1;
+			}
+			break;
+		case 'v':
+			printf("m6pack: %s\n", VERSION);
+			return 1;
+		case ':':
+		case '?':
+			fprintf(stderr, usage_string);
+			return 1;
+		}
+	}
+
+	if ((argc - optind) < 2 && ptmxdevices == 0) {
+		fprintf(stderr, usage_string);
+		return 1;
+	}
+
+	if ((argc - optind) < 1 && ptmxdevices > 0) {
+		fprintf(stderr, usage_string);
+		return 1;
+	}
+
+        numptys = argc - optind - 1;
+
+	if (numptys + ptmxdevices > MAX_PTYS) {
+		fprintf(stderr, "m6pack: max %d pty interfaces allowed.\n",
+			MAX_PTYS);
+		return 1;
+	}
+
+	/*
+	 * Check for lock files before opening any TTYs
+	 */
+	if (tty_is_locked(argv[optind])) {
+		fprintf(stderr, "m6pack: tty %s is locked by another process\n", argv[optind]);
+		return 1;
+	}
+	for (i = 0; i < numptys; i++) {
+		if (!strcmp("/dev/ptmx", argv[optind + i + 1]))
+			continue;
+		if (tty_is_locked(argv[optind + i + 1])) {
+			fprintf(stderr, "m6pack: pty %s is locked by another process\n", argv[optind + i + 1]);
+			return 1;
+		}
+	}
+
+	/*
+	 * Open and configure the tty interface. Open() is
+	 * non-blocking so it won't block regardless of the modem
+	 * status lines.
+	 */
+	if ((tty = calloc(1, sizeof(struct iface))) == NULL) {
+		perror("m6pack: malloc");
+		return 1;
+	}
+
+	if ((tty->fd = open(argv[optind], O_RDWR | O_NDELAY)) == -1) {
+		perror("m6pack: open");
+		return 1;
+	}
+
+	tty->name = argv[optind];
+	if (speed != -1) tty_speed(tty->fd, speed);
+	tty_raw(tty->fd, FALSE);
+	tty->pty_id = PTY_ID_TTY;
+	tty->optr = tty->databuf;
+	topfd = tty->fd;
+	tty->namepts[0] = '\0';
+
+	/*
+	 * Make it block again...
+	 */
+	fcntl(tty->fd, F_SETFL, 0);
+
+	/*
+	 * Open and configure the pty interfaces
+	 */
+	for (i = 0; i < numptys+ptmxdevices; i++) {
+		static char name_ptmx[] = "/dev/ptmx";
+		char *pty_name = (i < numptys ? argv[optind+i+1] : name_ptmx);
+
+		if ((pty[i] = calloc(1, sizeof(struct iface))) == NULL) {
+			perror("m6pack: malloc");
+			return 1;
+		}
+		if ((pty[i]->fd = open(pty_name, O_RDWR)) == -1) {
+			perror("m6pack: open");
+			return 1;
+		}
+		pty[i]->name = pty_name;
+		tty_raw(pty[i]->fd, FALSE);
+		pty[i]->pty_id = i;
+		pty[i]->optr = pty[i]->databuf;
+		topfd = (pty[i]->fd > topfd) ? pty[i]->fd : topfd;
+		pty[i]->namepts[0] = '\0';
+		if (!strcmp(pty[i]->name, "/dev/ptmx")) {
+			/* get name of pts-device */
+			if ((npts = ptsname(pty[i]->fd)) == NULL) {
+				fprintf(stderr, "m6pack: Cannot get name of pts-device.\n");
+				return 1;
+			}
+			strncpy(pty[i]->namepts, npts, PATH_MAX-1);
+			pty[i]->namepts[PATH_MAX-1] = '\0';
+
+			/* unlock pts-device */
+			if (unlockpt(pty[i]->fd) == -1) {
+				fprintf(stderr, "m6pack: Cannot unlock pts-device %s\n", pty[i]->namepts);
+				return 1;
+			}
+			if (wrote_info == 0)
+				printf("\nAwaiting client connects on:\n");
+			else
+				printf(" ");
+			printf("%s", pty[i]->namepts);
+			wrote_info = 1;
+		}
+	}
+
+	if (wrote_info > 0)
+		printf("\n");
+
+	numptys=numptys+ptmxdevices;
+
+	/*
+	 * Now all the ports are open, lock them.
+	 */
+	tty_lock(tty->name);
+	for (i = 0; i < numptys; i++) {
+		if (pty[i]->namepts[0] == '\0')
+			tty_lock(pty[i]->name);
+	}
+
+	if (logging) {
+		openlog("m6pack", LOG_PID, LOG_DAEMON);
+		syslog(LOG_INFO, "starting");
+	}
+
+	if (wrote_info > 0) {
+		fflush(stdout);
+		fflush(stderr);
+		close(0);
+		close(1);
+		close(2);
+	}
+
+	signal(SIGHUP, SIG_IGN);
+	signal(SIGUSR1, sigusr1_handler);
+	signal(SIGTERM, sigterm_handler);
+
+	if (!daemon_start(FALSE)) {
+		fprintf(stderr, "m6pack: cannot become a daemon\n");
+		return 1;
+	}
+
+	/*
+	 * Loop until an error occurs on a read.
+	 */
+	while (TRUE) {
+		FD_ZERO(&readfd);
+		FD_SET(tty->fd, &readfd);
+		for (i = 0; i < numptys; i++)
+			FD_SET(pty[i]->fd, &readfd);
+
+		errno = 0;
+		retval = select(topfd + 1, &readfd, NULL, NULL, NULL);
+
+		if (retval == -1) {
+			if (dump_report) {
+				if (logging)
+					report(tty, pty, numptys);
+				dump_report = FALSE;
+				continue;
+			} else {
+				perror("m6pack: select");
+				continue;
+			}
+		}
+
+
+		/*
+		 * A character has arrived on the ttyinterface.
+		 */
+		if (FD_ISSET(tty->fd, &readfd)) {
+			if ((size = read(tty->fd, ibuf, SIZE)) < 0 
+			    && errno != EINTR) {
+				if (logging)
+					syslog(LOG_ERR, "tty->fd: %m");
+				break;
+			}
+
+			for (icp = ibuf; size > 0; size--, icp++) {
+				if ((len = sixpack_rx(tty,*icp,&tnc_addr,
+						      &type)) != 0) {
+					if (tnc_addr <= numptys) {
+						sixpack_tx(pty[tnc_addr]->fd,
+							   0,
+							   (type == data) ? 
+							   tty->databuf : 
+							   tty->cmdbuf,
+							   len,
+							   type);
+						pty[tnc_addr]->txpackets++;
+						pty[tnc_addr]->txbytes += len;
+					} else
+						invalid_ports++;
+				}
+			}
+		}
+
+		for (i = 0; i < numptys; i++) {
+			/*
+			 * A character has arrived on pty[i].
+			 */
+			if (FD_ISSET(pty[i]->fd, &readfd)) {
+				if ((size = read(pty[i]->fd, ibuf, SIZE)) < 0
+				    && errno != EINTR) {
+					if (logging)
+						syslog(LOG_ERR,
+						       "pty[%d]->fd: %m\n",i);
+					goto end;
+				}
+
+				for (icp = ibuf; size > 0; size--, icp++) {
+					if ((len = sixpack_rx(pty[i],
+							      *icp,
+							      &tnc_addr,
+							      &type)) != 0) {
+						sixpack_tx(tty->fd, i,
+							   (type == data) ?
+							   pty[i]->databuf :
+							   pty[i]->cmdbuf,
+							   len, type);
+						tty->txpackets++;
+						tty->txbytes += len;
+					}
+				}
+			}
+		}
+	}
+
+end:
+	if (logging)
+		closelog();
+
+	tty_unlock(tty->name);
+	close(tty->fd);
+	free(tty);
+
+	for (i = 0; i < numptys; i++) {
+		tty_unlock(pty[i]->name);
+		close(pty[i]->fd);
+		free(pty[i]);
+	}
+
+	return 1;
+}
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..25068b7
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,28 @@
+axspawn			Joerg Reuter DL1BKE <jreuter at poboxes.com>
+ax25ipd			Rob Mayfield VK5XXX <mayfieldrob at mail.dec.com>
+ax25rtd			Klaus Kudielka <oe1kib at oe1xtu.ampr.org>
+bpqparms		Joerg Reuter DL1BKE <jreuter at poboxes.com>
+call			Alexander Tietzel DG6XA <tietze_a at etech.fh-hamburg.de>
+mkiss			Tomi Manninen OH2BNS <oh2bns at sral.fi>
+kissnetd		Frederic Rible F1OAT <frible at teaser.fr>
+listen			Heikki Hannikainen OH7LZB <oh7lzb at sral.fi>
+net2kiss		Thomas Sailer HB9JNX <t.sailer at alumni.ethz.ch>
+node			Tomi Manninen OH2BNS <oh2bns at sral.fi>
+nodesave		Tomi Manninen OH2BNS <oh2bns at sral.fi>
+nrsdrv			Dave Brown N2RJT <dcb at vectorbd.com>
+piconfig		John Paul Morrison VE7JPM <jmorriso at bogomips.com>
+pms			David Brown N2RJT <dcb at vectorbd.com>
+rxecho			Tomi Manninen OH2BNS <oh2bns at sral.fi>
+setcrystal		Thomas Sailer HB9JNX <t.sailer at alumni.ethz.ch>
+sethdlc			Thomas Sailer HB9JNX <t.sailer at alumni.ethz.ch>
+smdiag			Thomas Sailer HB9JNX <t.sailer at alumni.ethz.ch>
+smmixer			Thomas Sailer HB9JNX <t.sailer at alumni.ethz.ch>
+ttylinkd		Craig Small VK2XLZ <csmall at small.dropbear.id.au>
+dmascc_cfg		Klaus Kudielka	
+xfhdlcchpar		Thomas Sailer HB9JNX <t.sailer at alumni.ethz.ch>
+xfhdlcst		Thomas Sailer HB9JNX <t.sailer at alumni.ethz.ch>
+xfsmdiag		Thomas Sailer HB9JNX <t.sailer at alumni.ethz.ch>
+xfsmmixer		Thomas Sailer HB9JNX <t.sailer at alumni.ethz.ch>
+yamcfg			Jean-Paul Roubelat F6FBB <jpr at f6fbb.org>	
+
+All others		Jonathon Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..d60c31a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+

+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+

+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+

+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+

+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+

+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program 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 2 of the License, or
+    (at your option) any later version.
+
+    This program 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 this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..7cd0baf
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,94 @@
+ax25-tools (0.0.10)
+	* Version number 0.0.10 was used for several years in CVS.  To avoid
+	  confusion we decieded to not make a 0.0.9 tarball release.
+	* Fixed numerous build warnings and errors with modern distributions
+	  and compilers and other functional errors.
+	* Support for UNIX98 pseudo terminals.
+	* Support UNIX authentication for axspawn logins.
+	* Axspawn now support Hufman compression.
+	* An IP address is no longer mandatory for nrattach, kissattach.
+	* kissparms now allows to send a raw value to the driver and to set
+	  the CRC mode by command line option.
+	* axspawn now records the time at microsecond accuracy in utmp.
+	* removed old kernel patches for yum support for kernels 2.0.36 and
+	  2.2.1.  In the unexpected case somebody should still need them the
+	  patches can be found in older releases and the source archive.
+	* Add support for building rpm packages.
+
+ -- Ralf Baechle DL5RB <ralf at linux-mips.org>  Sat, 6 Jun 2009 17:36:01 +0100
+
+ax25-tools (0.0.9)
+	* Fix for mkiss pid problem 
+	* Removed inline statesment in hdrvcomm.c
+	* Added remaining missing sys/time.h
+	* Netromd now uses PF_SOCKET
+	* Changed sys_errlist[] to strerror()
+
+ -- Craig Small <csmall at small.dropbear.id.au>  NO RELEASE YET
+
+ax25-tools (0.0.8)
+	* kissattach now tells you where it thinks the config file is
+	* rip98r metric patch form Jean-Paul
+	* Fix for FTLK_LIB for configure.in from Hans
+	* Works better with newer GCCs (thanks again to Hans)
+	* Fixed sockaddr/osockaddr problem in ttylink
+	* Changed bcopy and bzero to memcpy and memset
+	* netromd was printing raw callsigns, now use ax25_ntoa()
+	* synced dmascc_cfg to Klauss' latest
+
+ -- Craig Small <csmall at small.dropbear.id.au>  
+
+ax25-tools (0.0.7)
+	* Fixed automake/autoconf stuff to sort out FLTK tools.
+
+ -- Craig Small <csmall at small.dropbear.id.au>  Thu, 26 Oct 2000 14:19:32 +1100
+
+ax25-tools (0.0.6)
+	* Added the new fltk smdiag and friends and put the old non-X based
+	  ones back in.
+	* Changed all references of rip98.conf to rip98d.conf
+	* Attempted to hunt down and change all my email addresses
+	* Another Tomi's patch for nrparms and user_call
+
+ -- Craig Small <csmall at small.dropbear.id.au>  Tue Jan  4 15:13:15 EST 2000
+
+ax25-tools (0.0.5)
+
+	* Added Tomi's patch to correctly detect broken headers
+
+ -- Craig Small <csmall at small.dropbear.id.au>  Mon, 23 Aug 1999 12:41:12 +1000
+
+ax25-tools (0.0.4)
+	
+	* Changed kissattach so that it demands an IP address
+	* The hdlc stuff now has -i in it
+	* mheardd.c patch for old glibc headers
+	* kissattach.c basename changed to kiss_bname due to conflict
+	* configure checks for linux/dmascc.h
+	* kiss/Makefile.am uses ln -sf instead of ln -s
+
+ --Craig Small <csmall at small.dropbear.id.au>  Tue, 10 Aug 1999 11:44:19 +1000,
+
+ax25-tools (0.0.3)
+
+  * Fixed configure.in so it doesn't check for libax25io
+  * Added dmascc configuration program
+  * Added spattach
+  * Added yamcfg
+  * Removed nrports, axports and rsports, they are in the library
+  * Had another crack at getting config locations portable
+
+ -- Craig Small <csmall at small.dropbear.id.au> 30 June 1999
+
+ax25-tools (0.0.2)
+
+  * First public release
+
+ -- Craig Small <csmall at small.dropbear.id.au> 21 April 1999
+
+ax25-tools (0.0.1)
+
+	* Initial version from Terry Dawson's code, split from the old
+	  ax25-utils package. Uses new ntoa aton calls.
+
+ -- Craig Small <csmall at small.dropbear.id.au>
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..a1e89e1
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+   The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package, generally using the just-built uninstalled binaries.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..3215b0f
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,13 @@
+
+installconf:
+	@for app in $(SUBDIRS); do $(MAKE) -C $$app installconf; done
+
+SUBDIRS = ax25 hdlcutil kiss 6pack netrom rose tcpip user_call yamdrv dmascc
+
+EXTRA_DIST = pathnames.h ax25-tools.spec
+
+INCLUDES = -DAX25_SYSCONFDIR=\""$(sysconfdir)/ax25/"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(localstatedir)/ax25/"\" 
+
+AX25_SYSCONFDIR=@sysconfdir@/ax25/
+AX25_LOCALSTATEDIR=@localstatedir@/ax25/
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..0fd05d3
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,745 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/ax25-tools.spec.in \
+	$(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
+	ChangeLog INSTALL NEWS depcomp install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = ax25-tools.spec
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = ax25 hdlcutil kiss 6pack netrom rose tcpip user_call yamdrv dmascc
+EXTRA_DIST = pathnames.h ax25-tools.spec
+INCLUDES = -DAX25_SYSCONFDIR=\""$(sysconfdir)/ax25/"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(localstatedir)/ax25/"\" 
+
+AX25_SYSCONFDIR = @sysconfdir@/ax25/
+AX25_LOCALSTATEDIR = @localstatedir@/ax25/
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+ax25-tools.spec: $(top_builddir)/config.status $(srcdir)/ax25-tools.spec.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod u+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile config.h
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+	ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+	dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+	distcheck distclean distclean-generic distclean-hdr \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
+
+installconf:
+	@for app in $(SUBDIRS); do $(MAKE) -C $$app installconf; done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..51c9a85
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,3 @@
+This is some news about ax25-tools
+
+
diff --git a/README b/README
new file mode 100644
index 0000000..293e64f
--- /dev/null
+++ b/README
@@ -0,0 +1,13 @@
+AX25 Tools
+==========
+
+Note that kissattch has changed its command line format slight.  While the
+old format will work, the -i option is now, err, not optional.  This was
+done to stop the million or so emails we get on linux-hams email list
+saying why do people get axports unconfigured even after a kissattach 
+command.
+
+
+  - Craig Small <csmall at small.dropbear.id.au>
+
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..381dd81
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,971 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.6], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/ax25-tools.spec b/ax25-tools.spec
new file mode 100644
index 0000000..248f970
--- /dev/null
+++ b/ax25-tools.spec
@@ -0,0 +1,173 @@
+Name:           ax25-tools
+Version:        0.0.10rc4
+Release:        1
+Summary:        Non-GUI tools used to configure an AX.25 enabled computer
+
+Group:          Applications/Communications
+License:        GPLv2+
+URL:            http://www.linux-ax25.org/
+Source0:        http://www.linux-ax25.org/pub/%{name}/%{name}-0.0.10-rc4.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-0.0.10-rc4-%{release}-root-%(%{__id_u} -n)
+BuildRequires:	libax25-devel
+BuildRequires:	libXext-devel, libX11-devel, libXi-devel, fltk-devel
+BuildRequires:	mesa-libGLU-devel
+
+%description
+ax25-tools is a collection of tools that are used to configure an ax.25 enabled
+computer. They will configure interfaces and assign callsigns to ports as well
+as Net/ROM and ROSE configuration.  This package only contains the command
+line programs; the GUI programs are contained in ax25-tools-x package.
+
+ * m6pack - handle multiple 6pack TNCs on a single interface
+ * ax25d - general purpose AX.25, NET/ROM and Rose daemon
+ * axctl - configure/Kill running AX.25 connections
+ * axparms - configure AX.25 interfaces
+ * axspawn - allow automatic login to a Linux system
+ * beacon - transmit periodic messages on an AX.25 port
+ * bpqparms - configure BPQ ethernet devices
+ * mheardd - display AX.25 calls recently heard
+ * rxecho - transparently route AX.25 packets between ports
+ * mheard - collect information about packet activity
+ * dmascc_cfg - configure dmascc devices
+ * sethdlc - get/set Linux HDLC packet radio modem driver port information
+ * smmixer - get/set Linux soundcard packet radio modem driver mixer
+ * kissattach - Attach a KISS or 6PACK interface
+ * kissnetd - create a virtual network
+ * kissparms - configure KISS TNCs
+ * mkiss - attach multiple KISS interfaces
+ * net2kiss - convert a network AX.25 driver to a KISS stream on a pty
+ * netromd - send and receive NET/ROM routing messages
+ * nodesave - saves NET/ROM routing information
+ * nrattach - start a NET/ROM interface
+ * nrparms - configure a NET/ROM interface
+ * nrsdrv - KISS to NET/ROM serial converter
+ * rsattach - start a ROSE interface
+ * rsdwnlnk - user exit from the ROSE network
+ * rsmemsiz - monitor the ROSE subsystem
+ * rsusers.sh - monitor AX.25, NET/ROM and ROSE users
+ * rsparms - configure a ROSE interface
+ * rsuplnk - User entry into the ROSE network
+ * rip98d - RIP98 routing daemon
+ * ttylinkd - TTYlink daemon for AX.25, NET/ROM, ROSE and IP
+ * ax25_call - Make an AX.25 connection
+ * netrom_call - Make a NET/ROM connection
+ * rose_call - Make a ROSE connection
+ * tcp_call - Make a TCP connection
+ * yamcfg - configure a YAM interface
+
+%package docs
+Summary:	Documentation for ax25-tools and ax25-tools-x
+Group:		Documentation
+
+%description docs
+This package contains the documentation for ax25-tools and ax25-tools-x.
+
+%package x
+
+Summary:	Tools used to configure an AX.25 enabled computer
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description x
+ax25-tools is a collection of tools that are used to configure an ax.25 enabled
+computer.  This package contains the GUI programs to configure Baycom modem
+and sound modem.
+
+ * smdiag - Linux soundcard packet radio modem driver diagnostics utility
+ * xfhdlcchpar - kernel HDLC radio modem driver channel parameter utility
+ * xfhdlcst - kernel HDLC radio modem driver status display utility
+ * xfsmdiag - kernel soundcard radio modem driver diagnostics utility
+ * xfsmmixer - kernel soundcard radio modem driver mixer utility
+
+%prep
+%setup -q -n %{name}-0.0.10-rc4
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING README
+%{_bindir}/axgetput
+%{_bindir}/bget
+%{_bindir}/bput
+%{_bindir}/mheard
+%{_bindir}/sethdlc
+%{_bindir}/smmixer
+%{_sbindir}/ax25_call
+%{_sbindir}/ax25d
+%{_sbindir}/axctl
+%{_sbindir}/axparms
+%{_sbindir}/axspawn
+%{_sbindir}/beacon
+%{_sbindir}/bpqparms
+%{_sbindir}/dmascc_cfg
+%{_sbindir}/kissattach
+%{_sbindir}/kissnetd
+%{_sbindir}/kissparms
+%{_sbindir}/m6pack
+%{_sbindir}/mcs2h
+%{_sbindir}/mheardd
+%{_sbindir}/mkiss
+%{_sbindir}/net2kiss
+%{_sbindir}/netrom_call
+%{_sbindir}/netromd
+%{_sbindir}/nodesave
+%{_sbindir}/nrattach
+%{_sbindir}/nrparms
+%{_sbindir}/nrsdrv
+%{_sbindir}/rip98d
+%{_sbindir}/rose_call
+%{_sbindir}/rsattach
+%{_sbindir}/rsdwnlnk
+%{_sbindir}/rsmemsiz
+%{_sbindir}/rsparms
+%{_sbindir}/rsuplnk
+%{_sbindir}/rsusers.sh
+%{_sbindir}/rxecho
+%{_sbindir}/spattach
+%{_sbindir}/tcp_call
+%{_sbindir}/ttylinkd
+%{_sbindir}/yamcfg
+
+%files docs
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING
+%doc yamdrv/README.yamdrv user_call/README.user_call tcpip/ttylinkd.README dmascc/README.dmascc
+%{_mandir}/man?/*
+%{_docdir}/*
+
+%files x
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING
+%{_bindir}/smdiag
+%{_sbindir}/xfhdlcchpar
+%{_sbindir}/xfhdlcst
+%{_sbindir}/xfsmdiag
+%{_sbindir}/xfsmmixer
+
+%changelog
+* Tue Jun 4 2013 Ralf Baechle <ralf at linux-mips.org>
+- Move doc files to separate docs package.
+- Reset Release to 1.
+
+* Sat Jun 25 2011 Ralf Baechle <ralf at linux-mips.org>
+- Add BuildRequires to libax25-devel, libXext-devel and libX11-devel.
+- Move smdiag, xfhdlcchpar, xfhdlcst, xfsmdiag and xfsmmixer into a separate
+  package.
+- Bump Release to 4.
+
+* Fri Jun 24 2011 Ralf Baechle <ralf at linux-mips.org>
+- Add BuildRequires to libXi-devel and fltk-devel
+- Bump Release to 2.
+
+* Sat Jun 27 2009 Ralf Baechle <ralf at linux-mips.org>
+- Initial version
diff --git a/ax25-tools.spec.in b/ax25-tools.spec.in
new file mode 100644
index 0000000..4eb11d4
--- /dev/null
+++ b/ax25-tools.spec.in
@@ -0,0 +1,173 @@
+Name:           ax25-tools
+Version:        @BASEVERSION@@EXTRAVERSION@
+Release:        1
+Summary:        Non-GUI tools used to configure an AX.25 enabled computer
+
+Group:          Applications/Communications
+License:        GPLv2+
+URL:            http://www.linux-ax25.org/
+Source0:        http://www.linux-ax25.org/pub/%{name}/%{name}- at VERSION@.tar.gz
+BuildRoot:      %{_tmppath}/%{name}- at VERSION@-%{release}-root-%(%{__id_u} -n)
+BuildRequires:	libax25-devel
+BuildRequires:	libXext-devel, libX11-devel, libXi-devel, fltk-devel
+BuildRequires:	mesa-libGLU-devel
+
+%description
+ax25-tools is a collection of tools that are used to configure an ax.25 enabled
+computer. They will configure interfaces and assign callsigns to ports as well
+as Net/ROM and ROSE configuration.  This package only contains the command
+line programs; the GUI programs are contained in ax25-tools-x package.
+
+ * m6pack - handle multiple 6pack TNCs on a single interface
+ * ax25d - general purpose AX.25, NET/ROM and Rose daemon
+ * axctl - configure/Kill running AX.25 connections
+ * axparms - configure AX.25 interfaces
+ * axspawn - allow automatic login to a Linux system
+ * beacon - transmit periodic messages on an AX.25 port
+ * bpqparms - configure BPQ ethernet devices
+ * mheardd - display AX.25 calls recently heard
+ * rxecho - transparently route AX.25 packets between ports
+ * mheard - collect information about packet activity
+ * dmascc_cfg - configure dmascc devices
+ * sethdlc - get/set Linux HDLC packet radio modem driver port information
+ * smmixer - get/set Linux soundcard packet radio modem driver mixer
+ * kissattach - Attach a KISS or 6PACK interface
+ * kissnetd - create a virtual network
+ * kissparms - configure KISS TNCs
+ * mkiss - attach multiple KISS interfaces
+ * net2kiss - convert a network AX.25 driver to a KISS stream on a pty
+ * netromd - send and receive NET/ROM routing messages
+ * nodesave - saves NET/ROM routing information
+ * nrattach - start a NET/ROM interface
+ * nrparms - configure a NET/ROM interface
+ * nrsdrv - KISS to NET/ROM serial converter
+ * rsattach - start a ROSE interface
+ * rsdwnlnk - user exit from the ROSE network
+ * rsmemsiz - monitor the ROSE subsystem
+ * rsusers.sh - monitor AX.25, NET/ROM and ROSE users
+ * rsparms - configure a ROSE interface
+ * rsuplnk - User entry into the ROSE network
+ * rip98d - RIP98 routing daemon
+ * ttylinkd - TTYlink daemon for AX.25, NET/ROM, ROSE and IP
+ * ax25_call - Make an AX.25 connection
+ * netrom_call - Make a NET/ROM connection
+ * rose_call - Make a ROSE connection
+ * tcp_call - Make a TCP connection
+ * yamcfg - configure a YAM interface
+
+%package docs
+Summary:	Documentation for ax25-tools and ax25-tools-x
+Group:		Documentation
+
+%description docs
+This package contains the documentation for ax25-tools and ax25-tools-x.
+
+%package x
+
+Summary:	Tools used to configure an AX.25 enabled computer
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description x
+ax25-tools is a collection of tools that are used to configure an ax.25 enabled
+computer.  This package contains the GUI programs to configure Baycom modem
+and sound modem.
+
+ * smdiag - Linux soundcard packet radio modem driver diagnostics utility
+ * xfhdlcchpar - kernel HDLC radio modem driver channel parameter utility
+ * xfhdlcst - kernel HDLC radio modem driver status display utility
+ * xfsmdiag - kernel soundcard radio modem driver diagnostics utility
+ * xfsmmixer - kernel soundcard radio modem driver mixer utility
+
+%prep
+%setup -q -n %{name}- at VERSION@
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING README
+%{_bindir}/axgetput
+%{_bindir}/bget
+%{_bindir}/bput
+%{_bindir}/mheard
+%{_bindir}/sethdlc
+%{_bindir}/smmixer
+%{_sbindir}/ax25_call
+%{_sbindir}/ax25d
+%{_sbindir}/axctl
+%{_sbindir}/axparms
+%{_sbindir}/axspawn
+%{_sbindir}/beacon
+%{_sbindir}/bpqparms
+%{_sbindir}/dmascc_cfg
+%{_sbindir}/kissattach
+%{_sbindir}/kissnetd
+%{_sbindir}/kissparms
+%{_sbindir}/m6pack
+%{_sbindir}/mcs2h
+%{_sbindir}/mheardd
+%{_sbindir}/mkiss
+%{_sbindir}/net2kiss
+%{_sbindir}/netrom_call
+%{_sbindir}/netromd
+%{_sbindir}/nodesave
+%{_sbindir}/nrattach
+%{_sbindir}/nrparms
+%{_sbindir}/nrsdrv
+%{_sbindir}/rip98d
+%{_sbindir}/rose_call
+%{_sbindir}/rsattach
+%{_sbindir}/rsdwnlnk
+%{_sbindir}/rsmemsiz
+%{_sbindir}/rsparms
+%{_sbindir}/rsuplnk
+%{_sbindir}/rsusers.sh
+%{_sbindir}/rxecho
+%{_sbindir}/spattach
+%{_sbindir}/tcp_call
+%{_sbindir}/ttylinkd
+%{_sbindir}/yamcfg
+
+%files docs
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING
+%doc yamdrv/README.yamdrv user_call/README.user_call tcpip/ttylinkd.README dmascc/README.dmascc
+%{_mandir}/man?/*
+%{_docdir}/*
+
+%files x
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING
+%{_bindir}/smdiag
+%{_sbindir}/xfhdlcchpar
+%{_sbindir}/xfhdlcst
+%{_sbindir}/xfsmdiag
+%{_sbindir}/xfsmmixer
+
+%changelog
+* Tue Jun 4 2013 Ralf Baechle <ralf at linux-mips.org>
+- Move doc files to separate docs package.
+- Reset Release to 1.
+
+* Sat Jun 25 2011 Ralf Baechle <ralf at linux-mips.org>
+- Add BuildRequires to libax25-devel, libXext-devel and libX11-devel.
+- Move smdiag, xfhdlcchpar, xfhdlcst, xfsmdiag and xfsmmixer into a separate
+  package.
+- Bump Release to 4.
+
+* Fri Jun 24 2011 Ralf Baechle <ralf at linux-mips.org>
+- Add BuildRequires to libXi-devel and fltk-devel
+- Bump Release to 2.
+
+* Sat Jun 27 2009 Ralf Baechle <ralf at linux-mips.org>
+- Initial version
diff --git a/ax25/Makefile.am b/ax25/Makefile.am
new file mode 100644
index 0000000..f5c0ebb
--- /dev/null
+++ b/ax25/Makefile.am
@@ -0,0 +1,48 @@
+SUBDIRS = axgetput 
+
+etcfiles = ax25.profile ax25d.conf axspawn.conf rxecho.conf
+varfiles = mheard.dat
+
+installconf:
+	$(mkinstalldirs) $(DESTDIR)$(AX25_SYSCONFDIR)
+	@list='$(etcfiles)'; for p in $$list; do \
+	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p"; \
+	  $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p; \
+	done
+	$(mkinstalldirs) $(DESTDIR)$(AX25_LOCALSTATEDIR)/mheard
+	@list='$(varfiles)'; for p in $$list; do \
+	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_LOCALSTATEDIR)/mheard/$$p"; \
+	  $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_LOCALSTATEDIR)/mheard/$$p; \
+	done
+
+
+sbin_PROGRAMS = ax25d axctl axparms axspawn beacon bpqparms mheardd rxecho
+
+bin_PROGRAMS = mheard
+
+LDADD = $(AX25_LIB)
+axspawn_LDADD = $(AX25_LIB) $(UTIL_LIB)
+
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR=$(sysconfdir)/ax25/
+AX25_LOCALSTATEDIR=$(localstatedir)/ax25/
+
+man_MANS = ax25.4 ax25d.conf.5 axspawn.conf.5 rxecho.conf.5 \
+	   ax25d.8 axctl.8 axparms.8 axspawn.8 beacon.8 bpqparms.8 \
+	   mheard.1 mheardd.8 rxecho.8
+
+
+
+EXTRA_DIST = $(man_MANS) $(etcfiles) $(varfiles)
+
+ax25d_SOURCES = ax25d.c
+axctl_SOURCES = axctl.c
+axparms_SOURCES = axparms.c
+axspawn_SOURCES = axspawn.c axspawn.h access.c access.h md5.c md5.h
+beacon_SOURCES = beacon.c
+bpqparms_SOURCES = bpqparms.c
+mheard_SOURCES = mheard.c
+mheardd_SOURCES = mheardd.c
+rxecho_SOURCES = rxecho.c
diff --git a/ax25/Makefile.in b/ax25/Makefile.in
new file mode 100644
index 0000000..05de393
--- /dev/null
+++ b/ax25/Makefile.in
@@ -0,0 +1,1023 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+sbin_PROGRAMS = ax25d$(EXEEXT) axctl$(EXEEXT) axparms$(EXEEXT) \
+	axspawn$(EXEEXT) beacon$(EXEEXT) bpqparms$(EXEEXT) \
+	mheardd$(EXEEXT) rxecho$(EXEEXT)
+bin_PROGRAMS = mheard$(EXEEXT)
+subdir = ax25
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
+	"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man4dir)" \
+	"$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
+PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+am_ax25d_OBJECTS = ax25d.$(OBJEXT)
+ax25d_OBJECTS = $(am_ax25d_OBJECTS)
+ax25d_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+ax25d_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_axctl_OBJECTS = axctl.$(OBJEXT)
+axctl_OBJECTS = $(am_axctl_OBJECTS)
+axctl_LDADD = $(LDADD)
+axctl_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_axparms_OBJECTS = axparms.$(OBJEXT)
+axparms_OBJECTS = $(am_axparms_OBJECTS)
+axparms_LDADD = $(LDADD)
+axparms_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_axspawn_OBJECTS = axspawn.$(OBJEXT) access.$(OBJEXT) md5.$(OBJEXT)
+axspawn_OBJECTS = $(am_axspawn_OBJECTS)
+axspawn_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_beacon_OBJECTS = beacon.$(OBJEXT)
+beacon_OBJECTS = $(am_beacon_OBJECTS)
+beacon_LDADD = $(LDADD)
+beacon_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_bpqparms_OBJECTS = bpqparms.$(OBJEXT)
+bpqparms_OBJECTS = $(am_bpqparms_OBJECTS)
+bpqparms_LDADD = $(LDADD)
+bpqparms_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_mheard_OBJECTS = mheard.$(OBJEXT)
+mheard_OBJECTS = $(am_mheard_OBJECTS)
+mheard_LDADD = $(LDADD)
+mheard_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_mheardd_OBJECTS = mheardd.$(OBJEXT)
+mheardd_OBJECTS = $(am_mheardd_OBJECTS)
+mheardd_LDADD = $(LDADD)
+mheardd_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_rxecho_OBJECTS = rxecho.$(OBJEXT)
+rxecho_OBJECTS = $(am_rxecho_OBJECTS)
+rxecho_LDADD = $(LDADD)
+rxecho_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(ax25d_SOURCES) $(axctl_SOURCES) $(axparms_SOURCES) \
+	$(axspawn_SOURCES) $(beacon_SOURCES) $(bpqparms_SOURCES) \
+	$(mheard_SOURCES) $(mheardd_SOURCES) $(rxecho_SOURCES)
+DIST_SOURCES = $(ax25d_SOURCES) $(axctl_SOURCES) $(axparms_SOURCES) \
+	$(axspawn_SOURCES) $(beacon_SOURCES) $(bpqparms_SOURCES) \
+	$(mheard_SOURCES) $(mheardd_SOURCES) $(rxecho_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man1dir = $(mandir)/man1
+man4dir = $(mandir)/man4
+man5dir = $(mandir)/man5
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man_MANS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = axgetput 
+etcfiles = ax25.profile ax25d.conf axspawn.conf rxecho.conf
+varfiles = mheard.dat
+LDADD = $(AX25_LIB)
+axspawn_LDADD = $(AX25_LIB) $(UTIL_LIB)
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR = $(sysconfdir)/ax25/
+AX25_LOCALSTATEDIR = $(localstatedir)/ax25/
+man_MANS = ax25.4 ax25d.conf.5 axspawn.conf.5 rxecho.conf.5 \
+	   ax25d.8 axctl.8 axparms.8 axspawn.8 beacon.8 bpqparms.8 \
+	   mheard.1 mheardd.8 rxecho.8
+
+EXTRA_DIST = $(man_MANS) $(etcfiles) $(varfiles)
+ax25d_SOURCES = ax25d.c
+axctl_SOURCES = axctl.c
+axparms_SOURCES = axparms.c
+axspawn_SOURCES = axspawn.c axspawn.h access.c access.h md5.c md5.h
+beacon_SOURCES = beacon.c
+bpqparms_SOURCES = bpqparms.c
+mheard_SOURCES = mheard.c
+mheardd_SOURCES = mheardd.c
+rxecho_SOURCES = rxecho.c
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ax25/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu ax25/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+ax25d$(EXEEXT): $(ax25d_OBJECTS) $(ax25d_DEPENDENCIES) $(EXTRA_ax25d_DEPENDENCIES) 
+	@rm -f ax25d$(EXEEXT)
+	$(LINK) $(ax25d_OBJECTS) $(ax25d_LDADD) $(LIBS)
+axctl$(EXEEXT): $(axctl_OBJECTS) $(axctl_DEPENDENCIES) $(EXTRA_axctl_DEPENDENCIES) 
+	@rm -f axctl$(EXEEXT)
+	$(LINK) $(axctl_OBJECTS) $(axctl_LDADD) $(LIBS)
+axparms$(EXEEXT): $(axparms_OBJECTS) $(axparms_DEPENDENCIES) $(EXTRA_axparms_DEPENDENCIES) 
+	@rm -f axparms$(EXEEXT)
+	$(LINK) $(axparms_OBJECTS) $(axparms_LDADD) $(LIBS)
+axspawn$(EXEEXT): $(axspawn_OBJECTS) $(axspawn_DEPENDENCIES) $(EXTRA_axspawn_DEPENDENCIES) 
+	@rm -f axspawn$(EXEEXT)
+	$(LINK) $(axspawn_OBJECTS) $(axspawn_LDADD) $(LIBS)
+beacon$(EXEEXT): $(beacon_OBJECTS) $(beacon_DEPENDENCIES) $(EXTRA_beacon_DEPENDENCIES) 
+	@rm -f beacon$(EXEEXT)
+	$(LINK) $(beacon_OBJECTS) $(beacon_LDADD) $(LIBS)
+bpqparms$(EXEEXT): $(bpqparms_OBJECTS) $(bpqparms_DEPENDENCIES) $(EXTRA_bpqparms_DEPENDENCIES) 
+	@rm -f bpqparms$(EXEEXT)
+	$(LINK) $(bpqparms_OBJECTS) $(bpqparms_LDADD) $(LIBS)
+mheard$(EXEEXT): $(mheard_OBJECTS) $(mheard_DEPENDENCIES) $(EXTRA_mheard_DEPENDENCIES) 
+	@rm -f mheard$(EXEEXT)
+	$(LINK) $(mheard_OBJECTS) $(mheard_LDADD) $(LIBS)
+mheardd$(EXEEXT): $(mheardd_OBJECTS) $(mheardd_DEPENDENCIES) $(EXTRA_mheardd_DEPENDENCIES) 
+	@rm -f mheardd$(EXEEXT)
+	$(LINK) $(mheardd_OBJECTS) $(mheardd_LDADD) $(LIBS)
+rxecho$(EXEEXT): $(rxecho_OBJECTS) $(rxecho_DEPENDENCIES) $(EXTRA_rxecho_DEPENDENCIES) 
+	@rm -f rxecho$(EXEEXT)
+	$(LINK) $(rxecho_OBJECTS) $(rxecho_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/access.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ax25d.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/axctl.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/axparms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/axspawn.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/beacon.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bpqparms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/md5.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mheard.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mheardd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rxecho.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man1: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man1dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.1[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man1dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.1[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+install-man4: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man4dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man4dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man4dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.4[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man4dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man4dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man4:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man4dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.4[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man4dir)'; $(am__uninstall_files_from_dir)
+install-man5: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man5dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.5[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man5:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man5dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.5[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
+install-man8: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man8dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.8[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man8:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man8dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.8[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-sbinPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man: install-man1 install-man4 install-man5 install-man8
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man \
+	uninstall-sbinPROGRAMS
+
+uninstall-man: uninstall-man1 uninstall-man4 uninstall-man5 \
+	uninstall-man8
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-sbinPROGRAMS ctags ctags-recursive \
+	distclean distclean-compile distclean-generic distclean-tags \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-binPROGRAMS install-data install-data-am \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-html install-html-am install-info install-info-am \
+	install-man install-man1 install-man4 install-man5 \
+	install-man8 install-pdf install-pdf-am install-ps \
+	install-ps-am install-sbinPROGRAMS install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-binPROGRAMS uninstall-man \
+	uninstall-man1 uninstall-man4 uninstall-man5 uninstall-man8 \
+	uninstall-sbinPROGRAMS
+
+
+installconf:
+	$(mkinstalldirs) $(DESTDIR)$(AX25_SYSCONFDIR)
+	@list='$(etcfiles)'; for p in $$list; do \
+	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p"; \
+	  $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p; \
+	done
+	$(mkinstalldirs) $(DESTDIR)$(AX25_LOCALSTATEDIR)/mheard
+	@list='$(varfiles)'; for p in $$list; do \
+	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_LOCALSTATEDIR)/mheard/$$p"; \
+	  $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_LOCALSTATEDIR)/mheard/$$p; \
+	done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/ax25/access.c b/ax25/access.c
new file mode 100644
index 0000000..bf02b04
--- /dev/null
+++ b/ax25/access.c
@@ -0,0 +1,396 @@
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <time.h>
+#include <limits.h>
+#include <pwd.h>
+#include <fcntl.h>
+
+#include "access.h"
+#include "md5.h"
+#include "axspawn.h"
+
+#define CONV_RAND_MAX 0x7fffffff
+
+#define	SYSTEMPW 0
+#define	USERPW	 1
+
+long seed = 1L;
+
+int conv_rand(void);
+void conv_randomize(void);
+int conv_random(int num, int base);
+char *generate_rand_pw(int len);
+void calc_md5_pw (const char *MD5prompt, const char *MD5pw, char *MD5result);
+static void char_to_hex(char *c, char *h, int n);
+
+/*--------------------------------------------------------------------------*/
+
+int conv_rand(void)
+{
+	seed = (1103515245L * seed + 12345) & CONV_RAND_MAX;
+	return ((int) (seed & 077777));
+}
+
+/*--------------------------------------------------------------------------*/
+
+void conv_randomize(void)
+{
+	seed = (time(0) & CONV_RAND_MAX);
+}
+
+/*--------------------------------------------------------------------------*/
+
+int conv_random(int num, int base)
+{
+	return (((long) (conv_rand() * time(0)) & CONV_RAND_MAX) % num + base);
+}
+
+/*--------------------------------------------------------------------------*/
+
+static void char_to_hex(char *c, char *h, int n)
+{
+
+	int  i;
+	static char  *hextable = "0123456789abcdef";
+
+	for (i = 0; i < n; i++) {
+		*h++ = hextable[(*c>>4)&0xf];
+		*h++ = hextable[*c++ &0xf];
+	}
+	*h = '\0';
+}
+
+/*--------------------------------------------------------------------------*/
+
+char *generate_rand_pw(int len)
+{
+	static char pass[PASSSIZE+1];
+	int i, j;
+
+	pass[0] = 0;
+
+	if (seed == 1L)
+		conv_randomize();
+
+	if (len < 1)
+		return pass;
+
+	if (len > PASSSIZE)
+		len = PASSSIZE;
+
+        for (i = 0; i < len; i++) {
+                j = conv_random(10+26*2, 0);
+                if (j < 10) {
+                        pass[i] = j + '0';
+                        continue;
+                }
+                j -= 10;
+                if (j < 26) {
+                        pass[i] = j + 'A';
+			continue;
+                }
+                j -= 26;
+                pass[i] = j + 'a';
+        }
+        pass[len] = 0;
+
+        return pass;
+}
+
+/*--------------------------------------------------------------------------*/
+
+void ask_pw_sys(char *prompt, char *pass_want, char *pw)
+{
+	char buffer[2048];
+	int five_digits[5];
+	int pwlen;
+	int i, j;
+
+	pass_want[0]= 0;
+
+	if (!pw || !*pw)
+		return;
+
+	pwlen = strlen(pw);
+
+	if (seed == 1L)
+		conv_randomize();
+
+	for (i = 0; i < 5; i++) {
+		int k;
+again:
+		j = conv_random(pwlen, 0);
+		/* store generated request-numbers  */
+		five_digits[i] = j+1; /* pos0 refers as 1  */
+		/* same number again? */
+		for (k = 0; k < i; k++) {
+			if (five_digits[k] == five_digits[i])
+				goto again;
+		}
+		/* store expected string in cp->passwd  */
+		pass_want[i] = pw[j];
+	}
+	/* and terminate the string  */
+	pass_want[i] = 0;
+
+	sprintf(buffer, "\r%s>  %d %d %d %d %d\r", prompt, five_digits[0], five_digits[1], five_digits[2], five_digits[3], five_digits[4]);
+	write_ax25(buffer, strlen(buffer), 1);
+}
+
+/*--------------------------------------------------------------------------*/
+
+void ask_pw_md5(char *prompt, char *pass_want, char *pw)
+{
+#define	SALT_LEN	10
+	char buffer[2048];
+	char cipher[16];
+	char key[256];
+	char *challenge;
+
+	pass_want[0]= 0;
+
+	if (!pw || !*pw)
+		return;
+
+	if (seed == 1L)
+		conv_randomize();
+
+	strncpy(key, pw, sizeof(key));
+	key[sizeof(key)-1] = 0;
+
+	/* compute random salt  */
+	challenge = generate_rand_pw(SALT_LEN);
+
+	/* ask for proper response to this challenge:  */
+	sprintf(buffer, "\r%s> [%s]\r", prompt, challenge);
+	write_ax25(buffer, strlen(buffer), 1);
+	/* compute md5 challenge  */
+	calc_md5_pw(challenge, key, cipher);
+	/* store expected answer  */
+	char_to_hex(cipher, pass_want, 16);
+}
+
+/*--------------------------------------------------------------------------*/
+
+void calc_md5_pw (const char *MD5prompt, const char *MD5pw, char *MD5result)
+{
+  MD5_CTX context;
+  short i, n, len;
+  char buffer[1024];
+
+  strncpy(buffer, MD5prompt, 10);
+  buffer[10] = 0;
+  strcat(buffer, MD5pw);
+
+  MD5Init(&context);
+
+  len = strlen(buffer);
+  for (i= 0; i < len; i += 16) {
+    n = (len - i) > 16 ? 16 : (len - i);
+    MD5Update(&context, buffer+i, n);
+  }
+
+  MD5Final(&context);
+
+  MD5result[0] = '\0';
+  for (i = 0; i < 16; i++) {
+    MD5result[i] = context.digest[i];
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+void write_example_passwd(char *pwfile, char pwlocation, struct passwd *pw) {
+	FILE * f;
+	int i;
+
+	if ((i = open(pwfile, O_CREAT|O_WRONLY|O_TRUNC, (S_IRUSR | S_IWUSR | (pwlocation == SYSTEMPW ? (S_IRGRP /* | S_IWGRP */ ) : 0)))) == -1)
+		return;
+	fchown(i, (pwlocation == SYSTEMPW ? 0 : pw->pw_uid), (pwlocation == SYSTEMPW ? 0 : pw->pw_gid));
+	close(i);
+	if ( ! (f = fopen(pwfile, "w")) )
+		return;
+	fprintf(f, "# %s Password file for axspawn\n", (pwlocation == SYSTEMPW ? "System" : "User")); 
+	if (pwlocation == SYSTEMPW) {
+		fprintf(f, "# disable user self-administered passwords in $HOME/.%s\n", PWFILE);
+		fprintf(f, "# with the line \"systempasswordonly\"\n");
+		fprintf(f, "# systempasswordonly\n");
+	}
+	fprintf(f, "# Examples (sys and md5 passwords may differ):\n");
+	fprintf(f, "# md5 standard (secure) - length: >= %d and <= %d characters\n", MINPWLEN_MD5, PASSSIZE); 
+	fprintf(f, "# %smd5:%s\n", (pwlocation == SYSTEMPW ? "username:" : ""), generate_rand_pw(MINPWLEN_MD5));
+	fprintf(f, "# sys/baycom standard (not very secure) - length: >= %d and <= %d characters\n", MINPWLEN_SYS, PASSSIZE);
+	fprintf(f, "# %ssys:%s\n", (pwlocation == SYSTEMPW ? "username:" : ""), generate_rand_pw(MINPWLEN_SYS));
+	fprintf(f, "# unix standard (plaintext): no password is read here. Your password is looked\n");
+	fprintf(f, "#   up during login in the system password table /etc/passwd or /etc/shadow\n");
+	fprintf(f, "# unix\n");
+	fclose(f);
+}
+
+/*--------------------------------------------------------------------------*/
+
+char *read_pwd (struct passwd *pw, int *pwtype)
+{
+	FILE * f = 0;
+	struct stat statbuf;
+	char pwfile[PATH_MAX + 1];
+	int len;
+	char pwlocation;
+	char buf[2048];
+	int only_systempw = 0;
+	char *pass = 0;
+	char *p_buf;
+	char *p;
+
+
+	for (pwlocation = 0; pwlocation < 2; pwlocation++) {
+
+		if (pwlocation == SYSTEMPW) {
+			sprintf(pwfile, "/%s/%s", AX25_SYSCONFDIR, PWFILE);
+			if (stat(pwfile, &statbuf)) {
+				write_example_passwd(pwfile, pwlocation, pw);
+				continue;
+			}
+			if (!S_ISREG(statbuf.st_mode) || (statbuf.st_mode & (S_IROTH | S_IWOTH)))
+				continue;
+			if ( !(f = fopen(pwfile, "r")) )
+				continue;
+		} else {
+			if (only_systempw)
+				goto end;
+			snprintf(pwfile, sizeof(pwfile), "%s/.%s", pw->pw_dir, PWFILE);
+			pwfile[sizeof(pwfile)-1] = 0;
+
+			if (stat(pwfile, &statbuf)) {
+				sprintf(buf, "Notice: No .%s file found in your homedirectory (for more secure\r", PWFILE);
+				write_ax25(buf, strlen(buf), 1);
+				sprintf(buf, "        password authentication than plaintext). Generating example file,\r");
+				write_ax25(buf, strlen(buf), 1);
+				sprintf(buf, "        with unique passwords (which may be changed).\r");
+				write_ax25(buf, strlen(buf), 1);
+				sprintf(buf, "        Please edit ~/.%s, and enable your prefered authentication type;\r", PWFILE);
+				write_ax25(buf, strlen(buf), 1);
+				sprintf(buf, "        MD5 is recommended.\r");
+				write_ax25(buf, strlen(buf), 1);
+				write_example_passwd(pwfile, pwlocation, pw);
+				goto end;
+			}
+			if (!S_ISREG(statbuf.st_mode)) {
+				sprintf(buf, "Error: password file .%s should be a regular file. Skiping..\r", PWFILE);
+				write_ax25(buf, strlen(buf), 1);
+				goto end;
+			}
+			if (statbuf.st_uid != 0 && statbuf.st_uid != pw->pw_uid) {
+				sprintf(buf, "Error: your password file .%s is not owned by you. Skiping..\r", PWFILE);
+				write_ax25(buf, strlen(buf), 1);
+				goto end;
+			}
+			if  ((statbuf.st_mode & (S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH))) {
+				sprintf(buf, "WARNING: your password file .%s has wrong permissions.\r", PWFILE);
+				write_ax25(buf, strlen(buf), 1);
+				sprintf(buf, "         Please change it with\r");
+				write_ax25(buf, strlen(buf), 1);
+				sprintf(buf, "           chmod 600 .%s\r", PWFILE);
+				write_ax25(buf, strlen(buf), 1);
+				sprintf(buf, "         and don't forget to change your password stored in .%s\r", PWFILE);
+				write_ax25(buf, strlen(buf), 1);
+				sprintf(buf, "         because it may be compromised.\r");
+				write_ax25(buf, strlen(buf), 1);
+				/* go on.. if user takes no action, he always gets this message */
+			}
+			if ( !(f = fopen(pwfile, "r")) )
+				goto end;
+		}
+
+
+		for (;;) {
+			if (!fgets(buf, sizeof(buf), f)) {
+				fclose(f);
+				if (pwlocation == SYSTEMPW)
+					break;
+				/* perhaps this is too irritating for the user
+				   when the message occurs always. Thus only
+				   write the notice, if cleartext fallback
+				   is disabled by administrative configuration.
+				 */
+				if  (!((*pwtype) & PW_CLEARTEXT)) {
+					sprintf(buf, "Failed to find a suitable password in %s\r", pwfile);
+					write_ax25(buf, strlen(buf), 1);
+				}
+				goto end;
+			}
+			if ((p = strchr(buf, '\n')))
+				*p = 0;
+			if (!*buf || isspace(*buf & 0xff))
+				continue;
+			if (*buf == '#')
+				continue;
+			if (pwlocation == SYSTEMPW) {
+				if (!Strcasecmp(buf, "systempasswordonly")) {
+					only_systempw = 1;
+					continue;
+				}
+				if (!(p = strchr(buf, ':')))
+					continue;
+				*p++ = 0;
+				if (strcmp(pw->pw_name, buf))
+					continue;
+				p_buf = p;
+			} else {
+				p_buf = buf;
+			}
+
+			if (!Strcasecmp(p_buf, "unix")) {
+				pass = p_buf;
+			} else {
+				if (!(pass = strchr(p_buf, ':')))
+					continue;
+				*pass++ = 0;
+			}
+
+			while (*pass && isspace(*pass & 0xff))
+				pass++;
+			for (p = pass; *p && !isspace(*p & 0xff); p++) ;
+			*p = 0;
+
+        		if ( (*pwtype & PW_MD5) && !Strcasecmp(p_buf, "md5") ) {
+				fclose(f);
+				*pwtype = PW_MD5;
+				goto found;
+			} else if ( (*pwtype & PW_SYS) && (!Strcasecmp(p_buf, "sys") || !strcmp(p_buf, "baycom")) ) {
+				fclose(f);
+				*pwtype = PW_SYS;
+				goto found;
+			} else if ( (*pwtype & PW_UNIX) &&  (!Strcasecmp(p_buf, "unix") ) ) {
+				fclose(f);
+				*pwtype = PW_UNIX;
+				return 0;
+			}
+		}
+	}
+found:
+	
+	if (!pass || !*pwtype)
+		goto end;
+
+	len = strlen(pass);
+
+	if ((*pwtype == PW_SYS && len < MINPWLEN_SYS) || (*pwtype == PW_MD5 && len < MINPWLEN_MD5)) {
+		sprintf(buf, "Password in password file too short\r");
+		write_ax25(buf, strlen(buf), 1);
+		goto end;
+	}
+	if (strlen(pass) > PASSSIZE)
+		pass[PASSSIZE] = 0;
+
+	return strdup(pass);
+
+end:
+	*pwtype = (((*pwtype) & PW_CLEARTEXT) ? PW_CLEARTEXT : 0);
+	           /*         ^ may allow cleartext? - then cleartext, else deny */
+	return 0;
+}
diff --git a/ax25/access.h b/ax25/access.h
new file mode 100644
index 0000000..4901418
--- /dev/null
+++ b/ax25/access.h
@@ -0,0 +1,20 @@
+#ifndef ACCESS_H
+#define ACCESS_H
+
+#define PASSSIZE        80      /* for md5 passwords, at least 32 characters */
+#define MINPWLEN_SYS	20
+#define MINPWLEN_MD5	8
+
+#define	PWFILE		"bcpasswd"
+
+/* PWxxx: set bits */
+#define PW_CLEARTEXT     1
+#define PW_SYS           2
+#define PW_MD5           4
+#define PW_UNIX		 8
+
+void ask_pw_sys(char *prompt, char *pass_want, char *pw);
+void ask_pw_md5(char *prompt, char *pass_want, char *pw);
+char *read_pwd (struct passwd *pw, int *pwtype);
+#endif
+
diff --git a/ax25/ax25.4 b/ax25/ax25.4
new file mode 100644
index 0000000..6456971
--- /dev/null
+++ b/ax25/ax25.4
@@ -0,0 +1,77 @@
+.TH AX25 4 "15 October 1996" Linux "Linux Programmer's Manual"
+.SH NAME
+AF_AX25 \- AX.25 amateur packet radio protocol family
+.SH DESCRIPTION
+.LP
+.B AX.25
+is a protocol used extensively by radio amateurs. The Linux AX.25 protocol
+family permits access to these protocols via the standard networking
+.B socket
+metaphor.
+.LP
+The AX.25 protocol layer supports both connected mode and datagram (UI)
+frame modes. IP traffic may be stacked on top of AX.25 frames for IP
+transmission over the AX.25 medium.
+.LP
+The primary mode of operation is connected mode which is the mode used for a
+socket of type SOCK_SEQPACKET (stream sockets are not available in AX.25).
+This requires that the user ensures output data is suitably packetised, and
+that input data is read a packet at a time into a buffer of suitable size.
+The Linux AX.25 protocol layer can operate in standard AX.25 mode with three
+bit sequence numbers or in PE1CHL extended AX.25 mode which uses seven bit
+sequence numbers. The protocol passed to the socket is used for all outgoing
+frames. Passing 0 causes the normal AX.25 Text PID to be used.
+.LP
+SOCK_DGRAM gives access to AX.25 UI frames. For access to special frames (of
+any form) SOCK_RAW can be used. There is no SOCK_PACKET support under AX.25.
+Instead an AF_INET socket of type SOCK_PACKET should be used.
+.LP
+AX.25 addresses consist of 6 ascii characters and a number called the SSID.
+These are encoded into a sockaddr_ax25 structure which is provided to the
+relevant system calls. When digipeaters are included a callsign path can be
+much more complex. When this is the case a struct full_sockaddr_ax25 should
+be passed to the system calls.
+.LP
+AX.25 has some unusual properties. Notably in a multi-user system an AX.25
+address is often associated with a user, and some users may not have such an
+association. a set of ioctl calls are provided to manage an association
+table, and in addition the superuser may use an arbitary callsign by binding
+to the callsign desired and specifying the port to use as a first digipeated
+hop.
+.LP 
+AX.25 supports the following socket options for SOL_AX25. AX25_T1 is the T1
+timer in 1/10ths of a second, AX25_T2 is the T2 timer in 1/10ths of a
+second, AX25_T3 is the T3 timer. The window is settable with AX25_WINDOW.
+AX25_N2, the retry counter is also configurable. There is no 'infinite
+retry' option supported however. The method of backoff for retries is
+configurable via the socket option AX25_BACKOFF, a value of true indicates
+the use of exponential backoff and false simple linear backoff. The mode of
+a connection made be altered to be either standard AX.25 or extended AX.25
+via AX25_EXTSEQ. It is possible to have the complete AX.25 header returned
+to the application by setting AX25_HDRINCL to true, programs must be aware
+of the internal structure of AX.25 frames to use this option. Note that if
+AX.25 fragmentation is encountered, only the control information of the
+first frame is returned along with the defragmented data.
+.SH "SEE ALSO"
+.BR call (1),
+.BR socket (2),
+.BR setsockopt (2),
+.BR getsockopt (2),
+.BR axctl (8),
+.BR axparms (5),
+.BR axassociate (8),
+.BR axparms (8),
+.BR kissattach (8).
+.LP
+.SH BUGS
+.LP
+Too numerous to list in full currently.
+.TP 3
+\(bu
+Minor protocol violations exist.
+.SH AUTHOR
+.nf
+Alan Cox GW4PTS <alan at cymru.net>
+.br
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
+.fi
diff --git a/ax25/ax25.profile b/ax25/ax25.profile
new file mode 100644
index 0000000..accb4fb
--- /dev/null
+++ b/ax25/ax25.profile
@@ -0,0 +1 @@
+#echo "/char ibmpc ibmpc" >.conversrc
diff --git a/ax25/ax25d.8 b/ax25/ax25d.8
new file mode 100644
index 0000000..96ceec4
--- /dev/null
+++ b/ax25/ax25d.8
@@ -0,0 +1,46 @@
+.TH AX25D 8 "27 August 1996" Linux "Linux System Managers Manual"
+.SH NAME
+ax25d \- General purpose AX.25, NET/ROM and Rose daemon
+.SH SYNOPSIS
+.B ax25d [-v] [-c altconffile] [-l]
+.SH DESCRIPTION
+.LP
+.B Ax25d
+is a general purpose server daemon that listens on a number of AX.25, NET/ROM
+and Rose ports and offers different services depending upon port, callsign
+and other parameters.
+.B Ax25d
+is driven by a complex configuration file, a full description of which may
+be found in another manual page.
+.sp 1
+.B AX25d
+has the facility to log information about incoming connections to the
+system log file. By default no logging is done. When
+.B ax25d
+is running, and a change in the configuration file is made,
+.B ax25d
+can be forced to re-read its configuration file by sending it a SIGHUP.
+.SH OPTIONS
+.TP 15
+.BI "\-c altconffile"
+Specifies an alternate configuration file name.
+.TP 15
+.BI \-l
+Specifies that messages should be logged into the system log file. By default
+no messages are logged.
+.TP 15
+.BI \-v
+Display the version.
+.SH FILES
+.LP
+/etc/ax25/ax25d.conf
+.SH "SEE ALSO"
+.BR kill (1),
+.BR ax25 (4),
+.BR netrom (4),
+.BR rose (4),
+.BR ax25d.conf (5).
+.SH AUTHOR
+Darryl Miles G7LED <dlm at frink.demon.co.uk>
+.br
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/ax25/ax25d.c b/ax25/ax25d.c
new file mode 100644
index 0000000..730ca49
--- /dev/null
+++ b/ax25/ax25d.c
@@ -0,0 +1,1394 @@
+/*
+ *  This is my version of axl.c, written for the LBBS code to make it
+ *    compatable with the kernel AX25 driver.  It appears to work, with
+ *    my setup, so it'll probably not work else where :-).
+ *
+ *  This was inspired by the example code written by Alan Cox (GW4PTS)
+ *    axl.c in AX25USER.TGZ from sunacm.swan.ac.uk.
+ *
+ *
+ *  Copyright (C) 1995, 1996 by Darryl L. Miles, G7LED.
+ *  Copyright (C) 1996 by Jonathan Naylor G4KLX
+ *
+ *   This program 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 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program 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 this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ *
+ *  Just a quickie Feb 1995.
+ *  It *was* just a quickie (at the time) but you'd know how these things
+ *   just... Apr 1995.
+ *
+ *  If your AX25/NETROM system is relying on this code for
+ *    securetty/firewalling then please be aware this has been coded
+ *    with the intent on striving on through system/(mis)configuration
+ *    errors in the hope that at worst it will run with a degraded
+ *    service.  Rather than leave your system providing no service at
+ *    all, if opinions require the old behavior back when let me know
+ *    and I'll #ifdef it in.
+ *
+ *
+ *  History:
+ *
+ *	1.0  Feb 1995	Basic AX25 listening daemon, Multi-port, Call
+ *			  matching, etc...
+ *
+ *	1.1  Feb 1995	Moved entry scanning before fork().
+ *			Added setgroups() to plug security hole.
+ *			Minor fixes + Improved handling.
+ *
+ *	1.2  Apr 1995   NETROM support added from developing AX25
+ *			  028b/029.
+ *			Added 'defaults' port setting.
+ *			Added FLAG_NODIGIS.
+ *
+ *	1.3  Jul 1995	Make it a little more intelligent about what to
+ *			  do with errors.
+ *			Added exec and argv[0] as two different fields,
+ *			  much like inetd uses.
+ *
+ *	1.4  Aug 1995	Confirmed support for AX25 030 (1.3.20 + hacks),
+ *			  it appears to work.
+ *			It will now bootup even if initial config errors
+ *			  occur when setting up and binding (e.g. port(s)
+ *			  down), it will skip the port(s) with a problem
+ *			  and listen out on those which are left standing.
+ *
+ *	1.5  Aug 1995	Updated old (buggy) libax25.a function copies in axl.
+ *			  Causing all sorts of problems.
+ *
+ *	1.6  Aug 1995	Reset the 'defaults' entry's when we start parsing
+ *			  a new interface.
+ *
+ *	1.7  Dec 1995	Added BROKEN_NETROM_KERNEL define for setsockopt.	
+ *
+ *	1.8  Jan 1996	Added support for AX25_BIND_ANY_DEVICE, specify just
+ *			  [CALL-X VIA *].
+ *			Better param parsing, T1 and T2 now using the real
+ *			  time in seconds as params, and not kernel units.
+ *			Connection loggin added, either via it's own logfile
+ *			  or syslog.
+ *			Modified 'defaults' to 'parameters'.
+ *
+ *	1.9  Jun 1996	Reworked config file parsing to use port names instead
+ *			  of callsigns. Reformated source code.
+ *
+ *	Under alpha:
+ *			BPQ like clever mode called for.... also a mode that
+ *			  requires a packet to kick application open.
+ *			A flag/mode which will cause a call to initgroups()
+ *			  based on uid.
+ *			Callsign validation check.
+ *			Logging of errors.
+ *			Handling of AX25.IP mode VC connections - dl9sau
+ *				recommended settings in ax25d.conf:
+ *				  parameters_extAX25 VC-wait-login VC-disc-on-linkfailure-msg VC-log-connections
+				or
+ *				  parameters_extAX25 VC-reject-login VC-send-failure-msg VC-log-connections
+ *
+ *
+ *  TODO:
+ *         The timing of the 'accept()' might be changed, defered to the
+ *           child, then that child fork() itself, to stop race conditions
+ *           around 'accept()'.
+ *         Add a config file to allow/disallow connections/services at
+ *           different times of the day to restrict access say.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+#include <string.h>
+#include <ctype.h>
+#include <time.h>
+#include <pwd.h>
+#include <grp.h>
+#include <syslog.h>
+#include <errno.h>
+
+#include <config.h>
+
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/fcntl.h>
+#include <sys/file.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+
+#include <netax25/ax25.h>
+#include <netrom/netrom.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/nrconfig.h>
+#include <netax25/rsconfig.h>
+#include <netax25/daemon.h>
+
+
+#include "../pathnames.h"
+
+/* Maximum number of command line arguments for the application we run */
+#define MAX_ARGS	32
+
+#define	FLAG_VALIDCALL	0x01	/* NOTUSED */
+#define	FLAG_NOLOGGING	0x02	/* Don't log this connection */
+#define	FLAG_CHKNRN	0x04	/* Check NetRom Neighbour - NOTUSED */
+#define	FLAG_NODIGIS	0x08	/* Disallow digipeated uplinks */
+#define	FLAG_LOCKOUT	0x10	/* Disallow connection */
+
+
+struct axlist {		/* Have used same struct for quickness */
+	struct axlist *next;	/* Port list */
+
+	char *port;		/* Port call, only set across the port list */
+	int fd;			/* The listening socket fd */
+
+	int af_type;		/* AF_AX25, AF_NETROM or AF_ROSE port */
+
+	struct axlist *ents;	/* Exec line entries */
+	char *call;		/* Call in listing entries */
+	char *node;		/* Node call in listing entries */
+	uid_t uid;		/* UID to run program as */
+	gid_t gid;		/* GID to run program as */
+	char *exec;		/* Real exec */
+	char *shell;		/* Command line. With possible escapes. */
+
+	unsigned int window;	/* Set window to... */
+	unsigned long t1;	/* Set T1 to... (Retrans timer) */
+	unsigned long t2;	/* Set T2 to... (Ack delay) */
+	unsigned long t3;	/* Set T3 to... (Idle Poll timer) */
+	unsigned long idle;	/* Set T4 to... (Link Drop timer) */
+	unsigned long n2;	/* Set N2 to... (Retries) */
+	unsigned long flags;	/* FLAG_ values ORed... */
+
+	int checkVC;		/* check for AX25.IP mode VC users? */
+	int VCdiscOnLinkfailureMsg;	/* action when mode VC user and checkVC == 1 */
+	int VCsendFailureMsg;	/* action when mode VC user and on checkVC > 1 */
+	int VCloginEnable;		/* trigger login when mode VC user and checkVC == 1 and one line is read */
+	int LoggingVC;		/* extra log stuff */
+};
+
+static struct axlist *AXL	= NULL;
+static char *ConfigFile		= CONF_AX25D_FILE;
+static char User[10];				/* Room for 'GB9ZZZ-15\0' */
+static char Node[10];				/* Room for 'GB9ZZZ-15\0' */
+static char myAX25Name[10];			/* Room for 'GB9ZZZ-15\0' */
+static char *Port;
+static int Logging		= FALSE;
+
+static void SignalHUP(int);
+static void SignalTERM(int);
+static void WorkoutArgs(int, char *, int *, char **);
+static void SetupOptions(int, struct axlist *);
+static int ReadConfig(void);
+static unsigned long ParseFlags(const char *, int);
+static struct axlist *ClearList(struct axlist *);
+static char *stripssid(const char *);
+
+static fd_set fdread;
+static int maxfd = -1;
+
+/*--------------------------------------------------------------------------*/
+
+void update_maxfd(void) {
+	struct axlist *paxl;
+
+	FD_ZERO(&fdread);
+
+	for (maxfd = -1, paxl = AXL; paxl != NULL && paxl->fd >= 0; paxl = paxl->next) {
+		FD_SET(paxl->fd, &fdread);
+
+		if (paxl->fd > maxfd)
+			maxfd = paxl->fd;
+	}
+}
+
+/*--------------------------------------------------------------------------*/
+
+void err_config(void) {
+	if (AXL == NULL) {
+		if (Logging)
+			syslog(LOG_ERR, "config file reload error, exiting");
+		exit(1);
+	} else {
+		if (Logging)
+			syslog(LOG_INFO, "config file reload error, continuing with original");
+	}
+}		
+
+/*--------------------------------------------------------------------------*/
+
+void _ReadConfig(int dummy)
+{
+	ReadConfig();
+}
+
+/*--------------------------------------------------------------------------*/
+
+void reload_timer(int sec) {
+	struct itimerval itv;
+
+	itv.it_value.tv_sec = sec;
+	itv.it_value.tv_usec = 0;
+	itv.it_interval.tv_sec = 0;
+	itv.it_interval.tv_usec = 0;
+	setitimer(ITIMER_REAL, &itv, 0);
+	signal(SIGALRM, _ReadConfig);
+}
+
+/*--------------------------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+	struct axlist *axltmp, *paxl, *raxl;
+	union {
+		struct full_sockaddr_ax25 ax25;
+		struct sockaddr_rose rose;
+	} sockaddr;
+	struct sigaction act, oact;
+	socklen_t addrlen;
+	int cnt;
+	char buf[1024];
+	char *p;
+	char *mesg;
+   
+	while ((cnt = getopt(argc, argv, "c:lv")) != EOF) {
+		switch (cnt) {
+			case 'c':
+				ConfigFile = optarg;
+				break;
+
+			case 'l':
+				Logging = TRUE;
+				break;
+
+			case 'v':
+				printf("ax25d: %s\n", VERSION);
+				return 1;
+
+			default:
+				fprintf(stderr, "Usage: ax25d [-v] [-c altfile] [-l]\n");
+				return 1;
+		}
+	}
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "ax25d: no AX.25 port data configured\n");
+		return 1;
+	}
+
+	nr_config_load_ports();
+
+	rs_config_load_ports();
+
+	if (!daemon_start(TRUE)) {
+		fprintf(stderr, "ax25d: cannot become a daemon\n");
+		return 1;
+	}
+
+	if (Logging) {
+		openlog("ax25d", LOG_PID, LOG_DAEMON);
+		syslog(LOG_INFO, "starting");
+	}
+
+	act.sa_handler = SignalHUP;
+	sigemptyset(&act.sa_mask);
+	act.sa_flags = 0;
+	sigaction(SIGHUP, &act, &oact);
+
+	act.sa_handler = SignalTERM;
+	sigemptyset(&act.sa_mask);
+	act.sa_flags = 0;
+	sigaction(SIGTERM, &act, &oact);
+
+	ReadConfig();
+
+	for (;;) {
+
+		update_maxfd();
+		if (maxfd < 0) {
+			sleep(10);
+			continue;
+		}
+
+		if (select(maxfd + 1, &fdread, NULL, NULL, NULL) <= 0)
+			continue;
+
+		for (paxl = AXL; paxl != NULL; paxl = paxl->next) {
+			if (paxl->fd > 0 && FD_ISSET(paxl->fd, &fdread)) {
+				pid_t pid;
+				gid_t grps[2];
+				char *argv[MAX_ARGS];
+				int argc;
+				int new;
+				int i;
+            
+				/*
+				 * Setting up a non-blocking accept() so is does not hang up
+				 *  - I am not sure at this time why I didn't/don't assign
+				 *  the socket non-blocking to start with.
+				 */
+				/*
+				 * We really need to setup the netrom window option here so
+				 *  that it's negotiated correctly on accepting the connection.
+				 */
+				/*
+				 * It would be very useful if recvmsg/sendmsg were supported
+				 *  then we can move the call checking up here.
+				 */
+				i = TRUE;
+				ioctl(paxl->fd, FIONBIO, &i);
+
+				addrlen = sizeof(struct full_sockaddr_ax25);
+				new = accept(paxl->fd, (struct sockaddr *)&sockaddr, &addrlen);
+
+				i = FALSE;
+				ioctl(paxl->fd, FIONBIO, &i);
+ 
+				if (new < 0) {
+					if (errno == EWOULDBLOCK)
+						continue;	/* It's gone ??? */
+
+					if (Logging)
+						syslog(LOG_ERR, "accept error %m, closing socket on port %s", paxl->port);
+					close(paxl->fd);
+					paxl->fd = -1;
+					reload_timer(10);
+					continue; 
+				}
+
+				switch (paxl->af_type) {
+					case AF_AX25:
+						strcpy(User, ax25_ntoa(&sockaddr.ax25.fsa_ax25.sax25_call));
+						strcpy(Node, "");
+						break;
+					case AF_NETROM:
+						strcpy(User, ax25_ntoa(&sockaddr.ax25.fsa_ax25.sax25_call));
+						strcpy(Node, ax25_ntoa(&sockaddr.ax25.fsa_digipeater[0]));
+						break;
+					case AF_ROSE:
+						strcpy(User, ax25_ntoa(&sockaddr.rose.srose_call));
+						strcpy(Node, rose_ntoa(&sockaddr.rose.srose_addr));
+						break;
+				}
+
+				for (raxl = paxl->ents; raxl != NULL; raxl = raxl->ents) {
+					if (paxl->af_type == AF_NETROM && raxl->node != NULL && Node[0] != '\0') {
+						if (strchr(raxl->node, '-') == NULL) {
+							if (strcasecmp(raxl->node, stripssid(Node)) != 0)
+								continue;	/* Found no match (for any SSID) */
+						} else {
+							if (strcasecmp(raxl->node, Node) != 0)
+								continue;	/* Found no match */
+						}
+					}
+
+					if (raxl->call == NULL)	/* default */
+						break;
+
+					if (strchr(raxl->call, '-') == NULL) {
+						if (strcasecmp(raxl->call, stripssid(User)) == 0)
+							break;	/* Found a match (for any SSID) */
+					} else {
+						if (strcasecmp(raxl->call, User) == 0)
+							break;	/* Found a match */
+					}
+				}
+
+				addrlen = sizeof(struct full_sockaddr_ax25);
+				getsockname(new, (struct sockaddr *)&sockaddr, &addrlen);
+
+				switch (paxl->af_type) {
+					case AF_AX25:
+						Port = ax25_config_get_port(&sockaddr.ax25.fsa_digipeater[0]);
+						break;
+					case AF_NETROM:
+						Port = nr_config_get_port(&sockaddr.ax25.fsa_ax25.sax25_call);
+						break;
+					case AF_ROSE:
+						Port = rs_config_get_port(&sockaddr.rose.srose_addr);
+						break;
+					default:
+						Port = "???";
+						break;
+				}
+
+				if (raxl == NULL) {
+					/* No default */
+					if (Logging && !(paxl->flags & FLAG_NOLOGGING)) {
+						switch (paxl->af_type) {
+							case AF_AX25:
+								syslog(LOG_INFO, "AX.25 %s (%s) rejected - no default", User, Port);
+								break;
+							case AF_NETROM:
+								syslog(LOG_INFO, "NET/ROM %s@%s (%s) rejected - no default", User, Node, Port);
+								break;
+							case AF_ROSE:
+								syslog(LOG_INFO, "Rose %s@%s (%s) rejected - no default", User, Node, Port);
+								break;
+						}
+					}
+					close(new);
+					continue;
+				}
+
+				if (raxl->flags & FLAG_LOCKOUT) {
+					/* Not allowed to connect */
+					if (Logging && !(paxl->flags & FLAG_NOLOGGING)) {
+						switch (raxl->af_type) {
+							case AF_AX25:
+								syslog(LOG_INFO, "AX.25 %s (%s) rejected - port locked", User, Port);
+								break;
+							case AF_NETROM:
+								syslog(LOG_INFO, "NET/ROM %s@%s (%s) rejected - port locked", User, Node, Port);
+								break;
+							case AF_ROSE:
+								syslog(LOG_INFO, "Rose %s@%s (%s) rejected - port locked", User, Node, Port);
+								break;
+						}
+					}
+					close(new);
+					continue;
+				}
+
+				if (raxl->af_type == AF_AX25 && (raxl->flags & FLAG_NODIGIS) && sockaddr.ax25.fsa_ax25.sax25_ndigis != 0) {
+					/* Not allowed to uplink via digi's */
+					if (Logging && !(paxl->flags & FLAG_NOLOGGING))
+						syslog(LOG_INFO, "AX.25 %s (%s) rejected - digipeaters", User, Port);
+					close(new);
+					continue;
+				}
+
+				pid = fork();
+
+				switch (pid) {
+					case -1:
+						if (Logging)
+							syslog(LOG_ERR, "fork error %m");
+						/*
+						 * I don't think AX25 at the moment will hold the
+						 * connection open, if the above does not make it
+						 * through first time.
+						 */
+						close(new);
+						break;			/* Oh well... */
+
+					case 0:
+
+						if (raxl->af_type == AF_AX25 && raxl->checkVC) {
+							/* to which of my own addresses has the user connected? */
+							getsockname(new, (struct sockaddr *)&sockaddr, &addrlen);
+							strcpy(myAX25Name, ax25_ntoa(&sockaddr.ax25.fsa_ax25.sax25_call));
+
+							sprintf(buf, "/usr/sbin/ax25rtctl -l ip | grep -i ' %s ' | /bin/grep 'v ' >/dev/null", User);
+
+							/* he's not a VC user? */
+							if (system(buf) != 0)
+								goto login;
+
+							if (raxl->checkVC > 1) {
+								/* setproctitle("ax25d [%d]: rejecting, User);  */
+							} else {
+								/* setproctitle("ax25d [%d]: %s, User, (VCloginEnable ? "waiting" : "discarding")); */
+							}
+
+							/* is a VC user. checkVC > 0? then reject now, or fork and wait for pid=textdata.. */
+							if (raxl->VCsendFailureMsg) {
+								sprintf(buf, "*** %s: NO MODE VC with %s\r", myAX25Name, myAX25Name);
+								write(new, buf, strlen(buf));
+								if (raxl->checkVC > 1)
+									sleep(1);
+							}
+
+							if (raxl->checkVC > 1) {
+								if (Logging && (!(paxl->flags & FLAG_NOLOGGING) || raxl->LoggingVC))
+									syslog((raxl->LoggingVC ? LOG_NOTICE : LOG_INFO), "AX.25 %s (%s:%s) rejected - AX25.IP-VC entry found", User, Port, myAX25Name);
+								goto close_link;
+							}
+
+							/* checkVC == 1: wait for data */
+							if (Logging && (!(paxl->flags & FLAG_NOLOGGING) || raxl->LoggingVC)) {
+								syslog((raxl->LoggingVC ? LOG_NOTICE : LOG_INFO), "AX.25 %s (%s:%s) AX25.IP-VC host connected. %s", 
+									User, Port, myAX25Name,
+									(raxl->VCloginEnable ? "waiting for first PID=text packet for triggered login" : "discarding PID=text packets"));
+							}
+
+							*buf = 0;
+							mesg = 0;
+							while ((i = read(new, buf, (sizeof(buf)-1))) > 0) {
+								buf[i] = 0;
+								if (Logging && raxl->LoggingVC > 1) {
+									/* debug */
+									syslog((LOG_DEBUG), "DEBUG: AX.25 %s (%s:%s) AX25.IP-VC host said: >%s<", User, Port, myAX25Name, buf); 
+								}
+							        /* skip leading mess */
+								for (p = buf; *p && (isspace(*p & 0xff) || *p == '\r'); p++) ;
+								if (raxl->VCdiscOnLinkfailureMsg && !strncmp(p, "***", 3)) {
+									/* format received line for debug purposes */
+									/* 1. skip "***" */
+									for (p += 3; *p && isspace(*p & 0xff); p++ ) ;
+									mesg = p;
+									/* 2. get rid off EOL delimiters */
+									while (*p) {
+										if (*p == '\r' || *p == '\n') {
+											*p = 0;
+											break;
+										}
+										p++;
+									}
+									/* end read loop */
+									break;
+								}
+								/* per default, we discard all messages,
+							 	 * because there's no useful combination
+							 	 * using VC and pidText togegther
+							 	 */
+								if (raxl->VCloginEnable)
+									goto login;
+							}
+
+							if (Logging && (!(paxl->flags & FLAG_NOLOGGING) || raxl->LoggingVC)) {
+								syslog((raxl->LoggingVC ? LOG_NOTICE : LOG_INFO),
+										"AX.25 %s (%s:%s) AX25.IP-VC host disconnected%s%s",
+										User,
+										Port,
+										myAX25Name,
+										(mesg ? ": " : "."),
+										(mesg ? mesg : ""));
+							}
+							/* point of no return */
+close_link:
+							/* close link */
+							/* setproctitle("ax25d [%s]: disconnecting", User); */
+							close(new);
+							exit(0);
+						}
+login:
+						/* setproctitle("ax25d [%s]: login", User); */
+
+						SetupOptions(new, raxl);
+						WorkoutArgs(raxl->af_type, raxl->shell, &argc, argv);
+
+						if (Logging && !(paxl->flags & FLAG_NOLOGGING)) {
+							switch (paxl->af_type) {
+								case AF_AX25:
+									syslog(LOG_INFO, "AX.25 %s (%s) %s", User, Port, argv[0]);
+									break;
+								case AF_NETROM:
+									syslog(LOG_INFO, "NET/ROM %s@%s (%s) %s", User, Node, Port, argv[0]);
+									break;
+								case AF_ROSE:
+									syslog(LOG_INFO, "Rose %s@%s (%s) %s", User, Node, Port, argv[0]);
+									break;
+							}
+						}
+
+						dup2(new, STDIN_FILENO);
+						dup2(new, STDOUT_FILENO);
+						close(new);
+
+						/*
+						 * Might be more efficient if we just went down AXL,
+						 * we cleaned up our parents left overs on bootup.
+						 */
+						for (axltmp = AXL; axltmp != NULL; axltmp = axltmp->next)
+							close(axltmp->fd);
+
+						if (Logging)
+							closelog();
+
+						/* Make root secure, before we exec() */
+						/* Strip any supplementary gid's */
+						if (setgroups(0, grps) == -1)
+							exit(1);
+						if (setgid(raxl->gid) == -1)
+							exit(1);
+						if (setuid(raxl->uid) == -1)
+							exit(1);
+						execve(raxl->exec, argv, NULL);
+						exit(1);
+
+					default:
+						close(new);
+						break;
+				}
+			}
+		}
+	}
+
+	/* NOT REACHED */
+	return 0;
+}
+
+static void SignalHUP(int code)
+{
+	ReadConfig();
+}
+
+static void SignalTERM(int code)
+{
+	if (Logging) {
+		syslog(LOG_INFO, "terminating on SIGTERM\n");
+		closelog();
+	}
+	
+	exit(0);
+}
+
+static void WorkoutArgs(int af_type, char *shell, int *argc, char **argv)
+{
+	char buffer[1024];	/* Maximum arg size */
+	char *sp, *cp;
+	int cnt  = 0;
+	int args = 0;
+   
+	for (cp = shell; *cp != '\0'; cp++) {
+		if (isspace(*cp) && cnt != 0) {
+			buffer[cnt]  = '\0';
+			argv[args++] = strdup(buffer);
+			cnt          = 0;
+
+			if (args == MAX_ARGS - 1) {
+				argv[args] = NULL;
+				*argc = args;
+				return;
+			}
+
+			continue;
+		} else if (isspace(*cp))	/* && !cnt */
+			continue;
+
+		if (*cp == '%') {
+			cp++;
+
+			switch(*cp) {
+				case 'd':	/* portname */
+					for (sp = Port; *sp != '\0' && *sp != '-'; sp++)
+						buffer[cnt++] = *sp;
+					break;
+
+				case 'U':	/* username in UPPER */
+					for (sp = User; *sp != '\0' && *sp != '-'; sp++)
+						buffer[cnt++] = toupper(*sp);
+					break;
+
+				case 'u':	/* USERNAME IN lower */
+					for (sp = User; *sp != '\0' && *sp != '-'; sp++)
+						buffer[cnt++] = tolower(*sp);
+					break;
+
+				case 'S':	/* username in UPPER (with SSID) */
+					for (sp = User; *sp != '\0'; sp++)
+						buffer[cnt++] = toupper(*sp);
+					break;
+
+				case 's':	/* USERNAME IN lower (with SSID) */
+					for (sp = User; *sp != '\0'; sp++)
+						buffer[cnt++] = tolower(*sp);
+					break;
+
+				case 'P':	/* nodename in UPPER */
+					if (af_type == AF_NETROM) {
+						for (sp = Node; *sp != '\0' && *sp != '-'; sp++)
+							buffer[cnt++] = toupper(*sp);
+					} else {
+						buffer[cnt++] = '%';
+					}
+					break;
+
+				case 'p':	/* NODENAME IN lower */
+					if (af_type == AF_NETROM) {
+						for(sp = Node; *sp != '\0' && *sp != '-'; sp++)
+							buffer[cnt++] = tolower(*sp);
+					} else {
+						buffer[cnt++] = '%';
+					}
+					break;
+
+				case 'R':	/* nodename in UPPER (with SSID) */
+					if (af_type == AF_NETROM) {
+						for (sp = Node; *sp != '\0'; sp++)
+							buffer[cnt++] = toupper(*sp);
+					} else {
+						buffer[cnt++] = '%';
+					}
+					break;
+
+				case 'r':	/* NODENAME IN lower (with SSID) */
+					if (af_type == AF_NETROM) {
+						for (sp = Node; *sp != '\0'; sp++)
+							buffer[cnt++] = tolower(*sp);
+					} else {
+						buffer[cnt++] = '%';
+					}
+					break;
+
+				case '\0':
+				case '%':
+				default:
+					buffer[cnt++] = '%';
+					break;
+			}
+		} else {
+			buffer[cnt++] = *cp;
+		}
+	}
+
+	if (cnt != 0) {
+		buffer[cnt]  = '\0';
+		argv[args++] = strdup(buffer);
+	}
+
+	argv[args] = NULL;
+	*argc      = args;
+}
+
+static void SetupOptions(int new, struct axlist *axl)
+{
+	switch (axl->af_type) {
+	case AF_AX25:
+		if (axl->window != 0)
+			setsockopt(new, SOL_AX25, AX25_WINDOW, &axl->window, sizeof(axl->window));
+		if (axl->t1 != 0)
+			setsockopt(new, SOL_AX25, AX25_T1, &axl->t1, sizeof(axl->t1));
+		if (axl->n2 != 0)
+			setsockopt(new, SOL_AX25, AX25_N2, &axl->n2, sizeof(axl->n2));
+		if (axl->t2 != 0)
+			setsockopt(new, SOL_AX25, AX25_T2, &axl->t2, sizeof(axl->t2));
+		if (axl->t3 != 0)
+			setsockopt(new, SOL_AX25, AX25_T3, &axl->t3, sizeof(axl->t3));
+		if (axl->idle != 0)
+			setsockopt(new, SOL_AX25, AX25_IDLE, &axl->idle, sizeof(axl->idle));
+		break;
+	case AF_NETROM:
+		if (axl->t1 != 0)
+			setsockopt(new, SOL_NETROM, NETROM_T1, &axl->t1, sizeof(axl->t1));
+		if (axl->n2 != 0)
+			setsockopt(new, SOL_NETROM, NETROM_N2, &axl->n2, sizeof(axl->n2));
+		if (axl->t2 != 0)
+			setsockopt(new, SOL_NETROM, NETROM_T2, &axl->t2, sizeof(axl->t2));
+		break;
+	case AF_ROSE:
+		if (axl->idle != 0)
+			setsockopt(new, SOL_ROSE, ROSE_IDLE, &axl->idle, sizeof(axl->idle));
+		break;
+	}
+}
+
+/**************************** CONFIGURATION STUFF ***************************/
+
+static int ReadConfig(void)
+{
+	struct axlist axl_defaults;
+	struct axlist *axl_build = NULL;
+	struct axlist *axl_port  = NULL;
+	struct axlist *axl_ent, *axltmp;
+	union {
+		struct full_sockaddr_ax25 ax25;
+		struct sockaddr_rose rose;
+	} sockaddr;
+	struct passwd *pwd;
+	FILE *fp;
+	char buffer[2048];
+	char *s, *port, *call, *node, *addr = NULL;
+	unsigned long val;
+	socklen_t addrlen;
+	int af_type = 0;	/* Keep GCC happy */
+	int line = 0;
+	int hunt = TRUE, error = FALSE;
+	int iamdigi = FALSE;
+	int parameters = 0;
+
+	signal(SIGALRM, SIG_IGN);
+	memset(&axl_defaults, 0, sizeof(axl_defaults));
+
+	if ((fp = fopen(ConfigFile, "r")) == NULL)
+		return -1;
+
+	while (fgets(buffer, sizeof(buffer), fp) != NULL) {
+		line++;
+
+		if ((s = strchr(buffer, '\n')) != NULL)
+			*s = '\0';
+		if ((s = strchr(buffer, '\r')) != NULL)
+			*s = '\0';
+
+		if (buffer[0] == '#')
+			continue;
+         
+		switch (buffer[0]) {
+			case '[':		/* AX25 port call */
+				af_type = AF_AX25;
+				hunt    = TRUE;
+				error   = FALSE;
+				iamdigi = FALSE;
+				break;
+   
+			case '<':		/* NETROM iface call */
+				af_type = AF_NETROM;
+				hunt    = TRUE;
+				error   = FALSE;
+				iamdigi = FALSE;
+				break;
+
+			case '{':		/* ROSE iface call */
+				af_type = AF_ROSE;
+				hunt    = TRUE;
+				error   = FALSE;
+				iamdigi = FALSE;
+				break;
+   
+			default:
+				if (hunt && !error)
+					goto BadLine;
+				break;
+		}
+
+		if (hunt) {	/* We've found a Iface entry */
+			/* Reset 'defaults' entry on the interface */
+			memset(&axl_defaults, 0, sizeof(axl_defaults));
+
+			switch (af_type) {
+				case AF_AX25:
+					if ((s = strchr(buffer, ']')) == NULL)
+						goto BadLine;
+					*s = '\0';
+					if ((s = strtok(buffer + 1, " \t")) == NULL)
+						goto BadLine;
+					port = s;
+					call = NULL;
+					if ((s = strtok(NULL, " \t")) != NULL) {
+						if (strcasecmp(s, "VIA") == 0 || strcasecmp(s, "V") == 0) {
+							if ((s = strtok(NULL, " \t")) == NULL)
+								goto BadLine;
+						}
+
+						call = port;
+						port = s;
+
+						if ((s = strchr(call, '*')) != NULL) {
+							iamdigi = TRUE;
+							*s = '\0';
+						}
+					}
+					if (strcmp(port, "*") == 0 && call == NULL) {
+						fprintf(stderr, "ax25d: invalid port name\n");
+						continue;
+					}
+					if (strcmp(port, "*") != 0) {
+						if ((addr = ax25_config_get_addr(port)) == NULL) {
+							fprintf(stderr, "ax25d: invalid AX.25 port '%s'\n", port);
+							continue;
+						}
+					}
+					if (call == NULL) {
+						sockaddr.ax25.fsa_ax25.sax25_family = AF_AX25;
+						sockaddr.ax25.fsa_ax25.sax25_ndigis = 0;
+						ax25_aton_entry(addr, sockaddr.ax25.fsa_ax25.sax25_call.ax25_call);
+					} else {
+						sockaddr.ax25.fsa_ax25.sax25_family = AF_AX25;
+						sockaddr.ax25.fsa_ax25.sax25_ndigis = 1;
+						ax25_aton_entry(call, sockaddr.ax25.fsa_ax25.sax25_call.ax25_call);
+						if (strcmp(port, "*") != 0)
+							ax25_aton_entry(addr, sockaddr.ax25.fsa_digipeater[0].ax25_call);
+						else
+							sockaddr.ax25.fsa_digipeater[0] = null_ax25_address;
+					}
+					addrlen = sizeof(struct full_sockaddr_ax25);
+					break;
+
+				case AF_NETROM:
+					if ((s = strchr(buffer, '>')) == NULL)
+						goto BadLine;
+					*s = '\0';
+					port = buffer + 1;
+					if ((addr = nr_config_get_addr(port)) == NULL) {
+						fprintf(stderr, "ax25d: invalid NET/ROM port '%s'\n", port);
+						continue;
+					}
+					sockaddr.ax25.fsa_ax25.sax25_family = AF_NETROM;
+					sockaddr.ax25.fsa_ax25.sax25_ndigis = 0;
+					ax25_aton_entry(addr, sockaddr.ax25.fsa_ax25.sax25_call.ax25_call);
+					addrlen = sizeof(struct full_sockaddr_ax25);
+					break;
+
+				case AF_ROSE:
+					if ((s = strchr(buffer, '}')) == NULL)
+						goto BadLine;
+					*s = '\0';
+					if ((s = strtok(buffer + 1, " \t")) == NULL)
+						goto BadLine;
+					call = s;
+					if ((s = strtok(NULL, " \t")) == NULL)
+						goto BadLine;
+					if (strcasecmp(s, "VIA") == 0 || strcasecmp(s, "V") == 0) {
+						if ((s = strtok(NULL, " \t")) == NULL)
+							goto BadLine;
+					}
+					port = s;
+					if ((addr = rs_config_get_addr(port)) == NULL) {
+						fprintf(stderr, "ax25d: invalid Rose port '%s'\n", port);
+						continue;
+					}
+					if (strcmp(call, "*") == 0) {
+						sockaddr.rose.srose_family = AF_ROSE;
+						sockaddr.rose.srose_ndigis = 0;
+						rose_aton(addr, sockaddr.rose.srose_addr.rose_addr);
+						sockaddr.rose.srose_call   = null_ax25_address;
+					} else {
+						sockaddr.rose.srose_family = AF_ROSE;
+						sockaddr.rose.srose_ndigis = 0;
+						rose_aton(addr, sockaddr.rose.srose_addr.rose_addr);
+						ax25_aton_entry(call,   sockaddr.rose.srose_call.ax25_call);
+					}
+					addrlen = sizeof(struct sockaddr_rose);
+					break;
+
+				default:
+					fprintf(stderr, "ax25d: unknown af_type=%d\n", af_type);
+					exit(1);
+			}
+
+			if ((axl_port = calloc(1, sizeof(*axl_port))) == NULL) {
+				fprintf(stderr, "ax25d: out of memory\n");
+				goto Error;
+			}
+
+			axl_port->port    = strdup(port);
+			axl_port->af_type = af_type;
+
+			if ((axl_port->fd = socket(axl_port->af_type, SOCK_SEQPACKET, 0)) < 0) {
+				fprintf(stderr, "ax25d: socket: %s\n", strerror(errno));
+				free(axl_port->port);
+				free(axl_port);
+				error = TRUE;
+				reload_timer(60);
+				continue;
+			}
+                        /* xlz - have to nuke this as this option is gone
+                         * what should be here?
+			if (iamdigi) {
+				yes = 1;
+				setsockopt(axl_port->fd, SOL_AX25, AX25_IAMDIGI, &yes, sizeof(yes));
+			}
+                        */
+
+			if (bind(axl_port->fd, (struct sockaddr *)&sockaddr, addrlen) < 0) {
+				fprintf(stderr, "ax25d: bind: %s on port %s\n", strerror(errno), axl_port->port);
+				close(axl_port->fd);
+				free(axl_port->port);
+				free(axl_port);
+				error = TRUE;
+				reload_timer(60);
+				continue;
+			}
+
+			if (listen(axl_port->fd, SOMAXCONN) < 0) {
+				fprintf(stderr, "ax25d: listen: %s\n", strerror(errno));
+				close(axl_port->fd);
+				free(axl_port->port);
+				free(axl_port);
+				error = TRUE;
+				reload_timer(60);
+				continue;
+			}
+
+			/* Add it to the head of the list we are building */
+			if (axl_build == NULL) {
+				axl_build = axl_port;
+			} else {
+				for (axltmp = axl_build; axltmp->next != NULL; axltmp = axltmp->next);
+				axltmp->next = axl_port;
+			}
+
+			hunt = FALSE;	/* Next lines will be entries */
+		} else {		/* This is an entry */
+			if ((axl_ent = calloc(1, sizeof(*axl_ent))) == NULL) {
+				fprintf(stderr, "ax25d: out of memory\n");
+				goto Error;
+			}
+
+			axl_ent->af_type = axl_port->af_type;	/* Inherit this */
+
+			if ((call = strtok(buffer, " \t")) == NULL) {
+				free(axl_ent);
+				continue;
+			}
+
+			strupr(call);
+
+			if (axl_ent->af_type == AF_NETROM) {
+				if ((s = strchr(call, '@')) != NULL) {
+					node = s + 1;
+					*s = '\0';
+
+					if (*node == '\0') {
+						free(axl_ent);
+						continue;
+					}
+
+					axl_ent->node = strdup(node);
+
+					if (*call == '\0')
+						call = "default";	/* @NODE means default at NODE */
+				}
+			}
+
+			if (axl_ent->af_type == AF_AX25) {
+				if ((strcasecmp("parameters_extAX25", call) == 0)) {
+					axl_defaults.checkVC = axl_defaults.VCdiscOnLinkfailureMsg = axl_defaults.VCsendFailureMsg = axl_defaults.VCloginEnable = axl_defaults.LoggingVC = 0;
+					while ((s = strtok(NULL, "  \t")) != NULL) {
+						if (strncmp(s, "VC", 2))
+							goto ignore;
+						if (!strncmp(s, "VC", 2)) {
+							if (!strcasecmp(s, "VC-reject-login"))
+								axl_defaults.checkVC += 2;
+							else if (!strcasecmp(s, "VC-wait-login"))
+								axl_defaults.checkVC += 1;
+							else if (!strcasecmp(s, "VC-disc-on-linkfailure-msg"))
+								axl_defaults.VCdiscOnLinkfailureMsg = 1;
+							else if (!strcasecmp(s, "VC-send-failure-msg"))
+								axl_defaults.VCsendFailureMsg = 1;
+							else if (!strcasecmp(s, "VC-login-ok"))
+								axl_defaults.VCloginEnable = 1;
+							else if (!strcasecmp(s, "VC-log-connections"))
+								axl_defaults.LoggingVC += 1;
+							else if (!strcasecmp(s, "VC-debug"))
+								axl_defaults.LoggingVC += 2;
+							else goto ignore;
+						}
+						continue;
+ignore:
+						fprintf(stderr, "ax25d: bad config entry on line %d: %s", line, s);
+						fprintf(stderr, "  valid parametrs for parameters_extAX25 are:\n[VC-reject-login ||\nVC-wait-login [VC-login-ok] [VC-disc-on-linkfailure-msg]||\nVC-send-failure-msg || VC-log-connections]\n");
+					}
+					if (axl_defaults.checkVC) {
+						if (axl_defaults.checkVC > 2) {
+							fprintf(stderr, "warning: line %d: VC-reject-login and VC-wait-login are exclusive. using VC-reject-login", line);
+							axl_defaults.checkVC = 2;
+						}
+					}
+					continue;
+				}
+				if (axl_defaults.checkVC != 0) {
+					axl_ent->checkVC = axl_defaults.checkVC;
+					axl_ent->VCdiscOnLinkfailureMsg = axl_defaults.VCdiscOnLinkfailureMsg;
+					axl_ent->VCsendFailureMsg = axl_defaults.VCsendFailureMsg;
+					axl_ent->VCloginEnable = axl_defaults.VCloginEnable;
+					axl_ent->LoggingVC = axl_defaults.LoggingVC;
+				}
+			}
+
+			parameters = FALSE;
+
+			if (strcasecmp("parameters", call) == 0)
+				parameters = TRUE;
+			else if (strcasecmp("default", call) != 0)
+				axl_ent->call = strdup(call);
+
+			/* Window */
+			if ((s = strtok(NULL, " \t")) == NULL)
+				goto BadArgsFree;
+
+			if (!parameters) {
+				if (strcmp(s, "*") != 0)
+					axl_ent->window = atoi(s);
+				else
+					axl_ent->window = axl_defaults.window;
+			} else {
+				if (strcmp(s, "*") != 0)
+					axl_defaults.window = atoi(s);
+			}
+
+			/* T1 */
+			if ((s = strtok(NULL, " \t")) == NULL)
+				goto BadArgsFree;
+
+			if (!parameters) {
+				if (strcmp(s, "*") != 0) {
+					val = (unsigned long)(atof(s) / 0.1);
+
+					if (val == 0 || val > 65535)
+						axl_ent->t1 = axl_defaults.t1;
+					else
+						axl_ent->t1 = val;
+				} else {
+					axl_ent->t1 = axl_defaults.t1;
+				}
+			} else {
+				if (strcmp(s, "*") != 0) {
+					val = (unsigned long)(atof(s) / 0.1);
+
+					if (val > 0 && val < 65535)
+						axl_defaults.t1 = val;
+				}
+			}
+
+			/* T2 */
+			if ((s = strtok(NULL, " \t")) == NULL)
+				goto BadArgsFree;
+
+			if (!parameters) {
+				if (strcmp(s, "*") != 0) {
+					val = (unsigned long)(atof(s) / 0.1);
+
+					if (val == 0 || val > 65535)
+						axl_ent->t2 = axl_defaults.t2;
+					else
+						axl_ent->t2 = val;
+				} else {
+					axl_ent->t2 = axl_defaults.t2;
+				}
+			} else {
+				if (strcmp(s, "*") != 0) {
+					val = (unsigned long)(atof(s) / 0.1);
+
+					if (val > 0 && val < 65535)
+						axl_defaults.t2 = val;
+				}
+			}
+
+			/* T3 */
+			if ((s = strtok(NULL, " \t")) == NULL)
+				goto BadArgsFree;
+
+			if (!parameters) {
+				if (strcmp(s, "*") != 0)
+					axl_ent->t3 = atoi(s);
+				else
+					axl_ent->t3 = axl_defaults.t3;
+			} else {
+				if (strcmp(s, "*") != 0)
+					axl_defaults.t3 = atoi(s);
+			}
+
+			/* Idle */
+			if ((s = strtok(NULL, " \t")) == NULL)
+				goto BadArgsFree;
+
+			if (!parameters) {
+				if (strcmp(s, "*") != 0)
+					axl_ent->idle = atoi(s);
+				else
+					axl_ent->idle = axl_defaults.idle;
+			} else {
+				if (strcmp(s, "*") != 0)
+					axl_defaults.idle = atoi(s);
+			}
+
+			/* N2 */
+			if ((s = strtok(NULL, " \t")) == NULL)
+				goto BadArgsFree;
+
+			if (!parameters) {
+				if (strcmp(s, "*") != 0)
+					axl_ent->n2 = atoi(s);
+				else
+					axl_ent->n2 = axl_defaults.n2;
+			} else {
+				if (strcmp(s, "*") != 0)
+					axl_defaults.n2 = atoi(s);
+			}
+
+			if (!parameters) {
+				/* Flags */
+				if ((s = strtok(NULL, " \t")) == NULL)
+					goto BadArgsFree;
+
+				axl_ent->flags = ParseFlags(s, line);
+            
+				if (!(axl_ent->flags & FLAG_LOCKOUT)) {
+					/* Get username */
+					if ((s = strtok(NULL, " \t")) == NULL)
+						goto BadArgsFree;
+
+					if ((pwd = getpwnam(s)) == NULL) {
+						fprintf(stderr, "ax25d: UID for user '%s' is unknown, ignoring entry\n", s);
+						goto BadUID;
+					}
+
+					axl_ent->uid = pwd->pw_uid;
+					axl_ent->gid = pwd->pw_gid;
+
+					/* Get exec file */
+					if ((s = strtok(NULL, " \t")) == NULL)
+						goto BadArgsFree;
+
+					axl_ent->exec = strdup(s);
+
+					/* Get command line */
+					if ((s = strtok(NULL, "")) == NULL)
+						goto BadArgsFree2;
+
+					axl_ent->shell = strdup(s);
+				}
+
+				axl_ent->next  = NULL;
+
+				if (axl_port->ents == NULL) {
+					axl_port->ents = axl_ent;
+				} else {
+					for (axltmp = axl_port->ents; axltmp->ents != NULL; axltmp = axltmp->ents)
+						;
+					axltmp->ents = axl_ent;
+				}
+			}
+		}
+
+		continue;
+
+BadLine:
+		fprintf(stderr, "ax25d: bad config entry on line %d\n", line);
+		continue;
+
+BadUID:
+		if (axl_ent->call != NULL)
+			free(axl_ent->call);
+		free(axl_ent);
+		continue;
+
+BadArgsFree2:
+		if (axl_ent->exec != NULL)
+			free(axl_ent->exec);
+BadArgsFree:
+		if (axl_ent->call != NULL)
+			free(axl_ent->call);
+		free(axl_ent);
+
+		/* BadArgs: */
+		fprintf(stderr, "ax25d: bad config entry on line %d, not enough fields.\n", line);
+		continue;
+	}
+
+	fclose(fp);
+
+	AXL = ClearList(AXL);
+	AXL = axl_build;		/* Assign our built list to AXL */
+
+	if (Logging)
+		syslog(LOG_INFO, "new config file loaded successfuly");
+
+	update_maxfd();
+	return 0;
+
+Error:
+	axl_build = ClearList(axl_build);
+	err_config();
+
+	return -1;
+}
+
+static unsigned long ParseFlags(const char *kp, int line)
+{
+	unsigned long flags = 0UL;
+
+	for (; *kp != '\0'; kp++) {
+		switch (*kp) {
+			case 'v':
+			case 'V':
+				flags |= FLAG_VALIDCALL;
+				break;
+
+			case 'q':
+			case 'Q':
+				flags |= FLAG_NOLOGGING;
+				break;
+
+			case 'n':
+			case 'N':
+				flags |= FLAG_CHKNRN;
+				break;
+
+			case 'd':
+			case 'D':
+				flags |= FLAG_NODIGIS;
+				break;
+
+			case 'l':
+			case 'L':
+				flags |= FLAG_LOCKOUT;
+				break;
+
+			case '0':
+			case '*':
+			case '-':		/* Be compatible and allow markers */
+				break;
+
+			default:
+				fprintf(stderr, "ax25d: config file line %d bad flag option '%c'.\n", line, *kp);
+				break;
+		}
+	}
+
+	return flags;
+}
+
+static struct axlist *ClearList(struct axlist *list)
+{
+	struct axlist *tp1, *tp2, *tmp;
+   
+	for (tp1 = list; tp1 != NULL; ) {
+		for (tp2 = tp1->ents; tp2 != NULL; ) {
+			if (tp2->port != NULL)
+				free(tp2->port);
+			if (tp2->call != NULL)
+				free(tp2->call);
+			if (tp2->node != NULL)
+				free(tp2->node);
+			if (tp2->exec != NULL)
+				free(tp2->exec);
+			if (tp2->shell != NULL)
+				free(tp2->shell);
+
+			tmp = tp2->ents;
+			free(tp2);
+			tp2 = tmp;
+		}
+
+		if (tp1->port != NULL)
+			free(tp1->port);
+		if (tp1->call != NULL)
+			free(tp1->call);
+		if (tp1->node != NULL)
+			free(tp1->node);
+		if (tp1->exec != NULL)
+			free(tp1->exec);
+		if (tp1->shell != NULL)
+			free(tp1->shell);
+
+		close(tp1->fd);
+
+		tmp = tp1->next;
+		free(tp1);
+		tp1 = tmp;
+	}
+
+	return NULL;
+}
+
+static char *stripssid(const char *call)
+{
+	static char newcall[10];
+	char *s;
+	
+	strcpy(newcall, call);
+
+	if ((s = strchr(newcall, '-')) != NULL)
+		*s = '\0';
+	
+	return newcall;
+}
diff --git a/ax25/ax25d.conf b/ax25/ax25d.conf
new file mode 100644
index 0000000..36ec357
--- /dev/null
+++ b/ax25/ax25d.conf
@@ -0,0 +1,47 @@
+# /etc/ax25/ax25d.conf
+#
+# ax25d Configuration File.
+#
+# AX.25 Ports begin with a '['.
+#
+[OH2BNS VIA 1]
+NOCALL   * * * * * *  L
+default  * * * * * *  -	root  /usr/local/sbin/ttylinkd	ttylinkd
+#parameters_extAX25 VC-wait-login VC-disc-on-linkfailure-msg VC-log-connections
+#
+#
+[OH2BNS-2 VIA 1]
+NOCALL   * * * * * *  L
+default  * * * * * *  -	root  /usr/sbin/node	node
+#
+#
+[OH2BNS VIA 2]
+NOCALL   * * * * * *  L
+default  * * * * * *  -	root  /usr/local/sbin/ttylinkd	ttylinkd
+#
+[OH2BNS-2 VIA 2]
+NOCALL   * * * * * *  L
+default  * * * * * *  -	root  /usr/sbin/node	node
+#
+[OH2BNS-3 VIA 2]
+NOCALL   * * * * * *  L
+default  * * * * * *  -	root  /usr/local/sbin/axwrapper	axwrapper /usr/bin/finger finger
+#
+#[OH2BNS-9]
+#NOCALL  * * * * * *  L
+#default * * * * * *  -	root  /usr/sbin/node	node
+#
+# NET/ROM Ports begin with a '<'.
+#
+#<netrom>
+#NOCALL  * * * * * *  L
+#default * * * * * *  -	root  /usr/local/sbin/ttylinkd	ttylinkd
+#
+<netrom>
+NOCALL   * * * * * *  L
+default  * * * * * *  -	root  /usr/sbin/node	node
+#
+#<netrom>
+#NOCALL  * * * * * *  L
+#default * * * * * *  -	root  /usr/sbin/node	node
+#
diff --git a/ax25/ax25d.conf.5 b/ax25/ax25d.conf.5
new file mode 100644
index 0000000..0fd80db
--- /dev/null
+++ b/ax25/ax25d.conf.5
@@ -0,0 +1,290 @@
+.TH AX25D.CONF 5 "17 January 1997" Linux "Linux Programmer's Manual"
+.SH NAME
+ax25d.conf \- ax25d configuration file.
+.SH DESCRIPTION
+.LP
+.B Ax25d.conf
+controls the functioning of
+.B ax25d.
+Its purpose is to specify on which ports to listen on, which applications
+are available, and to whom they are available to. The configuration file is
+common to both AX.25, NET/ROM and Rose and their is similarity between the
+two parts of the file.
+.sp 1
+The general layout for an entry for a given port is as follows:
+.sp 1
+.RS
+interface control
+.br
+callsign entry 1
+.br
+ .
+.br
+ .
+.br
+callsign entry n
+.RE
+.sp 1
+The
+.B "interface control"
+line determines which port and callsigns apply to the following
+.B "callsign entry"
+lines, until the next
+.B "interface control"
+is read. There are four different variants of the
+.B "interface control"
+line:
+.sp 1
+.RS
+1. [AX.25 Port Name]
+.br
+2. [Callsign VIA AX.25 Port Name]
+.br
+3. <NET/ROM Port Name>
+.br
+4. {Callsign VIA Rose Port Name}
+.RE
+.sp 1
+Version 1 allows the following
+.B "callsign entry"
+lines to listen on the AX.25 port specified by the AX.25 port name using the
+default callsign of that AX.25 port.
+.sp 1
+Version 2 allows the following
+.B "callsign entry"
+lines to listen on the AX.25 port specified by the AX.25 port name using the
+callsign specified instead of the default callsign of that AX.25 port.
+Specifying a * for the AX.25 port name allows the following
+.B "callsign entries"
+to be valid for all the operating AX.25 ports using the callsign specified. VIA
+can be abbreviated to just V. If the callsign has an asterisk appended to it
+then the system will be listening on the port with the callsign, but as a
+pseudo-digipeater instead of being the normal destination callsign.
+.sp 1
+Version 3 allows the following
+.B "callsign entry"
+lines to listen on the NET/ROM port specified by the NET/ROM port name using
+the default callsign of that NET/ROM port.
+.sp 1
+Version 4 allows the following
+.B "callsign entry"
+lines to listen on the Rose port using the specified Rose port name using
+the callsign specified as the service access point (SAP). A * may be
+specified for a callsign to allow matching to any incoming Call Requests
+with any SAP.
+.sp 1
+The
+.B "callsign entry"
+lines have a similar layout for both AX.25, NET/ROM and Rose, the layout is:
+.sp 1
+.RS
+peer window t1 t2 t3 idle n2 mode uid exec args...
+.RE
+.sp 1
+All values must be entered for all entries even when they are not used (ie
+window for NET/ROM, just enter a * instead), The meanings of each of the
+fields is given below. All timings apart from the idle value are given in
+seconds, the idle values is given in minutes.
+.RS
+.TP 10
+.B peer
+This specifies the callsign of the remote end of the connection that should
+have the following parameters and executable set up for them. The syntax of
+the peer argument is explained below.
+.TP 10
+.B window
+This sets the the value of the window size, if a value of * is entered in this
+field then the default value for the port is taken from the \(lqparameters\(rq
+entry (see below) or lacking such an entry, the kernel default value is used.
+This entry is used by AX.25 but not by NET/ROM or Rose.
+.TP 10
+.B t1
+This sets the the value of the T1 timer, if a value of * is entered in this
+field then the default value for the port is taken from the \(lqparameters\(rq
+entry (see below) or lacking such an entry, the kernel default value is used.
+This entry is used by both AX.25 and NET/ROM but not by Rose.
+.TP 10
+.B t2
+This sets the the value of the T2 timer, if a value of * is entered in this
+field then the default value for the port is taken from the \(lqparameters\(rq
+entry (see below) or lacking such an entry, the kernel default value is used.
+This entry is used by both AX.25 and NET/ROM but not by Rose.
+.TP 10
+.B t3
+This sets the the value of the T3 timer, if a value of * is entered in this
+field then the default value for the port is taken from the \(lqparameters\(rq
+entry (see below) or lacking such an entry, the kernel default value is used.
+This entry is used by AX.25 but not by NET/ROM or Rose.
+.TP 10
+.B idle
+This sets the the value of the idle timer, if a value of * is entered in
+this field then the default value for the port is taken from the
+\(lqparameters\(rq entry (see below) or lacking such an entry, the kernel
+default value is used.
+.TP 10
+.B n2
+This sets the the value of the N2 counter, if a value of * is entered in this
+field then the default value for the port is taken from the \(lqparameters\(rq
+entry (see below) or lacking such an entry, the kernel default value is used.
+This entry is used by both AX.25 and NET/ROM but not by Rose.
+.TP 10
+.B mode
+This is a set of flags that control the various properties associated with
+the incoming connection. The flags are single letters, may be in either
+upper or lower case, and there may not be any spaces between them. If no
+flags are to be specified either a 0, - or a * must be entered instead. The
+valid mode flag letters are:
+.RS
+.TP 5
+.B D
+Do not allow connections that have passed via any digipeaters. AX.25 only.
+.TP 5
+.B L
+Do not allow this station to connect, they are Locked out.
+.TP 5
+.B N
+Check that the NET/ROM neighbour is allowed, currently unused.
+.TP 5
+.B Q
+Do not make an entry into the log file for this connection.
+.TP 5
+.B V
+Validate the callsign of the incoming connection, currently unused.
+.RE
+.TP 10
+.B uid
+This is the userid that the following command should run under when
+executing.
+.TP 10
+.B exec
+This is the executable that should be executed when an incoming connection
+matches the criteria of both the
+.B "interface control"
+and the
+.B "callsign entry".
+.TP 10
+.B args...
+These are the optional arguments that are passed to the executable. All of
+the arguments are passed literally apart from the following:
+.RS
+.TP 5
+.B %d
+The name of the port that the connection is on.
+.TP 5
+.B %U
+The username (callsign) of the remote station in upper case without the SSID.
+.TP 5
+.B %u
+The username (callsign) of the remote station in lower case without the SSID.
+.TP 5
+.B %S
+The username (callsign) of the remote station in upper case with the SSID.
+.TP 5
+.B %s
+The username (callsign) of the remote station in lower case with the SSID.
+.TP 5
+.B %P
+The nodename of the remote station in upper case without the SSID.
+This is only valid under NET/ROM and Rose, under AX.25 a % is substituted instead.
+.TP 5
+.B %p
+The nodename of the remote station in lower case without the SSID.
+This is only valid under NET/ROM and Rose, under AX.25 a % is substituted instead.
+.TP 5
+.B %R
+The nodename of the remote station in upper case with the SSID.
+This is only valid under NET/ROM and Rose, under AX.25 a % is substituted instead.
+.TP 5
+.B %r
+The nodename of the remote station in lower case with the SSID.
+This is only valid under NET/ROM and Rose, under AX.25 a % is substituted instead.
+.TP 5
+.B %%
+A %.
+.RE
+.RE
+.sp 1
+The
+.B peer
+argument is dependant upon whether AX.25, NET/ROM or Rose is being used. There are
+five formats of this argument:
+.sp 1
+.RS
+1. default
+.br
+2. parameters
+.br
+3. callsign
+.br
+4. callsign at node
+.br
+5. @node
+.RE
+.sp 1
+The first version is used by AX.25, NET/ROM and Rose to specify that all callsigns
+on a given port are to be matched. The default line is usually the last of the
+.B "callsign entry"
+lines, so that more specific entries may have the chance to be matched
+first.
+.sp 1
+The second version is not a
+.B "callsign entry"
+that is used by any incoming connections. It is a means to specify default
+values for parameters such as Window, T1, T2, T3, Idle and N2. It is used for
+both AX.25, NET/ROM and Rose.
+.sp 1
+The third version is used by both AX.25, NET/ROM and Rose to specify the callsign of
+the remote station to match the
+.B "callsign entry"
+line. If no SSID is specified then the callsign will be matched with any
+that has the same callsign and any SSID. Specifying an SSID causes the
+callsign to be matched exactly. In the case of NET/ROM and Rose this entry does not
+specify which node the originating callsign comes from.
+.sp 1
+The fourth version is used by NET/ROM and Rose to specify the callsign of the remote
+station and the remote node to match the
+.B "callsign entry"
+line. If no SSID is specified in the callsign section then the callsign will
+be matched with any that has the same callsign and any SSID. Specifying an
+SSID causes the callsign to be matched exactly.
+.sp 1
+The fifth version is used by NET/ROM and Rose to specify only the address of the
+remote node to match the
+.B "callsign entry"
+line. This entry will mean that all remote users at the given node will
+match the entry.
+.sp 1
+Comments may be embedded in the configuration file by placing a # in the
+first column.
+.sp 1
+ax25d can now honour AX.25 TCP/IP mode-VC connections in a special way.
+Therefore, a new port specific option "parameters_extAX25" is available, with
+the following options, which are seperated by space.
+.TP 5
+parameters_extAX25
+VC-debug
+.br
+VC-reject-login|VC-wait-login|VC-login-ok
+.br
+VC-disc-on-linkfailure-msg, VC-send-failure-msg, VC-log-connections
+.br
+Recommended settings in ax25d.conf:
+.br
+  parameters_extAX25 VC-wait-login VC-disc-on-linkfailure-msg VC-log-connections
+.br
+or
+.br
+  parameters_extAX25 VC-reject-login VC-send-failure-msg VC-log-connections
+.br
+
+.SH FILES
+.LP
+/etc/ax25/ax25d.conf
+.SH "SEE ALSO"
+.BR ax25 (4),
+.BR netrom (4),
+.BR rose (4),
+.BR axports (5),
+.BR nrports (5),
+.BR rsports (5),
+.BR ax25d (8).
diff --git a/ax25/axctl.8 b/ax25/axctl.8
new file mode 100644
index 0000000..2de5151
--- /dev/null
+++ b/ax25/axctl.8
@@ -0,0 +1,67 @@
+.TH AXCTL 8 "2 August 1996" Linux "Linux System Managers Manual"
+.SH NAME
+axctl \- Configure/Kill running AX.25 connections.
+.SH SYNOPSIS
+.B axctl [-v] port dest src window|t1|t2|t3|n2|idle|paclen|kill [parm]
+.SH DESCRIPTION
+.LP
+The
+.B axctl
+command is designed to be a multi-function command that allows miscellaneous
+commands to be issued to the Linux AX.25 protocol layer for existing AX.25
+connections. The connection is uniquely identified via the combination of
+port, destination callsign and source callsign, with that information the
+kernel is able to change the parameters, or abort the connection.
+.LP
+Many of the options are similar to those found in
+.B axparms
+and perform the same function. Only one parameter may be changed on each
+invokation of
+.B axctl.
+.SH OPTIONS
+.TP 20
+.BI \-v
+Displays the version number.
+.TP 20
+.BI "window window"
+Sets the window size for the AX.25 connection.
+.TP 20
+.BI "t1 t1\-timeout"
+Sets the initial T1 timeout value for the AX.25 connection, the value is given in
+seconds.
+.TP 20
+.BI "t2 t2\-timeout"
+Sets the T2 timeout value for the AX.25 connection, the value is given in
+seconds.
+.TP 20
+.BI "t3 t3\-timeout"
+Sets the T3 timeout value for the AX.25 connected, the value is given in
+seconds.
+.TP 20
+.BI "n2 n2\-count"
+Sets the maximum number of tries for the AX.25 connection.
+.TP 20
+.BI "idle idle-timeout"
+Sets the value for the idle timer for the AX.25 connection, the value is in
+minutes.
+.TP 20
+.BI "paclen paclength"
+Sets the maximum packet length that may be transmitted on the AX.25
+connection.
+.TP 20
+.BI "kill"
+Will abort an existing AX.25 connection.
+.SH FILES
+.LP
+/etc/ax25/axports
+.SH "SEE ALSO"
+.BR call (1),
+.BR getsockopt (2),
+.BR setsockopt (2),
+.BR ax25 (4),
+.BR axparms (8),
+.BR axports (5).
+.SH AUTHORS
+.nf
+Joerg Reuter DL1BKE <jreuter at poboxes.com>
+.fi
diff --git a/ax25/axctl.c b/ax25/axctl.c
new file mode 100644
index 0000000..e198e97
--- /dev/null
+++ b/ax25/axctl.c
@@ -0,0 +1,94 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <pwd.h>
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+
+int main(int argc, char **argv)
+{
+	struct ax25_ctl_struct ax25_ctl;
+	char *addr;
+	int s;
+	
+	if (argc == 2 && strncmp(argv[1], "-v", 2) == 0) {
+		printf("axctl: %s\n", VERSION);
+		return 0;
+	}
+
+	if (argc < 5) {
+		fprintf(stderr, "Usage: axctl [-v] port dest src t1|t2|t3|n2|paclen|idle|window|maxq|kill [parm]\n");
+		return 1;
+	}
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "axctl: no AX.25 port data configured\n");
+		return 1;
+	}
+
+	if ((addr = ax25_config_get_addr(argv[1])) == NULL) {
+		fprintf(stderr, "axctl: invalid port name - %s\n", argv[1]);
+		return 1;
+	}
+
+	if (ax25_aton_entry(addr, (char *)&ax25_ctl.port_addr) == -1)
+		return 1;
+	if (ax25_aton_entry(argv[2], (char *)&ax25_ctl.dest_addr) == -1)
+		return 1;
+	if (ax25_aton_entry(argv[3], (char *)&ax25_ctl.source_addr) == -1)
+		return 1;
+		
+	if ((s = socket(AF_AX25, SOCK_SEQPACKET, 0)) < 0) {
+		perror("axctl: socket");
+		return 1;
+	}
+
+	if (strcmp(argv[4], "kill") == 0 || strcmp(argv[4], "-kill") == 0) {
+		ax25_ctl.cmd = AX25_KILL;
+		ax25_ctl.arg = 0;
+	} else {
+		if (argc < 6) {
+			fprintf(stderr,"axctl: parameter missing\n");
+			return 1;
+		}
+		ax25_ctl.arg = atoi(argv[5]);
+		
+		if (strcmp(argv[4], "t1") == 0 || strcmp(argv[4], "-t1") == 0)
+			ax25_ctl.cmd = AX25_T1;
+		else if (strcmp(argv[4], "t2") == 0 || strcmp(argv[4], "-t2") == 0)
+			ax25_ctl.cmd = AX25_T2;
+		else if (strcmp(argv[4], "t3") == 0 || strcmp(argv[4], "-t3") == 0)
+			ax25_ctl.cmd = AX25_T3;
+		else if (strcmp(argv[4], "idle") == 0 || strcmp(argv[4], "-idle") == 0)
+			ax25_ctl.cmd = AX25_IDLE;
+		else if (strcmp(argv[4], "n2") == 0 || strcmp(argv[4], "-n2") == 0)
+			ax25_ctl.cmd = AX25_N2;
+		else if (strcmp(argv[4], "window") == 0 || strcmp(argv[4], "-window") == 0)
+			ax25_ctl.cmd = AX25_WINDOW;
+		else if (strcmp(argv[4], "paclen") == 0 || strcmp(argv[4], "-paclen") == 0)
+			ax25_ctl.cmd = AX25_PACLEN;
+	}
+
+	ax25_ctl.digi_count = 0;
+	
+	if (ioctl(s, SIOCAX25CTLCON, &ax25_ctl) != 0) {
+		perror("axctl: SIOAX25CTLCON");
+		return 1;
+	}
+	
+	return 0;
+}
+
diff --git a/ax25/axgetput/Makefile.am b/ax25/axgetput/Makefile.am
new file mode 100644
index 0000000..d3f8f8f
--- /dev/null
+++ b/ax25/axgetput/Makefile.am
@@ -0,0 +1,20 @@
+
+installconf:
+
+etcfiles = 
+varfiles = 
+
+sbin_PROGRAMS = 
+
+bin_PROGRAMS = axgetput
+
+man_MANS = axgetput.1 
+EXTRA_DIST = $(man_MANS) 
+
+axgetput_SOURCES = axgetput.c axgetput.h util.h proto_bin.h util.c proto_bin.c includes.h
+
+install-exec-hook:
+	(cd $(DESTDIR)$(bindir) && ln -sf axgetput bget && ln -sf axgetput bput)
+
+install-data-hook:                                                             
+	(cd $(DESTDIR)$(mandir)/man1 && ln -sf axgetput.1 bget.1 && ln -sf axgetput.1 bput.1)
diff --git a/ax25/axgetput/Makefile.in b/ax25/axgetput/Makefile.in
new file mode 100644
index 0000000..5754e60
--- /dev/null
+++ b/ax25/axgetput/Makefile.in
@@ -0,0 +1,648 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+sbin_PROGRAMS =
+bin_PROGRAMS = axgetput$(EXEEXT)
+subdir = ax25/axgetput
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
+	"$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+am_axgetput_OBJECTS = axgetput.$(OBJEXT) util.$(OBJEXT) \
+	proto_bin.$(OBJEXT)
+axgetput_OBJECTS = $(am_axgetput_OBJECTS)
+axgetput_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(axgetput_SOURCES)
+DIST_SOURCES = $(axgetput_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+etcfiles = 
+varfiles = 
+man_MANS = axgetput.1 
+EXTRA_DIST = $(man_MANS) 
+axgetput_SOURCES = axgetput.c axgetput.h util.h proto_bin.h util.c proto_bin.c includes.h
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ax25/axgetput/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu ax25/axgetput/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+axgetput$(EXEEXT): $(axgetput_OBJECTS) $(axgetput_DEPENDENCIES) $(EXTRA_axgetput_DEPENDENCIES) 
+	@rm -f axgetput$(EXEEXT)
+	$(LINK) $(axgetput_OBJECTS) $(axgetput_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/axgetput.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/proto_bin.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/util.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man1: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man1dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.1[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man1dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.1[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-sbinPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man \
+	uninstall-sbinPROGRAMS
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-data-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-sbinPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am \
+	install-data-hook install-dvi install-dvi-am install-exec \
+	install-exec-am install-exec-hook install-html install-html-am \
+	install-info install-info-am install-man install-man1 \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-sbinPROGRAMS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-man \
+	uninstall-man1 uninstall-sbinPROGRAMS
+
+
+installconf:
+
+install-exec-hook:
+	(cd $(DESTDIR)$(bindir) && ln -sf axgetput bget && ln -sf axgetput bput)
+
+install-data-hook:                                                             
+	(cd $(DESTDIR)$(mandir)/man1 && ln -sf axgetput.1 bget.1 && ln -sf axgetput.1 bput.1)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/ax25/axgetput/README b/ax25/axgetput/README
new file mode 100644
index 0000000..87d8c01
--- /dev/null
+++ b/ax25/axgetput/README
@@ -0,0 +1,11 @@
+This shell utility is for up/downloading files via your ax25 unix login
+session which is managed by axspawn.
+you need a //BIN compatible axspawn, which has the functionality of making
+the stream 8bit compatible (normally the EOL-conversion <LF> <-> <CR>
+prevents this). see:
+  http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/patches/linux-ax25/
+
+The location of these sources is
+  http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/axgetput/
+
+Since 2006-12-10, axgetput is part of the ax25-tools (s. linux-ax25.org).
diff --git a/ax25/axgetput/TODO b/ax25/axgetput/TODO
new file mode 100644
index 0000000..88881c6
--- /dev/null
+++ b/ax25/axgetput/TODO
@@ -0,0 +1,3 @@
+
+- yapp support
+- didadit support
diff --git a/ax25/axgetput/axgetput.1 b/ax25/axgetput/axgetput.1
new file mode 100644
index 0000000..a148334
--- /dev/null
+++ b/ax25/axgetput/axgetput.1
@@ -0,0 +1,77 @@
+.TH AXGETPUT 1 "21 January 2007" Linux "Linux Programmer's Manual"
+.SH NAME
+axgetput \- upload or download files via AX.25 / axspawn Linux login session.
+.SH SYNOPSIS
+.B axgetput
+[-b \fIblocksize\fR] [-i] [-v] [-h] [?] \fIfilename\fR
+.br
+.B axgetput
+[-b \fIblocksize\fR] [-i] -s [-v] [-h] [?] [\fIfilename\fR]
+.LP
+.SH DESCRIPTION
+.TP
+\fB-b blocksize\fR
+Set the blocksize (frame length) of transmitted data.  Defaults to 256 bytes
+which matches typical AX.25 network confurations best.
+.TP
+\fB-i\fR
+Compute CRC checksum only.
+.TP
+\fB.B -s\fR
+Indicates input from a stream.  This option is available only if STDIN is a
+pipe.  The filename argument may be omitted if -s is given. The length of
+the file need not to be known.
+.TP
+\fB\-v\fR
+print version and exit.
+.TP
+\fB-h, ?\fR
+print usage and exit.
+.LP
+.B axgetput
+is the actual name of the program. You execute for e.g.
+.B bget
+or
+.B bput
+while axgetput is the common program to which bget and bput are linked to.
+axgetput autodetermines which operation mode the user desires.
+
+axgetput sets the pty to be 8bit clean (thus enables binary mode for the
+file transfer). It requires that the user is logged in through axspawn(8).
+
+.B I. #BIN Protocol
+
+.B bget
+is used for downloading a file on this system from the unix login shell
+via his ax25 session to his packet-radio terminal program. The download
+"protocol" is the "#BIN" standard known from packet radio mailboxes.
+
+.B bput
+does it the other way round: with this comand, the user may upload a
+file to this computer.
+
+The #BIN protocol provides a CRC consistency check after the file is
+transfered. The transfer of the file modification time is part of the
+#BIN protocol.
+
+.LP
+.B II. YAPP Protocol
+
+.B yget
+or
+.B yput
+is reserverd for the yapp protocol, which is not supported in this version.
+
+.LP
+.B II. DIDADIT Protocol
+
+.B rget
+or
+.B rput
+is reserverd for the didadit protocol, which is not supported in this version.
+.LP
+Anyone like to implement yapp and didadit protcols?
+.LP
+.SH AUTHOR
+Thomas Osterried  DL9SAU <thomas at x-berg.in-berlin.de>
+Ralf Baechle DL5RB <ralf at linux-mips.org>
diff --git a/ax25/axgetput/axgetput.c b/ax25/axgetput/axgetput.c
new file mode 100644
index 0000000..d3d3f53
--- /dev/null
+++ b/ax25/axgetput/axgetput.c
@@ -0,0 +1,393 @@
+/*
+ * This is axgetput
+ *
+ * This shell utility is for up/downloading files via your ax25 unix login
+ * session which is managed by axspawn.
+ * you need a //BIN compatible axspawn, which has the functionality of making
+ * the stream 8bit compatible (normally the EOL-conversion <LF> <-> <CR>
+ * prevents this). see:
+ *   http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/patches/linux-ax25/
+ *
+ * (c) 2002 Thomas Osterried  DL9SAU <thomas at x-berg.in-berlin.de>
+ * License: GPL. See http://www.fsf.org/
+ * Sources: http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/axgetput/
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "includes.h"
+
+#include "axgetput.h"
+#include "util.h"
+#include "proto_bin.h"
+
+int fdin = 0;
+int fdout = 1;
+int fderr = 2;
+int fdout_is_pipe = 0;
+int fdin_is_pipe = 0;
+
+int is_stream = 0;
+int mode = 0;
+int do_crc_only = 0;
+
+char c_eol = '\n';
+
+unsigned int BLOCKSIZ = BLOCKSIZ_DEFAULT;
+
+char *send_on_signal = 0;
+
+static struct termios prev_termios;
+static int prev_termios_stored = 0;
+static mode_t mode_tty = 0;
+
+#ifndef	MYNAME
+#define MYNAME "axgetput"
+#endif
+
+/*---------------------------------------------------------------------------*/
+
+static void set_tty_flags(void)
+{
+  struct termios termios;
+  struct stat statbuf;
+
+  if (fdin_is_pipe)
+    return;
+  /* mesg no  */
+  if (!fstat(fdin, &statbuf)) {
+    /* save old mode  */
+    mode_tty = statbuf.st_mode;
+    fchmod(fdin, 0600);
+  }
+  /* make tty 8bit clean  */
+  if (tcgetattr(fdin, &prev_termios) != -1)
+    prev_termios_stored = 1;
+  memset((char *) &termios, 0, sizeof(termios));
+  termios.c_iflag = IGNBRK | IGNPAR;
+  termios.c_oflag = 0;
+  termios.c_cflag = CBAUD | CS8 | CREAD | CLOCAL;
+  termios.c_cflag = ~(CSTOPB|PARENB|PARODD|HUPCL);
+  termios.c_lflag = 0;
+  termios.c_cc[VMIN] = 1;
+  termios.c_cc[VTIME] = 0;
+  termios.c_cc[VSTART] = -1;
+  termios.c_cc[VSTOP] = -1;
+  tcsetattr(fdin, TCSANOW, &termios);
+}
+
+/*---------------------------------------------------------------------------*/
+
+static void restore_tty_flags(void)
+{
+  if (fdin_is_pipe)
+    return;
+  if (prev_termios_stored)
+    tcsetattr(fdin, TCSANOW, &prev_termios);
+  if (mode_tty)
+    fchmod(fdin, mode_tty);
+}
+
+/*---------------------------------------------------------------------------*/
+
+static void eol_convention(int state_should)
+{
+  /* need patched axspawn */
+#define	BIN_ON	"//BIN ON\r"
+#define	BIN_OFF	"//BIN OFF\r"
+  static int state_is = 0;
+
+  /* already in correct state?  */
+  if ((state_is && state_should) || (!state_is && !state_should))
+	return;
+
+  sleep(1);
+
+  if (state_should) {
+    write(fderr, BIN_ON, strlen(BIN_ON));
+    c_eol = '\r';
+  } else {
+    write(fderr, BIN_OFF, strlen(BIN_OFF));
+    c_eol = '\n';
+  }
+  state_is = state_should;
+
+  sleep(1);
+}
+
+/*---------------------------------------------------------------------------*/
+
+static void restore_defaults(void)
+{
+  eol_convention(0);
+  restore_tty_flags();
+}
+
+/*---------------------------------------------------------------------------*/
+
+static void signal_handler(int sig)
+{
+  if (send_on_signal)
+    secure_write(fdout, send_on_signal, strlen(send_on_signal));
+  restore_defaults();
+  if (*err_msg) {
+    fputs(err_msg, stderr);
+  }
+  fprintf(stderr, "Died by signal %d.\n", sig);
+  exit(sig);
+}
+
+/*---------------------------------------------------------------------------*/
+
+void do_version(void)
+{
+        fprintf(stderr, MYNAME " " VERSION "\n");
+	fprintf(stderr, "  (c) 2002 Thomas Osterried <thomas at x-berg.in-berlin.de>\n");
+	fprintf(stderr, "  License: GPL. See http://www.fsf.org/\n");
+	fprintf(stderr, "  Sources: http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/axgetput/\n");
+}
+
+/*---------------------------------------------------------------------------*/
+
+static void usage(int all) {
+  fprintf(stderr, "usage: %s ", myname);
+  if (mode % 2) {
+    fprintf(stderr, "[-ivh] [filename]\n");
+  } else {
+    fprintf(stderr, "[-isvh] [-b <blocksize>] [filename]\n");
+  }
+  fprintf(stderr, "  -h prints detailed help\n");
+  fprintf(stderr, "  -i computes checksum only\n");
+  fprintf(stderr, "  -v prints version and exits\n");
+  if (!all)
+    return;
+  if (mode % 2) {
+    fprintf(stderr, "  filename is usually got from the remote side by the protocol\n");
+    fprintf(stderr, "  but can be forced if you like to ignore this.\n");
+    fprintf(stderr, "  filename should be ommitted if output is sent to a pipe\n.");
+  } else {
+    fprintf(stderr, "  -b value is the blocksize (framelen) of the transmitted data\n");
+    fprintf(stderr, "     default %d, which is a useful choice for ampr ax25.\n", BLOCKSIZ_DEFAULT);
+    fprintf(stderr, "  -s indicates a stream with unknown size.\n");
+    fprintf(stderr, "     otherwise, the data will be read to memory until EOF.\n");
+    fprintf(stderr, "  -s is only available if stdin is a pipe\n");
+    fprintf(stderr, "  if filename specified in filter, the given name will be suggested instead.\n");
+    fprintf(stderr, "  filename may be ommited if used as filter.\n");
+  }
+  fputc('\n', stderr);
+  fprintf(stderr, "Tips: - compressed download:\n");
+  fprintf(stderr, "        gzip -c foo.txt | bget foo.txt.gz\n");
+  fprintf(stderr, "        tar cjf - ~/foo ~/bar/ | bget my_data.tar.bz2\n");
+  fputc('\n', stderr);
+  fprintf(stderr, "Other protocols:\n");
+  fprintf(stderr, "  bget / bput: receive / send with #BIN# protocol\n");
+  fprintf(stderr, "  yget / yput: receive / send with yapp\n");
+  fprintf(stderr, "  rget / rput: receive / send with didadit\n");
+  fprintf(stderr, "These are (sym)links to one program: " MYNAME "\n");
+}
+
+
+/*---------------------------------------------------------------------------*/
+
+/* not implemented */
+static int yput(void) { strcpy(err_msg, "yapp: not implementet yet\n"); return 1; }
+static int yget(void) { strcpy(err_msg, "yapp: not implementet yet\n"); return 1; }
+static int rget(void) { strcpy(err_msg, "yapp: not implementet yet\n"); return 1; }
+static int rput(void) { strcpy(err_msg, "yapp: not implementet yet\n"); return 1; }
+
+/*---------------------------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+
+  int len;
+  int ret = 0;
+  int c;
+  char *p;
+
+  /* determine what to so in the way how we are called  */
+  if ((p = strrchr(argv[0], '/')))
+    p++; /* skip '/'  */
+  else
+    p = argv[0];
+  len = strlen(p);
+  if (len < 0 || len > sizeof(myname)-1)
+    len = sizeof(myname)-1;
+  strncpy(myname, p, len);
+  myname[len] = 0;
+  strlwc(myname);
+
+  fdin_is_pipe = (isatty(fdin) ? 0 : 1);
+  fdout_is_pipe = (isatty(fdout) ? 0 : 1);
+
+  if (fdin_is_pipe && fdout_is_pipe) { 
+    fprintf(stderr, "error: cannot work in between two pipes\n");
+    exit(1);
+  }
+
+  *filename = 0;
+  *err_msg = 0;
+
+  if (!strcmp(myname, "bput"))
+    mode = RECV_BIN;
+  else if (!strcmp(myname, "bget"))
+    mode = SEND_BIN;
+  else if (!strcmp(myname, "yput"))
+    mode = RECV_YAPP;
+  else if (!strcmp(myname, "yget"))
+    mode = SEND_YAPP;
+  else if (!strcmp(myname, "rput"))
+    mode = RECV_DIDADIT;
+  else if (!strcmp(myname, "rget"))
+    mode = SEND_DIDADIT;
+
+  if (mode % 2) {
+    if (fdin_is_pipe) {
+      fprintf(stderr, "error: error: stdin must be a tty\n");
+      exit(1);
+    }
+  } else {
+    if (fdout_is_pipe) {
+      fprintf(stderr, "error: stdout must be a tty\n");
+      exit(1);
+    }
+  }
+
+  signal(SIGHUP, signal_handler);
+  signal(SIGTERM, signal_handler);
+  signal(SIGINT, signal_handler);
+
+/* for difference betreen "bput -f file" and "bget file"  */
+#define	get_filename(f) { \
+      if (!strcmp(f, "-")) { \
+	if (mode % 2) \
+          fdin_is_pipe = 1; \
+        else \
+          fdout_is_pipe = 1; \
+      } else { \
+        strncpy(filename, f, sizeof(filename)-1); \
+        filename[sizeof(filename)-1] = 0; \
+	if (mode % 2) { \
+	  if (fdin_is_pipe) \
+	    fdin_is_pipe = 0; \
+	} else { \
+          if (fdout_is_pipe) \
+	    fdout_is_pipe = 0; \
+	} \
+      } \
+}
+
+  while ((c = getopt(argc, argv, (mode % 2) ? "ivh?" : "b:isvh?")) != EOF) {
+    switch(c) {
+    case 'b':
+      if (((BLOCKSIZ = (unsigned ) atoi(optarg)) < BLOCKSIZ_MIN) || BLOCKSIZ > BLOCKSIZ_MAX) {
+	fprintf(stderr, "error: invalid blocksize: %d\n", BLOCKSIZ);
+	fprintf(stderr, "       blocksize must be in the range %d <= x <= %d. a value\n", BLOCKSIZ_MIN, BLOCKSIZ_MAX);
+	fprintf(stderr, "       of %d (default) is suggested, because it fits in an ax25 frame.\n", BLOCKSIZ_DEFAULT);
+	exit(1);
+      }
+      break;
+    case 'i':
+      do_crc_only = 1;
+      break;
+    case 's':
+      is_stream = 1;
+      break;
+    case 'v':
+      do_version();
+      exit(0);
+      break;
+    case 'h':
+    case '?':
+      usage((c == 'h'));
+      exit(0);
+      break;
+    }
+  }
+
+  if (mode == 0) {
+    usage(1);
+    exit(0);
+  }
+
+  if (optind < argc) {
+    get_filename(argv[optind]);
+    optind++;
+  }
+  if (optind < argc) {
+    usage(0);
+    exit(1);
+  }
+
+  if (is_stream && !fdin_is_pipe) {
+    fprintf(stderr, "error: -s is only available in a pipe\n");
+    exit(1);
+  }
+
+  if (do_crc_only)
+    goto skiped_crc_only_tag_1;
+
+  if (mode % 2) {
+    if (fdin_is_pipe) {
+      fprintf(stderr, "error: error: stdin must be a tty.\n");
+      exit(1);
+    }
+    if (fdout_is_pipe && *filename) {
+      fprintf(stderr, "error: filename in a pipe does not make sense.\n");
+      exit(1);
+    }
+  } else {
+    if (fdout_is_pipe) {
+      fprintf(stderr, "error: stdout must be a tty.\n");
+      exit(1);
+    }
+    if (!fdin_is_pipe && !*filename) {
+      fprintf(stderr, "error: no file to send.\n");
+      exit(1);
+    }
+  }
+
+  signal(SIGQUIT, signal_handler);
+
+  set_tty_flags();
+  eol_convention(1);
+
+skiped_crc_only_tag_1:
+
+  switch (mode) {
+  case RECV_BIN:
+    if (do_crc_only)
+      ret = bget();
+    else
+      ret = bput();
+    break;
+  case SEND_BIN:
+    ret = bget();
+    break;
+  case RECV_YAPP:
+    ret = yput();
+    break;
+  case SEND_YAPP:
+    ret = yget();
+    break;
+  case RECV_DIDADIT:
+    ret = rput();
+    break;
+  case SEND_DIDADIT:
+    ret = rget();
+    break;
+  }
+
+  restore_defaults();
+  if (*err_msg) {
+    fputs(err_msg, stderr);
+  }
+  exit(ret);
+
+  return 0;
+
+}
+
diff --git a/ax25/axgetput/axgetput.h b/ax25/axgetput/axgetput.h
new file mode 100644
index 0000000..c1ad6fa
--- /dev/null
+++ b/ax25/axgetput/axgetput.h
@@ -0,0 +1,45 @@
+/*
+ * (c) 2002 Thomas Osterried  DL9SAU <thomas at x-berg.in-berlin.de>
+ *   License: GPL. See http://www.fsf.org/
+ *   Sources: http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/axgetput/
+ */
+
+#ifndef	AXGETPUT_H
+#define AXGETPUT_H
+
+extern int fdin;
+extern int fdout;
+extern int fderr;
+
+extern int fdin_is_pipe;
+extern int fdout_is_pipe;
+
+char myname[PATH_MAX+1];
+char filename[PATH_MAX+1];
+char err_msg[2048];
+
+extern int is_stream;
+extern int mode;
+extern int do_crc_only;
+
+extern char c_eol;
+extern char *send_on_signal;
+
+/* modes */
+#define RECV_BIN        1	/*   #BIN# protocol: receive */
+#define SEND_BIN        2	/*   #BIN# protocol: send */
+#define RECV_YAPP       3	/*    yapp protocol: receive */
+#define SEND_YAPP       4	/*    yapp protocol: send */
+#define RECV_DIDADIT    5	/* didadit protocol: receive */
+#define SEND_DIDADIT    6	/* didadit protocol: send */
+
+
+/* block sizes */
+
+extern unsigned int BLOCKSIZ;
+
+#define BLOCKSIZ_MIN	   1	/* not suggested */
+#define BLOCKSIZ_DEFAULT 256    /* useful, because it fits in an ax25 frame */
+#define BLOCKSIZ_MAX	1024	/* max. our buffer relies on it */
+
+#endif /* AXGETPUT_H */
diff --git a/ax25/axgetput/includes.h b/ax25/axgetput/includes.h
new file mode 100644
index 0000000..39115c1
--- /dev/null
+++ b/ax25/axgetput/includes.h
@@ -0,0 +1,27 @@
+#ifndef	INCLUDES_H
+#define	INCLUDES_H
+
+/*
+ * (c) 2002 Thomas Osterried  DL9SAU <thomas at x-berg.in-berlin.de>
+ *   License: GPL. See http://www.fsf.org/
+ *   Sources: http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/axgetput/
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <fcntl.h>
+#include <termios.h>
+#include <signal.h>
+#include <time.h>
+#include <sys/types.h>
+#include <utime.h>
+
+#endif /* INCLUDES_H */
diff --git a/ax25/axgetput/proto_bin.c b/ax25/axgetput/proto_bin.c
new file mode 100644
index 0000000..004ca5e
--- /dev/null
+++ b/ax25/axgetput/proto_bin.c
@@ -0,0 +1,507 @@
+/*
+ * (c) 2002 Thomas Osterried  DL9SAU <thomas at x-berg.in-berlin.de>
+ *   License: GPL. See http://www.fsf.org/
+ *   Sources: http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/axgetput/
+ */
+
+#include "includes.h"
+
+#include "proto_bin.h"
+#include "axgetput.h"
+#include "util.h"
+
+static int crctab[256];
+static int bittab[8] = { 128,64,32,16,8,4,2,1 };
+static int crcbit[8] = {
+  0x9188,0x48c4,0x2462,0x1231,0x8108,0x4084,0x2042,0x1021
+};
+
+/*---------------------------------------------------------------------------*/
+
+static int init_crc(void)
+{
+  int i,j;
+  
+  for (i = 0; i < 256; i++) {
+    crctab[i] = 0;
+    for (j = 0; j < 8; j++) {
+      if ((bittab[j] & i) != 0) {
+        crctab[i] = crctab[i] ^ crcbit[j];
+      }
+    }
+  }
+  return 0;
+}
+
+/*---------------------------------------------------------------------------*/
+
+static int do_crc(char b, int n, unsigned int crc)
+{
+  crc = (crctab[(crc >> 8)] ^ ((crc << 8) | (b & 0xff))) & 0xffff;
+  return (crc);
+}
+
+/*---------------------------------------------------------------------------*/
+
+static long parse_sfbin_date_to_unix(const char *s)
+{
+
+  unsigned long x;
+
+  sscanf(s, "%lX", &x);
+
+  return date_dos2unix(((x << 16) >> 16), (x >> 16));
+}
+
+/*---------------------------------------------------------------------------*/
+
+static char * unix_to_sfbin_date_string(long gmt)
+{
+
+  static char buf[9];
+  unsigned short s_time, s_date;
+
+  date_unix2dos(((gmt == -1) ? time(0) : gmt), &s_time, &s_date);
+  sprintf(buf, "%X", ((s_date << 16) + s_time));
+  return buf;
+}
+
+/*---------------------------------------------------------------------------*/
+
+int bput(void)
+{
+  struct stat statbuf;
+  char buf[1024];  /* < signed int */
+  char filename_given[PATH_MAX];
+  unsigned long len_read_expected = 0L;
+  unsigned long len_read_left;
+  time_t file_time = 0L;
+  unsigned int msg_crc = 0;
+  unsigned int crc = 0;
+  char *term_line = 0;
+  int last_line_had_CR = 0;
+  int len_termline = 0;
+  int len = 0;
+  int fddata = fdout;
+  int is_eof;
+  int i;
+  char *p;
+  char *p_buf;
+
+#define save_close(x) { \
+      if (!fdout_is_pipe) \
+	close(x); \
+}
+
+
+  for (;;) {
+    len = my_read(fdin, buf, sizeof(buf), &is_eof, "\r\n");
+    if (is_eof || len < 1) {
+      sprintf(err_msg, "error: read failed (%s)\n", strerror(errno));
+      return 1;
+    }
+    if (buf[len-1] == '\n') {
+#if 0
+      p = "warning: <LF> received. not 8bit clean?\r";
+      secure_write(fdout, p, strlen(p));
+#endif
+      sprintf(err_msg, "bad EOL: <LF>\n");
+      return 1;
+    }
+    if (IS_BIN_ABORT(buf, len)) {
+      sprintf(err_msg, "Aborted by user request\n");
+      return 1;
+    }
+    if (buf[len-1] == '\r' && len > 5 && !memcmp(buf, "#BIN#", 5)) {
+        break;
+    }
+    if (len == sizeof(buf)) {
+      sprintf(err_msg, "line to long\n");
+      return 1;
+    }
+  }
+  buf[len-1] = 0; /* without trailing \r. and: string termination */
+
+  send_on_signal = bin_send_no_on_sig;
+
+  /* parse #BIN arguments */
+  *filename_given = 0;
+
+  p_buf = buf;
+  for (i = 0; (p = strsep(&p_buf, "#")); i++) {
+    switch(i) {
+    case 0:
+    case 1:
+      break;
+    case 2:
+      if (*p)
+	len_read_expected = (unsigned long ) atol(p);
+      break;
+    default:
+      if (*p == '|') {
+        msg_crc = (unsigned int ) atoi(p+1);
+      } else if (*p == '$') {
+        file_time = parse_sfbin_date_to_unix(p+1);
+      } else {
+        strncpy(filename_given, p, sizeof(filename_given)-1);
+        filename_given[sizeof(filename_given)-1] = 0;
+      }
+    }
+  }
+
+  if (!fdout_is_pipe) {
+    /* normal mode: store in given filename  */
+    if (!*filename) {
+      p = get_fixed_filename(filename_given, len_read_expected, msg_crc, 1);
+      strncpy(filename, p, sizeof(filename)-1);
+      filename[sizeof(filename)-1] = 0;
+    }
+    if (!stat(filename, &statbuf)) {
+      /* file exist  */
+      if (unlink(filename)) {
+        sprintf(err_msg, "error: cannot unlink %s (%s)\n", filename, strerror(errno));
+        goto abort;
+      }
+    }
+    if ((fddata = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0640)) < 0) {
+      sprintf(err_msg, "error: cannot open %s (%s)\n", filename, strerror(errno));
+      write(fderr, "\r#NO#\r", 6);
+      return 1;
+    }
+  }
+
+  if (!len_read_expected) {
+    term_line = "***END\r";
+    len_termline = strlen(term_line);
+  }
+
+  /* say helo  */
+  send_on_signal = bin_send_abort_on_sig;
+  write(fderr, "\r#OK#\r", 6);
+
+  len_read_left = len_read_expected;
+
+  /* #bin# chechsum initialization  */
+  init_crc();
+
+  for (;;) {
+
+    if ((len = my_read(fdin, buf, ((term_line || len_read_left > sizeof(buf)) ? sizeof(buf) : len_read_left), &is_eof, "\r")) < 1) {
+      save_close(fddata);
+      sprintf(err_msg, "error: read failed (%s)\n", strerror(errno));
+      goto abort;
+    }
+    if (!len) {
+      save_close(fddata); 
+      if (!term_line) {
+        sprintf(err_msg, "error: unexpected end of file during read: %s\n", strerror(errno));
+	return 1;
+      }
+      return 0;
+    }
+
+    if (msg_crc) {
+      int i;
+      for (i = 0; i < len; i++)
+        crc = do_crc((int ) buf[i], 1, crc);
+    }
+
+    if (buf[len-1] == '\r') {
+      if (last_line_had_CR) {
+	if (IS_BIN_ABORT(buf, len)) {
+	  /* "\r#ABORT#\r" was sent  */
+          if (!fdout_is_pipe) {
+	    close(fddata);
+	    /* clean up  */
+	    unlink(filename);
+	  }
+	  return 1;
+	}
+	if (term_line && len == len_termline && !memcmp(buf, term_line, len_termline)) {
+          /* sucessfully read until termination string  */
+          break;
+	}
+      }
+      last_line_had_CR = 1;
+    } else {
+      last_line_had_CR = 0;
+    }
+    if (!term_line)
+      len_read_left -= len;
+
+    if (secure_write(fddata, buf, len) == -1) {
+      save_close(fddata);
+      sprintf(err_msg, "error: write failed (%s)\n", strerror(errno));
+      goto abort;
+    }
+
+    /* nothing left?  */
+    if (!term_line && len_read_left == 0L)
+      break;
+    if (is_eof) {
+      if (!term_line && len_read_left) {
+	save_close(fddata);
+        goto abort;
+      }
+      break;
+    }
+  }
+  if (crc != msg_crc) {
+    sprintf(err_msg, "Invalid crc: computed %d, expected %d.\n", crc, msg_crc);
+    /* don't unlink  */
+    save_close(fddata);
+    return 1;
+  }
+  if (!fdout_is_pipe) {
+    close(fddata);
+    if (file_time != 0L) {
+      struct utimbuf utb;
+      utb.modtime = file_time;
+      utb.actime = time(0);
+      utime(filename, &utb);
+    }
+  }
+
+  send_on_signal = 0;
+  return 0;
+
+abort:
+    sleep(1);
+    write(fderr, "\r#ABORT#\r", 9);
+    return 1;
+#undef	save_close
+}
+
+/*---------------------------------------------------------------------------*/
+
+int bget(void) {
+  struct strlist {
+    struct strlist *next;
+    size_t len;
+    char data[1]; /* actually a the address of char * pointer */
+  };
+
+  struct strlist *stored_file = 0;
+  struct strlist  *sl_tail = 0;
+  struct strlist *sl;
+  struct timeval timeout;
+  struct stat statbuf;
+
+  unsigned int crc = 0;
+
+  char buf[1024];
+  fd_set readfds;
+  int fddata = fdin;
+  int len;
+  unsigned long file_size = 0;
+  unsigned long len_remains;
+  int is_eof;
+  time_t file_time = 0L;
+
+#define save_close(x) { \
+      if (!fdin_is_pipe) \
+	close(x); \
+}
+
+#define	store_line(s, len) { \
+        if (!(sl = (struct strlist *) malloc(sizeof(struct strlist *) + sizeof(size_t) + len))) \
+	  return 1; \
+	sl->next = 0; \
+	sl->len = len; \
+	memcpy(sl->data, s, len); \
+	if (!stored_file) { \
+          stored_file = sl; \
+	} else { \
+	  sl_tail->next = sl; \
+	} \
+	sl_tail = sl; \
+}
+
+  if (BLOCKSIZ < 1 || BLOCKSIZ > sizeof(buf))
+    BLOCKSIZ = BLOCKSIZ_DEFAULT;
+
+  init_crc();
+
+  if (!fdin_is_pipe && *filename) {
+    if ((fddata = open(filename, O_RDONLY)) == -1) {
+      sprintf(err_msg, "error: cannot open %s (%s)\n", filename, strerror(errno));
+      return 1;
+    }
+    if (!fstat(fddata, &statbuf))
+      file_time =  statbuf.st_mtime;
+    else
+      file_time = time(0);
+    
+    /* compute crc  */
+    while ((len = read(fddata, buf, BLOCKSIZ)) > 0) {
+      int i;
+      for (i = 0; i < len; i++)
+        crc = do_crc((int ) buf[i], 1, crc);
+      file_size += len;
+    }
+    if (len < 0) {
+      sprintf(err_msg, "error: read failed (%s)\n", strerror(errno));
+      close(fddata);
+      return 1;
+    }
+    /* rewind  */
+    if (lseek(fddata, 0L, SEEK_SET) != 0L) {
+      sprintf(err_msg, "error: file io failed on lseek() (%s)\n", strerror(errno));
+      close(fddata);
+      return 1;
+    }
+    sprintf(buf, "\r#BIN#%ld#|%d#$%s#%s\r", file_size, crc, unix_to_sfbin_date_string(file_time), get_fixed_filename(filename, file_size, crc, 1));
+  } else {
+    file_time = time(0);
+    if (!is_stream || do_crc_only) {
+      sprintf(err_msg, "error: not enough memory\n");
+      while ((len = read(fddata, buf, sizeof(buf))) > 0) {
+        int i;
+        for (i = 0; i < len; i++)
+          crc = do_crc((int ) buf[i], 1, crc);
+        file_size += len;
+	if (!do_crc_only)
+	  store_line(buf, len);
+      }
+      if (len < 0) {
+        sprintf(err_msg, "error: read failed (%s)\n", strerror(errno));
+        close(fddata);
+        return 1;
+      }
+      *err_msg = 0;
+      sprintf(buf, "\r#BIN#%ld#|%d#$%s#%s\r", file_size, crc, unix_to_sfbin_date_string(file_time), get_fixed_filename(filename, file_size, crc, 1));
+    } else {
+      sprintf(buf, "\r#BIN###$%s#%s\r", unix_to_sfbin_date_string(file_time), get_fixed_filename(filename, 0, 0, 1));
+    }
+    /*
+     * hack: check for #ABORT# from fdout (fd 1), because fddata (fd 0) is
+     * our pipe we read the data from, which we actually tx.
+     * believe me, it does work.
+     */
+    fdin = fdout;
+  }
+
+  if (do_crc_only) {
+    printf("File information for %s:\n", get_fixed_filename(filename, file_size, crc, 1));
+    printf("  size %ld bytes, crc %d, date %s (%ld)\n", file_size, crc, unix_to_sfbin_date_string(file_time), file_time);
+    return 0;
+  }
+
+  send_on_signal = bin_send_abort_on_sig;
+  if (secure_write(fdout, buf, strlen(buf)) == -1) {
+    sprintf(err_msg, "error: write failed (%s)\n", strerror(errno));
+    save_close(fddata);
+    return 1;
+  }
+
+    /* wait for answer  */
+  for (;;) {
+                 /*
+		  * make sure we do not read from a pipe. fdout is also
+		  * assigned to the tty
+		  */
+    len = my_read(fdout, buf, sizeof(buf), &is_eof, "\r\n");
+    if (is_eof || len < 1) {
+      sprintf(err_msg, "error: read failed (%s)\n", strerror(errno));
+      save_close(fddata);
+      return 1;
+    }
+    if (buf[len-1] == '\n') {
+#if 0
+      char *p = "warning: <LF> received. not 8bit clean?\r";
+      secure_write(fdout, p, strlen(p));
+#endif
+      sprintf(err_msg, "bad EOL: <LF>\n");
+      goto abort;
+    } else if (buf[len-1] != '\r') {
+      sprintf(err_msg, "line to long\n");
+      continue;
+    }
+    if (IS_BIN_OK(buf, len))
+      break;
+    if (IS_BIN_NO(buf, len)) {
+      save_close(fddata);
+      return 0;
+    }
+    if (IS_BIN_ABORT(buf, len)) {
+      sprintf(err_msg, "Aborted by user request\n");
+      save_close(fddata);
+      return 1;
+    }
+  }
+
+  len_remains = file_size;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+
+  for (;;) {
+    char *p_buf;
+
+    /* check for user \r#ABORT#\r on tty stream  */
+    FD_ZERO(&readfds);
+    FD_SET(fdin, &readfds);
+    if (select(fdin+1, &readfds, 0, 0, &timeout) && FD_ISSET(fdin, &readfds)) {
+      if ((len = read(fdin, buf, sizeof(buf))) < 0) {
+        sprintf(err_msg, "read from tty failed (%s)\n", strerror(errno));
+          save_close(fddata);
+          goto abort;
+      }
+      if (IS_BIN_ABORT(buf, len)) {
+        sprintf(err_msg, "Aborted by user request\n");
+        save_close(fddata);
+        return 1;
+      }
+    }
+    /* read data  */
+    if (!fdin_is_pipe || is_stream) {
+      p_buf = buf;
+      if ((len = my_read(fddata, buf, ((len_remains > BLOCKSIZ || is_stream) ? BLOCKSIZ : len_remains), &is_eof, 0)) < 1) {
+        save_close(fddata);
+        if (len < 0) {
+          sprintf(err_msg, "error: read failed (%s)\n", strerror(errno));
+	  goto abort;
+        }
+        break;
+      }
+      len_remains -= len;
+    } else {
+      p_buf = stored_file->data;
+      len = stored_file->len;
+    }
+    /* write to client  */
+    if (secure_write(fdout, p_buf, len) == -1) {
+      sprintf(err_msg, "error: write failed (%s)\n", strerror(errno));
+      save_close(fddata);
+      goto abort;
+    }
+    if (fdin_is_pipe && !is_stream) {
+      sl = stored_file;
+      if (!(stored_file = stored_file->next))
+	is_eof = 1;
+      free(sl);
+    }
+    if (!fdin_is_pipe && !len_remains) {
+      if (read(fddata, buf, 1) == 1) {
+	sprintf(err_msg, "Warning: file has grown in the meantime\n");
+      }
+      is_eof = 1;
+      break;
+    }
+    /*
+     * need this because my_read may returned lenth != 0 (data to be written)
+     * but also has detected EOF.
+     */
+    if (is_eof)
+      break;
+  }
+
+  sleep(10);
+
+  return 0;
+
+abort:
+    sleep(1);
+    write(fderr, "\r#ABORT#\r", 9);
+    return 1;
+#undef	save_close
+}
diff --git a/ax25/axgetput/proto_bin.h b/ax25/axgetput/proto_bin.h
new file mode 100644
index 0000000..6c53fad
--- /dev/null
+++ b/ax25/axgetput/proto_bin.h
@@ -0,0 +1,32 @@
+/*
+ * (c) 2002 Thomas Osterried  DL9SAU <thomas at x-berg.in-berlin.de>
+ *   License: GPL. See http://www.fsf.org/
+ *   Sources: http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/axgetput/
+ */
+
+#ifndef	PROTO_BIN_H
+#define	PROTO_BIN_H
+
+extern int bget(void);
+extern int bput(void);
+
+static const char bin_s_on_ok[] = "#OK#\r";
+static const int  bin_len_ok = sizeof(bin_s_on_ok)-1;
+static const char bin_s_on_no[] = "#NO#\r";
+static const int  bin_len_no = sizeof(bin_s_on_no)-1;
+static const char bin_s_on_abort[] = "#ABORT#\r";
+static const int  bin_len_abort = sizeof(bin_s_on_abort)-1;
+
+#define bin_send_no_on_sig "\r#NO#\r"
+#define bin_send_abort_on_sig "\r#ABORT#\r"
+
+#define	IS_BIN_NO(s, len) \
+  len == bin_len_no && !memcmp(s, bin_s_on_no, bin_len_no)
+
+#define	IS_BIN_OK(s, len) \
+  len == bin_len_ok && !memcmp(s, bin_s_on_ok, bin_len_ok)
+
+#define	IS_BIN_ABORT(s, len) \
+  len == bin_len_abort && !memcmp(s, bin_s_on_abort, bin_len_abort)
+
+#endif /* PROTO_BIN_H */
diff --git a/ax25/axgetput/util.c b/ax25/axgetput/util.c
new file mode 100644
index 0000000..4aff6a0
--- /dev/null
+++ b/ax25/axgetput/util.c
@@ -0,0 +1,208 @@
+/*
+ * (c) 2002 Thomas Osterried  DL9SAU <thomas at x-berg.in-berlin.de>
+ *   License: GPL. See http://www.fsf.org/
+ *   Sources: http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/axgetput/
+ */
+
+#include "includes.h"
+
+#include "axgetput.h"
+
+/* Use private function because some platforms are broken, eg 386BSD */
+
+static int Xtolower(int c)
+{
+  return (c >= 'A' && c <= 'Z') ? (c - 'A' + 'a') : c;
+}
+
+/*---------------------------------------------------------------------------*/
+
+char *strlwc(char *s)
+{
+  char *p;
+
+  for (p = s; (*p = Xtolower(*p)); p++) ;
+  return s;
+}
+
+/*---------------------------------------------------------------------------*/
+
+char *strtrim(char *s)
+{
+  char *p;
+
+  for (p = s; *p; p++) ;
+  while (--p >= s && isspace(*p & 0xff)) ;
+  p[1] = 0;
+  return s;
+}
+
+/*---------------------------------------------------------------------------*/
+
+int my_read(int fd, char *s, int len_max, int *eof, char *p_break)
+{
+
+  struct timeval timeout;
+  fd_set errfds;
+  int len_got;
+
+  *eof = 0;
+
+  for (len_got = 0; len_got < len_max; ) {
+    int len;
+    char *s_curr = s + len_got;
+
+    if ((len = read(fd, s_curr, (p_break ? 1 : len_max))) < 1) {
+      if (len == -1 && errno == EAGAIN) {
+        sleep(10);
+        continue;
+      }
+      *eof = 1;
+      /*
+       * len = 0: normal eof. if we're looking for a string, return -1 since
+       * we have'nt found
+       */
+      return (len == 0 && p_break ? -1 : (len_got ? len_got : len));
+    }
+    len_got += len;
+
+    /* read once? or char in p_break found?  */
+    if (!p_break || strchr(p_break, *s_curr))
+      break;
+  }
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&errfds);
+  FD_SET(fdout, &errfds);
+  if (select(fd+1, 0, 0, &errfds, &timeout) && FD_ISSET(fd, &errfds))
+    *eof = 1;
+
+  return len_got;
+}
+    
+/*---------------------------------------------------------------------------*/
+
+int secure_write(int fd, char *s, int len_write) {
+  int len_write_left_curr = len_write;
+
+  while (len_write_left_curr) {
+    int len;
+    if ((len = write(fd, s, len_write_left_curr)) < 0) {
+      if (len == -1 && errno == EAGAIN) {
+        sleep(10);
+        continue;
+      }
+      return -1;
+    }
+    if (len != len_write_left_curr) {
+      /* queue busy..  */
+      sleep(10);
+    }
+    s += len;
+    len_write_left_curr -= len;
+  }
+  return len_write;
+}
+
+/*---------------------------------------------------------------------------*/
+
+char *get_fixed_filename(char *line, long size, unsigned int msg_crc, int generate_filename) {
+
+  static char filename[1024];
+  char *p, *q, *r;
+
+  *filename = 0;
+
+  if ((p = strchr(line, '\"'))) {
+    p++;
+  }
+
+  /* security.. */
+
+  if ((q = strrchr((p ? p : line), '/'))) {
+    p = ++q;
+  }
+  if ((q = strrchr((p ? p : line), '\\'))) {
+    p = ++q;
+  }
+  if ((q = strrchr((p ? p : line), ':'))) {
+    p = ++q;
+  }
+  if (!p) {
+    p = line;
+  }
+  while (*p && isspace(*p & 0xff))
+    p++;
+  for (r = filename, q = p; *q; q++) {
+    if (*q == '"' || *q == ';') {
+      break;
+    }
+    *r++ = *q;
+  }
+  *r = 0;
+  strtrim(filename);
+  if ((q = strrchr(filename, '.'))) {
+    if (!*(q+1)) {
+      /* remove trailing dots */
+      *q = 0;
+    } else {
+      /* make suffix lowercase */
+      strlwc(q);
+    }
+  }
+  if (!*filename && generate_filename) {
+    sprintf(filename, "unknown-%ld%d%ld.bin", size, msg_crc, time(0));
+  }
+  return filename;
+}
+
+/*---------------------------------------------------------------------------*/
+
+/* Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70). */
+
+/* Linear day numbers of the respective 1sts in non-leap years. */
+static int day_n[] = { 0,31,59,90,120,151,181,212,243,273,304,334,0,0,0,0 };
+                  /* JanFebMarApr May Jun Jul Aug Sep Oct Nov Dec */
+
+/*---------------------------------------------------------------------------*/
+
+long date_dos2unix(unsigned short time,unsigned short date)
+{
+        int month,year;
+        long secs;
+
+        month = ((date >> 5) & 15)-1;
+        year = date >> 9;
+        secs = (time & 31)*2+60*((time >> 5) & 63)+(time >> 11)*3600+86400*
+            ((date & 31)-1+day_n[month]+(year/4)+year*365-((year & 3) == 0 &&
+            month < 2 ? 1 : 0)+3653);
+                        /* days since 1.1.70 plus 80's leap day */
+        return secs;
+}
+
+/*---------------------------------------------------------------------------*/
+
+/* Convert linear UNIX date to a MS-DOS time/date pair. */
+
+void date_unix2dos(int unix_date,unsigned short *time, unsigned short *date)
+{
+        int day,year,nl_day,month;
+
+        *time = (unix_date % 60)/2+(((unix_date/60) % 60) << 5)+
+            (((unix_date/3600) % 24) << 11);
+        day = unix_date/86400-3652;
+        year = day/365;
+        if ((year+3)/4+365*year > day) year--;
+        day -= (year+3)/4+365*year;
+        if (day == 59 && !(year & 3)) {
+                nl_day = day;
+                month = 2;
+        }
+        else {
+                nl_day = (year & 3) || day <= 59 ? day : day-1;
+                for (month = 0; month < 12; month++)
+                        if (day_n[month] > nl_day) break;
+        }
+        *date = nl_day-day_n[month-1]+1+(month << 5)+(year << 9);
+}
+
diff --git a/ax25/axgetput/util.h b/ax25/axgetput/util.h
new file mode 100644
index 0000000..abec764
--- /dev/null
+++ b/ax25/axgetput/util.h
@@ -0,0 +1,18 @@
+/*
+ * (c) 2002 Thomas Osterried  DL9SAU <thomas at x-berg.in-berlin.de>
+ *   License: GPL. See http://www.fsf.org/
+ *   Sources: http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/axgetput/
+ */
+
+#ifndef UTIL_H
+#define	UTIL_H
+
+extern char *strlwc(char *s);
+extern char *strtrim(char *s);
+extern int my_read(int fd, char *s, int len_max, int *eof, char *p_break);
+extern int secure_write(int fd, char *s, int len_write_left);
+extern char *get_fixed_filename(char *line, long size, unsigned int msg_crc, int generate_filename);
+extern long date_dos2unix(unsigned short time,unsigned short date);
+extern void date_unix2dos(int unix_date,unsigned short *time, unsigned short *date);
+
+#endif /* UTIL_H */
diff --git a/ax25/axparms.8 b/ax25/axparms.8
new file mode 100644
index 0000000..9989be8
--- /dev/null
+++ b/ax25/axparms.8
@@ -0,0 +1,123 @@
+.TH AXPARMS 8 "25 July 1997" Linux "Linux System Managers Manual"
+.SH NAME
+axparms \- Configure AX.25 interfaces.
+.SH SYNOPSIS
+.B axparms --assoc|--forward|--route|--setcall|--version ...
+.SH DESCRIPTION
+.LP
+The
+.B axparms
+command is designed to be a multi-function command that allows miscellaneous
+commands to be issued to the Linux AX.25 protocol layer. It includes the
+functionality of
+.B axassociate
+and
+.B axsetcall
+which this command superceedes. The different modes of the command are
+chosen by the first argument. Sunsequent arguments depend upon this argument
+and so no generalised command format can be given.
+.SH "--assoc Argument"
+.LP
+The format of this option is:
+.LP
+.nf
+.B axparms --assoc <callsign> <username>
+.br
+.B axparms --assoc <callsign> delete
+.br
+.B axparms --assoc policy [default|deny]
+.br
+.B axparms --assoc show
+.fi
+.LP
+This option mainpulates the kernel uid/callsign mapping table, allowing
+callsigns to be associated and dis-associated with a user. The
+.B policy
+option permits the superuser to have all other uid's either default to the
+actual port name, or to block traffic.
+.LP
+At power up the table is blank and the policy is 'default', which is thus
+backward compatible.
+.SH "--forward Argument"
+.LP
+Allows the use of many receivers with one transmitter, known as packet
+forwarding in many systems. The format of this command is:
+.LP
+.nf
+.B axparms --forward <portfrom> <portto>
+.br
+.B axparms --forward <portfrom> delete
+.fi
+.LP
+Any packets to be transmitted on port portfrom will be transmitted on port
+portto. This will stay in force until the second form of the command is
+issued which will remove the association.
+.SH "--route Argument"
+.LP
+This option allows the internal AX.25 routing table to be manipulated. This
+table is available for reading in /proc/net/ax25_route, and will be built up
+dynamically by stations heard. However it is possible to add, delete and list
+entries via this option.
+.LP
+The formats of this option are:
+.LP
+.nf
+.B axparms --route add <port> <callsign> [<digis>] [--ipmode V|D]
+.br
+.B axparms --route del <port> <callsign>
+.fi
+.B axparms --route list
+.fi
+.LP
+Routes added via this command will not be removed from the internal routing
+table when they are \(lqold\(rq as normal entries are. The 
+.B --ipmode
+option sets mode vc or mode datagram for this destination.
+.LP
+If the <callsign> argument is set to \(lqdefault\(rq then this will set the 
+default route for all outgoing AX.25 connections which will be used when there 
+is no specific route to the required destination.
+.SH "--setcall Argument"
+.LP
+The format of this option is:
+.LP
+.B axparms --setcall <interface> <callsign>
+.LP
+This changes the callsign associated at the given physical ax25 interface.
+.LP
+Cave: The interface name is not the symbolic port name from axports, but
+the real interface name (from ifconfig(8)):
+ax0, ax1, .., sp0, .., bpq0, ... etc..
+.LP
+The change is permanent as long as the interface exists, or another \(lqaxparms
+--setcall\(rq is issued.
+.LP
+The interface has to exist already in order to use this option; it 
+may be in state UP or DOWN.
+.SH "--version Argument"
+.LP
+This option displays the version of the AX.25 utilities that
+.B axparms
+belongs to.
+.SH FILES
+.LP
+/proc/net/ax25_bpqether
+.br
+/proc/net/ax25_calls
+.br
+/etc/ax25/axports
+.SH "SEE ALSO"
+.BR call (1),
+.BR getsockopt (2),
+.BR setsockopt (2),
+.BR ax25 (4),
+.BR axctl (8),
+.BR axports (5).
+.SH AUTHORS
+.nf
+Alan Cox GW4PTS <alan at cymru.net>
+.br
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
+.br
+Joerg Reuter DL1BKE <jreuter at poboxes.com>
+.fi
diff --git a/ax25/axparms.c b/ax25/axparms.c
new file mode 100644
index 0000000..daac7d4
--- /dev/null
+++ b/ax25/axparms.c
@@ -0,0 +1,443 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <pwd.h>
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+
+#include <net/if.h>
+
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+
+#include "../pathnames.h"
+
+void usage(void)
+{
+	fprintf(stderr, "usage: axparms --assoc|--forward|--route|--setcall|--version ...\n");
+}
+
+void usageassoc(void)
+{
+	fprintf(stderr, "usage: axparms --assoc show\n");
+	fprintf(stderr, "usage: axparms --assoc policy default|deny\n");
+	fprintf(stderr, "usage: axparms --assoc [callsign] [username]\n");
+	fprintf(stderr, "usage: axparms --assoc [callsign] delete\n");
+}
+
+void usageforward(void)
+{
+	fprintf(stderr, "usage: axparms --forward <portfrom> <portto>\n");
+	fprintf(stderr, "usage: axparms --forward <portfrom> delete\n");
+}
+
+void usageroute(void)
+{
+	fprintf(stderr, "usage: axparms --route add port callsign [digi ...] [--ipmode mode]\n");
+	fprintf(stderr, "usage: axparms --route del port callsign\n");
+	fprintf(stderr, "usage: axparms --route list\n");
+}
+
+void usagesetcall(void)
+{
+	fprintf(stderr, "usage: axparms --setcall interface callsign\n");
+}
+
+int routes(int s, int argc, char *argv[], ax25_address *callsign)
+{
+	struct ax25_routes_struct ax25_route;
+	struct ax25_route_opt_struct ax25_opt;
+	int i, j;
+	int ip_mode = ' ';
+	FILE* fp;
+	char routebuf[80];
+
+	if (strcmp(argv[2], "add") == 0) {
+		ax25_route.port_addr  = *callsign;
+		ax25_route.digi_count = 0;
+
+		if (strcmp(argv[4], "default") == 0) {
+			ax25_route.dest_addr = null_ax25_address;
+		} else {
+			if (ax25_aton_entry(argv[4], (char *)&ax25_route.dest_addr) == -1)
+				return 1;
+		}
+
+		for (i = 5, j = 0; i < argc && j < 6; i++) {
+			if (strncmp(argv[i], "--i", 3) == 0 || strncmp(argv[i], "-i", 2) == 0) {
+				if (++i == argc) {
+					fprintf(stderr, "axparms: -i must have a parameter\n");
+					return 1;
+				}
+				switch (*argv[i]) {
+					case 'd':
+					case 'D':
+						ip_mode = 'D';
+						break;
+					case 'v':
+					case 'V':
+						ip_mode = 'V';
+						break;
+					default:
+						ip_mode = ' ';
+						break;
+				}
+			} else {
+				if (ax25_aton_entry(argv[i], (char *)&ax25_route.digi_addr[j]) == -1)
+					return 1;
+				ax25_route.digi_count++;
+				j++;
+			}
+		}
+
+		if (ioctl(s, SIOCADDRT, &ax25_route) != 0) {
+			perror("axparms: SIOCADDRT");
+			return 1;
+		}
+		
+		ax25_opt.port_addr = *callsign;
+		ax25_opt.dest_addr = ax25_route.dest_addr;
+		ax25_opt.cmd = AX25_SET_RT_IPMODE;
+		ax25_opt.arg = ip_mode;
+		
+		if (ioctl(s, SIOCAX25OPTRT, &ax25_opt) != 0) {
+			perror("axparms: SIOCAX25OPTRT");
+			return 1;
+		}
+	}
+	
+	if (strcmp(argv[2], "del") == 0) {
+		ax25_route.port_addr  = *callsign;
+		ax25_route.digi_count = 0;
+
+		if (strcmp(argv[4], "default") == 0) {
+			ax25_route.dest_addr = null_ax25_address;
+		} else {
+			if (ax25_aton_entry(argv[4], (char *)&ax25_route.dest_addr) == -1)
+				return 1;
+		}
+
+		if (ioctl(s, SIOCDELRT, &ax25_route) != 0) {
+			perror("axparms: SIOCDELRT");
+			return 1;
+		}
+	}
+
+	if (strcmp(argv[2], "list") == 0) {
+		if ((fp=fopen(PROC_AX25_ROUTE_FILE,"r")) == NULL) {
+			fprintf(stderr, "axparms: route: cannot open %s\n",
+PROC_AX25_ROUTE_FILE);
+			return 1;
+		}
+		while (fgets(routebuf,80,fp))
+			printf(routebuf);
+		puts("");
+	}
+
+	return 0;
+}
+
+int setifcall(int s, char *ifn, char *name)
+{
+	char call[7];
+	struct ifreq ifr;
+	
+	if (ax25_aton_entry(name, call) == -1)
+		return 1;
+
+	strcpy(ifr.ifr_name, ifn);
+	memcpy(ifr.ifr_hwaddr.sa_data, call, 7);
+	ifr.ifr_hwaddr.sa_family = AF_AX25;
+	
+	if (ioctl(s, SIOCSIFHWADDR, &ifr) != 0) {
+		perror("axparms: SIOCSIFHWADDR");
+		return 1;
+	}
+
+	return 0;
+}
+
+int associate(int s, int argc, char *argv[])
+{
+	char buffer[80], *u, *c;
+	struct sockaddr_ax25 sax25;
+	struct passwd *pw;
+	int opt;
+	FILE *fp;
+
+	
+	if (strcmp(argv[2], "show") == 0) {
+		if (argc < 3) {
+			usageassoc();
+			exit(1);
+		}
+
+		if ((fp = fopen(PROC_AX25_CALLS_FILE, "r")) == NULL) {
+			fprintf(stderr, "axparms: associate: cannot open %s\n", PROC_AX25_CALLS_FILE);
+			return 1;
+		}
+
+		fgets(buffer, 80, fp);
+
+		printf("Userid     Callsign\n");
+
+		while (fgets(buffer, 80, fp) != NULL) {
+			u = strtok(buffer, " \t\n");
+			c = strtok(NULL, " \t\n");
+			if ((pw = getpwuid(atoi(u))) != NULL)
+				printf("%-10s %s\n", pw->pw_name, c);
+		}
+
+		fclose(fp);
+
+		return 0;
+	}
+
+	if (strcmp(argv[2], "policy") == 0) {
+		if (argc < 4) {
+			usageassoc();
+			exit(1);
+		}
+
+		if (strcmp(argv[3], "default") == 0) {
+			opt = AX25_NOUID_DEFAULT;
+
+			if (ioctl(s, SIOCAX25NOUID, &opt) == -1) {
+				perror("axparms: SIOCAX25NOUID");
+				return 1;
+			}
+
+			return 0;
+		}
+
+		if (strcmp(argv[3], "deny") == 0) {
+			opt = AX25_NOUID_BLOCK;
+
+			if (ioctl(s, SIOCAX25NOUID, &opt) == -1) {
+				perror("axparms: SIOCAX25NOUID");
+				return 1;
+			}
+
+			return 0;
+		}
+
+		fprintf(stderr, "axparms: associate: 'default' or 'deny' required\n");
+
+		return 1;
+	}
+
+	if (argc < 4) {
+		usageassoc();
+		exit(1);
+	}
+	
+	if (ax25_aton_entry(argv[2], (char *)&sax25.sax25_call) == -1) {
+		fprintf(stderr, "axparms: associate: invalid callsign %s\n", argv[2]);
+		return 1;
+	}
+
+	if (strcmp(argv[3], "delete") == 0) {
+		if (ioctl(s, SIOCAX25DELUID, &sax25) == -1) {
+			perror("axparms: SIOCAX25DELUID");
+			return 1;
+		}
+
+		return 0;
+	}
+
+	if ((pw = getpwnam(argv[3])) == NULL) {
+		fprintf(stderr, "axparms: associate: unknown username %s\n", argv[3]);
+		return 1;
+	}
+
+	sax25.sax25_uid = pw->pw_uid;
+		
+	if (ioctl(s, SIOCAX25ADDUID, &sax25) == -1) {
+		perror("axparms: SIOCAX25ADDUID");
+		return 1;
+	}
+
+	return 0;
+}
+
+int forward(int s, int argc, char *argv[])
+{
+#ifdef HAVE_AX25_FWD_STRUCT
+	struct ax25_fwd_struct ax25_fwd;
+	char *addr;
+
+	if (argc < 4) {
+		usageforward();
+		exit(1);
+	}
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "axparms: no AX.25 port data configured\n");
+		return 1;
+	}
+
+	if ((addr = ax25_config_get_addr(argv[2])) == NULL) {
+		fprintf(stderr, "axparms: invalid port name - %s\n", argv[2]);
+		return 1;
+	}
+
+	if (ax25_aton_entry(addr, (char *)&ax25_fwd.port_from) == -1) {
+		fprintf(stderr, "axparms: invalid port name - %s\n", argv[2]);
+		return 1;
+	}
+
+	if (strcmp(argv[3], "delete") == 0) {
+		if (ioctl(s, SIOCAX25DELFWD, &ax25_fwd) == -1) {
+			perror("axparms: SIOCAX25DELFWD");
+			return 1;
+		}
+
+		return 0;
+	}
+
+	if ((addr = ax25_config_get_addr(argv[3])) == NULL) {
+		fprintf(stderr, "axparms: invalid port name - %s\n", argv[3]);
+		return 1;
+	}
+
+	if (ax25_aton_entry(addr, (char *)&ax25_fwd.port_to) == -1) {
+		fprintf(stderr, "axparms: invalid port name - %s\n", argv[3]);
+		return 1;
+	}
+
+	if (ioctl(s, SIOCAX25ADDFWD, &ax25_fwd) == -1) {
+		perror("axparms: SIOCAX25ADDFWD");
+		return 1;
+	}
+#else
+        fprintf(stderr, "axparms: Not compiled in with forwarding option.\n");
+#endif /* HAVE_AX25_FWD_STRUCT */
+
+	return 0;
+}
+
+int main(int argc, char **argv)
+{
+	ax25_address callsign;
+	int s, n;
+	char *addr;
+
+	if (argc == 1) {
+		usage();
+		return 1;
+	}
+
+	if (strncmp(argv[1], "--v", 3) == 0 || strncmp(argv[1], "-v", 2) == 0) {
+		printf("axparms: %s\n", VERSION);
+		return 0;
+	}
+
+	if (strncmp(argv[1], "--a", 3) == 0 || strncmp(argv[1], "-a", 2) == 0) {
+
+		if (argc < 3) {
+			usageassoc();
+			return 1;
+		}
+
+		if ((s = socket(AF_AX25, SOCK_SEQPACKET, 0)) < 0) {
+			perror("axparms: socket");
+			return 1;
+		}
+
+		n = associate(s, argc, argv);
+
+		close(s);
+
+		return n;
+	}
+
+	if (strncmp(argv[1], "--f", 3) == 0 || strncmp(argv[1], "-f", 2) == 0) {
+		if (argc == 2) {
+			usageforward();
+			return 1;
+		}
+
+		if ((s = socket(AF_AX25, SOCK_SEQPACKET, 0)) < 0) {
+			perror("axparms: socket");
+			return 1;
+		}
+
+		n = forward(s, argc, argv);
+
+		close(s);
+
+		return n;
+	}
+
+	if (strncmp(argv[1], "--r", 3) == 0 || strncmp(argv[1], "-r", 2) == 0) {
+		if (argc < 3 ) {
+			usageroute();
+			return 1;
+		}
+		
+		if (strcmp(argv[2], "add") != 0 && strcmp(argv[2], "del") != 0 && strcmp(argv[2], "list") != 0) {
+			usageroute();
+			return 1;
+		}
+
+		if (argc < 5 && strcmp(argv[2], "list") != 0) {
+			usageroute();
+			return 1;
+		}
+		
+		if (ax25_config_load_ports() == 0) {
+			fprintf(stderr, "axparms: no AX.25 port data configured\n");
+			return 1;
+		}
+
+		if ((addr = ax25_config_get_addr(argv[3])) == NULL) {
+			fprintf(stderr, "axparms: invalid port name - %s\n", argv[3]);
+			return 1;
+		}
+
+		if (ax25_aton_entry(addr, callsign.ax25_call) == -1)
+			return 1;
+
+		if ((s = socket(AF_AX25, SOCK_SEQPACKET, 0)) < 0) {
+			perror("axparms: socket");
+			return 1;
+		}
+
+		n = routes(s, argc, argv, &callsign);
+
+		close(s);
+		
+		return n;
+	}
+
+	if (strncmp(argv[1], "--s", 3) == 0 || strncmp(argv[1], "-s", 2) == 0) {
+		if (argc != 4) {
+			usagesetcall();
+			return 1;
+		}
+	
+		if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+			perror("axparms: socket");
+			return 1;
+		}
+
+		n = setifcall(s, argv[2], argv[3]);
+
+		close(s);
+
+		return n;
+	}
+
+	usage();
+
+	return 1;
+}
diff --git a/ax25/axspawn.8 b/ax25/axspawn.8
new file mode 100644
index 0000000..db34d23
--- /dev/null
+++ b/ax25/axspawn.8
@@ -0,0 +1,125 @@
+.TH AXSPAWN 8 "25 August 1996" Linux "Linux System Managers Manual"
+.SH NAME
+axspawn \- Allow automatic login to a Linux system.
+.SH SYNOPSIS
+.B axspawn [--pwprompt PR0MPT, -p PR0MPT] [--changeuser, -c] [--rootlogin, -r] [--only-md5] [--wait, -w]
+.SH DESCRIPTION
+.LP
+.B Axspawn
+will check if the peer is an AX.25 connect, the callsign a valid Amateur
+Radio callsign, strip the SSID, check if UID/GID are valid, allow a
+password-less login if the password-entry in /etc/passwd is \(lq+\(rq or
+empty; in every other case login will prompt for a password.
+.LP
+.B Axspawn
+can create user accounts automatically. You may specify the user shell,
+first and maximum user id, group ID in the config file and (unlike WAMPES)
+create a file \(lq/etc/ax25/ax25.profile\(rq which will be copied to
+~/.profile.
+.SH SECURITY
+.LP
+Auto accounting is a security problem by definition. Unlike WAMPES, which
+creates an empty password field, Axspawn adds an \(lqimpossible\(rq ('+')
+password to /etc/passwd. Login gets called with the \(lq-f\(rq option, thus
+new users have the chance to login without a password. (I guess this won't
+work with the shadow password system).
+.LP
+Of course
+.B axspawn
+does callsign checking: Only letters and numbers are allowed, the callsign
+must be longer than 4 characters and shorter than 6 characters (without
+SSID). There must be at least one digit, and max. two digits within the
+call. The SSID must be within the range of 0 and 15. Please drop me a note
+if you know a valid Amateur Radio callsign that does not fit this pattern
+_and_ can be represented correctly in AX.25.
+.LP
+axspawn also has the well known authentication mechanisms of the AX.25 bbs
+.B baycom (sys)
+and
+.B md5
+standards.
+axspawn searches in /etc/ax25/bcpasswd (first) and ~user/.bcpasswd (second)
+for a match of the required authentication mechanism and password.
+md5 and baycom passwords may differ. md5 passwords gain over baycom passwords. 
+
+Note: you could "lock" special "friends" out by specifying an empty password
+in /etc/ax25/bcpasswd (line "n0call:md5:"). -> md5 Passwords are enforced. But
+the length is shorter than the minimum (len 8 for md5, len 20 for baycom);
+user's password file is not searched because in /etc/ax25/bcpasswd its already
+found..
+
+Syntax and caveeats for /etc/ax25/bcpasswd: 
+  - Has to be a regular file (no symlink). Not world-readable/writable.
+  - Example lines:
+    # Thomas
+    dl9sau:md5:abcdefgh
+    # Test
+    te1st:sys:12345678901234567890
+    # root
+    root:md5:ziz7AoxuAt6jeuthTheexet0uDa9iefuAeph3eelAetahmi0
+    # misconfiguration:
+    thisbadlineisignored
+    # With this line
+    systempasswordonly
+    # .. axspan will not look in user's homedir for his .bcpasswd
+
+Syntax and caveeats for user's .bcpasswd in his $HOME:
+  - Has to be a regular file (no symlink). Neither group- nor world-
+      read-/writable. Has to be owned by the user or uid 0 (root).
+  - Example lines:
+    # could be shorter
+    md5:abcdefgh
+    # should be longer
+    sys:12345678901234567890
+
+.SH OPTIONS
+.TP 5
+.B -p DB0FHN or --pwprompt DB0FHN
+While baycom or md5 password authentication (see above), the password prompt
+is set to the first argument (DB0FHN in this example). This may be needed
+for some packet-radio terminal programs for detecting the password prompt
+properly.
+.TP 5
+.B -c, --changeuser
+Allow connecting ax25 users to change their username for login. They'll be
+asked for their real login name. 
+.TP 5
+.B -e, --embedded
+Special treatment for axspawn on non-standard conform embedded devices.
+I.e. openwrt has no true /bin/login: if you use it as a real login program,
+it raises a security hole.
+.TP 5
+.B -r, --rootlogin
+Permit login as user root. Cave: only md5 or baycom style is allowed; no
+plaintext password.
+.TP 5
+.B --only-md5
+Insist in md5 authentication during login. If no password for the user is
+found, or it is not md5, then no other login mechanism is granted.
+This option, in combination with -c and -r, may be a useful configuration for
+systems where no ax25 user accounts are available, but you as sysop would
+like to have a login access for your administrative tasks.
+.TP 5
+.B -w, --wait
+Eats the first line the user sends. This feature is useful if you have
+TCP VC connects to the same Call+SSID. It is now obsolete, because
+ax25d is the right place for this and implements this functionality better.
+.TP 5
+Theses are options and not part of the preferences because you _may_ like to have on every interface definition in ax25d.conf (where axspawn is started from) a different behaviour.
+.SH FILES
+.nf
+/etc/passwd
+.br
+/etc/ax25/ax25.profile
+.br
+/etc/ax25/axspawn.conf
+.fi
+/etc/ax25/bcpasswd
+.fi
+~/.bcpasswd
+.fi
+.SH "SEE ALSO"
+.BR axspawn.conf (5),
+.BR ax25d (8).
+.SH AUTHOR
+Joerg Reuter DL1BKE <jreuter at poboxes.com>
diff --git a/ax25/axspawn.c b/ax25/axspawn.c
new file mode 100644
index 0000000..e8ad0fa
--- /dev/null
+++ b/ax25/axspawn.c
@@ -0,0 +1,1918 @@
+/*
+ * axspawn.c - run a program from ax25d.
+ *
+ * Copyright (c) 1996 Joerg Reuter DL1BKE (jreuter at poboxes.com)
+ *
+ * This program is a hack.
+ * 
+ * This program 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 2 of the License, or
+ * (at your option) any later version.
+ *                
+ * This program 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.
+ *
+ * It might even kill your cat... ;-) 
+ *
+ * Status: alpha (still...)
+ *
+ * usage: change the "default" lines in your /usr/local/etc/ax25d.conf:
+ *
+ * 	default * * * * * 1 root /usr/local/sbin/axspawn axspawn
+ *
+ * a line like this would wait for an incoming info frame first.
+ *
+ * 	default * * * * * 1 root /usr/local/sbin/axspawn axspawn --wait
+ *
+ * The program will check if the peer is an AX.25 socket, the
+ * callsign is a valid amateur radio callsign, strip the SSID, 
+ * check if UID/GID are valid, allow a password-less login if the
+ * password-entry in /etc/passwd is "+" or empty; in every other case
+ * login will prompt for a password.
+ *
+ * Still on my TODO list: a TheNet compatible or MD5 based 
+ * authentication scheme... Won't help you if you changed the "+"-entry
+ * in /etc/passwd to a valid passord and login with telnet, though. 
+ * A better solution could be a small program called from .profile.
+ *
+ * Axspawn can create user accounts automatically. You may specify
+ * the user shell, first and maximum user id, group ID in the config
+ * file and (unlike WAMPES) create a file "/usr/local/etc/ax25.profile" 
+ * which will be copied to ~/.profile.
+ *
+ * This is an example for the config file:
+ *
+ * # this is /usr/local/etc/axspawn.conf
+ * #
+ * # allow automatic creation of user accounts
+ * create    yes
+ *
+ * # allow empty password field (so user may login via telnet, or pop3 their
+ * # mail) [default no]
+ * create_empty_password	no
+ *
+ * # pwcheck method: password or call or group [default: password]
+ * # "password" means, that passwords with '+' force a login without
+ * #   prompting for a password (old behaviour; backward compatibility).
+ * # "call" means, that ham calls via ax25/netrom/rose/.. should be able
+ * #   to login without password, even if it's set (for e.g. to secure
+ * #   from abuse of inet connections)
+ * # "group" means, that if the gid of the user matches the configured
+ * #  default user_gid, then the login is granted without password.
+ * #pwcheck call
+ * #pwcheck group
+ * #pwcheck password
+ *
+ * # create with system utility useradd(8)? [default no]
+ * create_with_useradd	no
+ *
+ * # guest user if above is 'no' or everything else fails. Disable with "no"
+ * guest     ax25
+ *
+ * # group id or name for autoaccount
+ * group     ax25
+ *
+ * # first user id to use
+ * first_uid 400
+ *
+ * # maximum user id
+ * max_uid   2000
+ *
+ * # where to add the home directory for the new user
+ * home      /home/hams
+ *
+ * # secure homedirectories (g-rwx)
+ * #secure_home yes
+ *
+ * # user's shell
+ * shell     /bin/bash
+ *
+ * # bind user id to callsign for outgoing connects.
+ * associate yes
+ *
+ * SECURITY:
+ *
+ * Umm... auto accounting is a security problem by definition. Unlike
+ * WAMPES, which creates an empty password field, Axspawn adds an
+ * "impossible" ('+') password to /etc/passwd. Login gets called with
+ * the "-f" option, thus new users have the chance to login without
+ * a password. (I guess this won't work with the shadow password system).
+ * News: there are good reasons to use empty password fields. For e.g.
+ *   at our mailbox-system db0tud where we have no inet access, so
+ *   every user is a ham, not a hacker. We need the empty password
+ *   so new may use ax25 for automatical account generation, and then
+ *   could login via telnet or poll their mail with pop3.
+ *   But i acknowledge, that this package will mostly used by hams who
+ *   use their computer for both, inet and ampr. So the new option
+ *   create_empty_password is not the default, but a feature
+ *   needed because we won't patch this code after a new release.
+ *   the useradd method and compression implementation is the the work
+ *   of thomas <dg1rtf>, the finetune is by me. GPL
+ *   the compression code initialy was for tnt by dl4ybg (GPL).
+ *     - dl9sau for db0tud team.
+ *
+ * The "associate" option has to be used with great care. If a user
+ * logs on it removes any existing callsign from the translation table
+ * for this userid and replaces it with the callsign and SSID of the
+ * user. This will happen with multiple connects (same callsign,
+ * different SSIDs), too. Unless you want your users to be able
+ * to call out from your machine disable "associate".
+ *
+ * Of course Axspawn does callsign checking: Only letters and numbers
+ * are allowed, the callsign must be longer than 4 characters and
+ * shorter than 6 characters (without SSID). There must be at least
+ * one digit, and max. two digits within the call. The SSID must
+ * be within the range of 0 and 15. Please drop me a note if you
+ * know a valid Amateur Radio (sic!) callsign that does not fit this 
+ * pattern _and_ can be represented correctly in AX.25.
+ *
+ * It uses the forkpty from libbsd.a (found after analyzing logind)
+ * which has no prototype in any of my .h files.
+ *
+ */
+
+/* removed -h <protocol> from login command as it was causing hostname lookups
+   with new login/libc - Terry, vk2ktj. */
+
+
+/*#define QUEUE_DELAY 400		/ * 400 usec */
+#define QUEUE_DELAY 100000		/* 10 msec */
+#define USERPROFILE ".profile"
+#define PASSWDFILE  "/etc/passwd"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <string.h>
+#include <ctype.h>
+#include <termios.h>
+#include <unistd.h>
+#include <signal.h>
+#include <time.h>
+#include <pwd.h>
+#include <grp.h>
+#include <utmp.h>
+#include <paths.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/file.h>
+
+#include <config.h>
+
+#include <sys/socket.h>
+
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+
+#include "../pathnames.h"
+#include "axspawn.h"
+#include "access.h"
+
+#define MAXLEN strlen("DB0PRA-15")
+#define MINLEN strlen("KA9Q")
+
+#define AX_PACLEN	256
+#define	NETROM_PACLEN	236
+#define	ROSE_PACLEN	128
+
+#define IS_DIGIT(x)  ( (x >= '0') && (x <= '9') )
+#define IS_LETTER(x) ( (x >= 'A') && (x <= 'Z') )
+
+#define MSG_NOCALL	"Sorry, you are not allowed to connect.\n"
+#define MSG_CANNOTFORK	"Sorry, system is overloaded.\n"
+#define MSG_NOPTY	"Sorry, all channels in use.\n"
+#define MSG_NOTINDBF	"Sorry, you are not in my database.\n"
+
+#define write_ax25_static_line(s) { \
+  char *msg = strdup(s); \
+  if (msg) { \
+    write_ax25(msg, strlen(msg), 1); \
+    free(msg); \
+  } \
+}
+
+#define EXITDELAY	10
+
+#define	USERADD_CONF	"/etc/default/useradd"
+
+struct huffencodtab {
+	unsigned short code;
+	unsigned short len;
+};
+
+struct huffdecodtab {
+	unsigned short node1;
+	unsigned short node2;
+};
+
+
+
+/* huffman encoding table */
+static struct huffencodtab huffencodtab[] = {
+{0xab2c,15},{0xaa84,15},{0x9fc4,15},{0xab3c,15},
+{0xab1c,15},{0xaafc,15},{0xaaec,15},{0xaad4,15},
+{0xaab4,15},{0xf340,10},{0xaaa4,15},{0x7d64,15},
+{0xaadc,15},{0xf400, 7},{0xaa94,15},{0x9ff4,15},
+{0x9fd4,15},{0x7d74,15},{0xab44,15},{0xab34,15},
+{0xab24,15},{0xab14,15},{0xab04,15},{0xaaf4,15},
+{0xaae4,15},{0xab60,14},{0xab0c,15},{0xaacc,15},
+{0xaabc,15},{0xaaac,15},{0xaa9c,15},{0xaa8c,15},
+{0xc000, 3},{0x3a80, 9},{0xabc0,10},{0x0060,11},
+{0x7d40,12},{0xab5c,14},{0x0000,12},{0xab58,14},
+{0x7c00, 9},{0x3c80, 9},{0x7d00,11},{0x0010,12},
+{0x1200, 7},{0x7a00, 7},{0xb800, 6},{0x3200, 7},
+{0x2200, 7},{0xf600, 8},{0x3d00, 8},{0x9e00, 9},
+{0xbd80, 9},{0x7c80, 9},{0x0080, 9},{0xaa00, 9},
+{0xbd00, 9},{0x9f00, 9},{0x0300, 8},{0xab78,13},
+{0xab68,13},{0x3c00, 9},{0x3000, 9},{0x0020,11},
+{0x7d50,12},{0x3800, 7},{0x7800, 7},{0x9c00, 7},
+{0xfe00, 7},{0x2400, 6},{0xbc00, 8},{0x0200, 8},
+{0x0100, 8},{0xf100, 8},{0x0040,11},{0x3100, 8},
+{0xf200, 8},{0x3400, 7},{0x1c00, 7},{0x1e00, 7},
+{0xbe00, 7},{0xaba0,11},{0x3e00, 7},{0x1400, 6},
+{0x3600, 7},{0xf380, 9},{0xf080, 9},{0x2000, 8},
+{0xfc00, 8},{0x9f80,10},{0x9e80, 9},{0xab90,12},
+{0x3b80, 9},{0xab80,12},{0xab54,14},{0x3a50,13},
+{0xab50,14},{0xa000, 5},{0x1800, 6},{0x9800, 6},
+{0x7000, 5},{0x4000, 3},{0x0400, 6},{0xac00, 6},
+{0xf800, 6},{0x6000, 4},{0x3a00,10},{0xfd00, 8},
+{0x2800, 5},{0xb000, 6},{0x8000, 4},{0xb400, 6},
+{0x1000, 7},{0x7d20,12},{0xe000, 5},{0x9000, 5},
+{0xe800, 5},{0x0800, 5},{0xf700, 8},{0xa800, 7},
+{0x7d80, 9},{0xf300,10},{0x7e00, 7},{0xab48,14},
+{0x3a48,13},{0xab4c,14},{0x3a60,12},{0x9ffc,15},
+{0x9fec,15},{0x2100, 8},{0x9fdc,15},{0x9fcc,15},
+{0xf000, 9},{0x7d7c,15},{0x7d6c,15},{0x3a40,14},
+{0xab40,15},{0xab38,15},{0xab30,15},{0xab28,15},
+{0xab20,15},{0xab18,15},{0xab70,13},{0xab10,15},
+{0xab08,15},{0xab00,15},{0xaaf8,15},{0xaaf0,15},
+{0x3b00, 9},{0xaae8,15},{0xaae0,15},{0xaad8,15},
+{0xaad0,15},{0xab64,14},{0x7d30,12},{0xaac8,15},
+{0xaac0,15},{0xaab8,15},{0xaab0,15},{0xaaa8,15},
+{0xaaa0,15},{0xaa98,15},{0xaa90,15},{0xaa88,15},
+{0xaa80,15},{0x9ff8,15},{0x9ff0,15},{0x9fe8,15},
+{0x9fe0,15},{0x9fd8,15},{0x9fd0,15},{0x9fc8,15},
+{0x9fc0,15},{0x7d78,15},{0x7d70,15},{0x3a58,13},
+{0x7d68,15},{0x7d60,15},{0xab46,15},{0xab42,15},
+{0xab3e,15},{0xab3a,15},{0xab36,15},{0xab32,15},
+{0xab2e,15},{0xab2a,15},{0xab26,15},{0xab22,15},
+{0xab1e,15},{0xab1a,15},{0xab16,15},{0xab12,15},
+{0xab0e,15},{0xab0a,15},{0xab06,15},{0xab02,15},
+{0xaafe,15},{0xaafa,15},{0xaaf6,15},{0xaaf2,15},
+{0xaaee,15},{0xaaea,15},{0xaae6,15},{0xaae2,15},
+{0xaade,15},{0xaada,15},{0xaad6,15},{0xaad2,15},
+{0xaace,15},{0xaaca,15},{0xaac6,15},{0xaac2,15},
+{0xaabe,15},{0xaaba,15},{0xaab6,15},{0xaab2,15},
+{0xaaae,15},{0xaaaa,15},{0xaaa6,15},{0xaaa2,15},
+{0xaa9e,15},{0x3a70,12},{0xaa9a,15},{0xaa96,15},
+{0xaa92,15},{0x3080, 9},{0xaa8e,15},{0xaa8a,15},
+{0xaa86,15},{0xaa82,15},{0x9ffe,15},{0x9ffa,15},
+{0x9ff6,15},{0x9ff2,15},{0x9fee,15},{0x9fea,15},
+{0x9fe6,15},{0x9fe2,15},{0x9fde,15},{0x9fda,15},
+{0x9fd6,15},{0x9fd2,15},{0x9fce,15},{0x9fca,15},
+{0x9fc6,15},{0x9fc2,15},{0x7d7e,15},{0x7d7a,15},
+{0x7d76,15},{0x7d72,15},{0x7d6e,15},{0x7d6a,15},
+{0x7d66,15},{0x7d62,15},{0x3a46,15},{0x3a44,15}
+};
+
+/* huffman decoding table */
+static struct huffdecodtab huffdecodtab[] = {
+{ 79,  1},{  2, 66},{ 24,  3},{  4,208},
+{292,  5},{  6,298},{317,  7},{ 16,  8},
+{  9,173},{ 10,116},{ 41, 11},{ 12, 37},
+{125, 13},{357, 14},{ 15,438},{  0,  0},
+{229, 17},{ 18, 46},{ 19, 61},{ 20, 99},
+{ 21,161},{404, 22},{ 23,483},{  1,  0},
+{306, 25},{313, 26},{294, 27},{245, 28},
+{221, 29},{231, 30},{277, 31},{ 32,103},
+{ 33,108},{ 34,339},{421, 35},{ 36,500},
+{  2,  0},{122, 38},{353, 39},{ 40,434},
+{  3,  0},{131, 42},{128, 43},{361, 44},
+{ 45,442},{  4,  0},{ 56, 47},{ 52, 48},
+{135, 49},{370, 50},{ 51,450},{  5,  0},
+{138, 53},{375, 54},{ 55,454},{  6,  0},
+{148, 57},{ 58, 94},{381, 59},{ 60,460},
+{  7,  0},{ 75, 62},{ 63,152},{392, 64},
+{ 65,469},{  8,  0},{164, 67},{311, 68},
+{ 69,246},{ 70, 97},{253, 71},{257, 72},
+{ 73,270},{319, 74},{  9,  0},{ 76,155},
+{396, 77},{ 78,473},{ 10,  0},{165, 80},
+{296, 81},{300, 82},{295, 83},{206, 84},
+{ 85,320},{193, 86},{ 87,318},{199, 88},
+{184, 89},{ 90,112},{ 91,346},{430, 92},
+{ 93,508},{ 11,  0},{379, 95},{ 96,458},
+{ 12,  0},{ 98,218},{ 13,  0},{100,158},
+{400,101},{102,478},{ 14,  0},{331,104},
+{105,328},{408,106},{107,487},{ 15,  0},
+{109,336},{417,110},{111,496},{ 16,  0},
+{113,343},{425,114},{115,504},{ 17,  0},
+{117,141},{118,186},{119,321},{351,120},
+{121,432},{ 18,  0},{355,123},{124,436},
+{ 19,  0},{359,126},{127,440},{ 20,  0},
+{364,129},{130,444},{ 21,  0},{132,145},
+{368,133},{134,448},{ 22,  0},{372,136},
+{137,452},{ 23,  0},{377,139},{140,456},
+{ 24,  0},{142,234},{143,236},{144,383},
+{ 25,  0},{366,146},{147,446},{ 26,  0},
+{387,149},{385,150},{151,462},{ 27,  0},
+{390,153},{154,467},{ 28,  0},{394,156},
+{157,471},{ 29,  0},{398,159},{160,475},
+{ 30,  0},{402,162},{163,481},{ 31,  0},
+{ 32,  0},{175,166},{214,167},{211,168},
+{169,195},{243,170},{171,281},{286,172},
+{ 33,  0},{265,174},{ 34,  0},{176,202},
+{177,315},{178,297},{179,232},{180,252},
+{181,228},{189,182},{255,183},{ 35,  0},
+{185,242},{ 36,  0},{284,187},{192,188},
+{ 37,  0},{190,241},{191,201},{ 38,  0},
+{ 39,  0},{194,227},{ 40,  0},{196,267},
+{197,220},{237,198},{ 41,  0},{200,309},
+{ 42,  0},{ 43,  0},{203,260},{204,268},
+{308,205},{ 44,  0},{244,207},{ 45,  0},
+{304,209},{210,223},{ 46,  0},{212,258},
+{238,213},{ 47,  0},{215,303},{216,249},
+{273,217},{ 48,  0},{219,316},{ 49,  0},
+{ 50,  0},{222,278},{ 51,  0},{224,264},
+{250,225},{230,226},{ 52,  0},{ 53,  0},
+{ 54,  0},{ 55,  0},{ 56,  0},{ 57,  0},
+{251,233},{ 58,  0},{363,235},{ 59,  0},
+{ 60,  0},{ 61,  0},{239,256},{240,480},
+{ 62,  0},{ 63,  0},{ 64,  0},{ 65,  0},
+{ 66,  0},{ 67,  0},{299,247},{275,248},
+{ 68,  0},{ 69,  0},{ 70,  0},{ 71,  0},
+{ 72,  0},{271,254},{ 73,  0},{ 74,  0},
+{ 75,  0},{ 76,  0},{259,269},{ 77,  0},
+{293,261},{262,263},{ 78,  0},{ 79,  0},
+{ 80,  0},{279,266},{ 81,  0},{ 82,  0},
+{ 83,  0},{ 84,  0},{ 85,  0},{342,272},
+{ 86,  0},{274,335},{ 87,  0},{276,302},
+{ 88,  0},{ 89,  0},{ 90,  0},{283,280},
+{ 91,  0},{374,282},{ 92,  0},{ 93,  0},
+{291,285},{ 94,  0},{301,287},{288,326},
+{323,289},{290,427},{ 95,  0},{ 96,  0},
+{ 97,  0},{ 98,  0},{ 99,  0},{100,  0},
+{101,  0},{102,  0},{103,  0},{104,  0},
+{105,  0},{106,  0},{107,  0},{108,  0},
+{305,307},{109,  0},{110,  0},{111,  0},
+{112,  0},{310,384},{113,  0},{312,314},
+{114,  0},{115,  0},{116,  0},{117,  0},
+{118,  0},{119,  0},{120,  0},{121,  0},
+{122,  0},{322,325},{123,  0},{349,324},
+{124,  0},{125,  0},{327,476},{126,  0},
+{406,329},{330,485},{127,  0},{412,332},
+{410,333},{334,489},{128,  0},{129,  0},
+{415,337},{338,494},{130,  0},{419,340},
+{341,498},{131,  0},{132,  0},{423,344},
+{345,502},{133,  0},{428,347},{348,506},
+{134,  0},{350,510},{135,  0},{352,433},
+{136,  0},{354,435},{137,  0},{356,437},
+{138,  0},{358,439},{139,  0},{360,441},
+{140,  0},{362,443},{141,  0},{142,  0},
+{365,445},{143,  0},{367,447},{144,  0},
+{369,449},{145,  0},{371,451},{146,  0},
+{373,453},{147,  0},{148,  0},{376,455},
+{149,  0},{378,457},{150,  0},{380,459},
+{151,  0},{382,461},{152,  0},{153,  0},
+{154,  0},{386,463},{155,  0},{388,464},
+{389,466},{156,  0},{391,468},{157,  0},
+{393,470},{158,  0},{395,472},{159,  0},
+{397,474},{160,  0},{399,477},{161,  0},
+{401,479},{162,  0},{403,482},{163,  0},
+{405,484},{164,  0},{407,486},{165,  0},
+{409,488},{166,  0},{411,490},{167,  0},
+{413,491},{414,493},{168,  0},{416,495},
+{169,  0},{418,497},{170,  0},{420,499},
+{171,  0},{422,501},{172,  0},{424,503},
+{173,  0},{426,505},{174,  0},{175,  0},
+{429,507},{176,  0},{431,509},{177,  0},
+{178,  0},{179,  0},{180,  0},{181,  0},
+{182,  0},{183,  0},{184,  0},{185,  0},
+{186,  0},{187,  0},{188,  0},{189,  0},
+{190,  0},{191,  0},{192,  0},{193,  0},
+{194,  0},{195,  0},{196,  0},{197,  0},
+{198,  0},{199,  0},{200,  0},{201,  0},
+{202,  0},{203,  0},{204,  0},{205,  0},
+{206,  0},{207,  0},{208,  0},{209,  0},
+{  0,465},{210,  0},{211,  0},{212,  0},
+{213,  0},{214,  0},{215,  0},{216,  0},
+{217,  0},{218,  0},{219,  0},{220,  0},
+{221,  0},{222,  0},{223,  0},{224,  0},
+{225,  0},{226,  0},{227,  0},{228,  0},
+{229,  0},{230,  0},{231,  0},{232,  0},
+{233,  0},{234,  0},{235,  0},{  0,492},
+{236,  0},{237,  0},{238,  0},{239,  0},
+{240,  0},{241,  0},{242,  0},{243,  0},
+{244,  0},{245,  0},{246,  0},{247,  0},
+{248,  0},{249,  0},{250,  0},{251,  0},
+{252,  0},{253,  0},{512,511},{254,  0},
+{255,  0}
+};
+
+static unsigned char mask8tab[8] = {
+  0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01
+};
+
+static unsigned short mask16tab[16] = {
+  0x8000,0x4000,0x2000,0x1000,0x0800,0x0400,0x0200,0x0100,
+  0x0080,0x0040,0x0020,0x0010,0x0008,0x0004,0x0002,0x0001
+};
+
+
+char   policy_add_user = 1;
+char   policy_add_empty_password = 0;
+char   policy_add_prog_useradd = 0;
+char   policy_guest = 1;
+char   policy_associate = 0;
+char   pwcheck = 1;
+char   secure_home = 0;
+
+gid_t  user_gid =  400;
+char   *user_shell = "/bin/bash";
+char   *start_home = "/home/hams";
+char   *guest = "guest";
+int    start_uid = 400;
+int    end_uid   = 65535;
+int    paclen    = ROSE_PACLEN;		/* Its the shortest ie safest */
+
+int    huffman = 0;
+int    bin = 0;
+int    fdmaster;
+
+struct write_queue {
+	struct write_queue *next;
+	char *data;
+	unsigned int  len;
+};
+
+struct write_queue *wqueue_head = NULL;
+struct write_queue *wqueue_tail = NULL;
+long wqueue_length = 0L;
+
+
+int encstathuf(char *src, int srclen, char *dest, int *destlen);
+int decstathuf(char *src, char *dest, int srclen, int *destlen);
+
+/*---------------------------------------------------------------------------*/
+
+/* Use private function because some platforms are broken, eg 386BSD */
+
+int Xtolower(int c)
+{
+  return (c >= 'A' && c <= 'Z') ? (c - 'A' + 'a') : c;
+}
+
+/*---------------------------------------------------------------------------*/
+
+/* Use private function because some platforms are broken, eg 386BSD */
+
+int Xtoupper(int c)
+{
+  return (c >= 'a' && c <= 'z') ? (c - 'a' + 'A') : c;
+}
+
+/*---------------------------------------------------------------------------*/
+
+int Strcasecmp(const char *s1, const char *s2)
+{
+  while (Xtolower(*s1) == Xtolower(*s2)) {
+    if (!*s1) return 0;
+    s1++;
+    s2++;
+  }
+  return Xtolower(*s1) - Xtolower(*s2);
+}
+
+/*---------------------------------------------------------------------------*/
+
+int Strncasecmp(const char *s1, const char *s2, int n)
+{
+  while (--n >= 0 && Xtolower(*s1) == Xtolower(*s2)) {
+    if (!*s1) return 0;
+    s1++;
+    s2++;
+  }
+  return n < 0 ? 0 : Xtolower(*s1) - Xtolower(*s2);
+}
+
+/* This one is in /usr/lib/libbsd.a, but not in bsd.h and fellows... weird. */
+/* (found in logind.c)							    */
+
+pid_t forkpty(int *, char *, void *, struct winsize *);
+
+/* The buffer in src (first byte length-1) is decoded into dest
+   (first byte length-1). If decoding is not successful, non-0 
+   is returned
+*/
+
+int encstathuf(char *src, int srclen, char *dest, int *destlen)
+{
+	char *srcptr;
+	char *destptr;
+	int wrklen;
+	int bit16;
+	int bit8;
+	unsigned short huffcode;
+	int hufflen;
+	
+	if ((src == NULL) || (dest == NULL)) {
+		syslog(LOG_NOTICE, "Huffman encode: src or dest NULL!");
+		return(1);
+	}
+	if (srclen > 255) {
+		syslog(LOG_NOTICE, "Huffman encode: srclen > 255: %d", srclen);
+		return(1);
+	}
+	srcptr = src;
+	destptr = &dest[1];
+	*destlen = 0;
+	wrklen = 0;
+	bit8 = 0;
+	*destptr = 0;
+	huffcode = huffencodtab[(int)*srcptr].code;
+	hufflen = huffencodtab[(int)*srcptr].len;
+	bit16 = 0;
+	for (;;) {
+		if (huffcode & mask16tab[bit16])
+			*destptr |= mask8tab[bit8];
+		bit8++;
+		if (bit8 > 7) {
+			destptr++;
+			(*destlen)++;
+			if ((*destlen) >= srclen) {
+				/* coding uneffective, use copy */
+				memcpy(&dest[1],src,srclen);
+				dest[0] = 255;
+				*destlen = srclen + 1;
+				return(0);
+			}
+			bit8 = 0;
+			*destptr = 0;
+		}
+		bit16++;
+		if (bit16 == hufflen) {
+			srcptr++;
+			wrklen++;
+			if (wrklen == srclen) break;
+			huffcode = huffencodtab[(int)*srcptr].code;
+			hufflen = huffencodtab[(int)*srcptr].len;
+			bit16 = 0;
+		}
+	}
+	if (bit8 != 0) (*destlen)++;
+	(*destlen)++;
+	dest[0] = (char)(srclen-1);
+	return(0);
+}
+
+/* The buffer in src (first byte length-1) is decoded into dest
+	 (first byte length-1). If decoding is not successful, non-0 
+   is returned
+*/
+
+
+int decstathuf(char *src, char *dest, int srclen, int *destlen)
+{
+	unsigned char *srcptr;
+	unsigned char *destptr;
+	int wrklen;
+	unsigned char bitmask;
+	unsigned short decod;
+	unsigned short newnode;
+
+	if ((src == NULL) || (dest == NULL)) return(1);
+
+	srcptr = src;
+	destptr = dest;
+	*destlen = (int)((*srcptr)+1);
+	srcptr++;
+	if (--srclen == 0) {
+		return(1);
+	}
+	if (*destlen == 0) {
+		return(1);
+	}
+
+	if (*destlen == 256) {
+		/* no compression, only copy */
+		memcpy(dest,src+1,srclen);
+		*destlen = (unsigned char)(srclen);
+		return(0);
+	}
+	wrklen = 0;
+	decod = 0;
+	bitmask = 0x80;
+	for (;;) {
+		while (bitmask > 0) {
+			if ((*srcptr) & bitmask) {
+				newnode = huffdecodtab[decod].node2;
+				if (newnode == 0) {
+					*destptr = (char)huffdecodtab[decod].node1;
+					destptr++;
+					wrklen++;
+					if (wrklen >= *destlen) break; /* decoding finished */
+					decod = 0;
+				}
+				else decod = newnode;
+			}
+			else {
+				newnode = huffdecodtab[decod].node1;
+				if (huffdecodtab[decod].node2 == 0) {
+					*destptr = (char)huffdecodtab[decod].node1;
+					destptr++;
+					wrklen++;
+					if (wrklen >= *destlen) break; /* decoding finished */
+					decod = 0;
+				}
+				else decod = newnode;
+			}
+			if (decod) bitmask = bitmask >> 1;
+		}
+		if (wrklen >= *destlen) break;
+		bitmask = 0x80;
+		srcptr++;
+		if (srclen == 0) return(1);
+		srclen--;
+	}
+	return(0);
+}
+
+
+int _write_ax25(const char *s, int len)
+{
+	int i;
+	if (!len)
+		return 0;
+
+	i = write(1, s, len);
+	fflush(stdout);
+	return (i > 0 ? i : 0);	/* on error, -1 is returned  */
+}
+
+int read_ax25(unsigned char *s, int size)
+{
+	int len;
+	int k;
+	char buffer[255];
+	char decomp[260];
+	int declen;
+	struct termios termios;
+
+	if ((len = read(0, s, size)) < 0)
+		return len;
+
+	if (huffman) {
+		if (!decstathuf(s, decomp, len, &declen))  {
+			 *(decomp+declen) = 0;
+			strcpy(s, decomp);
+			len = declen;
+		}
+	}
+	if (bin) {
+		return(len);
+	}
+	
+
+	for (k = 0; k < len; k++)
+		if (s[k] == '\r') s[k] = '\n';
+		
+
+	if (!huffman && !Strncasecmp(s, "//COMP ON\n", 10)) {
+		sprintf(buffer,"\r//COMP 1\r");
+		write_ax25(buffer, strlen(buffer), 1);
+		sleep(1);
+		memset((char *) &termios, 0, sizeof(termios));
+		termios.c_iflag = ICRNL | IXOFF | IGNBRK;
+		termios.c_oflag = 0;
+		termios.c_cflag = CS8 | CREAD | CLOCAL;
+		termios.c_lflag = 0;
+		termios.c_cc[VMIN] = 0;
+		termios.c_cc[VTIME] = 0;
+		tcsetattr(0, TCSANOW, &termios);
+
+		huffman = 1;
+		strcpy(s,"\n");
+		return 1;
+	}
+
+	if (huffman && !Strncasecmp(s, "//COMP OFF\n", 11)) {
+		sprintf(buffer,"\r//COMP 0\r"); fflush(stdout);
+		write_ax25(buffer, strlen(buffer), 1);
+		sleep(1);
+		huffman = 0;
+		memset((char *) &termios, 0, sizeof(termios));
+		termios.c_iflag = ICRNL | IXOFF;
+		termios.c_oflag = OPOST | ONLCR;
+		termios.c_cflag = CS8 | CREAD | CLOCAL;
+		termios.c_lflag = ISIG | ICANON;
+		termios.c_cc[VINTR]  = 127;
+		termios.c_cc[VQUIT]  =	28;
+		termios.c_cc[VERASE] =   8;
+		termios.c_cc[VKILL]  =	24;
+		termios.c_cc[VEOF]   =   4;
+		cfsetispeed(&termios, B19200);
+		cfsetospeed(&termios, B19200);
+		tcsetattr(0, TCSANOW, &termios);
+
+		strcpy(s,"\n");
+		return 1;
+	}
+
+	return len;
+}
+
+/*
+ *  We need to buffer the data from the pipe since bash does
+ *  a fflush() on every output line. We don't want it, it's
+ *  PACKET radio, isn't it?
+ */
+
+void kick_wqueue(int dummy)
+{
+	char *s, *p;
+	struct write_queue *w_buf, *new_head;
+	char *q, *r;
+	int i;
+	int len, curr_len;
+	struct itimerval itv;
+	int bufsize = (huffman ? 256-1 : paclen);
+	char decoded[260];
+	int  declen;
+	
+	signal(SIGALRM, SIG_IGN);
+	itv.it_value.tv_sec = 0;
+	itv.it_value.tv_usec = QUEUE_DELAY;
+	for (;;) {
+		if (wqueue_length == 0) {
+			return;
+		}
+
+		/* recompute waitqueue  */
+		if (wqueue_head->len < bufsize && wqueue_head->next) {
+			int s_len;
+			if (!(s = malloc(bufsize))) {
+				break;
+			}
+			if (!(new_head = malloc(sizeof(struct write_queue)))) {
+				free(s);
+				break;
+			}
+			p = s;
+			s_len = 0;
+	
+			while ((w_buf = wqueue_head)) {
+				curr_len = (w_buf->len > bufsize-s_len ? bufsize-s_len : w_buf->len);
+				memcpy(p, w_buf->data, curr_len);
+				s_len += curr_len;
+				p += curr_len;
+				if (w_buf->len > curr_len) {
+					/* rewrite current buffer, and break */
+					w_buf->len -= curr_len;
+		        		for (q = w_buf->data, r = w_buf->data+curr_len, i = 0; i < w_buf->len; i++)
+						*q++ = *r++;
+					break;
+				}
+				wqueue_head = w_buf->next;
+				free(w_buf->data);
+				free(w_buf);
+			}
+			new_head->data = s;
+			new_head->len = s_len;
+			new_head->next = wqueue_head;
+			wqueue_head = new_head;
+		}
+
+		w_buf = wqueue_head;
+		curr_len = w_buf->len > bufsize ? bufsize : w_buf->len;
+		if (huffman && !encstathuf(w_buf->data,curr_len,decoded,&declen)) {
+			*(decoded+declen) = 0;
+			s = decoded;
+			len = declen;
+		} else {
+			s = w_buf->data;
+			len = curr_len;
+		}
+		if (!_write_ax25(s, len) && errno == EAGAIN) {
+			/*
+			 * socket busy?
+			 * don't block, user may want interrupt the jam
+			 */
+			itv.it_value.tv_sec = 1;
+			break;
+		}
+		wqueue_length -= curr_len;
+		if (w_buf->len > curr_len) {
+			/*
+			 * there's still data to be written - copy restbuffer
+			 * to left
+			 */
+			w_buf->len -= curr_len;
+			for (q = w_buf->data, r = w_buf->data+curr_len, i = 0; i < w_buf->len; i++)
+				*q++ = *r++;
+		} else {
+			wqueue_head = w_buf->next;
+			free(w_buf->data);
+			free(w_buf);
+	
+			if (!wqueue_head) {
+				wqueue_tail = NULL;
+				return;
+			}
+		}
+
+		/*
+		 * if only a few bytes are left, wait a few ms if
+		 * new data is available in order to send "full packets"
+		 */
+		if (wqueue_length < paclen)
+			break;	
+	}
+
+	itv.it_interval.tv_sec = 0;
+	itv.it_interval.tv_usec = 0;
+
+	setitimer(ITIMER_REAL, &itv, 0);
+	signal(SIGALRM, kick_wqueue);
+}
+
+int write_ax25(char *s, int len, int kick)
+{
+	struct itimerval itv, oitv;
+	struct write_queue * buf;
+	struct termios termios;
+	static struct termios save_termios;
+	static struct termios save_termios_master;
+	static int last_ended_with_CR = 0;
+
+	int i = 0;
+	int j = 0;
+	char *p;
+	
+	if (!len)
+		return 0;
+	signal(SIGALRM, SIG_IGN);
+
+	if (!bin && !strncmp(s, "//BIN ON\r", 9)) {
+		tcgetattr(fdmaster, &save_termios_master);
+		tcgetattr(0, &save_termios);
+		memset((char *) &termios, 0, sizeof(termios));
+		termios.c_iflag = IGNBRK | IGNPAR;
+		termios.c_oflag = 0;
+		termios.c_cflag = CBAUD | CS8 | CREAD | CLOCAL;
+		termios.c_cflag = ~(CSTOPB|PARENB|PARODD|HUPCL);
+		termios.c_lflag = 0;
+		termios.c_cc[VMIN] = 1;
+		termios.c_cc[VTIME] = 0;
+		termios.c_cc[VSTART] = -1;
+		termios.c_cc[VSTOP] = -1;
+		tcsetattr(0, TCSANOW, &termios);
+		tcsetattr(fdmaster, TCSANOW, &termios);
+		*s= 0; len=0;
+		bin = 1;
+		kick_wqueue(0);
+		return 0;
+	 }
+
+	if (bin && !strncmp(s, "//BIN OFF\r", 10)) {
+		kick_wqueue(0);
+		bin = 0;
+		tcsetattr(fdmaster, TCSANOW, &save_termios_master);
+		tcsetattr(0, TCSANOW, &save_termios);
+		last_ended_with_CR = 0;
+		return 0;
+	 } 
+
+
+	if (!bin) {
+		p = s; i = 0; j = 0;
+		if (last_ended_with_CR) {
+			/*
+			 * \r\n was splited. wrote already \r, now ommiting \n
+			 */
+			if (*s == '\n') {
+				s++, p++;
+				len--;
+			}
+			last_ended_with_CR = 0;
+			if (!len) {
+				if (wqueue_head)
+					kick_wqueue(0);
+				return 0;
+			}
+		}
+		while (j < len) {
+			if ((j + 1 < len) && *(p + j) == '\r' && *(p + j + 1) == '\n') {
+		  		*(p + i) = '\r';
+				j++;
+			}
+			else
+				*(p + i) = *(p + j);
+			i++; j++;										
+		}
+		len = i;
+		if (len && s[len-1] == '\r')
+			last_ended_with_CR = 1;
+		*(p+len) = 0;
+	}
+
+	buf = (struct write_queue *) malloc(sizeof(struct write_queue));
+	if (buf == NULL)
+		return 0;
+
+	buf->data = (char *) malloc(len);
+	if (buf->data == NULL) {
+		free(buf);
+		return 0;
+	}
+
+	memcpy(buf->data, s, len);
+	buf->len = len;
+	buf->next = NULL;	
+	
+	if (wqueue_head == NULL)
+	{
+		wqueue_head = buf;
+		wqueue_tail = buf;
+		wqueue_length = len;
+	} else {
+		wqueue_tail->next = buf;
+		wqueue_tail = buf;
+		wqueue_length += len;
+	}
+	
+	if (wqueue_length > 7*paclen || kick || bin)
+	{
+		kick_wqueue(0);
+	} else {
+		itv.it_interval.tv_sec = 0;
+		itv.it_interval.tv_usec = 0;
+		itv.it_value.tv_sec = 0;
+		itv.it_value.tv_usec = QUEUE_DELAY;
+		setitimer(ITIMER_REAL, &itv, &oitv);
+		signal(SIGALRM, kick_wqueue);
+	}
+	return len;
+}
+
+int get_assoc(struct sockaddr_ax25 *sax25)
+{
+	FILE *fp;
+	int  uid;
+	char buf[81];
+	
+	fp = fopen(PROC_AX25_CALLS_FILE, "r");
+	if (!fp) return -1;
+	
+	fgets(buf, sizeof(buf)-1, fp);
+	
+	while(!feof(fp))
+	{
+		if (fscanf(fp, "%d %s", &uid, buf) == 2)
+			if (sax25->sax25_uid == uid)
+			{
+				ax25_aton_entry(buf, (char *) &sax25->sax25_call);
+				fclose(fp);
+				return 0;
+			}
+	}
+	fclose(fp);
+	
+	return -1;
+}
+
+
+void cleanup(char *tty)
+{
+	struct utmp ut, *ut_line;
+	struct timeval tv;
+	FILE *fp;
+
+
+	setutent();
+	ut.ut_type = LOGIN_PROCESS;
+	strncpy(ut.ut_id, tty + 3, sizeof(ut.ut_id));
+	ut_line = getutid(&ut);
+
+	if (ut_line != NULL) {
+		ut_line->ut_type = DEAD_PROCESS;
+		ut_line->ut_host[0] = '\0';
+		ut_line->ut_user[0] = '\0';
+		gettimeofday(&tv, NULL);
+		ut_line->ut_tv.tv_sec = tv.tv_sec;
+		ut_line->ut_tv.tv_usec = tv.tv_usec;
+		if ((fp = fopen(_PATH_WTMP, "r+")) != NULL) {
+			fseek(fp, 0L, SEEK_END);
+			if (fwrite(ut_line, sizeof(ut), 1, fp) != 1)
+				syslog(LOG_ERR, "Ooops, I think I've just barbecued your wtmp file\n");
+			fclose(fp);
+		}
+	}
+
+	endutent();
+}
+
+
+/* 
+ * add a new user to /etc/passwd and do some init
+ */
+
+void new_user(char *newuser)
+{
+	struct passwd pw, *pwp;
+	uid_t uid;
+	char command[1024];
+	FILE *fp;
+	char username[80];
+	char homedir[256], userdir[256];
+	char buf[4096];
+	char subdir[4];
+	int cnt;
+	unsigned char *q;
+	char *p;
+	struct stat fst;
+	int fd_a, fd_b, fd_l;
+	mode_t homedir_mode = S_IRUSR|S_IWUSR|S_IXUSR|S_IXOTH|(secure_home ? 0 : (S_IRGRP|S_IXGRP));
+	
+	/*
+	 * build path for home directory
+	 */
+
+	strncpy(subdir, newuser, 3);
+	subdir[3] = '\0';
+	sprintf(username, "%s", newuser);
+	sprintf(homedir, "%s/%s.../%s", start_home, subdir, newuser);
+	strcpy(userdir, homedir);
+
+	fd_l = open(LOCK_AXSPAWN_FILE, O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
+	flock(fd_l, LOCK_EX);
+
+retry:
+	/*
+	 * find first free UID
+	 */
+
+	for (uid = start_uid; uid < 65535; uid++)
+	{
+		pwp = getpwuid(uid);
+		if (pwp == NULL)
+			break;
+	}
+
+	if (uid >= 65535 || uid < start_uid)
+		goto out;
+
+	/*
+	 * build directories for home
+	 */
+	 
+	p = homedir;
+		
+	while (*p == '/') p++;
+
+	chdir("/");
+
+	while(p)
+	{
+		q = strchr(p, '/');
+		if (q)
+		{
+			*q = '\0';
+			q++;
+			while (*q == '/') q++;
+			if (*q == 0) q = NULL;
+		}
+
+		if (stat(p, &fst) < 0)
+		{
+			if (errno == ENOENT)
+			{
+				if (q == NULL && policy_add_prog_useradd) {
+					/* Some useradd implementations
+					 * fail if the directory for the
+					 * new user already existss. That's
+					 * why we stop here now, just before
+					 * mkdir of ....../username/
+					 * We had to use this function,
+					 * because we decided to make
+					 * directories in the form
+					 * /home/hams/dl9.../ - and if
+					 * for e.g. dl9.../ does not exist,
+					 * then useradd will refuse to make
+					 * the needed / missing subdirs
+					 * for /home/hams/dl9.../dl9sau/
+					 */
+					goto end_mkdirs;
+				}
+				mkdir(p, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
+
+				if (q == NULL)
+				{
+					chown(p, uid, user_gid);
+					chmod(p, homedir_mode);
+				} 
+			}
+			else
+				goto out;
+		}
+		
+		if (chdir(p) < 0)
+			goto out;
+		p = q;
+	}
+end_mkdirs:
+
+	/*
+	 * add the user now
+	 */
+
+	if (policy_add_prog_useradd) {
+		char *opt_shell = "";
+		struct stat statbuf;
+		if (stat(USERADD_CONF, &statbuf) == -1) {
+			 /* some programs need a shell explicitely specified
+			  * in /etc/passwd, although this field is not required
+			  * (and useradd does not set a shell when not
+			  * specified).
+			  * useradd has a config file. On debian for e.g.,
+			  * there is no /etc/default/useradd. Thus we
+			  * explecitely give the shell option to useradd, when
+			  * no useradd config file is present.
+			  */
+			  opt_shell = " -s \"/bin/sh\"";
+		}
+        	sprintf(command,"/usr/sbin/useradd -p \"%s\" -c %s -d %s -u %d -g %d -m %s%s",
+			((policy_add_empty_password) ? "" : "+"),
+                	username, userdir, uid, user_gid, newuser, opt_shell);
+		if (system(command) != 0)
+			goto out;
+	} else {
+		fp = fopen(PASSWDFILE, "a+");
+		if (fp == NULL)
+			goto out;
+	
+		pw.pw_name   = newuser;
+		pw.pw_passwd = ((policy_add_empty_password) ? "" : "+");
+		pw.pw_uid    = uid;
+		pw.pw_gid    = user_gid;
+		pw.pw_gecos  = username;
+		pw.pw_dir    = userdir;
+		pw.pw_shell  = user_shell;
+	
+		if (getpwuid(uid) != NULL) goto retry;	/* oops?! */
+
+		if (putpwent(&pw, fp) < 0)
+			goto out;
+	
+		fclose(fp);
+	}
+
+	/*
+	 * copy ax25.profile
+	 */
+
+	fd_a = open(CONF_AXSPAWN_PROF_FILE, O_RDONLY);
+	
+	if (fd_a > 0)
+	{
+		int first = 1;
+		fd_b = open(USERPROFILE, O_CREAT|O_WRONLY|O_APPEND, S_IRUSR|S_IWUSR);
+
+		if (fd_b < 0)
+			goto out;
+		
+		/* just 2b sure */
+		if (lseek(fd_b, 0L, SEEK_END) > 0L)
+			write(fd_b, "\n", 1);
+		while ( (cnt = read(fd_a, &buf, sizeof(buf))) > 0 ) {
+			if (first) {
+				/* fix: profiles never start with "#!/bin/sh",
+				 * but previous ax25.profile did. We fix this
+				 * now. We append this profile, because .profile
+				 * may came through /etc/skel. And because
+				 * its there, it's intended to be used. Then
+				 * if ax25.profile is present, it's regarded
+				 * as an optimization.
+				 * -> mark #!... as ##
+				 */
+                        	if (buf[0] == '#' && buf[1] == '!')
+					buf[1] = '#';
+				first = 0;
+			}
+			write(fd_b, &buf, cnt);
+		}
+		close(fd_b);
+		close(fd_a);
+		chown(USERPROFILE, uid, user_gid);
+	}
+out:
+	flock(fd_l, LOCK_UN);
+}
+
+void read_config(void)
+{
+	FILE *fp = fopen(CONF_AXSPAWN_FILE, "r");
+	char buf[512];
+	char cmd[40], param[80];
+	char *p;
+	
+	if (fp == NULL)
+		return;
+		
+	while (!feof(fp))
+	{
+		fgets(buf, sizeof(buf), fp);
+		p = strchr(buf, '#');
+		if (p) *p='\0';
+		
+		if (buf[0] != '\0')
+		{
+			sscanf(buf, "%s %s", cmd, param);
+
+			if (!strncmp(cmd, "create", 6) && !cmd[6])
+			{
+				policy_add_user = (param[0] == 'y');
+			} else
+			if (!strncmp(cmd, "create_empty_password", 21))
+				policy_add_empty_password = (param[0] == 'y');
+			else
+			if (!strncmp(cmd, "create_with_useradd", 19))
+				policy_add_prog_useradd = (param[0] == 'y');
+			else
+			if (!strncmp(cmd, "pwcheck", 7)) {
+				if (!strncmp(param, "pass", 4))
+					pwcheck = 1;
+				else if (!strncmp(param, "call", 4))
+					pwcheck = 2;
+				else if (!strncmp(param, "group", 5))
+					pwcheck = 3;
+			} else
+			if (!strncmp(cmd, "guest", 5))
+			{
+				if (!strcmp(param, "no"))
+				{
+					policy_guest = 0;
+				} else {
+					policy_guest = 1;
+					guest = (char *) malloc(strlen(param)+1);
+					strcpy(guest, param);
+				}
+			} else
+			if (!strncmp(cmd, "group", 5))
+			{
+				user_gid = strtol(param, &p, 0);
+				if (*p != '\0')
+				{
+					struct group * gp = getgrnam(param);
+					if (gp != NULL)
+						user_gid = gp->gr_gid;
+					else
+						user_gid = 400;
+					endgrent();
+				}
+			} else
+			if (!strncmp(cmd, "first", 5))
+			{
+				start_uid = strtol(param, &p, 0);
+				if (*p != '\0')
+					start_uid = 400;
+			} else
+			if (!strncmp(cmd, "max", 3))
+			{
+				end_uid = strtol(param, &p, 0);
+				if (*p != '\0')
+					end_uid = 0;
+			} else
+			if (!strncmp(cmd, "home", 4))
+			{
+				start_home = (char *) malloc(strlen(param)+1);
+				strcpy(start_home, param);
+			} else
+			if (!strncmp(cmd, "secure_home", 11)) {
+				secure_home = (param[0] == 'y');
+			} else	
+			if (!strncmp(cmd, "assoc", 5))
+			{
+				if (!strcmp(param, "yes"))
+					policy_associate = 1;
+				else 
+					policy_associate = 0;
+			} else
+			if (!strncmp(cmd, "shell", 5))
+			{
+				user_shell = (char *) malloc(strlen(param)+1);
+				strcpy(user_shell, param);
+			} else
+			{
+				printf("error in config: ->%s %s<-\n", cmd, param);
+			}
+		}
+	}
+	
+	fclose(fp);
+}
+
+char ptyslave[20];
+int child_pid;
+
+void signal_handler(int dummy)
+{
+	kill(child_pid, SIGHUP);
+	cleanup(ptyslave+5);
+	exit(1);
+}
+			
+int main(int argc, char **argv)
+{
+	char call[20], user[20], as_user[20];
+	char buf[2048];
+	int  k, cnt, digits, letters, invalid, ssid, ssidcnt;
+	socklen_t addrlen;
+	struct timeval tv;
+	pid_t pid = -1;
+	char *p;
+	fd_set fds_read, fds_err;
+	struct passwd *pw;
+	int  chargc = 0;
+	char *chargv[20];
+	int envc = 0;
+	char *envp[20];
+	struct utmp ut_line;
+	struct winsize win = { 0, 0, 0, 0};
+	struct sockaddr_ax25 sax25;
+	union {
+		struct full_sockaddr_ax25 fsax25;
+		struct sockaddr_rose      rose;
+	} sockaddr;
+	char *protocol = "";
+	char is_guest = 0;
+	char wait_for_tcp = 0;
+	char changeuser = 0;
+	char user_changed = 0;
+	char rootlogin = 0;
+	char dumb_embedded_system = 0;
+	int pwtype = 0;
+	int pwtype_orig = 0;
+	char prompt[20];
+	char *pwd = 0;
+
+	*prompt = 0;
+
+	digits = letters = invalid = ssid = ssidcnt = 0;
+
+	for (k = 1; k < argc; k++){
+		if (!strcmp(argv[k], "-w") || !strcmp(argv[k], "--wait"))
+			wait_for_tcp = 1;
+		if (!strcmp(argv[k], "-c") || !strcmp(argv[k], "--changeuser"))
+			changeuser = 1;
+		if (!strcmp(argv[k], "-r") || !strcmp(argv[k], "--rootlogin"))
+			rootlogin = 1;
+		if (!strcmp(argv[k], "-e") || !strcmp(argv[k], "--embedded"))
+			dumb_embedded_system = 1;
+		if ((!strcmp(argv[k], "-p") || !strcmp(argv[k], "--pwprompt")) && k < argc-1 ) {
+			strncpy(prompt, argv[k+1], sizeof(prompt));
+			prompt[sizeof(prompt)-1] = '\0';
+			k++;
+		}
+		if (!strcmp(argv[k], "--only-md5"))
+			pwtype = PW_MD5;
+	}
+	read_config();
+
+	if (!pwtype)
+		pwtype = (PW_CLEARTEXT | PW_SYS | PW_MD5 | PW_UNIX);
+	pwtype_orig = pwtype;
+	if (!*prompt) {
+		if (gethostname(buf, sizeof(buf)) < 0) {
+			strcpy(prompt, "Check");
+		} else {
+			if ((p = strchr(buf, '.')))
+				*p = 0;
+			strncpy(prompt, buf, sizeof(prompt));
+			prompt[sizeof(prompt)-1] = 0;
+		}
+	}
+	strupr(prompt);
+	
+	openlog("axspawn", LOG_PID, LOG_DAEMON);
+
+	if (getuid() != 0) {
+		printf("permission denied\n");
+		syslog(LOG_NOTICE, "user %d tried to run axspawn\n", getuid());
+		return 1;
+	}
+
+	addrlen = sizeof(struct full_sockaddr_ax25);
+	k = getpeername(0, (struct sockaddr *) &sockaddr, &addrlen);
+	
+	if (k < 0) {
+		syslog(LOG_NOTICE, "getpeername: %m\n");
+		return 1;
+	}
+
+	switch (sockaddr.fsax25.fsa_ax25.sax25_family) {
+		case AF_AX25:
+			strcpy(call, ax25_ntoa(&sockaddr.fsax25.fsa_ax25.sax25_call));
+			protocol = "AX.25";
+			paclen   = AX_PACLEN;
+			break;
+
+		case AF_NETROM:
+			strcpy(call, ax25_ntoa(&sockaddr.fsax25.fsa_ax25.sax25_call));
+			protocol = "NET/ROM";
+			paclen   = NETROM_PACLEN;
+			break;
+
+		case AF_ROSE:
+			strcpy(call, ax25_ntoa(&sockaddr.rose.srose_call));
+			protocol = "Rose";
+			paclen   = ROSE_PACLEN;
+			break;
+
+		default:
+			syslog(LOG_NOTICE, "peer is not an AX.25, NET/ROM or Rose socket\n");
+			return 1;
+	}
+
+	for (k = 0; k < strlen(call); k++)
+	{
+		if (ssidcnt)
+		{
+			if (!IS_DIGIT(call[k]))
+				invalid++;
+			else
+			{
+				if (ssidcnt > 2)
+					invalid++;
+				else if (ssidcnt == 1)
+					ssid = (int) (call[k] - '0');
+				else
+				{
+					ssid *= 10;
+					ssid += (int) (call[k] - '0');
+					
+					if (ssid > 15) invalid++;
+				}
+				ssidcnt++;
+			}
+		} else
+		if (IS_DIGIT(call[k]))
+		{
+			digits++;
+			if (k > 3) invalid++;
+		} else
+		if (IS_LETTER(call[k]))
+			letters++;
+		else
+		if (call[k] == '-')
+		{
+			if (k < MINLEN)
+				invalid++;
+			else
+				ssidcnt++;
+		}
+		else
+			invalid++;
+	}
+		
+	if ( invalid || (k < MINLEN) || (digits > 2) || (digits < 1) )
+	{
+		write_ax25_static_line(MSG_NOCALL);
+		syslog(LOG_NOTICE, "%s is not an Amateur Radio callsign\n", call);
+		sleep(EXITDELAY);
+		return 1;
+	}
+	
+	if (wait_for_tcp) {
+		/* incoming TCP/IP connection? */
+		if (read_ax25(buf, sizeof(buf)) < 0)
+			exit(0);
+	}
+
+	strcpy(user, call);
+	strlwr(user);
+	p = strchr(user, '-');
+	if (p) *p = '\0';
+
+	*as_user = 0;
+	if (changeuser) {
+		char *p_buf;
+		sprintf(buf, "Login (%s): ", user);
+		write_ax25(buf, strlen(buf), 1);
+		if ((cnt = read_ax25(buf, sizeof(buf)-1)) < 0)
+				exit(1);
+		buf[cnt] = 0;
+
+		/* skip leading blanks */
+		for (p_buf = buf; *p_buf && *p_buf != '\n' && !isalnum(*p_buf & 0xff); p_buf++) ;
+		/* skip trailing junk, blanks, \n, .. */
+		for (p = p_buf; *p && isalnum(*p & 0xff); p++) ;
+		*p = 0;
+
+		if (*p_buf) {
+			strncpy(as_user, p_buf, sizeof(as_user));
+			as_user[sizeof(as_user)-1] = 0;
+			user_changed = 1;
+		}
+	}
+	
+	if (!*as_user)
+		strcpy(as_user, user);
+	pw = getpwnam(as_user);
+	endpwent();
+
+	if (pw == NULL)
+	{
+		if (user_changed) {
+			syslog(LOG_NOTICE, "%s (callsign: %s) not found in /etc/passwd\n", as_user, call);
+			sleep(EXITDELAY);
+			return 1;
+		}
+
+		if (policy_add_user) 
+		{
+			new_user(as_user);
+			pw = getpwnam(as_user);
+			endpwent();
+		}
+		
+		if (pw == NULL && policy_guest)
+		{
+			strcpy(as_user,guest);
+			pw = getpwnam(guest);
+			endpwent();
+			is_guest = 1;
+		}
+	}
+	if (!pw) {
+		write_ax25_static_line(MSG_NOTINDBF);
+		syslog(LOG_NOTICE, "%s (callsign: %s) not found in /etc/passwd\n", as_user, call);
+		sleep(EXITDELAY);
+		return 1;
+	}
+	
+	if (!rootlogin && (pw->pw_uid == 0 || pw->pw_gid == 0))
+	{
+		write_ax25_static_line(MSG_NOCALL);
+		syslog(LOG_NOTICE, "root login of %s (callsign: %s) denied\n", as_user, call);
+		sleep(EXITDELAY);
+		return 1;
+	}
+	
+again:
+	if (!(pwd = read_pwd(pw, &pwtype))) {
+		if ((!pwtype || pwtype != PW_CLEARTEXT) && (pwtype != PW_UNIX)) {
+			sleep (EXITDELAY);
+			return 1;
+		}
+	}
+	if (pwtype == PW_UNIX) {
+		pwtype = PW_CLEARTEXT;
+		pwcheck = 1;
+	}
+
+	if (pwtype != PW_CLEARTEXT) {
+		char pass_want[PASSSIZE+1];
+		if (pwtype == PW_MD5)
+			ask_pw_md5(prompt, pass_want, pwd);
+		else
+                	ask_pw_sys(prompt, pass_want, pwd);
+
+		cnt = read_ax25(buf, sizeof(buf)-1);
+		if (cnt <= 0) {
+			sprintf(buf,"no response\r");
+			write_ax25(buf, strlen(buf),1);
+			sleep (EXITDELAY);
+			return -11;
+		}
+		buf[cnt] = 0;
+		if ((p = strchr(buf, '\n')))
+			*p = 0;
+		if ((pwtype & PW_MD5) && !strcmp(buf, "sys") && (pwtype_orig & PW_SYS)) {
+			pwtype = (pwtype_orig & ~PW_MD5);
+			if (pwd)
+				free(pwd);
+			pwd = 0;
+			goto again;
+		}
+		if (!strstr(buf, pass_want)) {
+			sprintf(buf,"authentication failed\r");
+			write_ax25(buf, strlen(buf), 1);
+			sleep (EXITDELAY);
+			return -11;
+		}
+		if (pwd)
+			free(pwd);
+		pwd = 0;
+	} else {
+		if (pw->pw_uid == 0 || pw->pw_gid == 0) {
+			sprintf(buf, "Sorry, root logins are only allowed with md5- or baycom-password!\r");
+			write_ax25(buf, strlen(buf), 1);
+			syslog(LOG_NOTICE, "root login of %s (callsign: %s) denied (only with md5- or baycom-Login)!\n", user, call);
+			sleep(EXITDELAY);
+			return 1;
+		}
+	}
+	if (pwd)
+		free(pwd);
+	pwd = 0;
+
+	/*
+	 * associate UID with callsign (or vice versa?)
+	 */
+
+	if (policy_associate)
+	{
+		int fds = socket(AF_AX25, SOCK_SEQPACKET, 0);
+		if (fds != -1)
+		{
+			sax25.sax25_uid = pw->pw_uid;
+			if (get_assoc(&sax25) != -1)
+				ioctl(fds, SIOCAX25DELUID, &sax25);
+			switch (sockaddr.fsax25.fsa_ax25.sax25_family) {
+				case AF_AX25:
+				case AF_NETROM:
+					sax25.sax25_call = sockaddr.fsax25.fsa_ax25.sax25_call;
+					break;
+				case AF_ROSE:
+					sax25.sax25_call = sockaddr.rose.srose_call;
+                                        break;
+			}
+			ioctl(fds, SIOCAX25ADDUID, &sax25);
+			close(fds);
+		}
+	}
+	
+	fcntl(1, F_SETFL, O_NONBLOCK);
+	
+	pid = forkpty(&fdmaster, ptyslave, NULL, &win);
+	
+	if (pid == 0)
+	{
+		struct termios termios;
+		char *shell = "/bin/sh";
+
+        	memset((char *) &termios, 0, sizeof(termios));
+        	
+        	ioctl(0, TIOCSCTTY, (char *) 0);
+
+		termios.c_iflag = ICRNL | IXOFF;
+            	termios.c_oflag = OPOST | ONLCR;
+                termios.c_cflag = CS8 | CREAD | CLOCAL;
+                termios.c_lflag = ISIG | ICANON;
+                termios.c_cc[VINTR]  = /* 127 */ 0x03;
+                termios.c_cc[VQUIT]  =  28;
+                termios.c_cc[VERASE] =   8;
+                termios.c_cc[VKILL]  =  24;
+                termios.c_cc[VEOF]   =   4;
+                cfsetispeed(&termios, B19200);
+                cfsetospeed(&termios, B19200);
+                tcsetattr(0, TCSANOW, &termios);
+
+		setutent();
+                ut_line.ut_type = LOGIN_PROCESS;
+                ut_line.ut_pid  = getpid();
+                strncpy(ut_line.ut_line, ptyslave + 5, sizeof(ut_line.ut_line));
+                strncpy(ut_line.ut_id,   ptyslave + 8, sizeof(ut_line.ut_id));
+                strncpy(ut_line.ut_user, "LOGIN",      sizeof(ut_line.ut_user));
+                strncpy(ut_line.ut_host, protocol,     sizeof(ut_line.ut_host));
+		gettimeofday(&tv, NULL);
+		ut_line.ut_tv.tv_sec = tv.tv_sec;
+		ut_line.ut_tv.tv_usec = tv.tv_usec;
+                ut_line.ut_addr = 0;                
+                pututline(&ut_line);
+                endutent();
+
+		/* become process group leader, if we not already are */
+		if (getpid() != getsid(0)) {
+			if (setsid() == -1)
+				exit(1);
+		}
+
+                chargc = 0;
+                envc = 0;
+
+		if (dumb_embedded_system) {
+			int ret = -1;
+			char *p = 0;
+
+			chown(ptyslave, pw->pw_uid, 0);
+			chmod(ptyslave, 0622);
+
+			ret = -1;
+			if (pw->pw_dir && *(pw->pw_dir))
+				p = pw->pw_dir;
+		  		ret = chdir(p);
+			if (ret != 0) {
+				p = "/tmp";
+		  		chdir(p);
+			}
+
+                	if ((envp[envc] = (char *) malloc(strlen(p)+6)))
+                		sprintf(envp[envc++], "HOME=%s", p);
+                	if ((envp[envc] = (char *) malloc(strlen(pw->pw_name)+6)))
+                		sprintf(envp[envc++], "USER=%s", pw->pw_name);
+                	if ((envp[envc] = (char *) malloc(strlen(pw->pw_name)+9)))
+                		sprintf(envp[envc++], "LOGNAME=%s", pw->pw_name);
+
+			if (pw->pw_shell && *(pw->pw_shell)) {
+				shell = pw->pw_shell;
+			} else {
+				shell = "/bin/sh";
+			}
+			if ((p = strrchr(shell, '/'))) {
+				if (p[1]) {
+					if ((p = strdup(p)))
+						*p = '-';
+					
+				} else p = 0;
+			}
+			if (!p)
+				p = shell;
+                	chargv[chargc++] = p;
+               		if ((envp[envc] = (char *) malloc(strlen(shell)+7)))
+               			sprintf(envp[envc++], "SHELL=%s", shell);
+
+			if (pw->pw_uid == 0)
+				p = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin";
+			else
+				p = "/bin:/usr/bin:/usr/local/bin";
+                	if ((envp[envc] = (char *) malloc(strlen(p)+6)))
+                		sprintf(envp[envc++], "PATH=%s", p);
+
+		} else {
+
+                	chargv[chargc++] = "/bin/login";
+                	chargv[chargc++] = "-p";
+			/* there exist several conectps:
+		 	* Historicaly, the special character '+' in the password
+		 	* field indicated that users may login via ax25, netrom, rose,
+		 	* etc.. - but not via other protocols like telnet.
+		 	* This secures the digipeater from abuse by inet access of
+		 	* non-hams.
+		 	* On the other hand, this leads to the problem that telent
+		 	* via HF, pop3, etc.. do not work.
+		 	* The "pwcheck == 2 method means, that the password is used on
+		 	* every login mechanism other than this axspawn program;
+		 	* here we do not rely on the password - the ax25 call of
+		 	* the ham is enough. We have already checked above, that
+		 	* the call of the user is valid (and not root, httpd, etc..);
+		 	* thus this method is safe here.
+		 	* Another mechanism (pwcheck == 3) is to check if the gid
+		 	* equals to user_gid preference. I prefer this way, because
+		 	* this approach gives the chance to temporary lock a user
+		 	* out (abuse, ..) by changing his gid in passwd to for e.g.
+		 	* 65534 (nogroup).
+		 	*/
+			chargv[chargc++] = "-h";
+			chargv[chargc++] = protocol;
+                	if (pwtype != PW_CLEARTEXT /* PW_SYS or PW_MD5 are already authenticated */ 
+				|| pwcheck == 2 || (pwcheck == 3 && (pw->pw_gid == user_gid || is_guest)) || !strcmp(pw->pw_passwd, "+"))
+	        		chargv[chargc++] = "-f";
+                	chargv[chargc++] = as_user;
+		}
+               	chargv[chargc]   = NULL;
+
+                if ((envp[envc] = (char *) malloc(30)))
+                	sprintf(envp[envc++], "AXCALL=%s", call);
+                if ((envp[envc] = (char *) malloc(30)))
+                	sprintf(envp[envc++], "CALL=%s", user);
+                if ((envp[envc] = (char *) malloc(30)))
+                	sprintf(envp[envc++], "PROTOCOL=%s", protocol);
+		if ((envp[envc] = (char *) malloc(30)))
+			sprintf(envp[envc++], "TERM=dumb"); /* SuSE bug (dump - tsts) */
+		/* other useful defaults */
+		if ((envp[envc] = (char *) malloc(30)))
+			sprintf(envp[envc++], "EDITOR=/usr/bin/ex");
+		if ((envp[envc] = (char *) malloc(30)))
+			sprintf(envp[envc++], "LESS=-d -E -F");
+		envp[envc] = NULL;
+
+		if (dumb_embedded_system) {
+			if (setgid(pw->pw_gid) == -1)
+				exit(1);
+			if (setuid(pw->pw_uid) == -1)
+				exit(1);
+                	execve(shell, chargv, envp);
+			/* point of no return */
+			exit(1);
+		}
+
+                execve(chargv[0], chargv, envp);
+		/* point of no return */
+		exit(1);
+        }
+        else if (pid > 0)
+        {
+        	child_pid = 0;
+        	signal(SIGHUP, signal_handler);
+        	signal(SIGTERM, signal_handler);
+        	signal(SIGINT, signal_handler);
+        	signal(SIGQUIT, signal_handler);
+ 
+        	while(1)
+        	{
+       			FD_ZERO(&fds_read);
+       			FD_ZERO(&fds_err);
+        		FD_SET(0, &fds_read);
+        		FD_SET(0, &fds_err);
+        		if (wqueue_length <= paclen*7)
+				FD_SET(fdmaster, &fds_read);
+        		FD_SET(fdmaster, &fds_err);
+        		
+        		k = select(fdmaster+1, &fds_read, NULL, &fds_err, NULL);
+  
+        		if (k > 0)
+        		{
+        			if (FD_ISSET(0, &fds_err))
+        			{
+					if (huffman) {
+							sprintf(buf,"\r//COMP 0\r");
+							write_ax25(buf, strlen(buf), 1);
+							sleep(EXITDELAY);
+        				}
+        				kill(pid, SIGHUP);
+        				cleanup(ptyslave+5);
+        				return 1;
+        			}
+        			
+        			if (FD_ISSET(fdmaster, &fds_err))
+        			{	
+					/* give the last packet in the timer controlled sendqueue a chance.. */
+					if (wqueue_length) {
+						continue;
+					}
+					if (huffman) {
+							sprintf(buf,"\r//COMP 0\r");
+							write_ax25(buf, strlen(buf), 1);
+							sleep(EXITDELAY);
+        				}
+        				cleanup(ptyslave+5);
+        				return 1;
+        			}
+
+        			if (FD_ISSET(0, &fds_read))
+        			{
+        				cnt = read_ax25(buf, sizeof(buf));
+        				if (cnt < 0)	/* Connection died */
+        				{
+        					kill(pid, SIGHUP);
+        					cleanup(ptyslave+5);
+        					return 1;
+        				} else
+        					write(fdmaster, buf, cnt);
+        			}
+        			
+        			if (FD_ISSET(fdmaster, &fds_read))
+        			{
+        				cnt = read(fdmaster, buf, (huffman ? 254 : sizeof(buf)));
+        				if (cnt < 0)
+        				{
+						/* give the last packet in the timer controlled sendqueue a chance.. */
+						if (wqueue_length) {
+							continue;
+						}
+						if (huffman) {
+								sprintf(buf,"\r//COMP 0\r");
+								write_ax25(buf, strlen(buf), 1);
+								sleep(EXITDELAY);
+        					}
+	        				cleanup(ptyslave+5);
+        					return 1;	/* Child died */
+        				}
+        				write_ax25(buf, cnt, 0);
+        			}
+        		} else 
+        		if (k < 0 && errno != EINTR)
+        		{
+				if (huffman) {
+						sprintf(buf,"\r//COMP 0\r");
+						write_ax25(buf, strlen(buf), 1);
+						sleep(EXITDELAY);
+        			}
+
+        			kill(pid, SIGHUP);	/* just in case... */
+        			cleanup(ptyslave+5);
+        			return 0;
+        		}
+        	}
+        } 
+        else
+        {
+		write_ax25_static_line(MSG_CANNOTFORK);
+        	syslog(LOG_ERR, "cannot fork %m, closing connection to %s\n", call);
+        	sleep(EXITDELAY);
+        	return 1;
+        }
+        
+        sleep(EXITDELAY);
+
+	return 0;
+}
diff --git a/ax25/axspawn.conf b/ax25/axspawn.conf
new file mode 100644
index 0000000..5935d34
--- /dev/null
+++ b/ax25/axspawn.conf
@@ -0,0 +1,50 @@
+# /etc/ax25/axspawn.conf
+#
+# allow automatic creation of user accounts
+create    yes
+
+# allow empty password field (so user may login via telnet, too) [default no]
+create_empty_password       no
+#create_empty_password       yes
+# create with system utility useradd(8)? [default no]
+#create_with_useradd  no
+create_with_useradd  yes
+#
+# pwcheck method: password or call or group [default: password]
+# "password" means, that passwords with '+' force a login without
+#   prompting for a password (old behaviour; backward compatibility).
+# "call" means, that ham calls via ax25/netrom/rose/.. should be able
+#   to login without password, even if it's set (for e.g. to secure
+#   from abuse of inet connections)
+# "group" means, that if the gid of the user matches the configured
+#  default user_gid, then the login is granted without password.
+#pwcheck call
+#pwcheck group
+#pwcheck password
+#
+# guest user if above is 'no' or everything else fails. Disable with "no"
+#guest     ax25
+guest     guest
+#
+# group id or name for autoaccount
+#group     ax25
+group     hams
+#
+# first user id to use
+first_uid 400
+#
+# maximum user id
+max_uid   2000
+#
+# where to add the home directory for the new user
+#home      /home/ax25
+home      /home/hams
+#
+# secure homedirectories (g-rwx)
+#secure_home yes
+#
+# user shell
+shell     /bin/bash
+#
+# bind user id to callsign for outgoing connects.
+associate no
diff --git a/ax25/axspawn.conf.5 b/ax25/axspawn.conf.5
new file mode 100644
index 0000000..cb33d9a
--- /dev/null
+++ b/ax25/axspawn.conf.5
@@ -0,0 +1,103 @@
+.TH AXSPAWN.CONF 5 "2 August 1996" Linux "Linux Programmer's Manual"
+.SH NAME
+axspawn.conf \- Control the operation of axspawn.
+.SH DESCRIPTION
+.LP
+The
+.B axspawn.conf
+file controls the operation of the axspawn(8) program. The operation of the
+config file can best be seen in an example:
+.LP
+.RS
+# this is /etc/ax25/axspawn.conf
+.br
+#
+.br
+# allow automatic creation of user accounts
+.br
+create    yes
+.br
+# allow empty password field (so user may login via telnet, too) [default no]
+.br
+create_empty_password       no
+.br
+#create_empty_password       yes
+.br
+# create with system utility useradd(8)? [default no]
+.br
+#create_with_useradd  no
+.br
+create_with_useradd  yes
+.br
+#
+.br
+# pwcheck method: password or call or group. [default: password]
+.br
+#pwcheck call
+.br
+#pwcheck group
+.br
+pwcheck password
+.br
+#
+.br
+# guest user if above is 'no' or everything else
+.br
+# fails. Disable with "no"
+.br
+guest     guest
+.br
+#
+.br
+# group id or name for autoaccount
+.br
+group     hams
+.br
+#
+.br
+# first user id to use
+.br
+first_uid 400
+.br
+#
+.br
+# maximum user id
+.br
+max_uid   2000
+.br
+#
+.br
+# where to add the home directory for the new user
+.br
+home      /home/hams
+.br
+#
+.br
+# secure homedirectories (g-rwx)
+.br
+#secure_home yes
+.br
+#
+.br
+# user's shell
+.br
+shell     /bin/bash
+.br
+#
+.br
+# bind user id to callsign for outgoing connects.
+.br
+associate yes
+.RE
+.LP
+The \(lqassociate\(rq option has to be used with great care. If a user logs
+on it removes any existing callsign from the translation table for this
+userid and replaces it with the callsign and SSID of the user. This will
+happen with multiple connects (same callsign, different SSIDs), too. Unless
+you want your users to be able to call out from your machine disable
+\(lqassociate\(rq.
+.SH FILES
+.LP
+/etc/ax25/axspawn.conf
+.SH "SEE ALSO"
+.BR axspawn (8).
diff --git a/ax25/axspawn.h b/ax25/axspawn.h
new file mode 100644
index 0000000..3d94dc2
--- /dev/null
+++ b/ax25/axspawn.h
@@ -0,0 +1,8 @@
+#ifndef AXSPAWN_H
+#define AXSPAWN_H
+
+#define EXITDELAY	10
+int write_ax25(char *s, int len, int kick);
+int Strcasecmp(const char *s1, const char *s2);
+
+#endif
diff --git a/ax25/beacon.8 b/ax25/beacon.8
new file mode 100644
index 0000000..d2a72ef
--- /dev/null
+++ b/ax25/beacon.8
@@ -0,0 +1,52 @@
+.TH BEACON 8 "10 February 1997" Linux "Linux System Managers Manual"
+.SH NAME
+beacon \- transmit periodic messages on an AX.25 port.
+.SH SYNOPSIS
+.B beacon [-c <src_call>] [-d <dest_call>[digi ..]] [-l] [-m] [-s] [-t interval] [-v] port \(lqmessage\(rq
+.SH DESCRIPTION
+.LP
+.B Beacon
+transmits the message text on an AX.25 port every thirty minutes. The message
+is addressed to \(lqIDENT\(rq and is sent using the AX.25 callsign of the port
+specified on the command line. Typically the message text will contain
+spaces and/or other characters, therefore the message text should be
+enclosed in quotes to ensure they are passed to the
+.B beacon
+program untranslated.
+.SH OPTIONS
+.TP 16
+.BI \-c
+Configure the source callsign for beacons. The default is to use the
+interface callsign.
+.TP 16
+.BI \-d
+Configure the destination callsign for beacons. The default is \(lqIDENT\(rq.
+Optional: Digipeaters may follow, separated with spaces. Use \-d "DEST DIGI1 DIGI2 .."
+.TP 16
+.BI \-l
+Enables the logging of errors to the system log, the default is off.
+.TP 16
+.BI \-m
+Changes the destination address to \(lqMAIL\(rq and sends the message text
+once only. This option overrides any destination callsign given with the \-d option.
+.TP 16
+.BI \-s
+Sends the message text once only.
+.TP 16
+.BI "\-t interval"
+The time interval between messages, the interval is given in minutes and the
+default is thirty minutes.
+.TP 16
+.BI \-v
+Display the version.
+.SH "SEE ALSO"
+.BR ax25 (4),
+.BR axports (5).
+.SH AUTHORS
+.nf
+Alan Cox GW4PTS <alan at cymru.net>
+.br
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
+.br
+David Brooke G6GZH <db at fusk.demon.co.uk>
+.fi
diff --git a/ax25/beacon.c b/ax25/beacon.c
new file mode 100644
index 0000000..095614f
--- /dev/null
+++ b/ax25/beacon.c
@@ -0,0 +1,172 @@
+#include <config.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <syslog.h>
+#include <signal.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/daemon.h>
+
+static int logging = FALSE;
+static int mail = FALSE;
+static int single = FALSE;
+
+static void terminate(int sig)
+{
+	if (logging) {
+		syslog(LOG_INFO, "terminating on SIGTERM\n");
+		closelog();
+	}
+	
+	exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+	struct full_sockaddr_ax25 dest;
+	struct full_sockaddr_ax25 src;
+	int s, n, dlen, len, interval = 30;
+	char *addr, *port, *message, *portcall;
+	char *srccall = NULL, *destcall = NULL;
+	
+	while ((n = getopt(argc, argv, "c:d:lmst:v")) != -1) {
+		switch (n) {
+			case 'c':
+				srccall = optarg;
+				break;
+			case 'd':
+				destcall = optarg;
+				break;
+			case 'l':
+				logging = TRUE;
+				break;
+			case 'm':
+				mail = TRUE;
+				/* falls through */
+			case 's':
+				single = TRUE;
+				break;
+			case 't':
+				interval = atoi(optarg);
+				if (interval < 1) {
+					fprintf(stderr, "beacon: interval must be greater than on minute\n");
+					return 1;
+				}
+				break;
+			case 'v':
+				printf("beacon: %s\n", VERSION);
+				return 0;
+			case '?':
+			case ':':
+				fprintf(stderr, "usage: beacon [-c <src_call>] [-d <dest_call>] [-l] [-m] [-s] [-t interval] [-v] <port> <message>\n");
+				return 1;
+		}
+	}
+
+	signal(SIGTERM, terminate);
+
+	if (optind == argc || optind == argc - 1) {
+		fprintf(stderr, "usage: beacon [-c <src_call>] [-d <dest_call>] [-l] [-m] [-s] [-t interval] [-v] <port> <message>\n");
+		return 1;
+	}
+
+	port    = argv[optind];
+	message = argv[optind + 1];
+	
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "beacon: no AX.25 ports defined\n");
+		return 1;
+	}
+
+	if ((portcall = ax25_config_get_addr(port)) == NULL) {
+		fprintf(stderr, "beacon: invalid AX.25 port setting - %s\n", port);
+		return 1;
+	}
+
+	addr = NULL;
+	if (mail)
+		addr = strdup("MAIL");
+	else if (destcall != NULL)
+		addr = strdup(destcall);
+	else
+		addr = strdup("IDENT");
+	if (addr == NULL)
+	  return 1;
+
+	if ((dlen = ax25_aton(addr, &dest)) == -1) {
+		fprintf(stderr, "beacon: unable to convert callsign '%s'\n", addr);
+		return 1;
+	}
+	if (addr != NULL) free(addr); addr = NULL;
+
+	if (srccall != NULL && strcmp(srccall, portcall) != 0) {
+		if ((addr = (char *) malloc(strlen(srccall) + 1 + strlen(portcall) + 1)) == NULL)
+			return 1;
+		sprintf(addr, "%s %s", srccall, portcall);
+	} else {
+		if ((addr = strdup(portcall)) == NULL)
+			return 1;
+	}
+
+	if ((len = ax25_aton(addr, &src)) == -1) {
+		fprintf(stderr, "beacon: unable to convert callsign '%s'\n", addr);
+		return 1;
+	}
+	if (addr != NULL) free(addr); addr = NULL;
+
+	if (!single) {
+		if (!daemon_start(FALSE)) {
+			fprintf(stderr, "beacon: cannot become a daemon\n");
+			return 1;
+		}
+	}
+
+	if (logging) {
+		openlog("beacon", LOG_PID, LOG_DAEMON);
+		syslog(LOG_INFO, "starting");
+	}
+
+	for (;;) {
+		if ((s = socket(AF_AX25, SOCK_DGRAM, 0)) == -1) {
+			if (logging) {
+				syslog(LOG_ERR, "socket: %m");
+				closelog();
+			}
+			return 1;
+		}
+
+		if (bind(s, (struct sockaddr *)&src, len) == -1) {
+			if (logging) {
+				syslog(LOG_ERR, "bind: %m");
+				closelog();
+			}
+			return 1;
+		}
+		
+		if (sendto(s, message, strlen(message), 0, (struct sockaddr *)&dest, dlen) == -1) {
+			if (logging) {
+				syslog(LOG_ERR, "sendto: %m");
+				closelog();
+			}
+			return 1;
+		}
+
+		close(s);
+
+		if (!single)
+			sleep(interval * 60);
+		else
+			break;
+	}
+
+	return 0;
+}
diff --git a/ax25/bpqparms.8 b/ax25/bpqparms.8
new file mode 100644
index 0000000..7a8b450
--- /dev/null
+++ b/ax25/bpqparms.8
@@ -0,0 +1,37 @@
+.TH BPQPARMS 8 "4 September 1996" Linux "Linux System Managers Manual"
+.SH NAME
+bpqparms \- Configure BPQ ethernet devices.
+.SH SYNOPSIS
+.B bpqparms device [-a ethaddr] [-d ethaddr] [-vV]
+.SH DESCRIPTION
+.LP
+.B Bpqparms
+allows the setting of the BPQ Ethernet options for a particular device. Each
+BPQ Ethernet device appears as a device named bpq0...bpqN which overlays the
+original Ethernet device, usually eth0...ethN. This device is an AX.25
+device driver and allows AX.25 frames to be transmitted over an Ethernet to
+another machine using the same protocol. The default for the device is to
+send and receive BPQ Ethernet packets to the broadcast address. This
+program replaces the previous \(lqaxparms -dev\(rq option.
+.SH OPTIONS
+.TP 15
+.BI "\-a ethaddr"
+Allows the setting of which ethernet address will be accepted by the BPQ
+Ethernet device.
+.TP 15
+.BI "\-d ethaddr"
+If specified on its own, will set the destination ethernet address will be
+used for transmitting and for receiving of BPQ ethernet packets. An address
+of \(lqbroadcast\(rq sets it to the ethernet broadcast address.
+.TP 15
+.BI \-v
+Displays the version number.
+.TP 15
+.BI \-V
+The original version messages.
+.SH "SEE ALSO"
+.BR ax25 (4),
+.BR axports (5),
+.BR ifconfig (8).
+.SH AUTHOR
+Joerg Reuter DL1BKE <jreuter at poboxes.com>
diff --git a/ax25/bpqparms.c b/ax25/bpqparms.c
new file mode 100644
index 0000000..f8e9d66
--- /dev/null
+++ b/ax25/bpqparms.c
@@ -0,0 +1,143 @@
+/* 
+   bpqparms.c
+
+   Copyright 1996, by Joerg Reuter jreuter at poboxes.com
+
+   This program is free software; you can redistribute it and/or modify 
+   it under the terms of the (modified) GNU General Public License 
+   delivered with the LinuX kernel source.
+   
+   This program 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 find a copy of the GNU General Public License in 
+   /usr/src/linux/COPYING; 
+
+*/
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <termios.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <net/if.h>
+
+#ifdef __GLIBC__
+#include <net/ethernet.h> /* is this really needed ??  */
+#endif
+
+#include <linux/bpqether.h> /* xlz - dammit, we need this again */
+
+#include <config.h>
+
+void usage(void)
+{
+		fprintf(stderr, "usage   : bpqparms dev -d address [-a address]\n");
+		fprintf(stderr, "examples: bpqparms bpq0 -d 00:80:AD:1B:05:26\n");
+		fprintf(stderr, "          bpqparms bpq0 -d broadcast -a 00:80:AD:1B:05:26\n");
+		exit(1);
+}
+
+int get_hwaddr(unsigned char *k, char *s)
+{
+	unsigned char broadcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+	unsigned int  eth[ETH_ALEN];
+	int n;
+
+	if (strcmp(s, "default") == 0 || strcmp(s, "broadcast") == 0) {
+		memcpy(k, broadcast, ETH_ALEN);
+	} else {
+		n = sscanf(s, "%x:%x:%x:%x:%x:%x", 
+		&eth[0], &eth[1], &eth[2], &eth[3], &eth[4], &eth[5]);
+		
+		if (n < 6)
+			return 1;
+
+		for (n = 0; n < ETH_ALEN; n++)
+			k[n] = eth[n];
+	}
+
+	return 0;
+}
+
+int main(int argc, char **argv)
+{
+	int fd;
+	int cmd, flag;
+	struct ifreq ifr;
+	char dev[40];
+	struct bpq_ethaddr addr;
+
+	flag = 0;
+
+	while ((cmd = getopt(argc, argv, "d:a:vVh")) != EOF) {
+		switch (cmd) {
+			case 'd':
+				flag |= 1;
+				if (get_hwaddr(addr.destination, optarg)) {
+					fprintf(stderr, "bpqparms: invalid 'destination' address %s\n", optarg);
+					return 1;
+				}
+				break;
+				
+			case 'a':
+				flag |= 2;
+				if (get_hwaddr(addr.accept, optarg)) {
+					fprintf(stderr, "bpqparms: invalid 'accept' address %s\n", optarg);
+					return 1;
+				}
+				break;
+
+			case 'V':
+				printf("bpqparms version " VERSION "\n");
+				printf("Copyright 1996, J�rg Reuter (jreuter at poboxes.com)\n");
+				printf("This program is free software; you can redistribute it and/or modify\n");
+				printf("it under the terms of the GNU General Public License as published by\n");
+				printf("the Free Software Foundation; either version 2 of the License, or\n");
+				printf(" (at your option) any later version.\n\n");
+				printf("This program is distributed in the hope that it will be useful,\n");
+				printf("but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
+				printf("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n");
+				return 0;
+
+			case 'v':
+				printf("bpqparms: %s\n", VERSION);
+				return(0);
+
+			case 'h':
+			case ':':
+			case '?':
+				usage();
+		}
+	}
+	
+	if (!(flag & 0x01) || optind+1 > argc)
+		usage();
+	
+	strcpy(dev, argv[optind]);
+
+	if ((flag & 0x02) == 0)
+		memcpy(addr.accept, addr.destination, ETH_ALEN);
+
+	fd = socket(AF_INET, SOCK_DGRAM, 0);
+	
+	strcpy(ifr.ifr_name, dev);
+	ifr.ifr_data = (caddr_t) &addr;
+	
+	if (ioctl(fd, SIOCSBPQETHADDR, &ifr) < 0) {
+		perror("bpqparms SIOCSBPQETHADDR");
+		close(fd);
+		return 1;
+	}
+	
+	close(fd);
+
+	return 0;
+}
diff --git a/ax25/md5.c b/ax25/md5.c
new file mode 100644
index 0000000..8bd0d11
--- /dev/null
+++ b/ax25/md5.c
@@ -0,0 +1,290 @@
+
+/*
+ ***********************************************************************
+ ** md5.c -- the source code for MD5 routines                         **
+ ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **
+ ** Created: 2/17/90 RLR                                              **
+ ** Revised: 1/91 SRD,AJ,BSK,JT Reference C ver., 7/10 constant corr. **
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved.  **
+ **                                                                   **
+ ** License to copy and use this software is granted provided that    **
+ ** it is identified as the "RSA Data Security, Inc. MD5 Message-     **
+ ** Digest Algorithm" in all material mentioning or referencing this  **
+ ** software or this function.                                        **
+ **                                                                   **
+ ** License is also granted to make and use derivative works          **
+ ** provided that such works are identified as "derived from the RSA  **
+ ** Data Security, Inc. MD5 Message-Digest Algorithm" in all          **
+ ** material mentioning or referencing the derived work.              **
+ **                                                                   **
+ ** RSA Data Security, Inc. makes no representations concerning       **
+ ** either the merchantability of this software or the suitability    **
+ ** of this software for any particular purpose.  It is provided "as  **
+ ** is" without express or implied warranty of any kind.              **
+ **                                                                   **
+ ** These notices must be retained in any copies of any part of this  **
+ ** documentation and/or software.                                    **
+ ***********************************************************************
+ */
+
+#include "md5.h"
+
+/*
+ ***********************************************************************
+ **  Message-digest routines:                                         **
+ **  To form the message digest for a message M                       **
+ **    (1) Initialize a context buffer mdContext using MD5Init        **
+ **    (2) Call MD5Update on mdContext and M                          **
+ **    (3) Call MD5Final on mdContext                                 **
+ **  The message digest is now in mdContext->digest[0...15]           **
+ ***********************************************************************
+ */
+
+/* forward declaration */
+static void Transform(UINT4 *buf, UINT4 *in);
+
+static unsigned char PADDING[64] = {
+  0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* F, G, H and I are basic MD5 functions */
+#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
+#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+#define I(x, y, z) ((y) ^ ((x) | (~z)))
+
+/* ROTATE_LEFT rotates x left n bits */
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
+
+/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */
+/* Rotation is separate from addition to prevent recomputation */
+#define FF(a, b, c, d, x, s, ac) \
+  {(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
+   (a) = ROTATE_LEFT ((a), (s)); \
+   (a) += (b); \
+  }
+#define GG(a, b, c, d, x, s, ac) \
+  {(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
+   (a) = ROTATE_LEFT ((a), (s)); \
+   (a) += (b); \
+  }
+#define HH(a, b, c, d, x, s, ac) \
+  {(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
+   (a) = ROTATE_LEFT ((a), (s)); \
+   (a) += (b); \
+  }
+#define II(a, b, c, d, x, s, ac) \
+  {(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
+   (a) = ROTATE_LEFT ((a), (s)); \
+   (a) += (b); \
+  }
+
+/* The routine MD5Init initializes the message-digest context
+   mdContext. All fields are set to zero.
+ */
+void MD5Init(MD5_CTX *mdContext)
+{
+  mdContext->i[0] = mdContext->i[1] = (UINT4)0;
+
+  /* Load magic initialization constants.
+   */
+  mdContext->buf[0] = (UINT4)0x67452301;
+  mdContext->buf[1] = (UINT4)0xefcdab89;
+  mdContext->buf[2] = (UINT4)0x98badcfe;
+  mdContext->buf[3] = (UINT4)0x10325476;
+}
+
+/* The routine MD5Update updates the message-digest context to
+   account for the presence of each of the characters inBuf[0..inLen-1]
+   in the message whose digest is being computed.
+ */
+void MD5Update(MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen)
+{
+  UINT4 in[16];
+  int mdi;
+  unsigned int i, ii;
+
+  /* compute number of bytes mod 64 */
+  mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
+
+  /* update number of bits */
+  if ((mdContext->i[0] + ((UINT4)inLen << 3)) < mdContext->i[0])
+    mdContext->i[1]++;
+  mdContext->i[0] += ((UINT4)inLen << 3);
+  mdContext->i[1] += ((UINT4)inLen >> 29);
+
+  while (inLen--) {
+    /* add new character to buffer, increment mdi */
+    mdContext->in[mdi++] = *inBuf++;
+
+    /* transform if necessary */
+    if (mdi == 0x40) {
+      for (i = 0, ii = 0; i < 16; i++, ii += 4)
+	in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |
+		(((UINT4)mdContext->in[ii+2]) << 16) |
+		(((UINT4)mdContext->in[ii+1]) << 8) |
+		((UINT4)mdContext->in[ii]);
+      Transform (mdContext->buf, in);
+      mdi = 0;
+    }
+  }
+}
+
+/* The routine MD5Final terminates the message-digest computation and
+   ends with the desired message digest in mdContext->digest[0...15].
+ */
+void MD5Final(MD5_CTX *mdContext)
+{
+  UINT4 in[16];
+  int mdi;
+  unsigned int i, ii;
+  unsigned int padLen;
+
+  /* save number of bits */
+  in[14] = mdContext->i[0];
+  in[15] = mdContext->i[1];
+
+  /* compute number of bytes mod 64 */
+  mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
+
+  /* pad out to 56 mod 64 */
+  padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi);
+  MD5Update (mdContext, PADDING, padLen);
+
+  /* append length in bits and transform */
+  for (i = 0, ii = 0; i < 14; i++, ii += 4)
+    in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |
+	    (((UINT4)mdContext->in[ii+2]) << 16) |
+	    (((UINT4)mdContext->in[ii+1]) << 8) |
+	    ((UINT4)mdContext->in[ii]);
+  Transform (mdContext->buf, in);
+
+  /* store buffer in digest */
+  for (i = 0, ii = 0; i < 4; i++, ii += 4) {
+    mdContext->digest[ii] = (unsigned char)(mdContext->buf[i] & 0xFF);
+    mdContext->digest[ii+1] =
+      (unsigned char)((mdContext->buf[i] >> 8) & 0xFF);
+    mdContext->digest[ii+2] =
+      (unsigned char)((mdContext->buf[i] >> 16) & 0xFF);
+    mdContext->digest[ii+3] =
+      (unsigned char)((mdContext->buf[i] >> 24) & 0xFF);
+  }
+}
+
+/* Basic MD5 step. Transforms buf based on in.
+ */
+static void Transform(UINT4 *buf, UINT4 *in)
+{
+  UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
+
+  /* Round 1 */
+#define S11 7
+#define S12 12
+#define S13 17
+#define S14 22
+  FF ( a, b, c, d, in[ 0], S11, 3614090360UL); /* 1 */
+  FF ( d, a, b, c, in[ 1], S12, 3905402710UL); /* 2 */
+  FF ( c, d, a, b, in[ 2], S13,  606105819UL); /* 3 */
+  FF ( b, c, d, a, in[ 3], S14, 3250441966UL); /* 4 */
+  FF ( a, b, c, d, in[ 4], S11, 4118548399UL); /* 5 */
+  FF ( d, a, b, c, in[ 5], S12, 1200080426UL); /* 6 */
+  FF ( c, d, a, b, in[ 6], S13, 2821735955UL); /* 7 */
+  FF ( b, c, d, a, in[ 7], S14, 4249261313UL); /* 8 */
+  FF ( a, b, c, d, in[ 8], S11, 1770035416UL); /* 9 */
+  FF ( d, a, b, c, in[ 9], S12, 2336552879UL); /* 10 */
+  FF ( c, d, a, b, in[10], S13, 4294925233UL); /* 11 */
+  FF ( b, c, d, a, in[11], S14, 2304563134UL); /* 12 */
+  FF ( a, b, c, d, in[12], S11, 1804603682UL); /* 13 */
+  FF ( d, a, b, c, in[13], S12, 4254626195UL); /* 14 */
+  FF ( c, d, a, b, in[14], S13, 2792965006UL); /* 15 */
+  FF ( b, c, d, a, in[15], S14, 1236535329UL); /* 16 */
+
+  /* Round 2 */
+#define S21 5
+#define S22 9
+#define S23 14
+#define S24 20
+  GG ( a, b, c, d, in[ 1], S21, 4129170786UL); /* 17 */
+  GG ( d, a, b, c, in[ 6], S22, 3225465664UL); /* 18 */
+  GG ( c, d, a, b, in[11], S23,  643717713UL); /* 19 */
+  GG ( b, c, d, a, in[ 0], S24, 3921069994UL); /* 20 */
+  GG ( a, b, c, d, in[ 5], S21, 3593408605UL); /* 21 */
+  GG ( d, a, b, c, in[10], S22,   38016083UL); /* 22 */
+  GG ( c, d, a, b, in[15], S23, 3634488961UL); /* 23 */
+  GG ( b, c, d, a, in[ 4], S24, 3889429448UL); /* 24 */
+  GG ( a, b, c, d, in[ 9], S21,  568446438UL); /* 25 */
+  GG ( d, a, b, c, in[14], S22, 3275163606UL); /* 26 */
+  GG ( c, d, a, b, in[ 3], S23, 4107603335UL); /* 27 */
+  GG ( b, c, d, a, in[ 8], S24, 1163531501UL); /* 28 */
+  GG ( a, b, c, d, in[13], S21, 2850285829UL); /* 29 */
+  GG ( d, a, b, c, in[ 2], S22, 4243563512UL); /* 30 */
+  GG ( c, d, a, b, in[ 7], S23, 1735328473UL); /* 31 */
+  GG ( b, c, d, a, in[12], S24, 2368359562UL); /* 32 */
+
+  /* Round 3 */
+#define S31 4
+#define S32 11
+#define S33 16
+#define S34 23
+  HH ( a, b, c, d, in[ 5], S31, 4294588738UL); /* 33 */
+  HH ( d, a, b, c, in[ 8], S32, 2272392833UL); /* 34 */
+  HH ( c, d, a, b, in[11], S33, 1839030562UL); /* 35 */
+  HH ( b, c, d, a, in[14], S34, 4259657740UL); /* 36 */
+  HH ( a, b, c, d, in[ 1], S31, 2763975236UL); /* 37 */
+  HH ( d, a, b, c, in[ 4], S32, 1272893353UL); /* 38 */
+  HH ( c, d, a, b, in[ 7], S33, 4139469664UL); /* 39 */
+  HH ( b, c, d, a, in[10], S34, 3200236656UL); /* 40 */
+  HH ( a, b, c, d, in[13], S31,  681279174UL); /* 41 */
+  HH ( d, a, b, c, in[ 0], S32, 3936430074UL); /* 42 */
+  HH ( c, d, a, b, in[ 3], S33, 3572445317UL); /* 43 */
+  HH ( b, c, d, a, in[ 6], S34,   76029189UL); /* 44 */
+  HH ( a, b, c, d, in[ 9], S31, 3654602809UL); /* 45 */
+  HH ( d, a, b, c, in[12], S32, 3873151461UL); /* 46 */
+  HH ( c, d, a, b, in[15], S33,  530742520UL); /* 47 */
+  HH ( b, c, d, a, in[ 2], S34, 3299628645UL); /* 48 */
+
+  /* Round 4 */
+#define S41 6
+#define S42 10
+#define S43 15
+#define S44 21
+  II ( a, b, c, d, in[ 0], S41, 4096336452UL); /* 49 */
+  II ( d, a, b, c, in[ 7], S42, 1126891415UL); /* 50 */
+  II ( c, d, a, b, in[14], S43, 2878612391UL); /* 51 */
+  II ( b, c, d, a, in[ 5], S44, 4237533241UL); /* 52 */
+  II ( a, b, c, d, in[12], S41, 1700485571UL); /* 53 */
+  II ( d, a, b, c, in[ 3], S42, 2399980690UL); /* 54 */
+  II ( c, d, a, b, in[10], S43, 4293915773UL); /* 55 */
+  II ( b, c, d, a, in[ 1], S44, 2240044497UL); /* 56 */
+  II ( a, b, c, d, in[ 8], S41, 1873313359UL); /* 57 */
+  II ( d, a, b, c, in[15], S42, 4264355552UL); /* 58 */
+  II ( c, d, a, b, in[ 6], S43, 2734768916UL); /* 59 */
+  II ( b, c, d, a, in[13], S44, 1309151649UL); /* 60 */
+  II ( a, b, c, d, in[ 4], S41, 4149444226UL); /* 61 */
+  II ( d, a, b, c, in[11], S42, 3174756917UL); /* 62 */
+  II ( c, d, a, b, in[ 2], S43,  718787259UL); /* 63 */
+  II ( b, c, d, a, in[ 9], S44, 3951481745UL); /* 64 */
+
+  buf[0] += a;
+  buf[1] += b;
+  buf[2] += c;
+  buf[3] += d;
+}
+
+/*
+ ***********************************************************************
+ ** End of md5.c                                                      **
+ ******************************** (cut) ********************************
+ */
diff --git a/ax25/md5.h b/ax25/md5.h
new file mode 100644
index 0000000..fc45c8a
--- /dev/null
+++ b/ax25/md5.h
@@ -0,0 +1,69 @@
+
+/*
+ ***********************************************************************
+ ** md5.h -- header file for implementation of MD5                    **
+ ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **
+ ** Created: 2/17/90 RLR                                              **
+ ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               **
+ ** Revised (for MD5): RLR 4/27/91                                    **
+ **   -- G modified to have y&~z instead of y&z                       **
+ **   -- FF, GG, HH modified to add in last register done             **
+ **   -- Access pattern: round 2 works mod 5, round 3 works mod 3     **
+ **   -- distinct additive constant for each step                     **
+ **   -- round 4 added, working mod 7                                 **
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved.  **
+ **                                                                   **
+ ** License to copy and use this software is granted provided that    **
+ ** it is identified as the "RSA Data Security, Inc. MD5 Message-     **
+ ** Digest Algorithm" in all material mentioning or referencing this  **
+ ** software or this function.                                        **
+ **                                                                   **
+ ** License is also granted to make and use derivative works          **
+ ** provided that such works are identified as "derived from the RSA  **
+ ** Data Security, Inc. MD5 Message-Digest Algorithm" in all          **
+ ** material mentioning or referencing the derived work.              **
+ **                                                                   **
+ ** RSA Data Security, Inc. makes no representations concerning       **
+ ** either the merchantability of this software or the suitability    **
+ ** of this software for any particular purpose.  It is provided "as  **
+ ** is" without express or implied warranty of any kind.              **
+ **                                                                   **
+ ** These notices must be retained in any copies of any part of this  **
+ ** documentation and/or software.                                    **
+ ***********************************************************************
+ */
+
+#ifndef MD5_H
+#define MD5_H
+
+/* typedef a 32-bit type */
+#ifdef  _LP64
+typedef unsigned int UINT4;
+#else
+typedef unsigned long int UINT4;
+#endif
+
+/* Data structure for MD5 (Message-Digest) computation */
+typedef struct {
+  UINT4 i[2];                   /* number of _bits_ handled mod 2^64 */
+  UINT4 buf[4];                                    /* scratch buffer */
+  unsigned char in[64];                              /* input buffer */
+  unsigned char digest[16];     /* actual digest after MD5Final call */
+} MD5_CTX;
+
+void MD5Init(MD5_CTX *mdContext);
+void MD5Update(MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen);
+void MD5Final(MD5_CTX *mdContext);
+
+#endif
+
+/*
+ ***********************************************************************
+ ** End of md5.h                                                      **
+ ******************************** (cut) ********************************
+ */
diff --git a/ax25/mheard.1 b/ax25/mheard.1
new file mode 100644
index 0000000..b300aaf
--- /dev/null
+++ b/ax25/mheard.1
@@ -0,0 +1,74 @@
+.TH MHEARD 1 "19 August 1996" Linux "Linux Programmer's Manual"
+.SH NAME
+mheard \- display AX.25 calls recently heard.
+.SH SYNOPSIS
+.B mheard [-d cmns] [-n] [-o cfpt] [-v] [port...]
+.SH DESCRIPTION
+.LP
+.B Mheard
+displays information about most recently heard AX.25 callsigns, the interface
+upon which they were heard, the total packets heard, the time
+at which the last one was heard and other information.
+.B Mheard
+displays different information, in different orders depending on the
+settings of the arguments. Information on specific ports can be displayed by
+giving the port names as arguments.
+.SH OPTIONS
+.TP 13
+.BI "\-d cmns"
+Sets the information that is displayed for each AX.25 callsign heard. The
+different arguments are:
+.RS
+.TP 5
+.BI c
+Display all the information with regard to callsigns, from-callsign,
+to-callsign, port name, and any digipeaters that may be in use.
+.TP 5
+.BI m
+Display miscellaneous information, the from-callsign, port name, no frames
+heard, the last type of frames heard, and which different PIDs have been
+heard from that station.
+.TP 5
+.BI n
+Display the default information. This is the from-callsign, port name, no frames
+heard and the date and time last heard.
+.TP 5
+.BI s
+Displays statistics about the station heard, the from-callsign, port name,
+no I frames, no S frames, no U frames, time first heard, and time last
+heard.
+.RE
+.TP 13
+.BI \-n
+Supress the displaying of titles.
+.TP 13
+.BI "\-o cfpt"
+Sets the ordering of the information displayed. The meanings of the
+different arguments are:
+.RS
+.TP 5
+.BI c
+Sort list by from-callsign.
+.TP 5
+.BI f
+Sort list by number of frames heard.
+.TP 5
+.BI p
+Sort list by port name.
+.TP 5
+.BI t
+Sort list by the time last heard, this is the default.
+.RE
+.TP 13
+.BI \-v
+Display the version.
+.SH FILES
+.LP
+/var/ax25/mheard/mheard.dat
+.br
+/etc/ax25/axports
+.SH "SEE ALSO"
+.BR ax25 (4),
+.BR mheardd (8).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/ax25/mheard.c b/ax25/mheard.c
new file mode 100644
index 0000000..5aeacf4
--- /dev/null
+++ b/ax25/mheard.c
@@ -0,0 +1,375 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <config.h>
+
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/mheard.h>
+
+#include "../pathnames.h"
+
+struct PortRecord {
+	struct mheard_struct entry;
+	struct PortRecord *Next;
+};
+
+static char *types[] = {
+	"SABM",
+	"SABME",
+	"DISC",
+	"UA",
+	"DM",
+	"RR",
+	"RNR",
+	"REJ",
+	"FRMR",
+	"I",
+	"UI",
+	"????"};
+
+static struct PortRecord *PortList = NULL;
+
+static void PrintHeader(int data)
+{
+	switch (data) {
+		case 0:
+			printf("Callsign  Port Packets   Last Heard\n");
+			break;
+		case 1:
+			printf("Callsign                                                              Port\n");
+			break;
+		case 2:
+			printf("Callsign  Port      #I    #S    #U  First Heard          Last Heard\n");
+			break;
+		case 3:
+			printf("Callsign  Port Packets  Type  PIDs\n");
+			break;
+	}
+}
+
+static void PrintPortEntry(struct PortRecord *pr, int data)
+{
+	char lh[30], fh[30], *call, *s;
+	char buffer[80];
+	int i;
+
+	switch (data) {
+		case 0:
+			strcpy(lh, ctime(&pr->entry.last_heard));
+			lh[19] = 0;
+			call =  ax25_ntoa(&pr->entry.from_call);
+			if ((s = strstr(call, "-0")) != NULL)
+				*s = '\0';
+			printf("%-10s %-5s %5d   %s\n",
+				call, pr->entry.portname, pr->entry.count, lh);
+			break;
+		case 1:
+			buffer[0] = '\0';
+			call = ax25_ntoa(&pr->entry.from_call);
+			if ((s = strstr(call, "-0")) != NULL)
+				*s = '\0';
+			strcat(buffer, call);
+			call = ax25_ntoa(&pr->entry.to_call);
+			if ((s = strstr(call, "-0")) != NULL)
+				*s = '\0';
+			strcat(buffer, ">");
+			strcat(buffer, call);
+			for (i = 0; i < pr->entry.ndigis && i < 4; i++) {
+				strcat(buffer, ",");
+				call = ax25_ntoa(&pr->entry.digis[i]);
+				if ((s = strstr(call, "-0")) != NULL)
+					*s = '\0';
+				strcat(buffer, call);
+			}
+			if (pr->entry.ndigis >= 4)
+				strcat(buffer, ",...");
+			printf("%-70s %-5s\n",
+				buffer, pr->entry.portname);
+			break;
+		case 2:
+			strcpy(lh, ctime(&pr->entry.last_heard));
+			lh[19] = 0;
+			strcpy(fh, ctime(&pr->entry.first_heard));
+			fh[19] = 0;
+			call = ax25_ntoa(&pr->entry.from_call);
+			if ((s = strstr(call, "-0")) != NULL)
+				*s = '\0';
+			printf("%-10s %-5s %5d %5d %5d  %s  %s\n",
+				call, pr->entry.portname, pr->entry.iframes, pr->entry.sframes, pr->entry.uframes, fh, lh);
+			break;
+		case 3:
+			call = ax25_ntoa(&pr->entry.from_call);
+			if ((s = strstr(call, "-0")) != NULL)
+				*s = '\0';
+			printf("%-10s %-5s %5d %5s ",
+				call, pr->entry.portname, pr->entry.count, types[pr->entry.type]);
+			if (pr->entry.mode & MHEARD_MODE_ARP)
+				printf(" ARP");
+			if (pr->entry.mode & MHEARD_MODE_FLEXNET)
+				printf(" FlexNet");
+			if (pr->entry.mode & MHEARD_MODE_IP_DG)
+				printf(" IP-DG");
+			if (pr->entry.mode & MHEARD_MODE_IP_VC)
+				printf(" IP-VC");
+			if (pr->entry.mode & MHEARD_MODE_NETROM)
+				printf(" NET/ROM");
+			if (pr->entry.mode & MHEARD_MODE_ROSE)
+				printf(" Rose");
+			if (pr->entry.mode & MHEARD_MODE_SEGMENT)
+				printf(" Segment");
+			if (pr->entry.mode & MHEARD_MODE_TEXNET)
+				printf(" TexNet");
+			if (pr->entry.mode & MHEARD_MODE_TEXT)
+				printf(" Text");
+			if (pr->entry.mode & MHEARD_MODE_PSATFT)
+				printf(" PacsatFT");
+			if (pr->entry.mode & MHEARD_MODE_PSATPB)
+				printf(" PacsatPB");
+			if (pr->entry.mode & MHEARD_MODE_UNKNOWN)
+				printf(" Unknown");
+			printf("\n");
+			break;
+	}
+}
+
+static void ListAllPorts(int data)
+{
+	struct PortRecord *pr;
+
+	for (pr = PortList; pr != NULL; pr = pr->Next)
+		PrintPortEntry(pr, data);
+}
+
+static void ListOnlyPort(char *name, int data)
+{
+	struct PortRecord *pr;
+
+	for (pr = PortList; pr != NULL; pr = pr->Next)
+		if (strcmp(pr->entry.portname, name) == 0)
+			PrintPortEntry(pr, data);
+}
+
+static void LoadPortData(void)
+{
+	FILE *fp;
+	struct PortRecord *pr;
+	struct mheard_struct mheard;
+
+	if ((fp = fopen(DATA_MHEARD_FILE, "r")) == NULL) {
+		fprintf(stderr, "mheard: cannot open mheard data file\n");
+		exit(1);
+	}
+
+	while (fread(&mheard, sizeof(struct mheard_struct), 1, fp) == 1) {
+		pr = malloc(sizeof(struct PortRecord));
+		pr->entry = mheard;
+		pr->Next  = PortList;
+		PortList  = pr;
+	}
+
+	fclose(fp);
+}
+
+static void SortByTime(void)
+{
+	struct PortRecord *p = PortList;
+	struct PortRecord *n;
+	PortList = NULL;
+
+	while (p != NULL) {
+		struct PortRecord *w = PortList;
+
+		n = p->Next;
+
+		if (w == NULL || p->entry.last_heard > w->entry.last_heard) {
+			p->Next  = w;
+			PortList = p;
+			p = n;
+			continue;
+		}
+
+		while (w->Next != NULL && p->entry.last_heard <= w->Next->entry.last_heard)
+			w = w->Next;
+
+		p->Next = w->Next;
+		w->Next = p;
+		p = n;
+	}
+}
+
+
+static void SortByPort(void)
+{
+	struct PortRecord *p = PortList;
+	struct PortRecord *n;
+	PortList = NULL;
+
+	while (p != NULL) {
+		struct PortRecord *w = PortList;
+
+		n = p->Next;
+
+		if (w == NULL || strcmp(p->entry.portname, w->entry.portname) < 0) {
+			p->Next  = w;
+			PortList = p;
+			p = n;
+			continue;
+		}
+
+		while (w->Next != NULL && strcmp(p->entry.portname, w->Next->entry.portname) >= 0)
+			w = w->Next;
+
+		p->Next = w->Next;
+		w->Next = p;
+		p = n;
+	}
+}
+
+static void SortByCall(void)
+{
+	struct PortRecord *p = PortList;
+	struct PortRecord *n;
+	PortList = NULL;
+
+	while (p != NULL) {
+		struct PortRecord *w = PortList;
+
+		n = p->Next;
+
+		if (w == NULL || memcmp(&p->entry.from_call, &w->entry.from_call, sizeof(ax25_address)) < 0) {
+			p->Next  = w;
+			PortList = p;
+			p = n;
+			continue;
+		}
+
+		while (w->Next != NULL && memcmp(&p->entry.from_call, &w->Next->entry.from_call, sizeof(ax25_address)) >= 0)
+			w = w->Next;
+
+		p->Next = w->Next;
+		w->Next = p;
+		p = n;
+	}
+}
+
+static void SortByFrame(void)
+{
+	struct PortRecord *p = PortList;
+	struct PortRecord *n;
+	PortList = NULL;
+
+	while (p != NULL) {
+		struct PortRecord *w = PortList;
+
+		n = p->Next;
+
+		if (w == NULL || p->entry.count > w->entry.count) {
+			p->Next  = w;
+			PortList = p;
+			p = n;
+			continue;
+		}
+
+		while (w->Next != NULL && p->entry.count <= w->Next->entry.count)
+			w = w->Next;
+
+		p->Next = w->Next;
+		w->Next = p;
+		p = n;
+	}
+}
+		
+int main(int argc, char *argv[])
+{
+	int headers = TRUE;
+	int mode = 0;
+	int data = 0;
+	int c;
+
+	while ((c = getopt(argc, argv, "d:no:v")) != -1) {
+		switch (c) {
+			case 'd':
+				switch (*optarg) {
+					case 'c':
+						data = 1;
+						break;
+					case 'm':
+						data = 3;
+						break;
+					case 'n':
+						data = 0;
+						break;
+					case 's':
+						data = 2;
+						break;
+					default:
+						fprintf(stderr, "mheard: invalid display type '%s'\n", optarg);
+						return 1;
+				}
+				break;
+			case 'n':
+				headers = FALSE;
+				break;
+			case 'o':
+				switch (*optarg) {
+					case 'c':
+						mode = 2;
+						break;
+					case 'f':
+						mode = 3;
+						break;
+					case 'p':
+						mode = 1;
+						break;
+					case 't':
+						mode = 0;
+						break;
+					default:
+						fprintf(stderr, "mheard: invalid ordering type '%s'\n", optarg);
+						return 1;
+				}
+				break;
+			case 'v':
+				printf("mheard: %s\n", VERSION);
+				return 0;
+			case '?':
+			case ':':
+				fprintf(stderr, "Usage: %s [-d cmns] [-n] [-o cfpt] [-v] [port ...]\n", argv[0]);
+				return 1;
+		}
+	}
+	
+	LoadPortData();
+
+	switch (mode) {
+		case 0: SortByTime();  break;
+		case 1: SortByPort();  break;
+		case 2: SortByCall();  break;
+		case 3: SortByFrame(); break;
+	}
+
+	if (argc == optind) {
+		if (headers)
+			PrintHeader(data);
+		ListAllPorts(data);
+	} else {
+		while (argv[optind] != NULL) {
+			if (headers) {
+				printf("Port %s:\n", argv[optind]);
+				PrintHeader(data);
+			}
+			ListOnlyPort(argv[optind], data);
+			optind++;
+		}
+	}
+
+	return 0;
+}
diff --git a/ax25/mheard.dat b/ax25/mheard.dat
new file mode 100644
index 0000000..e69de29
diff --git a/ax25/mheardd.8 b/ax25/mheardd.8
new file mode 100644
index 0000000..c0dd200
--- /dev/null
+++ b/ax25/mheardd.8
@@ -0,0 +1,48 @@
+.TH MHEARDD 8 "27 August 1996" Linux "Linux Programmer's Manual"
+.SH NAME
+mheardd \- collect information about packet activity
+.SH SYNOPSIS
+.B mheardd [-f] [-l] [-n number] [-p [!]port1[,port2,..]] [-v]
+.SH DESCRIPTION
+.LP
+.B Mheardd
+is a daemon that collects the statistics about the activity on all the AX.25
+channels that are configured. The list generated is available for viewing by
+the
+.BR mheard (1)
+program. The information collected is a superset of the information normally
+collected by similar mheard programs and this is reflected in the options
+available for the viewing program. Logging to the system log file may be
+enabled which will enable monitoring of pathalogical conditions, for example
+invalid frame types and invalid/unknown protocol IDs.
+.SH OPTIONS
+.TP 10
+.BI \-f
+Deletes the existing mheard logging file at program startup, this is not the
+default.
+.TP 10
+.BI \-l
+Enables logging to the system log file. The default is off.
+.TP 10
+.BI "\-n number"
+Sets the number of entries in the activity list file, the default is 100. The
+minimum value allowed is 10 and the maximum is 1000.
+.TP 10
+.BI "\-p [!]port1[,port2,..]"
+With -p, you instruct mheardd to only listen on specified ax25 ports. 
+You may give more ports, seperated by ','.
+If you introduce the port(s) by a leading '!', then mheardd will listen
+on all ports except those you specified.
+.TP 10
+.BI \-v
+Display the version.
+.SH FILES
+.LP
+/var/ax25/mheard/mheard.dat
+.br
+/etc/ax25/axports
+.SH "SEE ALSO"
+.BR mheard (1),
+.BR ax25 (4).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/ax25/mheardd.c b/ax25/mheardd.c
new file mode 100644
index 0000000..3d45131
--- /dev/null
+++ b/ax25/mheardd.c
@@ -0,0 +1,478 @@
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <signal.h>
+#include <syslog.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#include <sys/socket.h>
+
+#ifdef __GLIBC__
+#include <net/ethernet.h>
+#else
+#include <linux/if_ether.h>
+#endif
+
+#include <netinet/in.h>
+
+#include <config.h>
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/daemon.h>
+#include <netax25/mheard.h>
+
+#include <config.h>
+
+#include "../pathnames.h"
+
+#define	KISS_MASK	0x0F
+#define	KISS_DATA	0x00
+
+#define	PID_SEGMENT	0x08
+#define	PID_ARP		0xCD
+#define	PID_NETROM	0xCF
+#define	PID_IP		0xCC
+#define	PID_ROSE	0x01
+#define	PID_TEXNET	0xC3
+#define	PID_FLEXNET	0xCE
+#define	PID_TEXT	0xF0
+#define	PID_PSATFT	0xBB
+#define	PID_PSATPB	0xBD
+
+#define	I		0x00
+#define	S		0x01
+#define	RR		0x01
+#define	RNR		0x05
+#define	REJ		0x09
+#define	U		0x03
+#define	SABM		0x2F
+#define	SABME		0x6F
+#define	DISC		0x43
+#define	DM		0x0F
+#define	UA		0x63
+#define	FRMR		0x87
+#define	UI		0x03
+
+#define	PF		0x10
+#define	EPF		0x01
+
+#define	MMASK		7
+
+#define	HDLCAEB		0x01
+#define	SSID		0x1E
+#define	SSSID_SPARE	0x40
+#define	ESSID_SPARE	0x20
+
+#define	ALEN		6
+#define	AXLEN		7
+
+struct mheard_list_struct {
+	int in_use;
+	struct mheard_struct entry;
+	long position;
+};
+
+static struct mheard_list_struct *mheard_list;
+#define	MHEARD_LIST_SIZE 1000
+static int    mheard_list_size = MHEARD_LIST_SIZE/10;
+static int    logging = FALSE;
+
+static int ftype(unsigned char *, int *, int);
+static struct mheard_list_struct *findentry(ax25_address *, char *);
+
+static void terminate(int sig)
+{
+	if (logging) {
+		syslog(LOG_INFO, "terminating on SIGTERM\n");
+		closelog();
+	}
+
+	exit(0);
+}
+
+int main(int argc, char **argv)
+{
+	struct mheard_list_struct *mheard;
+	unsigned char buffer[1500], *data;
+	int size, s;
+	char *port = NULL;
+	struct sockaddr sa;
+	socklen_t asize;
+	long position;
+	int ctlen, type, end, extseq, flush = FALSE;
+	FILE *fp;
+	char *p;
+	char ports[1024];
+	int ports_excl = 0;
+
+	*ports = 0;
+	while ((s = getopt(argc, argv, "fln:p:v")) != -1) {
+		switch (s) {
+			case 'l':
+				logging = TRUE;
+				break;
+			case 'f':
+				flush = TRUE;
+				break;
+			case 'n':
+				mheard_list_size = atoi(optarg);
+				if (mheard_list_size < 10 || mheard_list_size > MHEARD_LIST_SIZE) {
+					fprintf(stderr, "mheardd: list size must be between 10 and %d\n", MHEARD_LIST_SIZE);
+					return 1;
+				}
+				break;
+			case 'p':
+				if (strlen(optarg) > sizeof(ports)-4) {
+					fprintf(stderr, "mheardd: too many ports specified.");
+					return 1;
+				}
+				if (*optarg == '!') {
+					ports_excl = 1;
+					optarg++;
+				}
+				sprintf(ports, "|%s|", optarg);
+				for (p = ports; *p; p++) {
+					if (*p == ' ' || *p == ',')
+						*p = '|';
+				}
+				break;
+			case 'v':
+				printf("mheardd: %s\n", VERSION);
+				return 0;
+			case ':':
+				fprintf(stderr, "mheardd: option -n needs an argument\n");
+				return 1;
+			case '?':
+				fprintf(stderr, "Usage: mheardd [-f] [-l] [-n number] [-p [!]port1[,port2,..]] [-v]\n");
+				return 1;
+		}
+	}
+
+	signal(SIGTERM, terminate);
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "mheardd: no AX.25 port data configured\n");
+		return 1;
+	}
+
+	if ((mheard_list = calloc(mheard_list_size, sizeof(struct mheard_list_struct))) == NULL) {
+		fprintf(stderr, "mheardd: cannot allocate memory\n");
+		return 1;
+	}
+
+	if (flush)
+		unlink(DATA_MHEARD_FILE);
+
+	/* Load an existing heard list */
+	if ((fp = fopen(DATA_MHEARD_FILE, "r")) != NULL) {
+		s = 0;
+		position = ftell(fp);
+
+		while (fread(buffer, sizeof(struct mheard_struct), 1, fp) == 1 && s < mheard_list_size) {
+			memcpy(&mheard_list[s].entry, buffer, sizeof(struct mheard_struct));
+			mheard_list[s].in_use   = TRUE;
+			mheard_list[s].position = position;
+			position = ftell(fp);
+			s++;
+		}
+		
+		fclose(fp);
+	} else {
+		if ((fp = fopen(DATA_MHEARD_FILE, "w")) != NULL)
+			fclose(fp);
+	}
+
+	if ((s = socket(PF_PACKET, SOCK_PACKET, htons(ETH_P_AX25))) == -1) {
+		perror("mheardd: socket");
+		return 1;
+	}
+	
+	if (!daemon_start(FALSE)) {
+		fprintf(stderr, "mheardd: cannot become a daemon\n");
+		return 1;
+	}
+
+	/* Use syslog for error messages rather than perror/fprintf */
+	if (logging) {
+		openlog("mheardd", LOG_PID, LOG_DAEMON);
+		syslog(LOG_INFO, "starting");
+	}
+
+	for (;;) {
+		asize = sizeof(sa);
+
+		if ((size = recvfrom(s, buffer, sizeof(buffer), 0, &sa, &asize)) == -1) {
+			if (logging) {
+				syslog(LOG_ERR, "recv: %m");
+				closelog();
+			}
+			return 1;
+		}
+		
+		if ((port = ax25_config_get_name(sa.sa_data)) == NULL) {
+			if (logging)
+				syslog(LOG_WARNING, "unknown port '%s'\n", sa.sa_data);
+			continue;
+		}
+		if (*ports) {
+			char testport[sizeof(sa.sa_data)+2];
+			sprintf(testport, "|%s|", sa.sa_data);
+			if (ports_excl) {
+				if (strstr(ports, testport)) {
+					continue;
+				}
+			} else {
+				if (!strstr(ports, testport)) {
+					continue;
+				}
+			}
+		}
+
+		data = buffer;
+
+		if ((*data & KISS_MASK) != KISS_DATA)
+			continue;
+
+		data++;
+		size--;
+
+		if (size < (AXLEN + AXLEN + 1)) {
+			if (logging)
+				syslog(LOG_WARNING, "packet too short\n");
+			continue;
+		}
+
+		mheard = findentry((ax25_address *)(data + AXLEN), port);
+
+		if (!ax25_validate(data + 0) || !ax25_validate(data + AXLEN)) {
+			if (logging)
+				syslog(LOG_WARNING, "invalid callsign on port %s\n", port);
+			continue;
+		}
+
+		memcpy(&mheard->entry.from_call, data + AXLEN, sizeof(ax25_address));
+		memcpy(&mheard->entry.to_call,   data + 0,     sizeof(ax25_address));
+		strcpy(mheard->entry.portname,   port);
+		mheard->entry.ndigis = 0;
+
+		extseq = ((data[AXLEN + ALEN] & SSSID_SPARE) != SSSID_SPARE);
+		end    = (data[AXLEN + ALEN] & HDLCAEB);
+
+		data += (AXLEN + AXLEN);
+		size -= (AXLEN + AXLEN);
+
+		while (!end) {
+			memcpy(&mheard->entry.digis[mheard->entry.ndigis], data, sizeof(ax25_address));
+			mheard->entry.ndigis++;
+			
+			end = (data[ALEN] & HDLCAEB);
+			
+			data += AXLEN;
+			size -= AXLEN;
+		}
+
+		if (size == 0) {
+			if (logging)
+				syslog(LOG_WARNING, "packet too short\n");
+			continue;
+		}
+
+		ctlen = ftype(data, &type, extseq);
+
+		mheard->entry.count++;
+
+		switch (type) {
+			case SABM:
+				mheard->entry.type = MHEARD_TYPE_SABM;
+				mheard->entry.uframes++;
+				break;
+			case SABME:
+				mheard->entry.type = MHEARD_TYPE_SABME;
+				mheard->entry.uframes++;
+				break;
+			case DISC:
+				mheard->entry.type = MHEARD_TYPE_DISC;
+				mheard->entry.uframes++;
+				break;
+			case UA:
+				mheard->entry.type = MHEARD_TYPE_UA;
+				mheard->entry.uframes++;
+				break;
+			case DM:
+				mheard->entry.type = MHEARD_TYPE_DM;
+				mheard->entry.uframes++;
+				break;
+			case RR:
+				mheard->entry.type = MHEARD_TYPE_RR;
+				mheard->entry.sframes++;
+				break;
+			case RNR:
+				mheard->entry.type = MHEARD_TYPE_RNR;
+				mheard->entry.sframes++;
+				break;
+			case REJ:
+				mheard->entry.type = MHEARD_TYPE_REJ;
+				mheard->entry.sframes++;
+				break;
+			case FRMR:
+				mheard->entry.type = MHEARD_TYPE_FRMR;
+				mheard->entry.uframes++;
+				break;
+			case I:
+				mheard->entry.type = MHEARD_TYPE_I;
+				mheard->entry.iframes++;
+				break;
+			case UI:
+				mheard->entry.type = MHEARD_TYPE_UI;
+				mheard->entry.uframes++;
+				break;
+			default:
+				if (logging)
+					syslog(LOG_WARNING, "unknown packet type %02X\n", *data);
+				mheard->entry.type = MHEARD_TYPE_UNKNOWN;
+				break;
+		}
+
+		data += ctlen;
+		size -= ctlen;
+
+		if (type == I || type == UI) {
+			switch (*data) {
+				case PID_TEXT:
+					mheard->entry.mode |= MHEARD_MODE_TEXT;
+					break;
+				case PID_SEGMENT:
+					mheard->entry.mode |= MHEARD_MODE_SEGMENT;
+					break;
+				case PID_ARP:
+					mheard->entry.mode |= MHEARD_MODE_ARP;
+					break;
+				case PID_NETROM:
+					mheard->entry.mode |= MHEARD_MODE_NETROM;
+					break;
+				case PID_IP:
+					mheard->entry.mode |= (type == I) ? MHEARD_MODE_IP_VC : MHEARD_MODE_IP_DG;
+					break;
+				case PID_ROSE:
+					mheard->entry.mode |= MHEARD_MODE_ROSE;
+					break;
+				case PID_TEXNET:
+					mheard->entry.mode |= MHEARD_MODE_TEXNET;
+					break;
+				case PID_FLEXNET:
+					mheard->entry.mode |= MHEARD_MODE_FLEXNET;
+					break;
+				case PID_PSATPB:
+					mheard->entry.mode |= MHEARD_MODE_PSATPB;
+					break;
+				case PID_PSATFT:
+					mheard->entry.mode |= MHEARD_MODE_PSATFT;
+					break;
+				default:
+					if (logging)
+						syslog(LOG_WARNING, "unknown PID %02X\n", *data);
+					mheard->entry.mode |= MHEARD_MODE_UNKNOWN;
+					break;
+			}
+		}
+		
+		if (mheard->entry.first_heard == 0)
+			time(&mheard->entry.first_heard);
+			
+		time(&mheard->entry.last_heard);
+
+		if ((fp = fopen(DATA_MHEARD_FILE, "r+")) == NULL) {
+			if (logging)
+				syslog(LOG_ERR, "cannot open mheard data file\n");
+			continue;
+		}
+		
+		if (mheard->position == 0xFFFFFF) {
+			fseek(fp, 0L, SEEK_END);
+			mheard->position = ftell(fp);
+		}
+
+		fseek(fp, mheard->position, SEEK_SET);
+		
+		fwrite(&mheard->entry, sizeof(struct mheard_struct), 1, fp);
+		
+		fclose(fp);
+	}
+}
+
+static int ftype(unsigned char *data, int *type, int extseq)
+{
+	if (extseq) {
+		if ((*data & 0x01) == 0) {	/* An I frame is an I-frame ... */
+			*type = I;
+			return 2;
+		}
+		if (*data & 0x02) {
+			*type = *data & ~PF;
+			return 1;
+		} else {
+			*type = *data;
+			return 2;
+		}
+	} else {
+		if ((*data & 0x01) == 0) {	/* An I frame is an I-frame ... */
+			*type = I;
+			return 1;
+		}
+		if (*data & 0x02) {		/* U-frames use all except P/F bit for type */
+			*type = *data & ~PF;
+			return 1;
+		} else {			/* S-frames use low order 4 bits for type */
+			*type = *data & 0x0F;
+			return 1;
+		}
+	}
+}
+
+static struct mheard_list_struct *findentry(ax25_address *callsign, char *port)
+{
+	struct mheard_list_struct *oldest = NULL;
+	int i;
+	
+	for (i = 0; i < mheard_list_size; i++)
+		if (mheard_list[i].in_use &&
+		    ax25_cmp(&mheard_list[i].entry.from_call, callsign) == 0 &&
+		    strcmp(mheard_list[i].entry.portname, port) == 0)
+			return mheard_list + i;
+
+	for (i = 0; i < mheard_list_size; i++) {
+		if (!mheard_list[i].in_use) {
+			mheard_list[i].in_use   = TRUE;
+			mheard_list[i].position = 0xFFFFFF;
+			return mheard_list + i;
+		}
+	}
+
+	for (i = 0; i < mheard_list_size; i++) {
+		if (mheard_list[i].in_use) {
+			if (oldest == NULL) {
+				oldest = mheard_list + i;
+			} else {
+				if (mheard_list[i].entry.last_heard < oldest->entry.last_heard)
+					oldest = mheard_list + i;
+			}
+		}
+	}
+
+	memset(&oldest->entry, 0x00, sizeof(struct mheard_struct));
+
+	return oldest;
+}
+
diff --git a/ax25/rxecho.8 b/ax25/rxecho.8
new file mode 100644
index 0000000..70fb846
--- /dev/null
+++ b/ax25/rxecho.8
@@ -0,0 +1,38 @@
+.TH RXECHO 8 "15 October 1996" Linux "Linux System Managers Manual"
+.SH NAME
+rxecho \- Route AX.25 packets between ports transparently.
+.SH SYNOPSIS
+.B rxecho [-l] [-v]
+.SH DESCRIPTION
+.LP
+.B Rxecho
+copies AX.25 frames between interfaces without altering their contents. The
+purpose of this utility is to allow other AX.25 aware programs/computers to
+share the same AX.25 ports as the Linux kernel AX.25 code. It could be used
+to route packets out onto another serial port to allow another machine
+running DOS based programs to share the same radio ports as the Linux
+machine, or it could route packets out onto a pseudo-tty to another
+application on the same machine. The copying could even be to another
+radio port.
+.LP
+The copying of the packets is controlled by a configuration file
+rxecho.conf(5), which can be set up to selectively copy packets.
+.SH OPTIONS
+.TP 10
+.BI \-l
+Enables logging of errors to the system log, the default is off.
+.TP 10
+.BI \-v
+Display the version.
+.SH FILES
+.nf
+/etc/ax25/axports
+.br
+/etc/ax25/rxecho.conf
+.fi
+.SH "SEE ALSO"
+.BR axports (5),
+.BR rxecho.conf (5),
+.BR kissattach (8).
+.SH AUTHOR
+Tomi Manninen OH2BNS <oh2bns at sral.fi>
diff --git a/ax25/rxecho.c b/ax25/rxecho.c
new file mode 100644
index 0000000..7acb156
--- /dev/null
+++ b/ax25/rxecho.c
@@ -0,0 +1,510 @@
+/*
+ * rxecho.c - Copies AX.25 packets from an interface to another interface.
+ *            Reads CONFIGFILE (see below) and uses that information to
+ *            decide what packets should be copied and where.
+ *
+ *            CONFIGFILE format is:
+ *
+ *              # this is a comment
+ *              144	kiss0	oh2bns-1,oh2bns-2
+ *              kiss0	144	*
+ *
+ *            This means that packets received on port 144 are copied to port
+ *            kiss0 if they are destined to oh2bns-1 or oh2bns-2. Packets
+ *            from port kiss0 are all copied to port 144.
+ *
+ *            There may be empty lines and an arbirary amount of white
+ *            space around the tokens but the callsign field must not
+ *            have any spaces in it. There can be up to MAXCALLS call-
+ *            signs in the callsign field (see below).
+ *
+ * Copyright (C) 1996 by Tomi Manninen, OH2BNS, <oh2bns at sral.fi>.
+ *
+ * *** Modified 9/9/96 by Heikki Hannikainen, OH7LZB, <oh7lzb at sral.fi>:
+ *
+ *            One port can actually be echoed to multiple ports (with a
+ *            different recipient callsign, of course). The old behaviour was
+ *            to give up on the first matching port, even if the recipient
+ *            callsign didn't match (and the frame wasn't echoed anywhere).
+ *
+ * *** 20021206 dl9sau:
+ * 	      - fixed a bug preventing echo to multible ports; it may also
+ *              lead to retransmission on the interface where it came from
+ *            - fixed problem that frames via sendto(...,alen) had a wrong
+ *              protocol (because alen became larger than the size of
+ *              struct sockaddr).
+ *            - sockaddr_pkt is the right struct for recvfrom/sendto on
+ *              type SOCK_PACKET family AF_INET sockets.
+ *	      - added support for new PF_PACKET family with sockaddr_ll
+ *
+ * ***
+ *
+ * This program 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <signal.h>
+#include <sys/types.h>
+
+#include <config.h>
+
+#include <sys/socket.h>
+
+/*
+ * dl9sau:
+ * uncomment this if you have problems with sockaddr_pkt.
+ * sockaddr_pkt is the right way for type SOCK_PACKET on family AF_INET sockets.
+ * especially because the "sockaddr" on recvfrom is truncated (internaly
+ * it's sockaddr_pkt) -- and because we use this sockaddr for retransmitting,
+ * it's really better to use the sockaddr_spkt.
+ * default is to use SOCKADDR_SPKT
+ */
+#define	USE_SOCKADDR_SPKT	1
+
+/* dl9sau: since linux 2.2.x, SOCK_PACKET is obsolete  */
+#define	USE_SOCKADDR_SLL	1
+
+#ifdef	USE_SOCKADDR_SLL
+#undef	USE_SOCKADDR_SPKT
+#endif
+
+#include <features.h>    /* for the glibc version number */
+#if __GLIBC__ >= 2
+#ifdef	USE_SOCKADDR_SPKT
+#include <net/if_packet.h>
+#endif
+#ifdef	USE_SOCKADDR_SLL
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <netpacket/packet.h>
+#endif
+#include <net/ethernet.h>
+#else
+#if defined(USE_SOCKADDR_SPKT) || defined(USE_SOCKADDR_SLL)
+#include <asm/types.h>
+#include <linux/if_packet.h>
+#endif
+#include <linux/if_ether.h>
+#endif
+
+#include <netinet/in.h>
+
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/daemon.h>
+
+#include "../pathnames.h"
+
+#define MAXCALLS	8
+
+struct config {
+	char		from[14];	/* sockaddr.sa_data is 14 bytes	*/
+	int		from_idx;
+	char		to[14];
+	int		to_idx;
+	ax25_address	calls[MAXCALLS];/* list of calls to echo	*/
+	int		ncalls;		/* number of calls to echo	*/
+
+	struct config	*next;
+};
+
+static int logging = FALSE;
+
+static void terminate(int sig)
+{
+	if (logging) {
+		syslog(LOG_INFO, "terminating on SIGTERM\n");
+		closelog();
+	}
+	
+	exit(0);
+}
+
+/*
+ * Read string "call1,call2,call3,..." into p.
+ */
+static int read_calls(struct config *p, char *s)
+{
+	char *cp, *cp1;
+
+	if (p == NULL || s == NULL)
+		return -1;
+
+	p->ncalls = 0;
+
+	if (strcmp(s, "*") == 0)
+		return 0;
+
+	cp = s;
+
+	while ((cp1 = strchr(cp, ',')) != NULL && p->ncalls < MAXCALLS) {
+		*cp1 = 0;
+
+		if (ax25_aton_entry(cp, p->calls[p->ncalls].ax25_call) == -1)
+			return -1;
+
+		p->ncalls++;
+		cp = ++cp1;
+	}
+
+	if (p->ncalls < MAXCALLS) {
+		if (ax25_aton_entry(cp, p->calls[p->ncalls].ax25_call) == -1)
+			return -1;
+
+		p->ncalls++;
+	}
+
+	return p->ncalls;
+}
+
+static struct config *readconfig(void)
+{
+	FILE *fp;
+	char line[80], *cp, *dev;
+	struct config *p, *list = NULL;
+
+	if ((fp = fopen(CONF_RXECHO_FILE, "r")) == NULL) {
+		fprintf(stderr, "rxecho: cannot open config file\n");
+		return NULL;
+	}
+
+	while (fgets(line, 80, fp) != NULL) {
+		cp = strtok(line, " \t\r\n");
+
+		if (cp == NULL || cp[0] == '#')
+			continue;
+
+		if ((p = calloc(1, sizeof(struct config))) == NULL) {
+			perror("rxecho: malloc");
+			return NULL;
+		}
+
+		if ((dev = ax25_config_get_dev(cp)) == NULL) {
+			fprintf(stderr, "rxecho: invalid port name - %s\n", cp);
+			return NULL;
+		}
+
+		strcpy(p->from, dev);
+		p->from_idx = -1;
+
+		if ((cp = strtok(NULL, " \t\r\n")) == NULL) {
+			fprintf(stderr, "rxecho: config file error.\n");
+			return NULL;
+		}
+
+		if ((dev = ax25_config_get_dev(cp)) == NULL) {
+			fprintf(stderr, "rxecho: invalid port name - %s\n", cp);
+			return NULL;
+		}
+
+		strcpy(p->to, dev);
+		p->to_idx = -1;
+
+		if (read_calls(p, strtok(NULL, " \t\r\n")) == -1) {
+			fprintf(stderr, "rxecho: config file error.\n");
+			return NULL;
+		}
+
+		p->next = list;
+		list = p;
+	}
+
+	fclose(fp);
+
+	if (list == NULL)
+		fprintf(stderr, "rxecho: Empty config file!\n");
+
+	return list;
+}
+
+/*
+ *	Slightly modified from linux/include/net/ax25.h and 
+ *	linux/net/ax25/ax25_subr.c:
+ */
+
+#if 0
+#define C_COMMAND	1
+#define C_RESPONSE	2
+#define LAPB_C		0x80
+#endif
+#define LAPB_E		0x01
+#define AX25_ADDR_LEN	7
+#define AX25_REPEATED	0x80
+
+typedef struct {
+	ax25_address calls[AX25_MAX_DIGIS];
+	unsigned char repeated[AX25_MAX_DIGIS];
+	char ndigi;
+	char lastrepeat;
+} ax25_digi;
+
+/*
+ *	Given an AX.25 address pull of to, from, digi list, and the start of data.
+ */
+static unsigned char *ax25_parse_addr(unsigned char *buf, int len, ax25_address *src, ax25_address *dest, ax25_digi *digi)
+{
+	int d = 0;
+	
+	if (len < 14) return NULL;
+		
+#if 0
+	if (flags != NULL) {
+		*flags = 0;
+	
+		if (buf[6] & LAPB_C) {
+			*flags = C_COMMAND;
+		}
+
+		if (buf[13] & LAPB_C) {
+			*flags = C_RESPONSE;
+		}
+	}
+		
+	if (dama != NULL) 
+		*dama = ~buf[13] & DAMA_FLAG;
+#endif
+		
+	/* Copy to, from */
+	if (dest != NULL) 
+		memcpy(dest, buf + 0, AX25_ADDR_LEN);
+
+	if (src != NULL)  
+		memcpy(src,  buf + 7, AX25_ADDR_LEN);
+
+	buf += 2 * AX25_ADDR_LEN;
+	len -= 2 * AX25_ADDR_LEN;
+
+	digi->lastrepeat = -1;
+	digi->ndigi      = 0;
+	
+	while (!(buf[-1] & LAPB_E)) {
+		if (d >= AX25_MAX_DIGIS)  return NULL;	/* Max of 6 digis */
+		if (len < 7) return NULL;		/* Short packet */
+
+		if (digi != NULL) {
+			memcpy(&digi->calls[d], buf, AX25_ADDR_LEN);
+			digi->ndigi = d + 1;
+
+			if (buf[6] & AX25_REPEATED) {
+				digi->repeated[d] = 1;
+				digi->lastrepeat  = d;
+			} else {
+				digi->repeated[d] = 0;
+			}
+		}
+
+		buf += AX25_ADDR_LEN;
+		len -= AX25_ADDR_LEN;
+		d++;
+	}
+
+	return buf;
+}
+
+/*
+ * Check if frame should be echoed. Return 0 if it should and -1 if not.
+ */
+static int check_calls(struct config *cfg, unsigned char *buf, int len)
+{
+	ax25_address dest;
+	ax25_digi digi;
+	ax25_address *axp;
+	int i;
+
+	if ((buf[0] & 0x0F) != 0)
+		return -1;			/* don't echo non-data	*/
+
+	if (cfg->ncalls == 0)
+		return 0;			/* copy everything	*/
+
+	if (ax25_parse_addr(++buf, --len, NULL, &dest, &digi) == NULL)
+		return -1;			/* invalid ax.25 header	*/
+
+	/*
+	 * If there are no digis or all digis are already repeated
+	 * use destination address. Else use first non-repeated digi.
+	 */
+	if (digi.ndigi == 0 || digi.ndigi == digi.lastrepeat + 1)
+		axp = &dest;
+	else
+		axp = &digi.calls[digi.lastrepeat + 1];
+
+	for (i = 0; i < cfg->ncalls; i++)
+		if (ax25_cmp(&cfg->calls[i], axp) == 0)
+			return 0;
+
+	return -1;
+}
+
+int main(int argc, char **argv)
+{
+#ifdef	USE_SOCKADDR_SLL
+	struct sockaddr_ll sll;
+	struct sockaddr *psa = (struct sockaddr *)&sll;
+	const socklen_t sa_len = sizeof(struct sockaddr_ll);
+	int from_idx;
+#else
+#ifdef	USE_SOCKADDR_SPKT
+	struct sockaddr_pkt spkt;
+	struct sockaddr *psa = (struct sockaddr *)&spkt;
+	const int sa_len = sizeof(struct sockaddr_pkt);
+#else
+	struct sockaddr sa_generic;
+	struct sockaddr *psa = (struct sockaddr *)&sa_generic;
+	const int sa_len = sizeof(struct sockaddr);
+#endif
+	char from_dev_name[sizeof(psa->sa_data)];
+#endif
+	int s, size;
+	socklen_t alen;
+	unsigned char buf[1500];
+	struct config *p, *list;
+
+	while ((s = getopt(argc, argv, "lv")) != -1) {
+		switch (s) {
+			case 'l':
+				logging = TRUE;
+				break;
+			case 'v':
+				printf("rxecho: %s\n", VERSION);
+				return 0;
+			default:
+				fprintf(stderr, "usage: rxecho [-l] [-v]\n");
+				return 1;
+		}
+	}
+
+	signal(SIGTERM, terminate);
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "rxecho: no AX.25 port data configured\n");
+		return 1;
+	}
+
+	if ((list = readconfig()) == NULL)
+		return 1;
+
+#ifdef	USE_SOCKADDR_SLL
+	if ((s = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_AX25))) == -1) {
+#else
+	if ((s = socket(AF_INET, SOCK_PACKET, htons(ETH_P_AX25))) == -1) {
+#endif
+		perror("rxecho: socket:");
+		return 1;
+	}
+
+#ifdef	USE_SOCKADDR_SLL
+	for (p = list; p != NULL; p = p->next) {
+		int i;
+
+		for (i = 0; i < 2; i++) {
+			struct config *q;
+			struct ifreq ifr;
+			char *p_name = (i ? p->to : p->from);
+			int *p_idx = (i ? &p->to_idx : &p->from_idx);
+
+			/* already set?  */
+			if (*p_idx >= 0)
+				continue;
+			strncpy(ifr.ifr_name, p_name, sizeof(ifr.ifr_name)-1);
+			ifr.ifr_name[sizeof(ifr.ifr_name)-1] = 0;
+			if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
+				perror("SIOCGIFINDEX");
+				return 1;
+			}
+			*p_idx = ifr.ifr_ifindex;
+			for (q = p->next; q != NULL; q = q->next) {
+				if (q->from_idx < 0 && !strcmp(q->from, p_name))
+					q->from_idx = *p_idx;
+				if (q->to_idx < 0 && !strcmp(q->to, p_name))
+					q->to_idx = *p_idx;
+			}
+		}
+	}
+#endif
+
+	if (!daemon_start(FALSE)) {
+		fprintf(stderr, "rxecho: cannot become a daemon\n");
+		close(s);
+		return 1;
+	}
+
+	if (logging) {
+		openlog("rxecho", LOG_PID, LOG_DAEMON);
+		syslog(LOG_INFO, "starting");
+	}
+
+	for (;;) {
+ 		alen = sa_len;
+
+		if ((size = recvfrom(s, buf, 1500, 0, psa, &alen)) == -1) {
+			if (logging) {
+				syslog(LOG_ERR, "recvfrom: %m");
+				closelog();
+			}
+			return 1;
+		}
+
+#ifdef	USE_SOCKADDR_SLL
+		from_idx = sll.sll_ifindex;
+#else
+		/*
+		 * dl9sau: save the names of the iface the frame came from;
+		 * we'll overwrite psa->sa_data it for sendto() and need the
+		 * name again when multiplexing to more than one iface
+		 */
+		strncpy(from_dev_name, psa->sa_data, sizeof(from_dev_name)-1);
+		from_dev_name[sizeof(from_dev_name)-1] = 0;
+#endif
+
+		for (p = list; p != NULL; p = p->next)
+#ifdef	USE_SOCKADDR_SLL
+ 			if (p->from_idx == from_idx && (check_calls(p, buf, size) == 0)) {
+ 				sll.sll_ifindex = p->to_idx;
+#else
+ 			if ((strcmp(p->from, from_dev_name) == 0) && (check_calls(p, buf, size) == 0)) {
+ 				strcpy(psa->sa_data, p->to);
+#endif
+				/*
+				 * cave: alen (set by recvfrom()) may > salen
+				 *   which means it may point beyound of the
+				 *   end of the struct. thats why we use the
+				 *   correct len (sa_len). this fixes a bug
+				 *   where skpt->protocol on sockaddr structs
+				 *   pointed behind the struct, leading to
+				 *   funny protocol IDs.
+				 *   btw, the linux kernel internaly always
+				 *   maps to sockaddr to sockaddr_pkt
+				 *   on sockets of type SOCK_PACKET on family
+				 *   AF_INET. sockaddr_pkt is len 18, sockaddr
+				 *   is 16.
+				 */
+				if (sendto(s, buf, size, 0, psa, sa_len) == -1) {
+					if (logging) {
+						syslog(LOG_ERR, "sendto: %m");
+						closelog();
+					}
+				}
+			}
+	}
+}
diff --git a/ax25/rxecho.conf b/ax25/rxecho.conf
new file mode 100644
index 0000000..0bb498c
--- /dev/null
+++ b/ax25/rxecho.conf
@@ -0,0 +1,12 @@
+# /etc/ax25/rxecho.conf
+#
+# This means that packets received on port '1' are copied to port '2' if they
+# are destined to oh2bns-1 or oh2bns-2. All packets from port '2' are copied
+# to port '1'.
+#
+# There may be empty lines and an arbirary amount of white space around the
+# tokens but the callsign field must not have any spaces in it. There can be
+# up to MAXCALLS callsigns in the callsign field.
+#
+1	2	oh2bns-1,oh2bns-2
+2	1	*
diff --git a/ax25/rxecho.conf.5 b/ax25/rxecho.conf.5
new file mode 100644
index 0000000..105c45b
--- /dev/null
+++ b/ax25/rxecho.conf.5
@@ -0,0 +1,22 @@
+.TH RXECHO.CONF 5 "2 August 1996" Linux "Linux Programmer's Manual"
+.SH NAME
+rxecho.conf \- control rxecho AX.25 packet routing.
+.SH DESCRIPTION
+.LP
+.B Rxecho.conf
+controls the copying of packets between AX.25 ports performed by the program
+rxecho. The format of the configuration file is:
+
+portin	portout		* | callsign...
+
+Each entry in the file represents a one-way packet flow between ports. Any
+packet received on portin is copied to portout, if its destination callsign
+or the next callsign to digipeat the frame is in the list of callsigns. If
+the callsign list is replaced by a \(lq*\(rq then all packets are copied.
+The configuration file may contain comments that begin with a #.
+.SH FILES
+.LP
+/etc/ax25/rxecho.conf
+.SH "SEE ALSO"
+.BR axports (8),
+.BR rxecho (8).
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..56825f4
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,158 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `gethostname' function. */
+#undef HAVE_GETHOSTNAME
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mkdir' function. */
+#undef HAVE_MKDIR
+
+/* Define to 1 if you have the <paths.h> header file. */
+#undef HAVE_PATHS_H
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if you have the `socket' function. */
+#undef HAVE_SOCKET
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strspn' function. */
+#undef HAVE_STRSPN
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
+
+/* Define to 1 if the system has the type `struct ax25_fwd_struct'. */
+#undef HAVE_STRUCT_AX25_FWD_STRUCT
+
+/* Define to 1 if the system has the type `struct rose_facilities_struct'. */
+#undef HAVE_STRUCT_ROSE_FACILITIES_STRUCT
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `wait3' system call. Deprecated, you should no
+   longer depend upon `wait3'. */
+#undef HAVE_WAIT3
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* Define to 1 if the `setpgrp' function takes no argument. */
+#undef SETPGRP_VOID
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
diff --git a/configure b/configure
new file mode 100755
index 0000000..811bb35
--- /dev/null
+++ b/configure
@@ -0,0 +1,7702 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for ax25-tools 0.0.10-rc4.
+#
+# Report bugs to <linux-hams at vger.kernel.org>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  # We cannot yet assume a decent shell, so we have to provide a
+	# neutralization value for shells without unset; and this also
+	# works around shells that cannot unset nonexistent variables.
+	# Preserve -v and -x to the replacement shell.
+	BASH_ENV=/dev/null
+	ENV=/dev/null
+	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+	export CONFIG_SHELL
+	case $- in # ((((
+	  *v*x* | *x*v* ) as_opts=-vx ;;
+	  *v* ) as_opts=-v ;;
+	  *x* ) as_opts=-x ;;
+	  * ) as_opts= ;;
+	esac
+	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org and
+$0: linux-hams at vger.kernel.org about your system, including
+$0: any error possibly output before this message. Then
+$0: install a modern shell, or manually run the script
+$0: under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='ax25-tools'
+PACKAGE_TARNAME='ax25-tools'
+PACKAGE_VERSION='0.0.10-rc4'
+PACKAGE_STRING='ax25-tools 0.0.10-rc4'
+PACKAGE_BUGREPORT='linux-hams at vger.kernel.org'
+PACKAGE_URL=''
+
+ac_unique_file="ax25/ax25d.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+EXTRAVERSION
+BASEVERSION
+LIBOBJS
+EGREP
+GREP
+HAVE_FLTK_FALSE
+HAVE_FLTK_TRUE
+FLTK_LIB
+UTIL_LIB
+NCURSES_LIB
+AX25IO_LIB
+AX25_LIB
+Z_LIB
+HAVE_X_FALSE
+HAVE_X_TRUE
+X_EXTRA_LIBS
+X_LIBS
+X_PRE_LIBS
+X_CFLAGS
+CPP
+XMKMF
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+with_x
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC
+XMKMF
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures ax25-tools 0.0.10-rc4 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/ax25-tools]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+X features:
+  --x-includes=DIR    X include files are in DIR
+  --x-libraries=DIR   X library files are in DIR
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of ax25-tools 0.0.10-rc4:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-x                use the X Window System
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  XMKMF       Path to xmkmf, Makefile generator for X Window System
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <linux-hams at vger.kernel.org>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+ax25-tools configure 0.0.10-rc4
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ----------------------------------------- ##
+## Report this to linux-hams at vger.kernel.org ##
+## ----------------------------------------- ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+	 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+	    return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval \${$4+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_member
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by ax25-tools $as_me 0.0.10-rc4, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+am__api_version='1.11'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='ax25-tools'
+ VERSION='0.0.10-rc4'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+
+# Check whether --with-x was given.
+if test "${with_x+set}" = set; then :
+  withval=$with_x;
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+  # The user explicitly disabled X.
+  have_x=disabled
+else
+  case $x_includes,$x_libraries in #(
+    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
+    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -f -r conftest.dir
+if mkdir conftest.dir; then
+  cd conftest.dir
+  cat >Imakefile <<'_ACEOF'
+incroot:
+	@echo incroot='${INCROOT}'
+usrlibdir:
+	@echo usrlibdir='${USRLIBDIR}'
+libdir:
+	@echo libdir='${LIBDIR}'
+_ACEOF
+  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+    for ac_var in incroot usrlibdir libdir; do
+      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+    done
+    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+    for ac_extension in a so sl dylib la dll; do
+      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
+	ac_im_usrlibdir=$ac_im_libdir; break
+      fi
+    done
+    # Screen out bogus values from the imake configuration.  They are
+    # bogus both because they are the default anyway, and because
+    # using them would break gcc on systems where it needs fixed includes.
+    case $ac_im_incroot in
+	/usr/include) ac_x_includes= ;;
+	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+    esac
+    case $ac_im_usrlibdir in
+	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
+	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+    esac
+  fi
+  cd ..
+  rm -f -r conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R7/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R7
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R7/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R7
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+  # Guess where to find include files, by looking for Xlib.h.
+  # First, try using that file with no special directory specified.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+  for ac_dir in $ac_x_header_dirs; do
+  if test -r "$ac_dir/X11/Xlib.h"; then
+    ac_x_includes=$ac_dir
+    break
+  fi
+done
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+  # Check for the libraries.
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS=$LIBS
+  LIBS="-lX11 $LIBS"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+int
+main ()
+{
+XrmInitialize ()
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+  LIBS=$ac_save_LIBS
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+  # Don't even attempt the hair of trying to link an X program!
+  for ac_extension in a so sl dylib la dll; do
+    if test -r "$ac_dir/libX11.$ac_extension"; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+case $ac_x_includes,$ac_x_libraries in #(
+  no,* | *,no | *\'*)
+    # Didn't find X, or a directory has "'" in its name.
+    ac_cv_have_x="have_x=no";; #(
+  *)
+    # Record where we found X for the cache.
+    ac_cv_have_x="have_x=yes\
+	ac_x_includes='$ac_x_includes'\
+	ac_x_libraries='$ac_x_libraries'"
+esac
+fi
+;; #(
+    *) have_x=yes;;
+  esac
+  eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
+  no_x=yes
+else
+  # If each of the values was on the command line, it overrides each guess.
+  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+  # Update the cache value to reflect the command line values.
+  ac_cv_have_x="have_x=yes\
+	ac_x_includes='$x_includes'\
+	ac_x_libraries='$x_libraries'"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+fi
+
+if test "$no_x" = yes; then
+  # Not all programs may use this symbol, but it does not hurt to define it.
+
+$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
+
+  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+  if test -n "$x_includes"; then
+    X_CFLAGS="$X_CFLAGS -I$x_includes"
+  fi
+
+  # It would also be nice to do this for all -L options, not just this one.
+  if test -n "$x_libraries"; then
+    X_LIBS="$X_LIBS -L$x_libraries"
+    # For Solaris; some versions of Sun CC require a space after -R and
+    # others require no space.  Words are not sufficient . . . .
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
+$as_echo_n "checking whether -R must be followed by a space... " >&6; }
+    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+    ac_xsave_c_werror_flag=$ac_c_werror_flag
+    ac_c_werror_flag=yes
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       X_LIBS="$X_LIBS -R$x_libraries"
+else
+  LIBS="$ac_xsave_LIBS -R $x_libraries"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	  X_LIBS="$X_LIBS -R $x_libraries"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
+$as_echo "neither works" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    ac_c_werror_flag=$ac_xsave_c_werror_flag
+    LIBS=$ac_xsave_LIBS
+  fi
+
+  # Check for system-dependent libraries X programs must link with.
+  # Do this before checking for the system-independent R6 libraries
+  # (-lICE), since we may need -lsocket or whatever for X linking.
+
+  if test "$ISC" = yes; then
+    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+  else
+    # Martyn Johnson says this is needed for Ultrix, if the X
+    # libraries were built with DECnet support.  And Karl Berry says
+    # the Alpha needs dnet_stub (dnet does not exist).
+    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XOpenDisplay ();
+int
+main ()
+{
+return XOpenDisplay ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
+if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dnet_dnet_ntoa=yes
+else
+  ac_cv_lib_dnet_dnet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
+if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+  ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+    fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LIBS="$ac_xsave_LIBS"
+
+    # msh at cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+    # to get the SysV transport functions.
+    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+    # needs -lnsl.
+    # The nsl library prevents programs from opening the X display
+    # on Irix 5.2, according to T.E. Dickey.
+    # The functions gethostbyname, getservbyname, and inet_addr are
+    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
+
+fi
+
+    if test $ac_cv_func_gethostbyname = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_nsl_gethostbyname=yes
+else
+  ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+      if test $ac_cv_lib_nsl_gethostbyname = no; then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
+$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
+if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_bsd_gethostbyname=yes
+else
+  ac_cv_lib_bsd_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
+$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+fi
+
+      fi
+    fi
+
+    # lieder at skyler.mavd.honeywell.com says without -lsocket,
+    # socket/setsockopt and other routines are undefined under SCO ODT
+    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
+    # on later versions), says Simon Leinen: it contains gethostby*
+    # variants that don't use the name server (or something).  -lsocket
+    # must be given before -lnsl if both are needed.  We assume that
+    # if connect needs -lnsl, so does gethostbyname.
+    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+if test "x$ac_cv_func_connect" = xyes; then :
+
+fi
+
+    if test $ac_cv_func_connect = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
+$as_echo_n "checking for connect in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_connect+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+int
+main ()
+{
+return connect ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_connect=yes
+else
+  ac_cv_lib_socket_connect=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
+$as_echo "$ac_cv_lib_socket_connect" >&6; }
+if test "x$ac_cv_lib_socket_connect" = xyes; then :
+  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+    fi
+
+    # Guillermo Gomez says -lposix is necessary on A/UX.
+    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
+if test "x$ac_cv_func_remove" = xyes; then :
+
+fi
+
+    if test $ac_cv_func_remove = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
+$as_echo_n "checking for remove in -lposix... " >&6; }
+if ${ac_cv_lib_posix_remove+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+int
+main ()
+{
+return remove ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_posix_remove=yes
+else
+  ac_cv_lib_posix_remove=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
+$as_echo "$ac_cv_lib_posix_remove" >&6; }
+if test "x$ac_cv_lib_posix_remove" = xyes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+    fi
+
+    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
+if test "x$ac_cv_func_shmat" = xyes; then :
+
+fi
+
+    if test $ac_cv_func_shmat = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
+$as_echo_n "checking for shmat in -lipc... " >&6; }
+if ${ac_cv_lib_ipc_shmat+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+int
+main ()
+{
+return shmat ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ipc_shmat=yes
+else
+  ac_cv_lib_ipc_shmat=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
+$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
+if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+    fi
+  fi
+
+  # Check for libraries that X11R6 Xt/Xaw programs need.
+  ac_save_LDFLAGS=$LDFLAGS
+  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+  # check for ICE first), but we must link in the order -lSM -lICE or
+  # we get undefined symbols.  So assume we have SM if we have ICE.
+  # These have to be linked with before -lX11, unlike the other
+  # libraries we check for below, so use a different variable.
+  # John Interrante, Karl Berry
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
+$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
+if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char IceConnectionNumber ();
+int
+main ()
+{
+return IceConnectionNumber ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+  ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
+  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+fi
+
+  LDFLAGS=$ac_save_LDFLAGS
+
+fi
+
+ if test -z "$no_x"; then
+  HAVE_X_TRUE=
+  HAVE_X_FALSE='#'
+else
+  HAVE_X_TRUE='#'
+  HAVE_X_FALSE=
+fi
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5
+$as_echo_n "checking for zlibVersion in -lz... " >&6; }
+if ${ac_cv_lib_z_zlibVersion+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char zlibVersion ();
+int
+main ()
+{
+return zlibVersion ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_zlibVersion=yes
+else
+  ac_cv_lib_z_zlibVersion=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5
+$as_echo "$ac_cv_lib_z_zlibVersion" >&6; }
+if test "x$ac_cv_lib_z_zlibVersion" = xyes; then :
+  Z_LIB="-lz"
+else
+  Z_LIB=
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ax25_config_load_ports in -lax25" >&5
+$as_echo_n "checking for ax25_config_load_ports in -lax25... " >&6; }
+if ${ac_cv_lib_ax25_ax25_config_load_ports+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lax25  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ax25_config_load_ports ();
+int
+main ()
+{
+return ax25_config_load_ports ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ax25_ax25_config_load_ports=yes
+else
+  ac_cv_lib_ax25_ax25_config_load_ports=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ax25_ax25_config_load_ports" >&5
+$as_echo "$ac_cv_lib_ax25_ax25_config_load_ports" >&6; }
+if test "x$ac_cv_lib_ax25_ax25_config_load_ports" = xyes; then :
+  AX25_LIB="-lax25"
+else
+  as_fn_error $? "Could not find the libax25 libraries; aborting" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5
+$as_echo_n "checking for initscr in -lncurses... " >&6; }
+if ${ac_cv_lib_ncurses_initscr+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lncurses  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char initscr ();
+int
+main ()
+{
+return initscr ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ncurses_initscr=yes
+else
+  ac_cv_lib_ncurses_initscr=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5
+$as_echo "$ac_cv_lib_ncurses_initscr" >&6; }
+if test "x$ac_cv_lib_ncurses_initscr" = xyes; then :
+  NCURSES_LIB="-lncurses"
+else
+  NCURSES_LIB=
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
+$as_echo_n "checking for openpty in -lutil... " >&6; }
+if ${ac_cv_lib_util_openpty+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char openpty ();
+int
+main ()
+{
+return openpty ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_util_openpty=yes
+else
+  ac_cv_lib_util_openpty=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
+$as_echo "$ac_cv_lib_util_openpty" >&6; }
+if test "x$ac_cv_lib_util_openpty" = xyes; then :
+  UTIL_LIB="-lutil"
+else
+  UTIL_LIB=
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lGL" >&5
+$as_echo_n "checking for main in -lGL... " >&6; }
+if ${ac_cv_lib_GL_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGL ${X_LIBS} ${X_PRE_LIBS} -lXi -lXext -lX11 ${X_EXTRA_LIBS} $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_GL_main=yes
+else
+  ac_cv_lib_GL_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_main" >&5
+$as_echo "$ac_cv_lib_GL_main" >&6; }
+if test "x$ac_cv_lib_GL_main" = xyes; then :
+  GL_LIB="-lGL"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lMesaGL" >&5
+$as_echo_n "checking for main in -lMesaGL... " >&6; }
+if ${ac_cv_lib_MesaGL_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lMesaGL ${X_LIBS} ${X_PRE_LIBS} -lXi -lXext -lX11 ${X_EXTRA_LIBS} $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_MesaGL_main=yes
+else
+  ac_cv_lib_MesaGL_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_MesaGL_main" >&5
+$as_echo "$ac_cv_lib_MesaGL_main" >&6; }
+if test "x$ac_cv_lib_MesaGL_main" = xyes; then :
+  GL_LIB="-lMesaGL"
+else
+  GL_LIB=
+fi
+
+fi
+
+if test -n "$GL_LIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lfltk" >&5
+$as_echo_n "checking for main in -lfltk... " >&6; }
+if ${ac_cv_lib_fltk_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfltk ${GL_LIB} ${X_LIBS} ${X_PRE_LIBS} -lXi -lXext -lX11 ${X_EXTRA_LIBS} $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_fltk_main=yes
+else
+  ac_cv_lib_fltk_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fltk_main" >&5
+$as_echo "$ac_cv_lib_fltk_main" >&6; }
+if test "x$ac_cv_lib_fltk_main" = xyes; then :
+  FLTK_LIB="-lfltk $GL_LIB $X_PRE_LIBS -lXi -lXext -lX11 $X_EXTRA_LIBS"
+else
+  FLTK_LIB=
+fi
+
+fi
+ if test -n "$FLTK_LIB" ; then
+  HAVE_FLTK_TRUE=
+  HAVE_FLTK_FALSE='#'
+else
+  HAVE_FLTK_TRUE='#'
+  HAVE_FLTK_FALSE=
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
+$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
+if ${ac_cv_header_sys_wait_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_sys_wait_h=yes
+else
+  ac_cv_header_sys_wait_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
+$as_echo "$ac_cv_header_sys_wait_h" >&6; }
+if test $ac_cv_header_sys_wait_h = yes; then
+
+$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in fcntl.h limits.h paths.h strings.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h zlib.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ac_fn_c_check_type "$LINENO" "struct ax25_fwd_struct" "ac_cv_type_struct_ax25_fwd_struct" "#include <netax25/ax25.h>
+"
+if test "x$ac_cv_type_struct_ax25_fwd_struct" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_AX25_FWD_STRUCT 1
+_ACEOF
+
+
+else
+  as_fn_error $? "Both glibc and libax25 are too old or both installed" "$LINENO" 5
+fi
+
+ac_fn_c_check_member "$LINENO" "struct nr_route_struct" "ndigis" "ac_cv_member_struct_nr_route_struct_ndigis" "#include <netrom/netrom.h>
+"
+if test "x$ac_cv_member_struct_nr_route_struct_ndigis" = xyes; then :
+
+else
+  as_fn_error $? "Both glibc and libax25 are too old or both installed" "$LINENO" 5
+fi
+
+ac_fn_c_check_type "$LINENO" "struct rose_facilities_struct" "ac_cv_type_struct_rose_facilities_struct" "#include <netax25/ax25.h>	/* Or <netrose/rose.h> will blow up */
+	#include <netrose/rose.h>
+
+"
+if test "x$ac_cv_type_struct_rose_facilities_struct" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_ROSE_FACILITIES_STRUCT 1
+_ACEOF
+
+
+else
+  as_fn_error $? "Both glibc and libax25 are too old or both installed" "$LINENO" 5
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset cs;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_const=yes
+else
+  ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if ${ac_cv_type_uid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then :
+  ac_cv_type_uid_t=yes
+else
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "#define uid_t int" >>confdefs.h
+
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_time=yes
+else
+  ac_cv_header_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if ${ac_cv_struct_tm+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+				     int *p = &tm.tm_sec;
+				     return !p;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_struct_tm=time.h
+else
+  ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+
+if test $ac_cv_c_compiler_gnu = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+$as_echo_n "checking whether $CC needs -traditional... " >&6; }
+if ${ac_cv_prog_gcc_traditional+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    ac_pattern="Autoconf.*'x'"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sgtty.h>
+Autoconf TIOCGETP
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+  ac_cv_prog_gcc_traditional=yes
+else
+  ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+  if test $ac_cv_prog_gcc_traditional = no; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <termio.h>
+Autoconf TCGETA
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+  ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+  if test $ac_cv_prog_gcc_traditional = yes; then
+    CC="$CC -traditional"
+  fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
+$as_echo_n "checking for working memcmp... " >&6; }
+if ${ac_cv_func_memcmp_working+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_memcmp_working=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+  /* Some versions of memcmp are not 8-bit clean.  */
+  char c0 = '\100', c1 = '\200', c2 = '\201';
+  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
+    return 1;
+
+  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
+     or more and with at least one buffer not starting on a 4-byte boundary.
+     William Lewis provided this test program.   */
+  {
+    char foo[21];
+    char bar[21];
+    int i;
+    for (i = 0; i < 4; i++)
+      {
+	char *a = foo + i;
+	char *b = bar + i;
+	strcpy (a, "--------01111111");
+	strcpy (b, "--------10000000");
+	if (memcmp (a, b, 16) >= 0)
+	  return 1;
+      }
+    return 0;
+  }
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_memcmp_working=yes
+else
+  ac_cv_func_memcmp_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
+$as_echo "$ac_cv_func_memcmp_working" >&6; }
+test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
+  *" memcmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+ ;;
+esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
+$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
+if ${ac_cv_func_setpgrp_void+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+/* If this system has a BSD-style setpgrp which takes arguments,
+  setpgrp(1, 1) will fail with ESRCH and return -1, in that case
+  exit successfully. */
+  return setpgrp (1,1) != -1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_setpgrp_void=no
+else
+  ac_cv_func_setpgrp_void=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
+$as_echo "$ac_cv_func_setpgrp_void" >&6; }
+if test $ac_cv_func_setpgrp_void = yes; then
+
+$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if ${ac_cv_type_signal+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_type_signal=int
+else
+  ac_cv_type_signal=void
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+for ac_func in strftime
+do :
+  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRFTIME 1
+_ACEOF
+
+else
+  # strftime is in -lintl on SCO UNIX.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
+$as_echo_n "checking for strftime in -lintl... " >&6; }
+if ${ac_cv_lib_intl_strftime+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strftime ();
+int
+main ()
+{
+return strftime ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_strftime=yes
+else
+  ac_cv_lib_intl_strftime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
+$as_echo "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = xyes; then :
+  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wait3 that fills in rusage" >&5
+$as_echo_n "checking for wait3 that fills in rusage... " >&6; }
+if ${ac_cv_func_wait3_rusage+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_wait3_rusage=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <sys/wait.h>
+/* HP-UX has wait3 but does not fill in rusage at all.  */
+int
+main ()
+{
+  struct rusage r;
+  int i;
+  /* Use a field that we can force nonzero --
+     voluntary context switches.
+     For systems like NeXT and OSF/1 that don't set it,
+     also use the system CPU time.  And page faults (I/O) for Linux.  */
+  r.ru_nvcsw = 0;
+  r.ru_stime.tv_sec = 0;
+  r.ru_stime.tv_usec = 0;
+  r.ru_majflt = r.ru_minflt = 0;
+  switch (fork ())
+    {
+    case 0: /* Child.  */
+      sleep(1); /* Give up the CPU.  */
+      _exit(0);
+      break;
+    case -1: /* What can we do?  */
+      _exit(0);
+      break;
+    default: /* Parent.  */
+      wait3(&i, 0, &r);
+      /* Avoid "text file busy" from rm on fast HP-UX machines.  */
+      sleep(2);
+      return (r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
+	      && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
+    }
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_wait3_rusage=yes
+else
+  ac_cv_func_wait3_rusage=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_wait3_rusage" >&5
+$as_echo "$ac_cv_func_wait3_rusage" >&6; }
+if test $ac_cv_func_wait3_rusage = yes; then
+
+$as_echo "#define HAVE_WAIT3 1" >>confdefs.h
+
+fi
+
+for ac_func in gethostname gettimeofday mkdir select socket strdup strerror strspn strstr strtol strtoul uname
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+if test "x$GCC" = "xyes"; then
+  if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
+    CFLAGS="$CFLAGS -Wall"
+  fi
+fi
+
+basever=$(echo $PACKAGE_VERSION | sed -e 's at -.*$@@')
+BASEVERSION=$basever
+
+extraver=$(echo $PACKAGE_VERSION | sed -e 's@[^-]*-@@' -e 's at -@_@')
+EXTRAVERSION=$extraver
+
+
+ac_config_files="$ac_config_files netrom/Makefile tcpip/Makefile ax25/Makefile ax25/axgetput/Makefile Makefile rose/Makefile user_call/Makefile kiss/Makefile 6pack/Makefile hdlcutil/Makefile hdlcutil/fl/Makefile yamdrv/Makefile dmascc/Makefile ax25-tools.spec"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_X_TRUE}" && test -z "${HAVE_X_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_X\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_FLTK_TRUE}" && test -z "${HAVE_FLTK_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_FLTK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by ax25-tools $as_me 0.0.10-rc4, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <linux-hams at vger.kernel.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+ax25-tools config.status 0.0.10-rc4
+configured by $0, generated by GNU Autoconf 2.68,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "netrom/Makefile") CONFIG_FILES="$CONFIG_FILES netrom/Makefile" ;;
+    "tcpip/Makefile") CONFIG_FILES="$CONFIG_FILES tcpip/Makefile" ;;
+    "ax25/Makefile") CONFIG_FILES="$CONFIG_FILES ax25/Makefile" ;;
+    "ax25/axgetput/Makefile") CONFIG_FILES="$CONFIG_FILES ax25/axgetput/Makefile" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "rose/Makefile") CONFIG_FILES="$CONFIG_FILES rose/Makefile" ;;
+    "user_call/Makefile") CONFIG_FILES="$CONFIG_FILES user_call/Makefile" ;;
+    "kiss/Makefile") CONFIG_FILES="$CONFIG_FILES kiss/Makefile" ;;
+    "6pack/Makefile") CONFIG_FILES="$CONFIG_FILES 6pack/Makefile" ;;
+    "hdlcutil/Makefile") CONFIG_FILES="$CONFIG_FILES hdlcutil/Makefile" ;;
+    "hdlcutil/fl/Makefile") CONFIG_FILES="$CONFIG_FILES hdlcutil/fl/Makefile" ;;
+    "yamdrv/Makefile") CONFIG_FILES="$CONFIG_FILES yamdrv/Makefile" ;;
+    "dmascc/Makefile") CONFIG_FILES="$CONFIG_FILES dmascc/Makefile" ;;
+    "ax25-tools.spec") CONFIG_FILES="$CONFIG_FILES ax25-tools.spec" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..18030d9
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,85 @@
+AC_PREREQ(2.59)
+AC_INIT(ax25-tools, 0.0.10-rc4, linux-hams at vger.kernel.org)
+AC_CONFIG_SRCDIR(ax25/ax25d.c)
+AM_INIT_AUTOMAKE([1.7])
+
+AC_CONFIG_HEADERS(config.h)
+
+dnl Checks for programs.
+AC_PROG_AWK
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_INSTALL
+
+dnl Check for X and set a conditional
+AC_PATH_XTRA
+AM_CONDITIONAL(HAVE_X, test -z "$no_x")
+
+dnl Checks for libraries.
+AC_SUBST(Z_LIB)
+AC_SUBST(AX25_LIB)
+AC_SUBST(AX25IO_LIB)
+AC_SUBST(NCURSES_LIB)
+AC_SUBST(UTIL_LIB)
+AC_SUBST(FLTK_LIB)
+AC_CHECK_LIB(z, zlibVersion,Z_LIB="-lz",Z_LIB=)
+AC_CHECK_LIB(ax25, ax25_config_load_ports, AX25_LIB="-lax25", AC_MSG_ERROR([Could not find the libax25 libraries; aborting]))
+AC_CHECK_LIB(ncurses, initscr,NCURSES_LIB="-lncurses",NCURSES_LIB=)
+AC_CHECK_LIB(util, openpty, UTIL_LIB="-lutil",UTIL_LIB=)
+AC_CHECK_LIB(GL, main, GL_LIB="-lGL",
+  AC_CHECK_LIB(MesaGL, main, GL_LIB="-lMesaGL", GL_LIB=, ${X_LIBS} ${X_PRE_LIBS} -lXi -lXext -lX11 ${X_EXTRA_LIBS}),${X_LIBS} ${X_PRE_LIBS} -lXi -lXext -lX11 ${X_EXTRA_LIBS})
+if test -n "$GL_LIB"; then
+  AC_CHECK_LIB(fltk, main, FLTK_LIB="-lfltk $GL_LIB $X_PRE_LIBS -lXi -lXext -lX11 $X_EXTRA_LIBS", FLTK_LIB=, ${GL_LIB} ${X_LIBS} ${X_PRE_LIBS} -lXi -lXext -lX11 ${X_EXTRA_LIBS})
+fi
+AM_CONDITIONAL(HAVE_FLTK, test -n "$FLTK_LIB" )
+
+
+dnl Checks for header files.
+dnl AC_PATH_X
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS(fcntl.h limits.h paths.h strings.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h zlib.h)
+
+dnl Checks for working glibc 2.1 headers
+AC_CHECK_TYPES([struct ax25_fwd_struct], [],
+	[AC_MSG_ERROR([Both glibc and libax25 are too old or both installed])],
+	[[#include <netax25/ax25.h>]])
+AC_CHECK_MEMBER([struct nr_route_struct.ndigis], [],
+	[AC_MSG_ERROR([Both glibc and libax25 are too old or both installed])],
+	[[#include <netrom/netrom.h>]])
+AC_CHECK_TYPES([struct rose_facilities_struct], [],
+	[AC_MSG_ERROR([Both glibc and libax25 are too old or both installed])],
+	[[#include <netax25/ax25.h>	/* Or <netrose/rose.h> will blow up */
+	#include <netrose/rose.h>
+	]])
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_UID_T
+AC_TYPE_PID_T
+AC_HEADER_TIME
+AC_STRUCT_TM
+
+dnl Checks for library functions.
+AC_PROG_GCC_TRADITIONAL
+AC_FUNC_MEMCMP
+AC_FUNC_SETPGRP
+AC_TYPE_SIGNAL
+AC_FUNC_STRFTIME
+AC_FUNC_WAIT3
+AC_CHECK_FUNCS(gethostname gettimeofday mkdir select socket strdup strerror strspn strstr strtol strtoul uname)
+
+dnl Only use -Wall if we have gcc
+if test "x$GCC" = "xyes"; then
+  if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
+    CFLAGS="$CFLAGS -Wall"
+  fi
+fi
+
+basever=$(echo $PACKAGE_VERSION | sed -e 's at -.*$@@')
+AC_SUBST(BASEVERSION, [$basever])
+extraver=$(echo $PACKAGE_VERSION | sed -e 's@@<:@^-@:>@*-@@' -e 's at -@_@')
+AC_SUBST(EXTRAVERSION, [$extraver])
+
+AC_CONFIG_FILES([netrom/Makefile tcpip/Makefile ax25/Makefile ax25/axgetput/Makefile Makefile rose/Makefile user_call/Makefile kiss/Makefile 6pack/Makefile hdlcutil/Makefile hdlcutil/fl/Makefile yamdrv/Makefile dmascc/Makefile ax25-tools.spec])
+AC_OUTPUT
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..25a39e6
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,708 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2012-03-27.16; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
+
+# This program 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 2, or (at your option)
+# any later version.
+
+# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by 'PROGRAMS ARGS'.
+  object      Object file output by 'PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputting dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+# A tabulation character.
+tab='	'
+# A newline character.
+nl='
+'
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u='sed s,\\\\,/,g'
+   depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+   # This is just like msvc7 but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u='sed s,\\\\,/,g'
+   depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+   gccflag=-qmakedep=gcc,-MF
+   depmode=gcc
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the "deleted header file" problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' "$nl" < "$tmpdepfile" |
+## Some versions of gcc put a space before the ':'.  On the theory
+## that the space means something, we add a space to the output as
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+      | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like '#:fec' to the end of the
+    # dependency line.
+    tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr "$nl" ' ' >> "$depfile"
+    echo >> "$depfile"
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' "$nl" < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts '$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form 'foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # '$object: dependent.h' and one to simply 'dependent.h:'.
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
+  # However on
+  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using '\':
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+  # tcc 0.9.26 (FIXME still under development at the moment of writing)
+  # will emit a similar output, but also prepend the continuation lines
+  # with horizontal tabulation characters.
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form 'foo.o: dependent.h',
+  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # '$object: dependent.h' and one to simply 'dependent.h:'.
+  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
+    < "$tmpdepfile" > "$depfile"
+  sed '
+    s/[ '"$tab"'][ '"$tab"']*/ /g
+    s/^ *//
+    s/ *\\*$//
+    s/^[^:]*: *//
+    /^$/d
+    /:$/d
+    s/$/ :/
+  ' < "$tmpdepfile" >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add 'dependent.h:' lines.
+    sed -ne '2,${
+	       s/^ *//
+	       s/ \\*$//
+	       s/$/:/
+	       p
+	     }' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in 'foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test "$stat" = 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/'"$tab"'/
+  G
+  p
+}' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove '-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for ':'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' "$nl" < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no eat=no
+  for arg
+  do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove '-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/dmascc/Makefile.am b/dmascc/Makefile.am
new file mode 100644
index 0000000..45bd335
--- /dev/null
+++ b/dmascc/Makefile.am
@@ -0,0 +1,13 @@
+
+sbin_PROGRAMS = dmascc_cfg
+
+dmascc_cfg_SOURCE = dmascc_cfg.c
+
+man_MANS = dmascc_cfg.1
+
+EXTRA_DIST = $(man_MANS) $(doc_DATA)
+
+doc_DATA = README.dmascc
+
+installconf:
+
diff --git a/dmascc/Makefile.in b/dmascc/Makefile.in
new file mode 100644
index 0000000..28cd40a
--- /dev/null
+++ b/dmascc/Makefile.in
@@ -0,0 +1,615 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+sbin_PROGRAMS = dmascc_cfg$(EXEEXT)
+subdir = dmascc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+	"$(DESTDIR)$(docdir)"
+PROGRAMS = $(sbin_PROGRAMS)
+dmascc_cfg_SOURCES = dmascc_cfg.c
+dmascc_cfg_OBJECTS = dmascc_cfg.$(OBJEXT)
+dmascc_cfg_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = dmascc_cfg.c
+DIST_SOURCES = dmascc_cfg.c
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+DATA = $(doc_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+dmascc_cfg_SOURCE = dmascc_cfg.c
+man_MANS = dmascc_cfg.1
+EXTRA_DIST = $(man_MANS) $(doc_DATA)
+doc_DATA = README.dmascc
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dmascc/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu dmascc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+dmascc_cfg$(EXEEXT): $(dmascc_cfg_OBJECTS) $(dmascc_cfg_DEPENDENCIES) $(EXTRA_dmascc_cfg_DEPENDENCIES) 
+	@rm -f dmascc_cfg$(EXEEXT)
+	$(LINK) $(dmascc_cfg_OBJECTS) $(dmascc_cfg_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dmascc_cfg.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man1: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man1dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.1[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man1dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.1[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+install-docDATA: $(doc_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+	done
+
+uninstall-docDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-docDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-docDATA uninstall-man uninstall-sbinPROGRAMS
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-sbinPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-docDATA install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-man1 \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-sbinPROGRAMS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-docDATA uninstall-man uninstall-man1 \
+	uninstall-sbinPROGRAMS
+
+
+installconf:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dmascc/README.dmascc b/dmascc/README.dmascc
new file mode 100644
index 0000000..1091c93
--- /dev/null
+++ b/dmascc/README.dmascc
@@ -0,0 +1,94 @@
+The dmascc_cfg utility
+======================
+
+Use this utility to configure the dmascc driver.
+
+Usage:
+------
+
+dmascc_cfg <interface> [ options ... ]
+
+Options:
+--------
+
+--show		Show all configurable parameters for this port.
+		May be specified at any time by any user.
+
+All other options change parameters and thus may only be specified by root
+and only when the interface is down.
+
+f ... floating-point argument, i ... integer argument.
+
+--frequency f	Set frequency of baud rate generator. A value of 0 disables
+		the baud rate generator and the digital PLL. Use the
+		--show option to check whether the frequency you selected
+		could be approximated with sufficient accuracy.
+
+--nrzi 0 | 1	0 selects NRZ mode, 1 selects NRZI mode.
+
+--clocks i	Set clock mode. You may OR together three choices (other
+		values are not supported and may cause strange results):
+
+		TX clock pin:		0x00	input
+					0x05	output TX clock *
+					0x06	output baud rate generator *
+					0x07	output digital PLL *
+
+		TX clock source:	0x00	RX clock pin
+					0x08	TX clock pin #
+					0x10	baud rate generator
+					0x18	digital PLL +
+
+		RX clock source:	0x00	RX clock pin
+					0x20	TX clock pin
+					0x40	baud rate generator
+					0x60	digital PLL +
+
+		* Not allowed on PI2 Port A if J3 is installed.
+		# TX clock pin must be configured as input
+		+ The BRG frequency must be equal to 32 times the baud rate.
+
+--txdelay f	Set the transmit delay (in ms).
+
+--txpause f	Set the delay (in ms) between two transmitted packets.
+		This parameter sometimes helps to reduce RX FIFO overruns,
+		if the receiving station has a slower CPU than the
+		transmitting station and cannot re-initialize the SCC's
+		receiver quickly enough.
+
+--txtimeout f	Set the time (in ms), after which the transmitter may
+		not squeeze in another packet, but rather has to go
+		off-air.
+
+--txtail f	Set the time (in ms) between the end of the last packet
+		and the RTS line actually going inactive.
+
+--rtsoff f	Set the DCD settling time (in ms) after switching off the
+		transmitter. During this period the DCD line is being
+		ignored. This parameter is especially useful for the
+		S5SCC/DMA, which frequently generates short DCD pulses
+		after switching from TX to RX.
+
+--dcdon f	Set the DCD settling time (in ms) after the DCD line has
+		become active. This parameter should be < txdelay.
+
+--dcdoff f	Set the DCD settling time (in ms) after the DCD line has
+		become inactive. This parameter should be >= rtsoff.
+
+--slottime f	Set the slot time (in ms).
+
+--persist i	Set the persistence parameter (1 <= i <= 256). After the
+		DCD off settling time has expired, the driver waits
+		random(0..255)/persist*slottime before activating the
+		RTS line. Integer arithmetic is being performed;
+		persist==256 thus means zero delay in any case (which only
+		makes sense in a two-station scenario).
+
+--waittime f	Set the minimum time (in ms) before a station may start
+		transmitting again (after the RTS off settling time has
+		expired). This value should be larger than
+		255/persist*slottime.
+
+--dma i		Set the DMA channel (-1, 0, 1, or 3). -1 disables DMA.
+		0 is only valid on the S5SCC/DMA. Remember, DMA can be
+		used only on channel A (dmascc0, dmascc2, and so on).
diff --git a/dmascc/dmascc_cfg.1 b/dmascc/dmascc_cfg.1
new file mode 100644
index 0000000..f5884ea
--- /dev/null
+++ b/dmascc/dmascc_cfg.1
@@ -0,0 +1,101 @@
+.TH DMASCC_CFG 1 "30 June 1999" Linux "Linux Programmer's Manual"
+.SH NAME
+dmascc_cfg \- Configure dmascc devices
+.SH SYNOPSIS
+.B dmascc <interface> [<options>]
+.SH DESCRIPTION
+.LP
+.B dmascc_cfg
+is used to configure dmascc devices such as PI2 and PackeTwin cards.  The
+\fB\-\-show\fR option can be used by any user, all other options must be
+used by root.
+.SH OPTIONS
+.TP 10
+.BI "\-\-speed "\fIfrequency\fR
+Set frequency of baud rate generator to \fIfrequency\fR. A value of 0
+disables the baud rate generator and the digital PLL. Use the \fB\-\-show\fR
+option to check whether the frequency you selected could be approximated 
+with sufficient accuracy.
+.TP 10
+.BI "\-\-nrzi "\fR[\fI0\fR|\fI1\fR] 
+\fI0\fR selects NRZ mode, \fI1\fR selects NRZI mode.
+.TP 10
+.BI "\-\-clocks "\fIinteger\fR
+Set the clock mode. You may \fBOR\fR together three choices (other values
+are not supported and may cause strange results).
+.PP
+TX clock pin:
+.IP
+.ta 1.5i
+0x00 input
+.br
+0x05 output TX clock *
+.br
+0x06 output baud rate generator *
+.br
+0x07 output digital PLL *
+.PP
+TX clock source:
+.IP
+.ta 1.5i
+0x00 RX clock pin
+.br
+0x08 TX clock pin #
+.br
+0x10 baud rate generator
+.br
+0x18 digital PLL +
+.br
+.PP
+RX clock source:
+.IP
+.ta 1.5i
+0x00 RX clock pin
+.br
+0x20 TX clock pin
+.br
+0x40 baud rate generator
+.br
+0x60 digital PLL +
+.br
+.PP
+* Not allowed on PI2 Port A if J3 is installed.
+.PP
+# TX clock pin must be configured as input.
+.PP
++ Speed must be equal to 32 times the baud rate.
+.TP 10
+.BI "\-\-txdelay "\fImilliseconds\fR
+Set transmit delay to \fImilliseconds\fR. Maximum is 2500 ms.
+.TP 10
+.BI "\-\-txtime "\fIseconds\fR
+Set maximum time the transmitter may be active to \fIseconds\fR.
+.TP 10
+.BI "\-\-sqdelay "\fImilliseconds\fR
+Set the squelch delay to \fImilliseconds\fR. Maximum delay is 2500 ms.
+.TP 10
+.BI "\-\-slottime "\fImilliseconds\fR
+Set the slot time to \fImilliseconds\fR. Maximum slottime is 2500 ms.
+.TP 10
+.BI "\-\-waittime "\fImilliseconds\fR
+Set the minimum time between the transmitter turning off to when it turns
+on to \fImilliseconds\fR. Maximum wait time is 2500 ms.
+.TP 10
+.BI "\-\-persist "\fIf\fR
+Set the persistance parameter to \fIf\fR. Must be between 0 and 255 
+(inclusive).
+.TP 10
+.BI "\-\-dma "\fIchannel\fR
+Set the DMA channel to \fIchannel\fR. Can be 1 or 3.  Setting to 0 disables
+DMA.
+.LP
+.SH BUGS
+.B dmascc_cfg
+does not check the parameters for validity. The driver or kernel may crash
+if you specify invalid values.
+.SH AUTHORS
+.nf
+Klaus Kudielka
+.br
+This manual page written by Craig Small <csmall at small.dropbear.id.au>
+.fi
diff --git a/dmascc/dmascc_cfg.c b/dmascc/dmascc_cfg.c
new file mode 100644
index 0000000..80f27c0
--- /dev/null
+++ b/dmascc/dmascc_cfg.c
@@ -0,0 +1,341 @@
+/*
+ * Configuration utility for dmascc driver
+ * Copyright (C) 1997,2000 Klaus Kudielka
+ *
+ * This program 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <linux/if.h>
+#ifndef _SC_CLK_TCK
+#include <sys/param.h>
+#endif
+#ifndef _SC_CLK_TCK
+#include <asm/param.h>
+#endif
+
+
+/* Ioctls */
+#define SIOCGSCCPARAM SIOCDEVPRIVATE
+#define SIOCSSCCPARAM (SIOCDEVPRIVATE+1)
+
+/* Frequency of timer 0 */
+#define TMR_0_HZ      25600
+
+/* Configurable parameters */
+struct scc_param {
+  int pclk_hz;    /* frequency of BRG input (don't change) */
+  int brg_tc;     /* BRG terminal count; BRG disabled if < 0 */
+  int nrzi;       /* 0 (nrz), 1 (nrzi) */
+  int clocks;     /* see dmascc_cfg documentation */
+  int txdelay;    /* [1/TMR_0_HZ] */
+  int txtimeout;  /* [1/HZ] */
+  int txtail;     /* [1/TMR_0_HZ] */
+  int waittime;   /* [1/TMR_0_HZ] */
+  int slottime;   /* [1/TMR_0_HZ] */
+  int persist;    /* 1 ... 256 */
+  int dma;        /* -1 (disable), 0, 1, 3 */
+  int txpause;    /* [1/TMR_0_HZ] */
+  int rtsoff;     /* [1/TMR_0_HZ] */
+  int dcdon;      /* [1/TMR_0_HZ] */
+  int dcdoff;     /* [1/TMR_0_HZ] */
+  int reserved[35];
+};
+
+void usage(void)
+{
+  fprintf(stderr,
+	  "usage:   dmascc_cfg <interface> [ options ... ]\n\n"
+	  "options: --show         show updated configuration\n"
+	  "         --frequency f  frequency of baud rate generator in Hz\n"
+	  "         --nrzi n       NRZ (0) or NRZI (1) encoding\n"
+	  "         --clocks n     clock mode (see manual page)\n"
+	  "         --txdelay t    transmit delay in ms\n"
+	  "         --txpause t    inter-packet delay in ms\n"
+	  "         --txtimeout t  stop transmitting packets after t ms\n"
+	  "         --txtail t     transmit tail in ms\n"
+	  "         --rtsoff t     DCD settling time in ms (after RTS off)\n"
+	  "         --dcdon t      DCD settling time in ms (after DCD on)\n"
+	  "         --dcdoff t     DCD settling time in ms (after DCD off)\n"
+	  "         --slottime t   slot time in ms\n"
+	  "         --persist n    persistence parameter (1..256)\n"
+	  "         --waittime t   wait time after transmit in ms\n"
+	  "         --dma n        "
+	  "DMA channel: -1 (no DMA), 0 (S5SCC/DMA only), 1, 3\n"
+	  );
+}
+
+int main(int argc, char *argv[])
+{
+  int sk, show = 0, set = 0, old = 0, secondary;
+  struct ifreq ifr;
+  struct scc_param param;
+  char **option, *end, *error = NULL;
+  long hz = -1L;
+
+  if (argc < 2) {
+    usage();
+    return 1;
+  }
+
+  if ((sk = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+    perror("socket");
+    return 2;
+  }
+
+  memset(&param, 0, sizeof(param));
+  param.txpause = -1;
+
+  if (strncmp(argv[1], "dmascc", 6)) {
+    fprintf(stderr, "invalid interface name.\n");
+    return 5;
+  }
+
+  strncpy(ifr.ifr_name, argv[1], IFNAMSIZ);
+  ifr.ifr_data = (caddr_t) ¶m;
+  if (ioctl(sk, SIOCGSCCPARAM, &ifr) < 0) {
+    perror("ioctl");
+    close(sk);
+    return 3;
+  }
+
+  if (param.txpause == -1) {
+    param.txpause = 0;
+    old = 1;
+  }
+
+#ifdef	_SC_CLK_TCKxx
+  hz = sysconf(_SC_CLK_TCK);
+  if (hz == -1)
+	perror("sysconf(_SC_CLK_TCK)");
+#endif
+  if (hz == -1) {
+#ifdef	HZ
+	hz = HZ;
+#else
+	hz = 100;
+#endif
+	fprintf(stderr, "warning: cannot dermine the clock rate HZ on which this system is running.\n");
+	fprintf(stderr, "         Assuming %ld, what may be wrong.\n", hz);
+  }
+
+  secondary = argv[1][strlen(argv[1])-1]%2;
+
+  option = argv + 2;
+  while (!error && *option != NULL) {
+    if (!strcmp(*option, "--show")) {
+      show = 1;
+      option++;
+    } else if (!strcmp(*option, "--frequency")) {
+      option++;
+      if (*option != NULL) {
+	double f;
+	set = 1;
+	f = strtod(*option++, &end);
+	if (*end) error = "frequency not a number";
+	else {
+	  if (f < 0.0) error = "frequency < 0";
+	  else if (f == 0.0) param.brg_tc = -1;
+	  else {
+	    param.brg_tc = param.pclk_hz / (f * 2) - 2;
+	    if (param.brg_tc > 0xffff) error = "frequency too low";
+	    if (param.brg_tc < 0) error = "frequency too high";
+	  }
+	}
+      } else error = "--frequency requires parameter";
+    } else if (!strcmp(*option, "--nrzi")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.nrzi = strtol(*option++, &end, 0);
+	if (*end || param.nrzi < 0 || param.nrzi > 1)
+	  error = "nrzi must be 0 or 1";
+      } else error = "--nrzi requires parameter";
+    } else if (!strcmp(*option, "--clocks")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.clocks = strtol(*option++, &end, 0);
+	if (*end) error = "clock mode not a number";
+	else if ((param.clocks & ~0x7f)) error = "invalid clock mode";
+      } else error = "--clocks requires parameter";
+    } else if (!strcmp(*option, "--txdelay")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.txdelay = TMR_0_HZ * strtod(*option++, &end) / 1000.0;
+	if (*end) error = "txdelay not a number";
+	else if (param.txdelay < 0) error = "txdelay < 0";
+	else if (param.txdelay > 0xffff) error = "txdelay too large";
+      } else error = "--txdelay requires parameter";
+    } else if (!strcmp(*option, "--txpause")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.txpause = TMR_0_HZ * strtod(*option++, &end) / 1000.0;
+	if (*end) error = "txpause not a number";
+	else if (param.txpause < 0) error = "txpause < 0";
+	else if (param.txpause > 0xffff) error = "txpause too large";
+	if (old && param.txpause != 0)
+	  fprintf(stderr, "warning: old driver; txpause not supported.\n");
+      } else error = "--txpause requires parameter";
+    } else if (!strcmp(*option, "--txtimeout")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.txtimeout = hz * strtod(*option++, &end) / 1000.0;
+	if (*end) error = "txtimeout not a number";
+	else if (param.txtimeout < 0) error = "txtimeout < 0";
+      } else error = "--txtimeout requires parameter";
+    } else if (!strcmp(*option, "--txtail")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.txtail = TMR_0_HZ * strtod(*option++, &end) / 1000.0;
+	if (*end) error = "txtail not a number";
+	else if (param.txtail < 0) error = "txtail < 0";
+	else if (param.txtail > 0xffff) error = "txtail too large";
+      } else error = "--txtail requires parameter";
+    } else if (!strcmp(*option, "--rtsoff")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.rtsoff = TMR_0_HZ * strtod(*option++, &end) / 1000.0;
+	if (*end) error = "rtsoff not a number";
+	else if (param.rtsoff < 0) error = "rtsoff < 0";
+	else if (param.rtsoff > 0xffff) error = "rtsoff too large";
+	if (old && param.rtsoff != 0)
+	  fprintf(stderr, "warning: old driver; rtsoff not supported.\n");
+      } else error = "--rtsoff requires parameter";
+    } else if (!strcmp(*option, "--dcdon")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.dcdon = TMR_0_HZ * strtod(*option++, &end) / 1000.0;
+	if (*end) error = "dcdon not a number";
+	else if (param.dcdon < 0) error = "dcdon < 0";
+	else if (param.dcdon > 0xffff) error = "dcdon too large";
+	if (old && param.dcdon != 0)
+	  fprintf(stderr, "warning: old driver; dcdon not supported.\n");
+      } else error = "--dcdon requires parameter";
+    } else if (!strcmp(*option, "--dcdoff")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.dcdoff = TMR_0_HZ * strtod(*option++, &end) / 1000.0;
+	if (*end) error = "dcdoff not a number";
+	else if (param.dcdoff < 0) error = "dcdoff < 0";
+	else if (param.dcdoff > 0xffff) error = "dcdoff too large";
+	if (old && param.dcdoff != 0)
+	  fprintf(stderr, "warning: old driver; dcdoff not supported.\n");
+      } else error = "--dcdoff requires parameter";
+    } else if (!strcmp(*option, "--slottime")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.slottime = TMR_0_HZ * strtod(*option++, &end) / 1000.0;
+	if (*end) error = "slottime not a number";
+	else if (param.slottime < 0) error = "slottime < 0";
+	else if (param.slottime > 0xffff) error = "slottime too large";
+      } else error = "--slottime requires parameter";
+    } else if (!strcmp(*option, "--persist")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.persist = strtol(*option++, &end, 0);
+	if (*end) error = "persist not a number";
+	else if (param.persist < 1) error = "persist < 1";
+	else if (param.persist > 256) error = "persist > 256";
+      } else error = "--persist requires parameter";
+    } else if (!strcmp(*option, "--waittime")) {
+      option++;
+      if (*option != NULL) {
+	set = 1;
+	param.waittime = TMR_0_HZ * strtod(*option++, &end) / 1000.0;
+	if (*end) error = "waittime not a number";
+	else if (param.waittime < 0) error = "waittime < 0";
+	else if (param.waittime > 0xffff) error = "waittime too large";
+      } else error = "--waittime requires parameter";
+    } else if (!strcmp(*option, "--dma")) {
+      option++;
+      if (*option != NULL) {
+	int dma = param.dma;
+	set = 1;
+	param.dma = strtol(*option++, &end, 0);
+	if (*end) error = "DMA channel not a number";
+	else if (secondary && param.dma != -1)
+	  error = "SCC port B must have DMA disabled";
+	else if (param.dma < -1 || param.dma == 2 || param.dma > 3)
+	  error = "invalid DMA channel";
+	else if (param.pclk_hz != 9830400 && param.dma == 0)
+	  error = "only S5SCC/DMA supports DMA channel 0";
+	else if (old && param.dma == 0)
+	  error = "old driver; DMA channel 0 not supported";
+	else if (old && param.dma == -1 && dma > 0)
+	  error = "old driver; reload module or reboot to disable DMA";
+	else if (old && param.dma == -1 && dma == 0)
+	  param.dma = 0;
+      } else error = "--dma requires parameter";
+    } else error = "invalid option";
+  }
+
+  if (error) {
+    fprintf(stderr, "usage error: %s.\n", error);
+    close(sk);
+    return 1;
+  }
+
+  if (set) {
+    if (ioctl(sk, SIOCSSCCPARAM, &ifr) < 0) {
+      perror("ioctl");
+      close(sk);
+      return 4;
+    }
+  }
+
+  if (show) {
+    double f;
+    if (param.brg_tc < 0) f = 0.0;
+    else f = ((double) param.pclk_hz) / ( 2 * (param.brg_tc + 2));
+    printf("dmascc_cfg %s \\\n--frequency %.2f --nrzi %d --clocks 0x%02X "
+	   "--txdelay %.2f \\\n--txpause %.2f --txtimeout %.2f "
+	   "--txtail %.2f --rtsoff %.2f \\\n--dcdon %.2f --dcdoff %.2f "
+	   "--slottime %.2f --persist %d \\\n--waittime %.2f --dma %d\n",
+	   argv[1],
+	   f,
+	   param.nrzi,
+	   param.clocks,
+	   param.txdelay * 1000.0 / TMR_0_HZ,
+	   param.txpause * 1000.0 / TMR_0_HZ,
+	   param.txtimeout * 1000.0 / hz,
+	   param.txtail * 1000.0 / TMR_0_HZ,
+	   param.rtsoff * 1000.0 / TMR_0_HZ,
+	   param.dcdon * 1000.0 / TMR_0_HZ,
+	   param.dcdoff * 1000.0 / TMR_0_HZ,
+	   param.slottime * 1000.0 / TMR_0_HZ,
+	   param.persist,
+	   param.waittime * 1000.0 / TMR_0_HZ,
+	   (old && param.dma == 0) ? -1 : param.dma);
+  }
+
+  close(sk);
+  return 0;
+}
diff --git a/hdlcutil/Makefile.am b/hdlcutil/Makefile.am
new file mode 100644
index 0000000..b200566
--- /dev/null
+++ b/hdlcutil/Makefile.am
@@ -0,0 +1,25 @@
+
+if HAVE_X
+X11_bin_programs = smdiag
+endif
+
+SUBDIRS = . fl
+
+bin_PROGRAMS = sethdlc smmixer $(X11_bin_programs)
+
+sethdlc_SOURCES = sethdlc.c hdrvcomm.c hdrvcomm.h usersmdiag.h soundmodem.h
+smmixer_SOURCES = smmixer.c hdrvcomm.c hdrvcomm.h usersmdiag.h soundmodem.h
+smdiag_SOURCES = smdiag.c hdrvcomm.c hdrvcomm.h usersmdiag.h soundmodem.h
+
+smdiag_LDADD = $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
+
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR=$(sysconfdir)/ax25/
+AX25_LOCALSTATEDIR=$(localstatedir)/ax25/
+
+man_MANS = sethdlc.8 smmixer.8 baycom.9 hdlcdrv.9 soundmodem.9 smdiag.8
+
+EXTRA_DIST = $(man_MANS) 
+
diff --git a/hdlcutil/Makefile.in b/hdlcutil/Makefile.in
new file mode 100644
index 0000000..00842b2
--- /dev/null
+++ b/hdlcutil/Makefile.in
@@ -0,0 +1,809 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+bin_PROGRAMS = sethdlc$(EXEEXT) smmixer$(EXEEXT) $(am__EXEEXT_1)
+subdir = hdlcutil
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+ at HAVE_X_TRUE@am__EXEEXT_1 = smdiag$(EXEEXT)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)" \
+	"$(DESTDIR)$(man9dir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_sethdlc_OBJECTS = sethdlc.$(OBJEXT) hdrvcomm.$(OBJEXT)
+sethdlc_OBJECTS = $(am_sethdlc_OBJECTS)
+sethdlc_LDADD = $(LDADD)
+am_smdiag_OBJECTS = smdiag.$(OBJEXT) hdrvcomm.$(OBJEXT)
+smdiag_OBJECTS = $(am_smdiag_OBJECTS)
+am__DEPENDENCIES_1 =
+smdiag_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_smmixer_OBJECTS = smmixer.$(OBJEXT) hdrvcomm.$(OBJEXT)
+smmixer_OBJECTS = $(am_smmixer_OBJECTS)
+smmixer_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(sethdlc_SOURCES) $(smdiag_SOURCES) $(smmixer_SOURCES)
+DIST_SOURCES = $(sethdlc_SOURCES) $(smdiag_SOURCES) $(smmixer_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man8dir = $(mandir)/man8
+man9dir = $(mandir)/man9
+NROFF = nroff
+MANS = $(man_MANS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ at HAVE_X_TRUE@X11_bin_programs = smdiag
+SUBDIRS = . fl
+sethdlc_SOURCES = sethdlc.c hdrvcomm.c hdrvcomm.h usersmdiag.h soundmodem.h
+smmixer_SOURCES = smmixer.c hdrvcomm.c hdrvcomm.h usersmdiag.h soundmodem.h
+smdiag_SOURCES = smdiag.c hdrvcomm.c hdrvcomm.h usersmdiag.h soundmodem.h
+smdiag_LDADD = $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR = $(sysconfdir)/ax25/
+AX25_LOCALSTATEDIR = $(localstatedir)/ax25/
+man_MANS = sethdlc.8 smmixer.8 baycom.9 hdlcdrv.9 soundmodem.9 smdiag.8
+EXTRA_DIST = $(man_MANS) 
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hdlcutil/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu hdlcutil/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+sethdlc$(EXEEXT): $(sethdlc_OBJECTS) $(sethdlc_DEPENDENCIES) $(EXTRA_sethdlc_DEPENDENCIES) 
+	@rm -f sethdlc$(EXEEXT)
+	$(LINK) $(sethdlc_OBJECTS) $(sethdlc_LDADD) $(LIBS)
+smdiag$(EXEEXT): $(smdiag_OBJECTS) $(smdiag_DEPENDENCIES) $(EXTRA_smdiag_DEPENDENCIES) 
+	@rm -f smdiag$(EXEEXT)
+	$(LINK) $(smdiag_OBJECTS) $(smdiag_LDADD) $(LIBS)
+smmixer$(EXEEXT): $(smmixer_OBJECTS) $(smmixer_DEPENDENCIES) $(EXTRA_smmixer_DEPENDENCIES) 
+	@rm -f smmixer$(EXEEXT)
+	$(LINK) $(smmixer_OBJECTS) $(smmixer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdrvcomm.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sethdlc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/smdiag.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/smmixer.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man8: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man8dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.8[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man8:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man8dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.8[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
+install-man9: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man9dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man9dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man9dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.9[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^9][0-9a-z]*$$,9,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man9dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man9dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man9dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man9dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man9:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man9dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.9[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^9][0-9a-z]*$$,9,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man9dir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(man9dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man: install-man8 install-man9
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man8 uninstall-man9
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags ctags-recursive distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-man8 install-man9 install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-binPROGRAMS uninstall-man \
+	uninstall-man8 uninstall-man9
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/hdlcutil/baycom.9 b/hdlcutil/baycom.9
new file mode 100644
index 0000000..3e2c740
--- /dev/null
+++ b/hdlcutil/baycom.9
@@ -0,0 +1,62 @@
+.\" Copyright 1996 Thomas Sailer (t.sailer at alumni.ethz.ch)
+.\" May be distributed under the GNU General Public License
+.\" "
+.TH BAYCOM 9 "2 October 1996" "Linux 2.1.x" "Kernel Reference Guide"
+.SH NAME
+baycom \- amateur (AX.25) packet radio network driver for baycom modems
+.SH SYNOPSIS
+
+.nf
+.B #include <linux/baycom.h>
+.B #include <linux/hdlcdrv.h>
+.fi
+
+.SH DESCRIPTION
+The driver currently supports three different modems: ser12, par96 and
+par97.
+.SS ser12
+This is a very simple 1200 baud AFSK modem. The modem consists only
+of a modulator/demodulator chip, usually a TI TCM3105. The computer
+is responsible for regenerating the receiver bit clock. The modem 
+connects to a serial port, hence the name. Since the serial port is
+not used as an async serial port, the kernel driver for serial ports
+cannot be used, and this driver only supports standard serial 
+hardware (8250, 16450, 16550).
+.SS par96
+This is a modem for 9600 baud FSK compatible to the G3RUH standard.
+The modem does all the filtering and regenerates the receiver clock.
+Data is transferred from and to the PC via a shift register.
+The shift register is filled with 16 bits and an interrupt is
+signalled. The PC then empties the shift register in a burst. This
+modem connects to the parallel port, hence the name.
+.SS par97
+This is a redesign of the par96 modem by Henning Rech, DF9IC. The
+modem is protocol compatible to par96, but uses only three low
+power ICs and can therefore be fed from the parallel port and
+does not require an additional power supply.
+
+.SH "IOCTL CALLS"
+The \fBioctl\fP calls follow the implementation in the \fIhdlcdrv\fP.
+
+.TP
+.B BAYCOMCTL_GETMODEMTYPE
+returns the modem type (i.e. \fIser12\fP or \fIpar96\fP) and the 
+options in effect (currently only the source of the DCD signal)
+.TP
+.B BAYCOMCTL_SETMODEMTYPE
+sets the modem type and the options. Only superuser can do this.
+.TP
+.B BAYCOMCTL_GETDEBUG
+return some debugging values. Not always available.
+
+
+.SH "SEE ALSO"
+.BR baycom " (9), " soundmodem " (9),"
+linux/drivers/net/hdlcdrv.c,
+
+.SH AUTHOR
+baycom was written by Thomas Sailer, HB9JNX/AE4WA, (t.sailer at alumni.ethz.ch).
+
+
+
+
diff --git a/hdlcutil/fl/Makefile.am b/hdlcutil/fl/Makefile.am
new file mode 100644
index 0000000..f0c7979
--- /dev/null
+++ b/hdlcutil/fl/Makefile.am
@@ -0,0 +1,14 @@
+
+if HAVE_FLTK
+sbin_PROGRAMS = xfsmmixer xfhdlcchpar xfhdlcst xfsmdiag
+endif
+
+AM_CPPFLAGS = $(X_CFLAGS) -I$(srcdir)/..
+LDADD = ../hdrvcomm.o $(X_LIBS) -lX11 $(FLTK_LIB) $(LDDADD)
+
+xfsmmixer_SOURCES = xfsmmixer.cxx xfsmmixer_main.cxx xfsmmixer.h
+xfhdlcchpar_SOURCES = xfhdlcchpar.cxx xfhdlcchpar_main.cxx xfhdlcchpar.h
+xfhdlcst_SOURCES = xfhdlcst.cxx xfhdlcst_main.cxx xfhdlcst.h
+xfsmdiag_SOURCES = xfsmdiag.cxx xfsmdiag_main.cxx xfsmdiag.h xfsmdiag_main.h
+
+hdrvcomm.o: ../hdrvcomm.o
diff --git a/hdlcutil/fl/Makefile.in b/hdlcutil/fl/Makefile.in
new file mode 100644
index 0000000..12339dd
--- /dev/null
+++ b/hdlcutil/fl/Makefile.in
@@ -0,0 +1,547 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+ at HAVE_FLTK_TRUE@sbin_PROGRAMS = xfsmmixer$(EXEEXT) \
+ at HAVE_FLTK_TRUE@	xfhdlcchpar$(EXEEXT) xfhdlcst$(EXEEXT) \
+ at HAVE_FLTK_TRUE@	xfsmdiag$(EXEEXT)
+subdir = hdlcutil/fl
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)"
+PROGRAMS = $(sbin_PROGRAMS)
+am_xfhdlcchpar_OBJECTS = xfhdlcchpar.$(OBJEXT) \
+	xfhdlcchpar_main.$(OBJEXT)
+xfhdlcchpar_OBJECTS = $(am_xfhdlcchpar_OBJECTS)
+xfhdlcchpar_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+xfhdlcchpar_DEPENDENCIES = ../hdrvcomm.o $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_xfhdlcst_OBJECTS = xfhdlcst.$(OBJEXT) xfhdlcst_main.$(OBJEXT)
+xfhdlcst_OBJECTS = $(am_xfhdlcst_OBJECTS)
+xfhdlcst_LDADD = $(LDADD)
+xfhdlcst_DEPENDENCIES = ../hdrvcomm.o $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_xfsmdiag_OBJECTS = xfsmdiag.$(OBJEXT) xfsmdiag_main.$(OBJEXT)
+xfsmdiag_OBJECTS = $(am_xfsmdiag_OBJECTS)
+xfsmdiag_LDADD = $(LDADD)
+xfsmdiag_DEPENDENCIES = ../hdrvcomm.o $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_xfsmmixer_OBJECTS = xfsmmixer.$(OBJEXT) xfsmmixer_main.$(OBJEXT)
+xfsmmixer_OBJECTS = $(am_xfsmmixer_OBJECTS)
+xfsmmixer_LDADD = $(LDADD)
+xfsmmixer_DEPENDENCIES = ../hdrvcomm.o $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(xfhdlcchpar_SOURCES) $(xfhdlcst_SOURCES) \
+	$(xfsmdiag_SOURCES) $(xfsmmixer_SOURCES)
+DIST_SOURCES = $(xfhdlcchpar_SOURCES) $(xfhdlcst_SOURCES) \
+	$(xfsmdiag_SOURCES) $(xfsmmixer_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = $(X_CFLAGS) -I$(srcdir)/..
+LDADD = ../hdrvcomm.o $(X_LIBS) -lX11 $(FLTK_LIB) $(LDDADD)
+xfsmmixer_SOURCES = xfsmmixer.cxx xfsmmixer_main.cxx xfsmmixer.h
+xfhdlcchpar_SOURCES = xfhdlcchpar.cxx xfhdlcchpar_main.cxx xfhdlcchpar.h
+xfhdlcst_SOURCES = xfhdlcst.cxx xfhdlcst_main.cxx xfhdlcst.h
+xfsmdiag_SOURCES = xfsmdiag.cxx xfsmdiag_main.cxx xfsmdiag.h xfsmdiag_main.h
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cxx .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hdlcutil/fl/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu hdlcutil/fl/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+xfhdlcchpar$(EXEEXT): $(xfhdlcchpar_OBJECTS) $(xfhdlcchpar_DEPENDENCIES) $(EXTRA_xfhdlcchpar_DEPENDENCIES) 
+	@rm -f xfhdlcchpar$(EXEEXT)
+	$(CXXLINK) $(xfhdlcchpar_OBJECTS) $(xfhdlcchpar_LDADD) $(LIBS)
+xfhdlcst$(EXEEXT): $(xfhdlcst_OBJECTS) $(xfhdlcst_DEPENDENCIES) $(EXTRA_xfhdlcst_DEPENDENCIES) 
+	@rm -f xfhdlcst$(EXEEXT)
+	$(CXXLINK) $(xfhdlcst_OBJECTS) $(xfhdlcst_LDADD) $(LIBS)
+xfsmdiag$(EXEEXT): $(xfsmdiag_OBJECTS) $(xfsmdiag_DEPENDENCIES) $(EXTRA_xfsmdiag_DEPENDENCIES) 
+	@rm -f xfsmdiag$(EXEEXT)
+	$(CXXLINK) $(xfsmdiag_OBJECTS) $(xfsmdiag_LDADD) $(LIBS)
+xfsmmixer$(EXEEXT): $(xfsmmixer_OBJECTS) $(xfsmmixer_DEPENDENCIES) $(EXTRA_xfsmmixer_DEPENDENCIES) 
+	@rm -f xfsmmixer$(EXEEXT)
+	$(CXXLINK) $(xfsmmixer_OBJECTS) $(xfsmmixer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xfhdlcchpar.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xfhdlcchpar_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xfhdlcst.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xfhdlcst_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xfsmdiag.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xfsmdiag_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xfsmmixer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xfsmmixer_main.Po at am__quote@
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-sbinPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-sbinPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-sbinPROGRAMS install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-sbinPROGRAMS
+
+
+hdrvcomm.o: ../hdrvcomm.o
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/hdlcutil/fl/xfhdlcchpar.cxx b/hdlcutil/fl/xfhdlcchpar.cxx
new file mode 100644
index 0000000..ad2b6b1
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcchpar.cxx
@@ -0,0 +1,73 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#include "xfhdlcchpar.h"
+
+Fl_Window *chpar=(Fl_Window *)0;
+
+Fl_Value_Slider *txdelay=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *txtail=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *slottime=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ppersist=(Fl_Value_Slider *)0;
+
+Fl_Check_Button *fulldup=(Fl_Check_Button *)0;
+
+Fl_Button *quit=(Fl_Button *)0;
+
+Fl_Output *ifname=(Fl_Output *)0;
+
+Fl_Window* create_the_forms() {
+  Fl_Window* w;
+  { Fl_Window* o = chpar = new Fl_Window(390, 260, "HDLC channel parameters");
+    w = o;
+    o->box(FL_NO_BOX);
+    o->labeltype(FL_NORMAL_LABEL);
+    { Fl_Box* o = new Fl_Box(0, 0, 390, 260);
+      o->box(FL_UP_BOX);
+    }
+    { Fl_Box* o = new Fl_Box(10, 10, 370, 240);
+      o->box(FL_DOWN_BOX);
+    }
+    { Fl_Value_Slider* o = txdelay = new Fl_Value_Slider(24, 30, 341, 30, "Tx Delay (ms)");
+      o->type(3);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)cb_update);
+    }
+    { Fl_Value_Slider* o = txtail = new Fl_Value_Slider(24, 80, 341, 30, "Tx Tail (ms)");
+      o->type(3);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)cb_update);
+    }
+    { Fl_Value_Slider* o = slottime = new Fl_Value_Slider(24, 130, 341, 30, "Slottime (ms)");
+      o->type(3);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)cb_update);
+    }
+    { Fl_Value_Slider* o = ppersist = new Fl_Value_Slider(24, 180, 341, 30, "P-Persistence");
+      o->type(3);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)cb_update);
+    }
+    { Fl_Check_Button* o = fulldup = new Fl_Check_Button(20, 220, 90, 20, "Full Duplex");
+      o->down_box(FL_DIAMOND_DOWN_BOX);
+      o->selection_color(3);
+      o->callback((Fl_Callback*)cb_update);
+    }
+    { Fl_Button* o = quit = new Fl_Button(290, 220, 70, 20, "Quit");
+      o->callback((Fl_Callback*)cb_quit, (void*)(0));
+    }
+    { Fl_Box* o = new Fl_Box(150, 220, 60, 20, "Interface");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = ifname = new Fl_Output(220, 220, 60, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    o->end();
+  }
+  return w;
+}
diff --git a/hdlcutil/fl/xfhdlcchpar.h b/hdlcutil/fl/xfhdlcchpar.h
new file mode 100644
index 0000000..57109a3
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcchpar.h
@@ -0,0 +1,25 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#ifndef xfhdlcchpar_h
+#define xfhdlcchpar_h
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+extern Fl_Window *chpar;
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Value_Slider.H>
+extern void cb_update(Fl_Widget*, void*);
+extern void cb_update(Fl_Value_Slider*, void*);
+extern Fl_Value_Slider *txdelay;
+extern Fl_Value_Slider *txtail;
+extern Fl_Value_Slider *slottime;
+extern Fl_Value_Slider *ppersist;
+#include <FL/Fl_Check_Button.H>
+extern void cb_update(Fl_Check_Button*, void*);
+extern Fl_Check_Button *fulldup;
+#include <FL/Fl_Button.H>
+extern void cb_quit(Fl_Button*, long);
+extern Fl_Button *quit;
+#include <FL/Fl_Output.H>
+extern Fl_Output *ifname;
+Fl_Window* create_the_forms();
+#endif
diff --git a/hdlcutil/fl/xfhdlcchpar_main.cxx b/hdlcutil/fl/xfhdlcchpar_main.cxx
new file mode 100644
index 0000000..8ebee3d
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcchpar_main.cxx
@@ -0,0 +1,136 @@
+/*****************************************************************************/
+
+/*
+ *	xfhdlcchpar_main.C  -- kernel hdlc radio modem driver channel parameter setting utility.
+ *
+ *	Copyright (C) 1996,1997,2000  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *   0.1  14.12.1996  Started
+ *   0.2  11.05.1997  introduced hdrvcomm.h
+ *   0.3  05.01.2000  upgraded to fltk 1.0.7
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <net/if.h>
+#include "hdrvcomm.h"
+#include "xfhdlcchpar.h"
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+
+/* ---------------------------------------------------------------------- */
+
+void cb_update(Fl_Widget *widget, void *udata)
+{
+	int ret;
+	struct hdrvc_channel_params cp;
+
+	cp.tx_delay = (int)(0.1*txdelay->value());
+	cp.tx_tail = (int)(0.1*txtail->value());
+	cp.slottime = (int)(0.1*slottime->value());
+	cp.ppersist = (int)(ppersist->value());
+	cp.fulldup = !!fulldup->value();
+	ret = hdrvc_set_channel_access_param(cp);
+	if (ret < 0) 
+		perror("hdrvc_set_channel_access_param");
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_quit(Fl_Button *, long)
+{
+	exit(0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str = 
+"[-i smif]\n"
+"  -i: specify the name of the baycom kernel driver interface\n\n";
+
+/* ---------------------------------------------------------------------- */
+
+int main(int argc, char *argv[])
+{
+        int c, i;
+	int ret;
+	struct hdrvc_channel_params cp;
+
+	progname = *argv;
+	printf("%s: Version 0.3; (C) 1996,1997,2000 by Thomas Sailer HB9JNX/AE4WA\n", progname);
+	hdrvc_args(&argc, argv, "bc0");
+	for (i = 1; i < argc; ) {
+		c = i;
+		Fl::arg(argc, argv, c);
+		if (c <= 0) {
+			i++;
+			continue;
+		}
+		memmove(&argv[i], &argv[i+c], (argc-i) * sizeof(char *));
+		argc -= c;
+	}
+#if 0
+	while ((ret = getopt(argc, argv, "")) != -1) {
+		switch (ret) {
+		default:
+			printf("usage: %s %s", progname, usage_str);
+			exit(-1);
+		}
+	}
+#endif
+	hdrvc_init();
+
+	create_the_forms();
+	ifname->value(hdrvc_ifname());
+	/*
+	 * set channel params
+	 */
+	ret = hdrvc_get_channel_access_param(&cp);
+	if (ret < 0) {
+		perror("hdrvc_get_channel_access_param");
+		exit(1);
+	}
+	txdelay->step(10);
+	txdelay->bounds(0, 2550);
+	txdelay->value(cp.tx_delay*10);
+	txtail->step(10);
+	txtail->bounds(0, 2550);
+	txtail->value(cp.tx_tail*10);
+	slottime->step(10);
+	slottime->bounds(0, 2550);
+	slottime->value(cp.slottime*10);
+	ppersist->step(1);
+	ppersist->bounds(0, 255);
+	ppersist->value(cp.ppersist);
+	fulldup->value(!!cp.fulldup);
+	chpar->show();
+	Fl::run();
+	exit(0);
+}
diff --git a/hdlcutil/fl/xfhdlcst.cxx b/hdlcutil/fl/xfhdlcst.cxx
new file mode 100644
index 0000000..0548bf3
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcst.cxx
@@ -0,0 +1,160 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#include "xfhdlcst.h"
+
+Fl_Window *hdlcst=(Fl_Window *)0;
+
+Fl_Round_Button *dcd=(Fl_Round_Button *)0;
+
+Fl_Round_Button *ptt=(Fl_Round_Button *)0;
+
+Fl_Output *txpacket=(Fl_Output *)0;
+
+Fl_Output *txerror=(Fl_Output *)0;
+
+Fl_Output *rxpacket=(Fl_Output *)0;
+
+Fl_Output *rxerror=(Fl_Output *)0;
+
+Fl_Output *modcyc=(Fl_Output *)0;
+
+Fl_Output *demodcyc=(Fl_Output *)0;
+
+Fl_Output *intfreq=(Fl_Output *)0;
+
+Fl_Output *dmares=(Fl_Output *)0;
+
+Fl_Box *tmodcyc=(Fl_Box *)0;
+
+Fl_Box *tdemodcyc=(Fl_Box *)0;
+
+Fl_Box *tintfreq=(Fl_Box *)0;
+
+Fl_Box *tdmares=(Fl_Box *)0;
+
+Fl_Output *modename=(Fl_Output *)0;
+
+Fl_Output *drivername=(Fl_Output *)0;
+
+Fl_Button *quit=(Fl_Button *)0;
+
+Fl_Window* create_the_forms() {
+  Fl_Window* w;
+  { Fl_Window* o = hdlcst = new Fl_Window(250, 300, "HDLC driver state");
+    w = o;
+    o->box(FL_NO_BOX);
+    { Fl_Box* o = new Fl_Box(0, 0, 250, 300);
+      o->box(FL_UP_BOX);
+    }
+    { Fl_Box* o = new Fl_Box(10, 230, 230, 60);
+      o->box(FL_DOWN_BOX);
+    }
+    { Fl_Box* o = new Fl_Box(10, 10, 230, 220);
+      o->box(FL_DOWN_BOX);
+    }
+    { Fl_Round_Button* o = dcd = new Fl_Round_Button(160, 20, 20, 20);
+      o->down_box(FL_ROUND_DOWN_BOX);
+      o->selection_color(3);
+      o->align(FL_ALIGN_CENTER);
+    }
+    { Fl_Round_Button* o = ptt = new Fl_Round_Button(160, 40, 20, 20);
+      o->down_box(FL_ROUND_DOWN_BOX);
+      o->align(FL_ALIGN_CENTER);
+    }
+    { Fl_Output* o = txpacket = new Fl_Output(160, 60, 70, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = txerror = new Fl_Output(160, 80, 70, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = rxpacket = new Fl_Output(160, 100, 70, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = rxerror = new Fl_Output(160, 120, 70, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = modcyc = new Fl_Output(160, 140, 70, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = demodcyc = new Fl_Output(160, 160, 70, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = intfreq = new Fl_Output(160, 180, 70, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = dmares = new Fl_Output(160, 200, 70, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = new Fl_Box(20, 60, 110, 20, "Transmit Packets");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = new Fl_Box(20, 80, 110, 20, "Transmit Errors");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = new Fl_Box(20, 100, 110, 20, "Receive Packets");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = new Fl_Box(20, 120, 110, 20, "Receive Errors");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = new Fl_Box(20, 40, 110, 20, "PTT");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = new Fl_Box(20, 20, 110, 20, "DCD");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = tmodcyc = new Fl_Box(20, 140, 110, 20, "Modulator Cycles");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = tdemodcyc = new Fl_Box(20, 160, 110, 20, "Demodulator Cycles");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = tintfreq = new Fl_Box(20, 180, 110, 20, "Interrupt Frequency");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = tdmares = new Fl_Box(20, 200, 110, 20, "DMA residue");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = modename = new Fl_Output(20, 240, 210, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = drivername = new Fl_Output(20, 260, 210, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+    }
+    { Fl_Button* o = quit = new Fl_Button(190, 20, 40, 30, "Quit");
+      o->callback((Fl_Callback*)cb_quit, (void*)(0));
+    }
+    o->end();
+  }
+  return w;
+}
diff --git a/hdlcutil/fl/xfhdlcst.h b/hdlcutil/fl/xfhdlcst.h
new file mode 100644
index 0000000..0d70e48
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcst.h
@@ -0,0 +1,31 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#ifndef xfhdlcst_h
+#define xfhdlcst_h
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+extern Fl_Window *hdlcst;
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Round_Button.H>
+extern Fl_Round_Button *dcd;
+extern Fl_Round_Button *ptt;
+#include <FL/Fl_Output.H>
+extern Fl_Output *txpacket;
+extern Fl_Output *txerror;
+extern Fl_Output *rxpacket;
+extern Fl_Output *rxerror;
+extern Fl_Output *modcyc;
+extern Fl_Output *demodcyc;
+extern Fl_Output *intfreq;
+extern Fl_Output *dmares;
+extern Fl_Box *tmodcyc;
+extern Fl_Box *tdemodcyc;
+extern Fl_Box *tintfreq;
+extern Fl_Box *tdmares;
+extern Fl_Output *modename;
+extern Fl_Output *drivername;
+#include <FL/Fl_Button.H>
+extern void cb_quit(Fl_Button*, long);
+extern Fl_Button *quit;
+Fl_Window* create_the_forms();
+#endif
diff --git a/hdlcutil/fl/xfhdlcst_main.cxx b/hdlcutil/fl/xfhdlcst_main.cxx
new file mode 100644
index 0000000..a17e546
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcst_main.cxx
@@ -0,0 +1,177 @@
+/*****************************************************************************/
+
+/*
+ *	xfhdlcst_main.C  -- kernel hdlc radio modem driver status display utility.
+ *
+ *	Copyright (C) 1996,1997,2000  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *   0.1  14.12.1996  Started
+ *   0.2  11.05.1997  introduced hdrvcomm.h
+ *   0.3  05.01.2000  upgraded to fltk 1.0.7
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <net/if.h>
+#include "hdrvcomm.h"
+#include "xfhdlcst.h"
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+static bool update = true;
+
+/* ---------------------------------------------------------------------- */
+
+void cb_quit(Fl_Button *, long)
+{
+	exit(0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_timer(void *)
+{
+	update = true;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str = 
+"[-i smif]\n"
+"  -i: specify the name of the baycom kernel driver interface\n\n";
+
+/* ---------------------------------------------------------------------- */
+
+int main(int argc, char *argv[])
+{
+        int c, i;
+	int ret;
+	struct hdrvc_channel_state cs;
+#ifdef HDRVC_KERNEL
+	struct sm_ioctl smi;
+#endif /* HDRVC_KERNEL */
+	char buf[32];
+	char name[64];
+
+	progname = *argv;
+	printf("%s: Version 0.3; (C) 1996,1997,2000 by Thomas Sailer HB9JNX/AE4WA\n", *argv);
+	hdrvc_args(&argc, argv, "bc0");
+	for (i = 1; i < argc; ) {
+		c = i;
+		Fl::arg(argc, argv, c);
+		if (c <= 0) {
+			i++;
+			continue;
+		}
+		memmove(&argv[i], &argv[i+c], (argc-i) * sizeof(char *));
+		argc -= c;
+	}
+#if 0
+	while ((ret = getopt(argc, argv, "")) != -1) {
+		switch (ret) {
+		default:
+			printf("usage: %s %s", *argv, usage_str);
+			exit(-1);
+		}
+	}
+#endif
+	hdrvc_init();
+
+	create_the_forms();
+	Fl::add_timeout(0.1, cb_timer);
+	/*
+	 * set driver and modem name
+	 */
+	ret = hdrvc_get_mode_name(name, sizeof(name));
+	if (ret < 0) {
+		perror("hdrvc_get_mode_name");
+		modename->hide();
+	} else 
+		modename->value(name);
+	ret = hdrvc_get_driver_name(name, sizeof(name));
+	if (ret < 0) {
+		perror("hdrvc_get_driver_name");
+		drivername->hide();
+	} else 
+		drivername->value(name);
+	/*
+	 * check for soundmodem driver
+	 */
+#ifdef HDRVC_KERNEL
+	ret = hdrvc_sm_ioctl(SMCTL_GETDEBUG, &smi);
+	if (ret < 0) {
+#endif /* HDRVC_KERNEL */
+		tdemodcyc->hide();
+		tmodcyc->hide();
+		tintfreq->hide();
+		tdmares->hide();
+		demodcyc->hide();
+		modcyc->hide();
+		intfreq->hide();
+		dmares->hide();
+#ifdef HDRVC_KERNEL
+	}
+#endif /* HDRVC_KERNEL */
+	hdlcst->show();
+	for (;;) {
+		Fl::wait();
+		if (!update)
+			continue;
+		update = false;
+		Fl::add_timeout(0.5, cb_timer);
+		/*
+		 * display state
+		 */
+		ret = hdrvc_get_channel_state(&cs);
+		if (ret >= 0) {
+			ptt->value(cs.ptt);
+			dcd->value(cs.dcd);
+			sprintf(buf, "%ld", cs.tx_packets);
+			txpacket->value(buf);
+			sprintf(buf, "%ld", cs.tx_errors);
+			txerror->value(buf);
+			sprintf(buf, "%ld", cs.rx_packets);
+			rxpacket->value(buf);
+			sprintf(buf, "%ld", cs.rx_errors);
+			rxerror->value(buf);
+		}
+		ret = hdrvc_sm_ioctl(SMCTL_GETDEBUG, &smi);
+		if (ret >= 0) {
+			sprintf(buf, "%d", smi.data.dbg.int_rate);
+			intfreq->value(buf);
+			sprintf(buf, "%d", smi.data.dbg.mod_cycles);
+			modcyc->value(buf);
+			sprintf(buf, "%d", smi.data.dbg.demod_cycles);
+			demodcyc->value(buf);
+			sprintf(buf, "%d", smi.data.dbg.dma_residue);
+			dmares->value(buf);
+		} 
+	}
+	exit (0);
+}
diff --git a/hdlcutil/fl/xfsmdiag.cxx b/hdlcutil/fl/xfsmdiag.cxx
new file mode 100644
index 0000000..84c4bac
--- /dev/null
+++ b/hdlcutil/fl/xfsmdiag.cxx
@@ -0,0 +1,124 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#include "xfsmdiag.h"
+
+Fl_Window *scopewindow=(Fl_Window *)0;
+
+scope *scdisp=(scope *)0;
+
+Fl_Button *cleargr=(Fl_Button *)0;
+
+Fl_Group *scopemode=(Fl_Group *)0;
+
+Fl_Check_Button *sm_off=(Fl_Check_Button *)0;
+
+Fl_Check_Button *sm_input=(Fl_Check_Button *)0;
+
+Fl_Check_Button *sm_demod=(Fl_Check_Button *)0;
+
+Fl_Check_Button *sm_constell=(Fl_Check_Button *)0;
+
+Fl_Check_Button *sm_dcd=(Fl_Check_Button *)0;
+
+Fl_Button *quit=(Fl_Button *)0;
+
+Fl_Round_Button *st_dcd=(Fl_Round_Button *)0;
+
+Fl_Round_Button *st_ptt=(Fl_Round_Button *)0;
+
+Fl_Output *modename=(Fl_Output *)0;
+
+Fl_Output *drivername=(Fl_Output *)0;
+
+Fl_Window* create_the_forms() {
+  Fl_Window* w;
+  { Fl_Window* o = scopewindow = new Fl_Window(700, 550, "SoundCard Modem Driver Diagnose Tool");
+    w = o;
+    o->box(FL_NO_BOX);
+    { Fl_Box* o = new Fl_Box(0, 0, 700, 550);
+      o->box(FL_UP_BOX);
+    }
+    { scope* o = scdisp = new scope(10, 10, 530, 530);
+      o->box(FL_DOWN_BOX);
+    }
+    { Fl_Button* o = cleargr = new Fl_Button(640, 150, 50, 60, "Clear\nGraph");
+      o->callback((Fl_Callback*)cb_cleargr, (void*)(0));
+    }
+    { Fl_Box* o = new Fl_Box(550, 310, 140, 70, "(C) 1996 by\nTom Sailer\nHB9JNX/AE4WA");
+      o->box(FL_EMBOSSED_BOX);
+      o->labelsize(18);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Group* o = scopemode = new Fl_Group(550, 10, 140, 130);
+      o->align(FL_ALIGN_CENTER);
+      { Fl_Box* o = new Fl_Box(550, 10, 140, 130);
+        o->box(FL_DOWN_BOX);
+      }
+      { Fl_Check_Button* o = sm_off = new Fl_Check_Button(560, 20, 120, 20, "Off");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)cb_mode, (void*)(0));
+      }
+      { Fl_Check_Button* o = sm_input = new Fl_Check_Button(560, 40, 120, 20, "Input");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)cb_mode, (void*)(1));
+      }
+      { Fl_Check_Button* o = sm_demod = new Fl_Check_Button(560, 60, 120, 20, "Demodulator");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)cb_mode, (void*)(2));
+      }
+      { Fl_Check_Button* o = sm_constell = new Fl_Check_Button(560, 80, 120, 20, "Constellation");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)cb_mode, (void*)(3));
+      }
+      { Fl_Check_Button* o = sm_dcd = new Fl_Check_Button(560, 110, 120, 20, "Gated with DCD");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)cb_mode, (void*)(256));
+      }
+      o->end();
+    }
+    { Fl_Button* o = quit = new Fl_Button(550, 270, 140, 30, "Quit");
+      o->callback((Fl_Callback*)cb_quit, (void*)(0));
+    }
+    { Fl_Box* o = new Fl_Box(550, 150, 80, 60);
+      o->box(FL_DOWN_BOX);
+    }
+    { Fl_Round_Button* o = st_dcd = new Fl_Round_Button(600, 160, 20, 20);
+      o->down_box(FL_ROUND_DOWN_BOX);
+      o->selection_color(3);
+      o->align(FL_ALIGN_CENTER);
+    }
+    { Fl_Round_Button* o = st_ptt = new Fl_Round_Button(600, 180, 20, 20);
+      o->down_box(FL_ROUND_DOWN_BOX);
+      o->align(FL_ALIGN_CENTER);
+    }
+    { Fl_Box* o = new Fl_Box(560, 180, 40, 20, "PTT");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Box* o = new Fl_Box(560, 160, 40, 20, "DCD");
+      o->box(FL_FLAT_BOX);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = modename = new Fl_Output(550, 220, 140, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    { Fl_Output* o = drivername = new Fl_Output(550, 240, 140, 20);
+      o->box(FL_EMBOSSED_BOX);
+      o->selection_color(49);
+      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+    }
+    o->end();
+  }
+  return w;
+}
diff --git a/hdlcutil/fl/xfsmdiag.h b/hdlcutil/fl/xfsmdiag.h
new file mode 100644
index 0000000..20fcf18
--- /dev/null
+++ b/hdlcutil/fl/xfsmdiag.h
@@ -0,0 +1,32 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#ifndef xfsmdiag_h
+#define xfsmdiag_h
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+extern Fl_Window *scopewindow;
+#include <FL/Fl_Box.H>
+#include "xfsmdiag_main.h"
+extern scope *scdisp;
+#include <FL/Fl_Button.H>
+extern void cb_cleargr(Fl_Button*, long);
+extern Fl_Button *cleargr;
+#include <FL/Fl_Group.H>
+extern Fl_Group *scopemode;
+#include <FL/Fl_Check_Button.H>
+extern void cb_mode(Fl_Check_Button*, long);
+extern Fl_Check_Button *sm_off;
+extern Fl_Check_Button *sm_input;
+extern Fl_Check_Button *sm_demod;
+extern Fl_Check_Button *sm_constell;
+extern Fl_Check_Button *sm_dcd;
+extern void cb_quit(Fl_Button*, long);
+extern Fl_Button *quit;
+#include <FL/Fl_Round_Button.H>
+extern Fl_Round_Button *st_dcd;
+extern Fl_Round_Button *st_ptt;
+#include <FL/Fl_Output.H>
+extern Fl_Output *modename;
+extern Fl_Output *drivername;
+Fl_Window* create_the_forms();
+#endif
diff --git a/hdlcutil/fl/xfsmdiag_main.cxx b/hdlcutil/fl/xfsmdiag_main.cxx
new file mode 100644
index 0000000..695d98f
--- /dev/null
+++ b/hdlcutil/fl/xfsmdiag_main.cxx
@@ -0,0 +1,412 @@
+/*****************************************************************************/
+
+/*
+ *	xfsmdiag.c  -- kernel soundcard radio modem driver diagnostics utility.
+ *
+ *	Copyright (C) 1996,1997,2000  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *   0.1  14.12.1996  Started
+ *   0.2  11.05.1997  introduced hdrvcomm.h
+ *   0.3  05.01.2000  upgraded to fltk 1.0.7
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <limits.h>
+#include <net/if.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include "hdrvcomm.h"
+#include "xfsmdiag.h"
+#include <FL/x.H>
+#include <FL/fl_draw.H>
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+static unsigned int drawflags = 0;
+
+/* ---------------------------------------------------------------------- */
+
+scope::scope(int x, int y, int w, int h, const char *l)
+	: Fl_Box(x, y, w, h, l) 
+{
+	box(FL_DOWN_FRAME);
+	X = x+3;
+	Y = y+4;
+	W = w-6;
+	H = h-8;
+	drawmode = HDRVC_DIAGMODE_OFF;
+	pixmalloc = false;
+	hide();
+}
+
+scope::~scope()
+{
+	if (pixmalloc) {
+		XFreePixmap(fl_display, pixmap);
+		pixmalloc = false;
+	}
+}
+
+void scope::resize(int xx, int yy, int ww, int hh)
+{
+	if (pixmalloc && (ww != w() || hh != h())) {
+		XFreePixmap(fl_display, pixmap);
+		pixmalloc = false;
+	}
+	X = xx+3;
+	Y = yy+4;
+	W = ww-6;
+	H = hh-8;
+	Fl_Box::resize(xx, yy, ww, hh);
+}
+
+void scope::draw()
+{
+	GC gc;
+        XGCValues gcv;
+
+	/* cannot use draw_box(); as it clears the whole window -> flicker */
+	/* from fl_boxtype.C, fl_down_frame */
+	if (W > 0 && H > 0) {
+		fl_color(FL_DARK1); fl_xyline(X-3, Y-4, X+W+1);
+		fl_color(FL_DARK2); fl_yxline(X-3, Y+H+3, Y-3, X+W+1);
+		fl_color(FL_DARK3); fl_yxline(X-2, Y+H+2, Y-2, X+W);
+		fl_color(FL_LIGHT3); fl_xyline(X-1, Y+H+1, X+W+1, Y-2);
+		fl_color(FL_LIGHT2); fl_xyline(X-2, Y+H+2, X+W+2, Y-4);
+		fl_color(FL_LIGHT1); fl_xyline(X-3, Y+H+3, X+W+2);
+	}
+	draw_label();
+	if (pixmalloc)
+		XCopyArea(fl_display, pixmap, fl_window, fl_gc, 0, 0, W, H, X, Y);
+	else {
+		gcv.line_width = 1;
+		gcv.line_style = LineSolid;
+		gcv.fill_style = FillSolid;
+		gc = XCreateGC(fl_display, pixmap, GCLineWidth | GCLineStyle | GCFillStyle, &gcv);
+		XSetState(fl_display, gc, col_background, col_background, GXcopy, AllPlanes);
+		XFillRectangle(fl_display, fl_window, gc, X, Y, W, H);
+		XFreeGC(fl_display, gc);
+	}
+	XSync(fl_display, 0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+int scope::mode(void)
+{
+	mode(drawmode);
+	return drawmode;
+}
+
+void scope::mode(int dmode)
+{
+	Fl_Window *wnd;
+
+	if (dmode != drawmode) {
+		if (pixmalloc) {
+			XFreePixmap(fl_display, pixmap);
+			pixmalloc = false;
+		}
+		drawmode = dmode;
+		switch (drawmode) {
+		case HDRVC_DIAGMODE_OFF:
+		default:
+			hide();
+			break;
+
+		case HDRVC_DIAGMODE_INPUT:
+		case HDRVC_DIAGMODE_DEMOD:
+			size(512+6, 256+8);
+			show();
+			break;
+
+		case HDRVC_DIAGMODE_CONSTELLATION:
+			size(512+6, 512+8);
+			show();
+			break;
+		}
+	}
+	if (pixmalloc || !visible() || W < 2 || H < 2)
+		return;
+	if (!(wnd = window()))
+		return;
+	wnd->make_current();
+	if (!(pixmap = XCreatePixmap(fl_display, fl_window, W, H, fl_visual->depth))) {
+		fprintf(stderr, "unable to open offscreen pixmap\n");
+		exit(1);
+	}
+	pixmalloc = true;
+	col_zeroline = fl_xpixel(FL_RED);
+	col_background = fl_xpixel(FL_WHITE);
+	col_trace = fl_xpixel(FL_BLACK);
+	clear();
+}
+
+/* ---------------------------------------------------------------------- */
+
+void scope::clear(void)
+{
+	GC gc;
+        XGCValues gcv;
+
+	if (!pixmalloc)
+		return;
+	gcv.line_width = 1;
+        gcv.line_style = LineSolid;
+	gcv.fill_style = FillSolid;
+        gc = XCreateGC(fl_display, pixmap, GCLineWidth | GCLineStyle | GCFillStyle, &gcv);
+        XSetState(fl_display, gc, col_background, col_background, GXcopy, AllPlanes);
+	XFillRectangle(fl_display, pixmap, gc, 0, 0, W, H);
+        XFreeGC(fl_display, gc);
+	redraw();
+}
+
+/* ---------------------------------------------------------------------- */
+
+#define WIDTH 512
+
+/* ---------------------------------------------------------------------- */
+
+void scope::drawdata(short data[], int len, int xm)
+{
+	int cnt;
+        GC gc;
+        XGCValues gcv;
+
+	mode();
+	if (!pixmalloc || (drawmode != HDRVC_DIAGMODE_CONSTELLATION && 
+			   drawmode != HDRVC_DIAGMODE_INPUT && 
+			   drawmode != HDRVC_DIAGMODE_DEMOD))
+		return;
+	gcv.line_width = 1;
+        gcv.line_style = LineSolid;
+        gc = XCreateGC(fl_display, pixmap, GCLineWidth | GCLineStyle, &gcv);
+	if (drawmode == HDRVC_DIAGMODE_CONSTELLATION) {
+#define XCOORD(x) ((SHRT_MAX - (int)(x)) * W / USHRT_MAX)
+#define YCOORD(y) ((SHRT_MAX - (int)(y)) * H / USHRT_MAX)
+		XSetState(fl_display, gc, col_background, col_background, GXcopy, AllPlanes);
+		XSetForeground(fl_display, gc, col_trace);
+		for (cnt = 0; cnt < len-1; cnt += 2)
+			XDrawPoint(fl_display, pixmap, gc, XCOORD(data[cnt]), YCOORD(data[cnt+1]));
+		XSetForeground(fl_display, gc, col_zeroline);
+		XDrawLine(fl_display, pixmap, gc, 0, YCOORD(0), W, YCOORD(0));
+		XDrawLine(fl_display, pixmap, gc, XCOORD(0), 0, XCOORD(0), H);
+#undef XCOORD
+#undef YCOORD
+	} else {
+#define XCOORD(x) ((x) * xm)
+#define YCOORD(y) ((SHRT_MAX - (int)(y)) * H / USHRT_MAX)
+		XSetState(fl_display, gc, col_background, col_background, GXcopy, AllPlanes);
+		if (drawmode == HDRVC_DIAGMODE_INPUT) {
+			XFillRectangle(fl_display, pixmap, gc, 0, 0, W, H);
+			xm = 5;
+		}
+		XSetForeground(fl_display, gc, col_trace);
+		for (cnt = 0; cnt < len-1; cnt++)
+			XDrawLine(fl_display, pixmap, gc, XCOORD(cnt), YCOORD(data[cnt]),
+				  XCOORD(cnt+1), YCOORD(data[cnt+1]));
+		XSetForeground(fl_display, gc, col_zeroline);
+		XDrawLine(fl_display, pixmap, gc, 0, YCOORD(0), W, YCOORD(0));
+#undef XCOORD
+#undef YCOORD
+	}
+        XFreeGC(fl_display, gc);
+	redraw();
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_cleargr(Fl_Button *, long)
+{
+	scdisp->clear();
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_mode(Fl_Check_Button *, long which)
+{
+	struct sm_diag_data diag;
+	short data;
+
+	diag.mode = HDRVC_DIAGMODE_OFF;
+	diag.flags = 0;
+	diag.datalen = 1;
+	diag.data = &data;
+	hdrvc_diag(&diag);
+	switch (which) {
+	case 256:
+		drawflags ^= HDRVC_DIAGFLAG_DCDGATE;
+		break;
+		
+	case 0:
+		scdisp->mode(HDRVC_DIAGMODE_OFF);
+		drawflags = 0;
+		break;
+
+	case 1:
+		scdisp->mode(HDRVC_DIAGMODE_INPUT);
+		drawflags = 0;
+		break;
+
+	case 2:
+		scdisp->mode(HDRVC_DIAGMODE_DEMOD);
+		drawflags = HDRVC_DIAGFLAG_DCDGATE;
+		break;
+
+	case 3:
+		scdisp->mode(HDRVC_DIAGMODE_CONSTELLATION);
+		drawflags = HDRVC_DIAGFLAG_DCDGATE;
+		break;
+	}
+	sm_dcd->value(!!(drawflags & HDRVC_DIAGFLAG_DCDGATE));
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_quit(Fl_Button *, long)
+{
+	struct sm_diag_data diag;
+	short data;
+	
+	diag.mode = HDRVC_DIAGMODE_OFF;
+	diag.flags = 0;
+	diag.datalen = 1;
+	diag.data = &data;
+	hdrvc_diag(&diag);
+	exit(0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_timer(void *)
+{
+	struct hdrvc_channel_state cs;
+	int ret;
+	short data[256];
+	unsigned int samplesperbit;
+
+	Fl::add_timeout(0.2, cb_timer);
+	/*
+	 * display state
+	 */
+	ret = hdrvc_get_channel_state(&cs);
+	if (ret < 0) {
+		perror("hdrvc_get_channel_state");
+	} else {
+		st_ptt->value(cs.ptt);
+		st_dcd->value(cs.dcd);
+	}
+	/*
+	 * draw scope
+	 */
+	if ((ret = hdrvc_diag2(scdisp->mode(), drawflags, data, sizeof(data) / sizeof(short), 
+			       &samplesperbit)) < 0) {
+		perror("hdrvc_diag2");
+		exit(1);
+	}
+	if (ret > 0)
+		scdisp->drawdata(data, ret, WIDTH / (2*(samplesperbit > 0 ? samplesperbit : 1)));
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str = 
+"[-i smif]\n"
+"  -i: specify the name of the baycom kernel driver interface\n\n";
+
+/* ---------------------------------------------------------------------- */
+
+int main(int argc, char *argv[])
+{
+        int c, i;
+	int ret;
+	unsigned int ifflags;
+	char name[64];
+
+	progname = *argv;
+	printf("%s: Version 0.3; (C) 1996,1997,2000 by Thomas Sailer HB9JNX/AE4WA\n", *argv);
+
+	hdrvc_args(&argc, argv, "sm0");
+	for (i = 1; i < argc; ) {
+		c = i;
+		Fl::arg(argc, argv, c);
+		if (c <= 0) {
+			i++;
+			continue;
+		}
+		memmove(&argv[i], &argv[i+c], (argc-i) * sizeof(char *));
+		argc -= c;
+	}
+#if 0
+	while ((ret = getopt(argc, argv, "")) != -1) {
+		switch (ret) {
+		default:
+			printf("usage: %s %s", *argv, usage_str);
+			exit(-1);
+		}
+	}
+#endif
+	hdrvc_init();
+	ifflags = hdrvc_get_ifflags();
+	if (!(ifflags & IFF_UP)) {
+		fprintf(stderr, "interface %s down\n", hdrvc_ifname());
+		exit(1);
+	}
+	if (!(ifflags & IFF_RUNNING)) {
+		fprintf(stderr, "interface %s not running\n", hdrvc_ifname());
+		exit(1);
+	}
+	create_the_forms();
+	scdisp->hide();
+	/*
+	 * set driver and modem name
+	 */
+	ret = hdrvc_get_mode_name(name, sizeof(name));
+	if (ret < 0) {
+		perror("hdrvc_get_mode_name");
+		modename->hide();
+	} else 
+		modename->value(name);
+	ret = hdrvc_get_driver_name(name, sizeof(name));
+	if (ret < 0) {
+		perror("hdrvc_get_driver_name");
+		drivername->hide();
+	} else 
+		drivername->value(name);
+	Fl::add_timeout(0.1, cb_timer);
+	scopewindow->show();
+	Fl::run();
+	cb_quit(quit, 0);
+	exit(0);
+}
diff --git a/hdlcutil/fl/xfsmdiag_main.h b/hdlcutil/fl/xfsmdiag_main.h
new file mode 100644
index 0000000..e273e73
--- /dev/null
+++ b/hdlcutil/fl/xfsmdiag_main.h
@@ -0,0 +1,70 @@
+/*****************************************************************************/
+
+/*
+ *	xfsmdiag_main.h  -- kernel soundcard radio modem driver diagnostics utility.
+ *
+ *	Copyright (C) 1996,1997,2000  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *   0.1  14.12.1996  Started
+ *   0.2  11.05.1997  introduced hdrvcomm.h
+ *   0.3  05.01.2000  upgraded to fltk 1.0.7
+ */
+
+/*****************************************************************************/
+
+#ifndef _XFSMDIAG_MAIN_H
+#define _XFSMDIAG_MAIN_H
+
+/* ---------------------------------------------------------------------- */
+
+#include <FL/Fl.H>
+#include <FL/Fl_Box.H>
+#include <FL/x.H>
+
+/* ---------------------------------------------------------------------- */
+
+class scope : public Fl_Box {
+	Pixmap pixmap;
+	bool pixmalloc;
+	int X, Y, W, H;
+	unsigned long col_zeroline;
+	unsigned long col_background;
+	unsigned long col_trace;
+	int drawmode;
+
+protected:
+	void draw();
+	void resize(int, int, int, int);
+
+public:
+	scope(int, int, int, int, const char * = 0);
+	~scope();
+
+	void drawdata(short data[], int len, int xm);
+	void mode(int dmode);
+	int mode(void);
+	void clear(void);
+};
+
+/* ---------------------------------------------------------------------- */
+#endif /* _XFSMDIAG_MAIN_H */
diff --git a/hdlcutil/fl/xfsmmixer.cxx b/hdlcutil/fl/xfsmmixer.cxx
new file mode 100644
index 0000000..57b5306
--- /dev/null
+++ b/hdlcutil/fl/xfsmmixer.cxx
@@ -0,0 +1,437 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#include "xfsmmixer.h"
+
+Fl_Window *mixer_ad1848=(Fl_Window *)0;
+
+Fl_Value_Slider *ad1848_inl=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ad1848_inr=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ad1848_outl=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ad1848_outr=(Fl_Value_Slider *)0;
+
+Fl_Button *ad1848_quit=(Fl_Button *)0;
+
+Fl_Group *ad1848_srcr=(Fl_Group *)0;
+
+Fl_Check_Button *ad1848_srcr_line=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcr_aux1=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcr_mic=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcr_dac=(Fl_Check_Button *)0;
+
+Fl_Group *ad1848_srcl=(Fl_Group *)0;
+
+Fl_Check_Button *ad1848_srcl_line=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcl_aux1=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcl_mic=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcl_dac=(Fl_Check_Button *)0;
+
+Fl_Window* create_form_ad1848() {
+  Fl_Window* w;
+  { Fl_Window* o = mixer_ad1848 = new Fl_Window(300, 330, "SoundModem Mixer");
+    w = o;
+    o->box(FL_NO_BOX);
+    { Fl_Box* o = new Fl_Box(0, 0, 300, 330);
+      o->box(FL_UP_BOX);
+    }
+    { Fl_Box* o = new Fl_Box(10, 10, 280, 310);
+      o->box(FL_DOWN_BOX);
+    }
+    { Fl_Value_Slider* o = ad1848_inl = new Fl_Value_Slider(20, 20, 30, 270, "Input\nleft");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ad1848);
+    }
+    { Fl_Value_Slider* o = ad1848_inr = new Fl_Value_Slider(60, 20, 30, 270, "Input\nright");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ad1848);
+    }
+    { Fl_Value_Slider* o = ad1848_outl = new Fl_Value_Slider(100, 20, 30, 270, "Output\nleft");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ad1848);
+    }
+    { Fl_Value_Slider* o = ad1848_outr = new Fl_Value_Slider(140, 20, 30, 270, "Output\nright");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ad1848);
+    }
+    { Fl_Button* o = ad1848_quit = new Fl_Button(180, 280, 100, 30, "Quit");
+      o->callback((Fl_Callback*)cb_quit, (void*)(0));
+    }
+    { Fl_Group* o = ad1848_srcr = new Fl_Group(180, 150, 100, 120);
+      o->align(FL_ALIGN_CENTER);
+      { Fl_Box* o = new Fl_Box(180, 150, 100, 120);
+        o->box(FL_DOWN_BOX);
+      }
+      { Fl_Check_Button* o = ad1848_srcr_line = new Fl_Check_Button(190, 180, 60, 20, "Line");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ad1848);
+      }
+      { Fl_Check_Button* o = ad1848_srcr_aux1 = new Fl_Check_Button(190, 200, 60, 20, "Aux1");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ad1848);
+      }
+      { Fl_Check_Button* o = ad1848_srcr_mic = new Fl_Check_Button(190, 220, 60, 20, "Mic");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ad1848);
+      }
+      { Fl_Check_Button* o = ad1848_srcr_dac = new Fl_Check_Button(190, 240, 60, 20, "DAC");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ad1848);
+      }
+      { Fl_Box* o = new Fl_Box(190, 160, 60, 20, "Right source");
+        o->box(FL_FLAT_BOX);
+        o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+      }
+      o->end();
+    }
+    { Fl_Group* o = ad1848_srcl = new Fl_Group(180, 20, 100, 120);
+      o->align(FL_ALIGN_CENTER);
+      { Fl_Box* o = new Fl_Box(180, 20, 100, 120);
+        o->box(FL_DOWN_BOX);
+      }
+      { Fl_Box* o = new Fl_Box(190, 30, 60, 20, "Left source");
+        o->box(FL_FLAT_BOX);
+        o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+      }
+      { Fl_Check_Button* o = ad1848_srcl_line = new Fl_Check_Button(190, 50, 60, 20, "Line");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ad1848);
+      }
+      { Fl_Check_Button* o = ad1848_srcl_aux1 = new Fl_Check_Button(190, 70, 60, 20, "Aux1");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ad1848);
+      }
+      { Fl_Check_Button* o = ad1848_srcl_mic = new Fl_Check_Button(190, 90, 60, 20, "Mic");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ad1848);
+      }
+      { Fl_Check_Button* o = ad1848_srcl_dac = new Fl_Check_Button(190, 110, 60, 20, "DAC");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ad1848);
+      }
+      o->end();
+    }
+    o->end();
+  }
+  return w;
+}
+
+Fl_Window *mixer_ct1335=(Fl_Window *)0;
+
+Fl_Value_Slider *ct1335_out=(Fl_Value_Slider *)0;
+
+Fl_Button *ct1335_quit=(Fl_Button *)0;
+
+Fl_Window* create_form_ct1335() {
+  Fl_Window* w;
+  { Fl_Window* o = mixer_ct1335 = new Fl_Window(100, 360, "SoundModem Mixer");
+    w = o;
+    o->box(FL_NO_BOX);
+    { Fl_Box* o = new Fl_Box(0, 0, 100, 360);
+      o->box(FL_UP_BOX);
+    }
+    { Fl_Box* o = new Fl_Box(10, 10, 80, 340);
+      o->box(FL_DOWN_BOX);
+    }
+    { Fl_Value_Slider* o = ct1335_out = new Fl_Value_Slider(30, 20, 40, 270, "Output");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ct1335);
+    }
+    { Fl_Button* o = ct1335_quit = new Fl_Button(20, 310, 60, 30, "Quit");
+      o->callback((Fl_Callback*)cb_quit, (void*)(0));
+    }
+    o->end();
+  }
+  return w;
+}
+
+Fl_Window *mixer_ct1345=(Fl_Window *)0;
+
+Fl_Value_Slider *ct1345_outl=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ct1345_outr=(Fl_Value_Slider *)0;
+
+Fl_Button *ct1345_quit=(Fl_Button *)0;
+
+Fl_Group *ct1345_src=(Fl_Group *)0;
+
+Fl_Check_Button *ct1345_src_mic=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1345_src_cd=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1345_src_line=(Fl_Check_Button *)0;
+
+Fl_Window* create_form_ct1345() {
+  Fl_Window* w;
+  { Fl_Window* o = mixer_ct1345 = new Fl_Window(190, 330, "SoundModem Mixer");
+    w = o;
+    o->box(FL_NO_BOX);
+    { Fl_Box* o = new Fl_Box(0, 0, 190, 330);
+      o->box(FL_UP_BOX);
+    }
+    { Fl_Box* o = new Fl_Box(10, 10, 170, 310);
+      o->box(FL_DOWN_BOX);
+    }
+    { Fl_Value_Slider* o = ct1345_outl = new Fl_Value_Slider(20, 20, 30, 270, "Output\nleft");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ct1345);
+    }
+    { Fl_Value_Slider* o = ct1345_outr = new Fl_Value_Slider(60, 20, 30, 270, "Output\nright");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ct1345);
+    }
+    { Fl_Button* o = ct1345_quit = new Fl_Button(100, 280, 70, 30, "Quit");
+      o->callback((Fl_Callback*)cb_quit, (void*)(0));
+    }
+    { Fl_Group* o = ct1345_src = new Fl_Group(100, 20, 70, 100);
+      o->align(FL_ALIGN_CENTER);
+      { Fl_Box* o = new Fl_Box(100, 20, 70, 100);
+        o->box(FL_DOWN_BOX);
+      }
+      { Fl_Check_Button* o = ct1345_src_mic = new Fl_Check_Button(110, 50, 50, 20, "Mic");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1345);
+      }
+      { Fl_Check_Button* o = ct1345_src_cd = new Fl_Check_Button(110, 70, 50, 20, "CD");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1345);
+      }
+      { Fl_Check_Button* o = ct1345_src_line = new Fl_Check_Button(110, 90, 50, 20, "Line");
+        o->type(102);
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1345);
+      }
+      { Fl_Box* o = new Fl_Box(110, 30, 50, 20, "Source");
+        o->box(FL_FLAT_BOX);
+        o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+      }
+      o->end();
+    }
+    o->end();
+  }
+  return w;
+}
+
+Fl_Window *mixer_ct1745=(Fl_Window *)0;
+
+Fl_Value_Slider *ct1745_inl=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ct1745_inr=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ct1745_outl=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ct1745_outr=(Fl_Value_Slider *)0;
+
+Fl_Button *ct1745_quit=(Fl_Button *)0;
+
+Fl_Value_Slider *ct1745_treble=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ct1745_bass=(Fl_Value_Slider *)0;
+
+Fl_Group *ct1745_srcl=(Fl_Group *)0;
+
+Fl_Check_Button *ct1745_srcl_mic=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_cdl=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_cdr=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_linel=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_midil=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_midir=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_liner=(Fl_Check_Button *)0;
+
+Fl_Group *ct1745_srcr=(Fl_Group *)0;
+
+Fl_Check_Button *ct1745_srcr_mic=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_cdl=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_cdr=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_linel=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_midil=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_midir=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_liner=(Fl_Check_Button *)0;
+
+Fl_Window* create_form_ct1745() {
+  Fl_Window* w;
+  { Fl_Window* o = mixer_ct1745 = new Fl_Window(430, 330, "SoundModem Mixer");
+    w = o;
+    o->box(FL_NO_BOX);
+    { Fl_Box* o = new Fl_Box(0, 0, 430, 330);
+      o->box(FL_UP_BOX);
+    }
+    { Fl_Box* o = new Fl_Box(10, 10, 410, 310);
+      o->box(FL_DOWN_BOX);
+    }
+    { Fl_Value_Slider* o = ct1745_inl = new Fl_Value_Slider(20, 20, 30, 270, "Input\nleft");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ct1745);
+    }
+    { Fl_Value_Slider* o = ct1745_inr = new Fl_Value_Slider(60, 20, 30, 270, "Input\nright");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ct1745);
+    }
+    { Fl_Value_Slider* o = ct1745_outl = new Fl_Value_Slider(100, 20, 30, 270, "Output\nleft");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ct1745);
+    }
+    { Fl_Value_Slider* o = ct1745_outr = new Fl_Value_Slider(140, 20, 30, 270, "Output\nright");
+      o->type(2);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ct1745);
+    }
+    { Fl_Button* o = ct1745_quit = new Fl_Button(180, 280, 230, 30, "Quit");
+      o->callback((Fl_Callback*)cb_quit, (void*)(0));
+    }
+    { Fl_Value_Slider* o = ct1745_treble = new Fl_Value_Slider(180, 210, 230, 20, "Treble");
+      o->type(3);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ct1745);
+    }
+    { Fl_Value_Slider* o = ct1745_bass = new Fl_Value_Slider(180, 250, 230, 20, "Bass");
+      o->type(3);
+      o->labelsize(8);
+      o->callback((Fl_Callback*)update_ct1745);
+    }
+    { Fl_Group* o = ct1745_srcl = new Fl_Group(180, 20, 110, 180);
+      o->align(FL_ALIGN_CENTER);
+      { Fl_Box* o = new Fl_Box(180, 20, 110, 180);
+        o->box(FL_DOWN_BOX);
+      }
+      { Fl_Box* o = new Fl_Box(191, 29, 89, 18, "Left source");
+        o->box(FL_FLAT_BOX);
+        o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+      }
+      { Fl_Check_Button* o = ct1745_srcl_mic = new Fl_Check_Button(190, 50, 90, 20, "Mic");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcl_cdl = new Fl_Check_Button(190, 70, 90, 20, "CD left");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcl_cdr = new Fl_Check_Button(190, 90, 90, 20, "CD right");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcl_linel = new Fl_Check_Button(190, 110, 90, 20, "Line left");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcl_midil = new Fl_Check_Button(190, 150, 90, 20, "MIDI left");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcl_midir = new Fl_Check_Button(190, 170, 90, 20, "MIDI right");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcl_liner = new Fl_Check_Button(190, 130, 90, 20, "Line right");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      o->end();
+    }
+    { Fl_Group* o = ct1745_srcr = new Fl_Group(300, 20, 110, 180);
+      o->align(FL_ALIGN_CENTER);
+      { Fl_Box* o = new Fl_Box(300, 20, 110, 180);
+        o->box(FL_DOWN_BOX);
+      }
+      { Fl_Box* o = new Fl_Box(311, 29, 89, 18, "Right source");
+        o->box(FL_FLAT_BOX);
+        o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+      }
+      { Fl_Check_Button* o = ct1745_srcr_mic = new Fl_Check_Button(310, 50, 90, 20, "Mic");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcr_cdl = new Fl_Check_Button(310, 70, 90, 20, "CD left");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcr_cdr = new Fl_Check_Button(310, 90, 90, 20, "CD right");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcr_linel = new Fl_Check_Button(310, 110, 90, 20, "Line left");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcr_midil = new Fl_Check_Button(310, 150, 90, 20, "MIDI left");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcr_midir = new Fl_Check_Button(310, 170, 90, 20, "MIDI right");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      { Fl_Check_Button* o = ct1745_srcr_liner = new Fl_Check_Button(310, 130, 90, 20, "Line right");
+        o->down_box(FL_DIAMOND_DOWN_BOX);
+        o->selection_color(3);
+        o->callback((Fl_Callback*)update_ct1745);
+      }
+      o->end();
+    }
+    o->end();
+  }
+  return w;
+}
diff --git a/hdlcutil/fl/xfsmmixer.h b/hdlcutil/fl/xfsmmixer.h
new file mode 100644
index 0000000..5a59e8f
--- /dev/null
+++ b/hdlcutil/fl/xfsmmixer.h
@@ -0,0 +1,79 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#ifndef xfsmmixer_h
+#define xfsmmixer_h
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+extern Fl_Window *mixer_ad1848;
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Value_Slider.H>
+extern void update_ad1848(Fl_Widget*, void*);
+extern void update_ad1848(Fl_Value_Slider*, void*);
+extern Fl_Value_Slider *ad1848_inl;
+extern Fl_Value_Slider *ad1848_inr;
+extern Fl_Value_Slider *ad1848_outl;
+extern Fl_Value_Slider *ad1848_outr;
+#include <FL/Fl_Button.H>
+extern void cb_quit(Fl_Button*, long);
+extern Fl_Button *ad1848_quit;
+#include <FL/Fl_Group.H>
+extern Fl_Group *ad1848_srcr;
+#include <FL/Fl_Check_Button.H>
+extern void update_ad1848(Fl_Check_Button*, void*);
+extern Fl_Check_Button *ad1848_srcr_line;
+extern Fl_Check_Button *ad1848_srcr_aux1;
+extern Fl_Check_Button *ad1848_srcr_mic;
+extern Fl_Check_Button *ad1848_srcr_dac;
+extern Fl_Group *ad1848_srcl;
+extern Fl_Check_Button *ad1848_srcl_line;
+extern Fl_Check_Button *ad1848_srcl_aux1;
+extern Fl_Check_Button *ad1848_srcl_mic;
+extern Fl_Check_Button *ad1848_srcl_dac;
+Fl_Window* create_form_ad1848();
+extern Fl_Window *mixer_ct1335;
+extern void update_ct1335(Fl_Widget*, void*);
+extern void update_ct1335(Fl_Value_Slider*, void*);
+extern Fl_Value_Slider *ct1335_out;
+extern Fl_Button *ct1335_quit;
+Fl_Window* create_form_ct1335();
+extern Fl_Window *mixer_ct1345;
+extern void update_ct1345(Fl_Widget*, void*);
+extern void update_ct1345(Fl_Value_Slider*, void*);
+extern Fl_Value_Slider *ct1345_outl;
+extern Fl_Value_Slider *ct1345_outr;
+extern Fl_Button *ct1345_quit;
+extern Fl_Group *ct1345_src;
+extern void update_ct1345(Fl_Check_Button*, void*);
+extern Fl_Check_Button *ct1345_src_mic;
+extern Fl_Check_Button *ct1345_src_cd;
+extern Fl_Check_Button *ct1345_src_line;
+Fl_Window* create_form_ct1345();
+extern Fl_Window *mixer_ct1745;
+extern void update_ct1745(Fl_Widget*, void*);
+extern void update_ct1745(Fl_Value_Slider*, void*);
+extern Fl_Value_Slider *ct1745_inl;
+extern Fl_Value_Slider *ct1745_inr;
+extern Fl_Value_Slider *ct1745_outl;
+extern Fl_Value_Slider *ct1745_outr;
+extern Fl_Button *ct1745_quit;
+extern Fl_Value_Slider *ct1745_treble;
+extern Fl_Value_Slider *ct1745_bass;
+extern Fl_Group *ct1745_srcl;
+extern void update_ct1745(Fl_Check_Button*, void*);
+extern Fl_Check_Button *ct1745_srcl_mic;
+extern Fl_Check_Button *ct1745_srcl_cdl;
+extern Fl_Check_Button *ct1745_srcl_cdr;
+extern Fl_Check_Button *ct1745_srcl_linel;
+extern Fl_Check_Button *ct1745_srcl_midil;
+extern Fl_Check_Button *ct1745_srcl_midir;
+extern Fl_Check_Button *ct1745_srcl_liner;
+extern Fl_Group *ct1745_srcr;
+extern Fl_Check_Button *ct1745_srcr_mic;
+extern Fl_Check_Button *ct1745_srcr_cdl;
+extern Fl_Check_Button *ct1745_srcr_cdr;
+extern Fl_Check_Button *ct1745_srcr_linel;
+extern Fl_Check_Button *ct1745_srcr_midil;
+extern Fl_Check_Button *ct1745_srcr_midir;
+extern Fl_Check_Button *ct1745_srcr_liner;
+Fl_Window* create_form_ct1745();
+#endif
diff --git a/hdlcutil/fl/xfsmmixer_main.cxx b/hdlcutil/fl/xfsmmixer_main.cxx
new file mode 100644
index 0000000..5569e7c
--- /dev/null
+++ b/hdlcutil/fl/xfsmmixer_main.cxx
@@ -0,0 +1,462 @@
+/*****************************************************************************/
+
+/*
+ *	xfsmmixer_main.c  -- kernel soundcard radio modem driver mixer utility.
+ *
+ *	Copyright (C) 1996,1997,2000  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *   0.1  14.12.1996  Started
+ *   0.2  11.05.1997  introduced hdrvcomm.h
+ *   0.3  05.01.2000  upgraded to fltk 1.0.7
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <net/if.h>
+//#include <forms.h>
+#include "hdrvcomm.h"
+#include "xfsmmixer.h"
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+static unsigned int mixdevice;
+
+/* ---------------------------------------------------------------------- */
+
+static int do_mix_ioctl(int cmd, struct sm_mixer_data *mixdat)
+{
+        struct sm_ioctl par;
+	int i;
+	
+	par.cmd = cmd;
+	par.data.mix = *mixdat;
+	i = hdrvc_sm_ioctl(cmd, &par);
+	*mixdat = par.data.mix;
+	return i;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static unsigned char get_mixer_reg(unsigned char addr)
+{
+	int i;
+	struct sm_mixer_data mixdat;
+
+	mixdat.reg = addr;
+	if ((i = do_mix_ioctl(SMCTL_GETMIXER, &mixdat)) < 0) {
+		perror("do_mix_ioctl: SMCTL_GETMIXER");
+		exit(1);
+	}
+	if (!i)
+		fprintf(stderr, "warning: mixer device %u register %u not "
+			"accessible for reading!\n", mixdat.mixer_type,
+			addr);
+	if (mixdat.mixer_type != mixdevice) {
+		fprintf(stderr, "error: mixer type changed !?\n");
+		exit(2);
+	}
+	return mixdat.data;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void set_mixer_reg(unsigned char addr, unsigned char data)
+{
+	struct sm_mixer_data mixdat;
+
+	mixdat.reg = addr;
+	mixdat.data = data;
+	mixdat.mixer_type = mixdevice;
+	if (do_mix_ioctl(SMCTL_SETMIXER, &mixdat) < 0) {
+		perror("do_mix_ioctl: SMCTL_SETMIXER");
+		exit(1);
+	}
+}
+
+/* ---------------------------------------------------------------------- */
+
+void update_ad1848(Fl_Widget *widget, void *udata)
+{
+	unsigned char mdata;
+	float mval;
+
+	mdata = 0;
+	if (ad1848_srcl_line->value())
+		mdata = 0x00;
+	else if (ad1848_srcl_aux1->value())
+		mdata = 0x40;
+	else if (ad1848_srcl_mic->value())
+		mdata = 0x80;
+	else if (ad1848_srcl_dac->value())
+		mdata = 0xc0;
+	mval = ad1848_inl->value();
+	if (mdata == 0x80 && mval >= 20) {
+		mval -= 20;
+		mdata |= 0x20;
+	}
+	mval *= 0.666666;
+	if (mval > 15) 
+		mval = 15;
+	mdata |= (int)mval;
+	set_mixer_reg(0x00, mdata);
+	mdata = 0;
+	if (ad1848_srcr_line->value())
+		mdata = 0x00;
+	else if (ad1848_srcr_aux1->value())
+		mdata = 0x40;
+	else if (ad1848_srcr_mic->value())
+		mdata = 0x80;
+	else if (ad1848_srcr_dac->value())
+		mdata = 0xc0;
+	mval = ad1848_inr->value();
+	if (mdata == 0x80 && mval >= 20) {
+		mval -= 20;
+		mdata |= 0x20;
+	}
+	mval *= 0.666666;
+	if (mval > 15) 
+		mval = 15;
+	mdata |= (int)mval;
+	set_mixer_reg(0x01, mdata);
+	set_mixer_reg(0x02, 0x80);
+	set_mixer_reg(0x03, 0x80);
+	set_mixer_reg(0x04, 0x80);
+	set_mixer_reg(0x05, 0x80);
+	mval = ad1848_outl->value();
+	if (mval < -95)
+		set_mixer_reg(0x06, 0x80);
+	else 
+		set_mixer_reg(0x06, (unsigned char)(mval * (-0.66666666)));
+	mval = ad1848_outr->value();
+	if (mval < -95)
+		set_mixer_reg(0x07, 0x80);
+	else 
+		set_mixer_reg(0x07, (unsigned char)(mval * (-0.66666666)));
+	set_mixer_reg(0x0d, 0x00);
+}
+
+/* ---------------------------------------------------------------------- */
+
+void update_ct1335(Fl_Widget *widget, void *udata)
+{
+	float mval;
+
+	mval = ct1335_out->value() * (7.0 / 46.0);
+	set_mixer_reg(0x02, ((((int)(mval)) + 7) << 1));
+	set_mixer_reg(0x06, 0x00);
+	set_mixer_reg(0x08, 0x00);
+	set_mixer_reg(0x0a, 0x06);
+}
+
+/* ---------------------------------------------------------------------- */
+
+void update_ct1345(Fl_Widget *widget, void *udata)
+{
+	unsigned char mdata;
+	double mval;
+
+	set_mixer_reg(0x04, 0xee);
+	set_mixer_reg(0x0a, 0x00);
+	mdata = 0x20;
+	if (ct1345_src_mic->value())
+		mdata = 0x20;
+	else if (ct1345_src_cd->value())
+		mdata = 0x22;
+	else if (ct1345_src_line->value())
+		mdata = 0x26;
+	set_mixer_reg(0x0c, mdata);
+	set_mixer_reg(0x0e, 0x20);
+	mval = ct1345_outl->value() * (7.0 / 46.0);
+	mdata = (((int)(mval))+7) << 5;
+	mval = ct1345_outr->value() * (7.0 / 46.0);
+	mdata |= (((int)(mval))+7) << 1;
+	set_mixer_reg(0x22, mdata);
+	set_mixer_reg(0x26, 0x00);
+	set_mixer_reg(0x28, 0x00);
+	set_mixer_reg(0x2e, 0x00);
+}
+
+/* ---------------------------------------------------------------------- */
+
+void update_ct1745(Fl_Widget *widget, void *udata)
+{
+	unsigned char mdata;
+	float mval;
+
+	set_mixer_reg(0x3c, 0); /* output src: only voice and pcspk */
+	mval = ct1745_treble->value();
+	set_mixer_reg(0x44, ((int)mval)<<4); /* treble.l */
+	set_mixer_reg(0x45, ((int)mval)<<4); /* treble.r */
+	mval = ct1745_bass->value();
+	set_mixer_reg(0x46, ((int)mval)<<4); /* bass.l */
+	set_mixer_reg(0x47, ((int)mval)<<4); /* bass.r */
+	set_mixer_reg(0x3b, 0); /* PC speaker vol -18dB */
+	set_mixer_reg(0x43, 1); /* mic: agc off, fixed 20dB gain */
+	mval = ct1745_outl->value();
+	mdata = 0;
+	while (mval > 0) {
+		mval -= 6;
+		mdata += 0x40;
+	}
+	set_mixer_reg(0x41, mdata); /* output gain */
+	set_mixer_reg(0x30, 0xf8); /* master vol */
+	set_mixer_reg(0x32, ((int)(mval * 0.5) + 31) << 3); /* voice vol */
+	mval = ct1745_outr->value();
+	mdata = 0;
+	while (mval > 0) {
+		mval -= 6;
+		mdata += 0x40;
+	}
+	set_mixer_reg(0x42, mdata); /* output gain */
+	set_mixer_reg(0x31, 0xf8); /* master vol */
+	set_mixer_reg(0x33, ((int)(mval * 0.5) + 31) << 3); /* voice vol */
+	mval = ct1745_inl->value();
+	mdata = 0;
+	while (mval > 0) {
+		mval -= 6;
+		mdata += 0x40;
+	}
+	set_mixer_reg(0x3f, mdata); /* input gain */
+	mdata = ((int)(mval * 0.5) + 31) << 3;
+	set_mixer_reg(0x34, mdata); /* midi vol */
+	set_mixer_reg(0x36, mdata); /* cd vol */
+	set_mixer_reg(0x38, mdata); /* line vol */
+	set_mixer_reg(0x3a, mdata); /* mic vol */
+	mval = ct1745_inr->value();
+	mdata = 0;
+	while (mval > 0) {
+		mval -= 6;
+		mdata += 0x40;
+	}
+	set_mixer_reg(0x40, mdata); /* input gain */
+	mdata = ((int)(mval * 0.5) + 31) << 3;
+	set_mixer_reg(0x35, mdata); /* midi vol */
+	set_mixer_reg(0x37, mdata); /* cd vol */
+	set_mixer_reg(0x39, mdata); /* line vol */
+	mdata = 0;
+	if (ct1745_srcl_mic->value())
+		mdata |= 0x01;
+	if (ct1745_srcl_cdl->value())
+		mdata |= 0x04;
+	if (ct1745_srcl_cdr->value())
+		mdata |= 0x02;
+	if (ct1745_srcl_linel->value())
+		mdata |= 0x10;
+	if (ct1745_srcl_liner->value())
+		mdata |= 0x08;
+	if (ct1745_srcl_midil->value())
+		mdata |= 0x40;
+	if (ct1745_srcl_midir->value())
+		mdata |= 0x20;				
+	set_mixer_reg(0x3d, mdata); /* input sources left */
+	mdata = 0;
+	if (ct1745_srcr_mic->value())
+		mdata |= 0x01;
+	if (ct1745_srcr_cdl->value())
+		mdata |= 0x04;
+	if (ct1745_srcr_cdr->value())
+		mdata |= 0x02;
+	if (ct1745_srcr_linel->value())
+		mdata |= 0x10;
+	if (ct1745_srcr_liner->value())
+		mdata |= 0x08;
+	if (ct1745_srcr_midil->value())
+		mdata |= 0x40;
+	if (ct1745_srcr_midir->value())
+		mdata |= 0x20;				
+	set_mixer_reg(0x3e, mdata); /* input sources right*/
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_quit(Fl_Button *, long)
+{
+	exit (0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str = 
+"[-i smif]\n"
+"  -i: specify the name of the soundmodem kernel driver interface\n\n";
+
+/* ---------------------------------------------------------------------- */
+
+int main(int argc, char *argv[])
+{
+        int c, i;
+	struct sm_mixer_data mixdat;
+	unsigned char mdata;
+	
+	progname = *argv;
+	printf("%s: Version 0.3; (C) 1996,1997,2000 by Thomas Sailer HB9JNX/AE4WA\n", progname);
+	hdrvc_args(&argc, argv, "sm0");
+	for (i = 1; i < argc; ) {
+		c = i;
+		Fl::arg(argc, argv, c);
+		if (c <= 0) {
+			i++;
+			continue;
+		}
+		memmove(&argv[i], &argv[i+c], (argc-i) * sizeof(char *));
+		argc -= c;
+	}
+#if 0
+	while ((ret = getopt(argc, argv, "")) != -1) {
+		switch (ret) {
+		default:
+			printf("usage: %s %s", progname, usage_str);
+			exit(-1);
+		}
+	}
+#endif
+	hdrvc_init();
+	/*
+	 * set mixer
+	 */
+	mixdat.reg = 0;
+	if (do_mix_ioctl(SMCTL_GETMIXER, &mixdat) < 0) {
+		perror("do_mix_ioctl: SMCTL_GETMIXER");
+		mixdevice = SM_MIXER_INVALID;
+	} else
+		mixdevice = mixdat.mixer_type;
+	switch (mixdevice) {
+	case SM_MIXER_INVALID:
+		printf("invalid mixer device\n");
+		exit(1);
+
+	case SM_MIXER_AD1848:
+	case SM_MIXER_CRYSTAL:
+		printf("Mixer device: %s\n", mixdevice == SM_MIXER_CRYSTAL ? 
+		       "CS423x" : "AD1848");
+		create_form_ad1848();
+		mdata = get_mixer_reg(0);
+		ad1848_inl->step(1.5);
+		ad1848_inl->bounds(42.5, 0);
+		ad1848_inl->value((((mdata & 0xe0) == 0xa0) ? 20 : 0) + (mdata & 0xf) * 1.5);
+		ad1848_srcl_line->value((mdata & 0xc0) == 0x00);
+		ad1848_srcl_aux1->value((mdata & 0xc0) == 0x40);
+		ad1848_srcl_mic->value((mdata & 0xc0) == 0x80);
+		ad1848_srcl_dac->value((mdata & 0xc0) == 0xc0);
+		mdata = get_mixer_reg(1);
+		ad1848_inr->step(1.5);
+		ad1848_inr->bounds(42.5, 0);
+		ad1848_inr->value((((mdata & 0xe0) == 0xa0) ? 20 : 0) + (mdata & 0xf) * 1.5);
+		ad1848_srcr_line->value((mdata & 0xc0) == 0x00);
+		ad1848_srcr_aux1->value((mdata & 0xc0) == 0x40);
+		ad1848_srcr_mic->value((mdata & 0xc0) == 0x80);
+		ad1848_srcr_dac->value((mdata & 0xc0) == 0xc0);
+		mdata = get_mixer_reg(6);
+		ad1848_outl->step(1.5);
+		ad1848_outl->bounds(0, -100);
+		ad1848_outl->value((mdata & 0x80) ? -100 : (mdata & 0x3f) * -1.5);
+		mdata = get_mixer_reg(7);
+		ad1848_outr->step(1.5);
+		ad1848_outr->bounds(0, -100);
+		ad1848_outr->value((mdata & 0x80) ? -100 : (mdata & 0x3f) * -1.5);
+		mixer_ad1848->show();
+		break;
+
+	case SM_MIXER_CT1335:
+		printf("Mixer device: CT1335\n");
+		create_form_ct1335();
+		mdata = get_mixer_reg(0x2);
+		ct1335_out->step(46.0/7.0);
+		ct1335_out->bounds(0, -46);
+		ct1335_out->value((((int)((mdata >> 1) & 7)) - 7) * (46.0/7.0));
+		mixer_ct1335->show();
+		break;
+
+	case SM_MIXER_CT1345:
+		printf("Mixer device: CT1345\n");
+		create_form_ct1345();
+		mdata = get_mixer_reg(0x22);
+		ct1345_outl->step(46.0/7.0);
+		ct1345_outl->bounds(0, -46);
+		ct1345_outl->value((((int)((mdata >> 5) & 7)) - 7) * (46.0/7.0));
+		ct1345_outr->step(46.0/7.0);
+		ct1345_outr->bounds(0, -46);
+		ct1345_outr->value((((int)((mdata >> 1) & 7)) - 7) * (46.0/7.0));
+		mdata = get_mixer_reg(0xc);
+		ct1345_src_mic->value((mdata & 6) == 0 || (mdata & 6) == 4);
+		ct1345_src_cd->value((mdata & 6) == 2);
+		ct1345_src_line->value((mdata & 6) == 6);
+		mixer_ct1345->show();
+		break;
+
+	case SM_MIXER_CT1745:
+		printf("Mixer device: CT1745\n");
+		create_form_ct1745();
+		ct1745_outl->step(2);
+		ct1745_outl->bounds(0, -62);
+		ct1745_outl->value(((int)((get_mixer_reg(0x32) >> 3) & 0x1f) - 31) * 2 +
+				   ((get_mixer_reg(0x41) >> 6) & 0x3) * 6);
+		ct1745_outr->step(2);
+		ct1745_outr->bounds(0, -62);
+		ct1745_outr->value(((int)((get_mixer_reg(0x33) >> 3) & 0x1f) - 31) * 2 +
+				   ((get_mixer_reg(0x42) >> 6) & 0x3) * 6);
+		ct1745_inl->step(2);
+		ct1745_inl->bounds(0, -62);
+		ct1745_inl->value(((int)((get_mixer_reg(0x38) >> 3) & 0x1f) - 31) * 2 +
+				  ((get_mixer_reg(0x3f) >> 6) & 0x3) * 6);
+		ct1745_inr->step(2);
+		ct1745_inr->bounds(0, -62);
+		ct1745_inr->value(((int)((get_mixer_reg(0x39) >> 3) & 0x1f) - 31) * 2 +
+				  ((get_mixer_reg(0x40) >> 6) & 0x3) * 6);
+		mdata = get_mixer_reg(0x3d);
+		ct1745_srcl_mic->value(!!(mdata & 1));
+		ct1745_srcl_cdl->value(!!(mdata & 4));
+		ct1745_srcl_cdr->value(!!(mdata & 2));
+		ct1745_srcl_linel->value(!!(mdata & 0x10));
+		ct1745_srcl_liner->value(!!(mdata & 8));
+		ct1745_srcl_midil->value(!!(mdata & 0x40));
+		ct1745_srcl_midir->value(!!(mdata & 0x20));
+		mdata = get_mixer_reg(0x3e);
+		ct1745_srcr_mic->value(!!(mdata & 1));
+		ct1745_srcr_cdl->value(!!(mdata & 4));
+		ct1745_srcr_cdr->value(!!(mdata & 2));
+		ct1745_srcr_linel->value(!!(mdata & 0x10));
+		ct1745_srcr_liner->value(!!(mdata & 8));
+		ct1745_srcr_midil->value(!!(mdata & 0x40));
+		ct1745_srcr_midir->value(!!(mdata & 0x20));
+		ct1745_treble->step(1);
+		ct1745_treble->bounds(7, -8);
+		ct1745_treble->value((get_mixer_reg(0x44) >> 4) & 0xf);
+		ct1745_bass->step(1);
+		ct1745_bass->bounds(7, -8);
+		ct1745_bass->value((get_mixer_reg(0x46) >> 4) & 0xf);
+		mixer_ct1745->show();
+		break;
+
+	default:
+		printf("unknown mixer device %d\n", mixdevice);
+		exit(1);
+	}
+	Fl::run();
+	exit(0);
+}
diff --git a/hdlcutil/hdlcdrv.9 b/hdlcutil/hdlcdrv.9
new file mode 100644
index 0000000..d0182ff
--- /dev/null
+++ b/hdlcutil/hdlcdrv.9
@@ -0,0 +1,220 @@
+.\" Copyright 1996 Thomas Sailer (t.sailer at alumni.ethz.ch)
+.\" May be distributed under the GNU General Public License
+.\" "
+.TH HDLCDRV 9 "2 October 1996" "Linux 2.1.x" "Kernel Reference Guide"
+.SH NAME
+hdlcdrv \- HDLC amateur (AX.25) packet radio network driver
+.SH SYNOPSIS
+
+.B #include <linux/hdlcdrv.h>
+
+.B linux/drivers/net/hdlcdrv.c
+
+.BI "extern inline void hdlcdrv_putbits(struct hdlcdrv_state * " s ", unsigned int " bits ");"
+
+.BI "extern inline unsigned int hdlcdrv_getbits(struct hdlcdrv_state * " s ");"
+
+.BI "extern inline void hdlcdrv_channelbit(struct hdlcdrv_state * " s ", unsigned int " bit ");"
+
+.BI "extern inline void hdlcdrv_setdcd(struct hdlcdrv_state * " s " , int " dcd ");"
+
+.BI "extern inline int hdlcdrv_ptt(struct hdlcdrv_state * " s ");"
+
+.BI "void hdlcdrv_receiver(struct device *, struct hdlcdrv_state *);"
+
+.BI "void hdlcdrv_transmitter(struct device *, struct hdlcdrv_state *);"
+
+.BI "void hdlcdrv_arbitrate(struct device *, struct hdlcdrv_state *);"
+
+.BI "int hdlcdrv_register_hdlcdrv(struct device * " dev ", struct hdlcdrv_ops * " ops ", unsigned int " privsize ", char * " ifname ", unsigned int " baseaddr " , unsigned int " irq ", unsigned int " dma ");
+
+.BI "int hdlcdrv_unregister_hdlcdrv(struct device * " dev ");"
+
+.SH DESCRIPTION
+This driver should ease the implementation of simple AX.25 packet radio
+modems where the software is responsible for the HDLC encoding and decoding.
+Examples of such modems include the \fIbaycom\fP family and the 
+\fIsoundcard\fP modems. 
+
+This driver provides a standard Linux network driver interface.
+It can even be compiled if Kernel AX.25 is not enabled in the Linux
+configuration. This allows this driver to be used even for userland
+AX.25 stacks such as \fIWampes\fP or \fITNOS\fP, with the help of
+the \fInet2kiss\fP utility.
+
+This driver does not access any hardware; it is the responsibility of
+an additional hardware driver such as \fIbaycom\fP or \fIsoundmodem\fP
+to access the hardware and derive the bitstream to feed into this
+driver.
+
+The hardware driver should store its state in a structure of the
+following form:
+
+.nf
+struct hwdrv_state {
+	struct hdlc_state \fIhdrv\fP;
+
+	... the drivers private state
+};
+.fi
+
+A pointer to this structure will be stored in \fIdev->priv\fP.
+
+\fBhdlcdrv_register_hdlcdrv\fP registers a hardware driver to the
+hdlc driver. \fIdev\fP points to storage for the \fIdevice\fP structure,
+which must be provided by the hardware driver, but gets initialized by
+this function call. \fIops\fP provides information about the hardware driver
+and its calls. \fIprivsize\fP should be \fIsizeof(struct\ hwdrv_state)\fP.
+\fIifname\fP specifies the name the interface should get. \fIbaseaddr\fP,
+\fIirq\fP and \fIdma\fP are simply stored in the \fIdevice\fP structure.
+After this function succeeds, the interface is registered with the kernel.
+It is not running, however, this must be done with
+\fBifconfig\ \fP\fIifname\fP\fB\ up\fP.
+
+\fBhdlcdrv_unregister_hdlcdrv\fP shuts the interface down and unregisters
+it with the kernel.
+
+\fBhdlcdrv_putbits\fP delivers 16 received bits for processing to the HDLC
+driver. This routine merely stores them in a buffer and does not process them.
+It is thus fast and can be called with interrupts off. The least significant
+bit should be the first one received.
+
+\fBhdlcdrv_getbits\fP requests 16 bits from the driver for transmission.
+The least significant bit should be transmitted first. This routine takes
+them from a buffer and is therefore fast. It can be called with interrupts
+off.
+
+\fBhdlcdrv_channelbit\fP puts a single bit into a buffer, which can be
+displayed with \fBsethdlc\ \-s\fP. It is intended for driver debugging
+purposes.
+
+\fBhdlcdrv_setdcd\fP informs the HDLC driver about the channel state
+(i.e. if the hardware driver detected a data carrier). This information
+is used in the channel access algorithm, i.e. it prevents the driver
+from transmitting on a half duplex channel if there is already a
+transmitter on air.
+
+\fBhdlcdrv_ptt\fP should be called by the hardware driver to determine
+if it should start or stop transmitting. The hardware driver does not
+need to worry about keyup delays. This is done by the HDLC driver.
+
+\fBhdlcdrv_receiver\fP actually processes the received bits delivered
+by \fBhdlcdrv_putbits\fP. It should be called with interrupts on.
+It guards itself against reentrance problems.
+
+\fBhdlcdrv_transmitter\fP actually prepares the bits to be transmitted.
+It should be called with interrupts on. It guards itself against
+reentrance problems.
+
+\fBhdlcdrv_arbitrate\fP does the channel access algorithm
+(p-persistent CSMA). It should be called once every 10ms. Note that the
+hardware driver \fBmust\fP set the \fIhdrv.par.bitrate\fP field prior
+to starting operation so that \fBhdlcdrv\fP can calculate the transmitter
+keyup delay correctly.
+
+.SH "HARDWARE DRIVER ENTRY POINTS"
+The hardware driver should provide the following information to
+the HDLC driver:
+
+.nf
+struct hdlcdrv_ops {
+        const char *\fIdrvname\fP;
+        const char *\fIdrvinfo\fP;
+        int (*\fIopen\fP)(struct device *);
+        int (*\fIclose\fP)(struct device *);
+        int (*\fIioctl\fP)(struct device *, struct ifreq *, int);
+};
+.fi
+
+\fBdrvname\fP and \fBdrvinfo\fP are just for informational purposes.
+
+The following routines receive a pointer to the \fIdevice\fP structure,
+where they may find the io address, irq and dma channels.
+
+\fBopen\fP must be provided. It is called during
+\fBifconfig\ \fP\fIifname\fP\fB\ up\fP and should check for the hardware,
+grab it and initialize it. It usually installs an interrupt handler
+which then gets invoked by the hardware.
+
+\fBclose\fP must be provided. It is called during
+\fBifconfig\ \fP\fIifname\fP\fB\ down\fP and should undo all actions done
+by \fBopen\fP, i.e. release io regions and irqs.
+
+\fBioctl\fP may be provided to implement device specific ioctl's. 
+
+.SH "IOCTL CALLS"
+
+The driver only responds to \fISIOCDEVPRIVATE\fP. Parameters are passed
+from and to the driver using the following struct:
+
+.nf
+struct hdlcdrv_ioctl {
+        int cmd;
+        union {
+                struct hdlcdrv_params mp;
+                struct hdlcdrv_channel_params cp;
+                struct hdlcdrv_channel_state cs;
+                unsigned int calibrate;
+                unsigned char bits;
+        } data;
+};
+.fi
+
+Since the 16 private \fIioctl\ request\fP numbers for network drivers
+were not enough, the driver implements its own \fIsub\ request\fP number
+with \fIcmd\fP. The following numbers are implemented:
+
+.TP
+.B HDLCDRVCTL_GETMODEMPAR
+returns the IO parameters of the modem in \fIdata.mp\fP. This includes
+the io address, irq, eventually dma, and ports to output a PTT signal.
+
+.TP
+.B HDLCDRVCTL_SETMODEMPAR
+sets the modem parameters. Only superuser can do this. Parameters
+can only be changed if the interface is not running (i.e. down).
+
+.TP
+.B HDLCDRVCTL_GETCHANNELPAR
+returns the channel access parameters.
+
+.TP
+.B HDLCDRVCTL_SETCHANNELPAR
+sets the channel access parameters. Only superuser can do this.
+They may also be changed using the \fBkissparms\fP command if using
+kernel AX.25 or the \fBparam\fP command of \fB*NOS\fP.
+
+.TP
+.B HDLCDRVCTL_GETSTAT
+statistics and status information, such as if a carrier is detected
+on the channel and if the interface is currently transmitting.
+
+.TP
+.B HDLCDRVCTL_CALIBRATE
+instructs the driver to transmit a calibration pattern for the
+specified number of seconds.
+
+.TP
+.B HDLCDRVCTL_GETSAMPLES
+returns the bits delivered by the hardware driver with
+\fIhdlcdrv_channelbit\fP. The bits are returned 8 at a time
+with the least significant bit the first one. This command may not be
+available, depending on debugging settings.
+
+.TP
+.B HDLCDRVCTL_GETBITS
+returns the bits delivered by the hardware driver to the HDLC decoder.
+The bits are returned 8 at a time with the least significant bit the
+first one. This command may not be available, depending on debugging
+settings.
+
+.SH "SEE ALSO"
+.BR baycom "\ (9), " soundmodem "\ (9), " sethdlc "\ (8), "
+linux/drivers/net/hdlcdrv.c,
+
+.SH AUTHOR
+hdlcdrv was written by Thomas Sailer, HB9JNX/AE4WA, (t.sailer at alumni.ethz.ch).
+
+
+
+
diff --git a/hdlcutil/hdrvcomm.c b/hdlcutil/hdrvcomm.c
new file mode 100644
index 0000000..6b4335e
--- /dev/null
+++ b/hdlcutil/hdrvcomm.c
@@ -0,0 +1,717 @@
+/*****************************************************************************/
+
+/*
+ *	hdrvcomm.c  -- HDLC driver communications.
+ *
+ *	Copyright (C) 1996-1998  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *   0.1  10.05.97  Started
+ *   0.2  14.04.98  Tried to implement AF_PACKET
+ */
+
+/*****************************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
+#include <endian.h>
+#include <netinet/in.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <net/if.h>
+#include "hdrvcomm.h"
+#include "usersmdiag.h"
+#include <net/if_arp.h>
+
+#ifdef __GLIBC__
+#include <net/ethernet.h>
+#else
+#include <linux/if_ether.h>
+#endif
+
+#include <linux/if_packet.h>
+#ifndef SOL_PACKET
+#define SOL_PACKET  263
+#endif
+
+/* ---------------------------------------------------------------------- */
+
+#ifdef HDRVC_KERNEL
+static int kernel_mode = 1;
+#endif /* HDRVC_KERNEL */
+static const char *if_name = "bcsf0";
+static char *prg_name;
+static int fd = -1;
+static struct ifreq ifr_h;
+static int promisc = 0;
+static int afpacket = 1;
+static int msqid = -1;
+
+/* ---------------------------------------------------------------------- */
+
+static void terminate(void)
+{
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		if (ioctl(fd, SIOCSIFFLAGS, &ifr_h) < 0) {
+			perror("ioctl (SIOCSIFFLAGS)");
+			exit(1);
+		}
+	}
+#endif /* HDRVC_KERNEL */
+	exit(0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void terminate_sig(int signal)
+{
+	printf("signal %i caught\n", signal);
+	terminate();
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_recvpacket(char *pkt, int maxlen)
+{
+	struct ifreq ifr_new;
+	struct sockaddr_ll from;
+	socklen_t from_len = sizeof(from);
+
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		if (!promisc) {
+			if (afpacket) {
+				struct sockaddr_ll sll;
+				struct packet_mreq mr;
+
+				memset(&sll, 0, sizeof(sll));
+				sll.sll_family = AF_PACKET;
+				sll.sll_ifindex = ifr_h.ifr_ifindex;
+				sll.sll_protocol = htons(ETH_P_AX25);
+				if (bind(fd, (struct sockaddr *)&sll, sizeof(sll)) < 0) {
+					fprintf(stderr, "%s: Error %s (%i) bind failed\n",
+						prg_name, strerror(errno), errno);
+					exit(-2);
+				}
+				memset(&mr, 0, sizeof(mr));
+				mr.mr_ifindex = sll.sll_ifindex;
+				mr.mr_type = PACKET_MR_PROMISC;
+				if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, (char *)&mr, sizeof(mr)) < 0) {
+					fprintf(stderr, "%s: Error %s (%i) setsockopt SOL_PACKET, PACKET_ADD_MEMBERSHIP failed\n",
+						prg_name, strerror(errno), errno);
+					exit(-2);
+				}
+			} else {
+				struct sockaddr sa;
+			
+				strcpy(sa.sa_data, if_name);
+				sa.sa_family = AF_INET;
+				if (bind(fd, &sa, sizeof(sa)) < 0) {
+					fprintf(stderr, "%s: Error %s (%i) bind failed\n",
+						prg_name, strerror(errno), errno);
+					exit(-2);
+				}
+				ifr_new = ifr_h;
+				ifr_new.ifr_flags |= IFF_PROMISC;
+				if (ioctl(fd, SIOCSIFFLAGS, &ifr_new) < 0) {
+					perror("ioctl (SIOCSIFFLAGS)");
+					exit(1);
+				}
+				signal(SIGTERM, terminate_sig);
+				signal(SIGQUIT, terminate_sig);
+				if (atexit((void (*)(void))terminate)) {
+					perror("atexit");
+					terminate();
+				}
+			}
+			promisc = 1;
+			fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
+		}
+		if (!pkt || maxlen < 2)
+			return 0;
+		return recvfrom(fd, pkt, maxlen, 0, (struct sockaddr *)&from, &from_len);
+	}
+#endif /* HDRVC_KERNEL */
+	return -1;
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_getfd(void)
+{
+	return fd;
+}
+
+/* ---------------------------------------------------------------------- */
+
+const char *hdrvc_ifname(void)
+{
+	return if_name;
+}
+
+/* ---------------------------------------------------------------------- */
+
+void hdrvc_args(int *argc, char *argv[], const char *def_if)
+{
+	int ac, i;
+
+	if (def_if)
+		if_name = def_if;
+	if (!argc || !argv || (ac = *argc) < 1)
+		return;
+	prg_name = argv[0];
+	for (i = 1; i < ac-1; i++) {
+#ifdef HDRVC_KERNEL
+		if (!strcmp(argv[i], "-i")) {
+			kernel_mode = 1;
+			if_name = argv[i+1];
+			ac -= 2;
+			if (i < ac)
+				memmove(argv+i, argv+i+2, (ac-i) * sizeof(void *));
+			i--;
+		} else 
+#endif /* HDRVC_KERNEL */
+			if (!strcmp(argv[i], "-u")) {
+#ifdef HDRVC_KERNEL
+				kernel_mode = 0;
+#endif /* HDRVC_KERNEL */
+				if_name = argv[i+1];
+				ac -= 2;
+				if (i < ac)
+					memmove(argv+i, argv+i+2, (ac-i) * sizeof(void *));
+				i--;
+			}
+	}
+	*argc = ac;
+}
+
+/* ---------------------------------------------------------------------- */
+
+void hdrvc_init(void)
+{
+	key_t k;
+	static struct ifreq ifr;
+
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		strcpy(ifr_h.ifr_name, if_name);
+		/* first try to use AF_PACKET */
+		if ((fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_AX25))) < 0
+		    || ioctl(fd, SIOCGIFINDEX, &ifr_h) < 0) {
+			if (fd >= 0)
+				close(fd);
+			afpacket = 0;
+			if ((fd = socket(PF_INET, SOCK_PACKET, htons(ETH_P_AX25))) < 0) {
+				fprintf(stderr, "%s: Error %s (%i), cannot open %s\n", prg_name, 
+					strerror(errno), errno, if_name);
+				exit(-1);
+			}
+			if (ioctl(fd, SIOCGIFFLAGS, &ifr_h) < 0) {
+				fprintf(stderr, "%s: Error %s (%i), cannot ioctl SIOCGIFFLAGS %s\n", prg_name, 
+					strerror(errno), errno, if_name);
+				exit(-1);
+			}
+		}
+		strcpy(ifr.ifr_name, if_name);
+		if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0 ) {
+			fprintf(stderr, "%s: Error %s (%i), cannot ioctl SIOCGIFHWADDR %s\n", prg_name, 
+				strerror(errno), errno, if_name);
+			exit(-1);
+                }
+		if (ifr.ifr_hwaddr.sa_family != ARPHRD_AX25) {
+			fprintf(stderr, "%s: Error, interface %s not AX25 (%i)\n", prg_name, 
+				if_name, ifr.ifr_hwaddr.sa_family);
+			exit(-1);
+		}
+		return;
+	}
+#endif /* HDRVC_KERNEL */
+	k = ftok(if_name, USERSM_KEY_PROJ);
+	if (k == (key_t)-1) {
+		fprintf(stderr, "%s: Error %s (%i), cannot ftok on %s\n", prg_name, 
+			strerror(errno), errno, if_name);
+		exit(-1);
+	}
+	if ((msqid = msgget(k, 0700)) < 0) {
+		fprintf(stderr, "%s: Error %s (%i), cannot msgget %d\n", prg_name, 
+			strerror(errno), errno, k);
+		exit(-1);
+	}
+}
+
+/* ---------------------------------------------------------------------- */
+
+void hdrvc_sendmsg(struct usersmmsg *msg, int len)
+{
+	if (msgsnd(msqid, (struct msgbuf *)msg, len+sizeof(msg->hdr)-sizeof(long), 0) < 0) {
+		perror("msgsnd");
+		exit(1);
+	}
+}
+
+int hdrvc_recvmsg(struct usersmmsg *msg, int maxlen, long type) 
+{
+	int len;
+
+	if ((len = msgrcv(msqid, (struct msgbuf *)msg, maxlen-sizeof(long), type, MSG_NOERROR)) < 0) {
+		perror("msgrcv");
+		exit(1);
+	}
+#if 0
+	for (;;) {
+		if ((len = msgrcv(msqid, (struct msgbuf *)msg, maxlen-sizeof(long), type, IPC_NOWAIT|MSG_NOERROR)) >= 0) 
+			return len+sizeof(long);
+		if (errno != ENOMSG) { 
+			perror("msgrcv");
+			exit(1);
+		}
+		usleep(250000);
+	}
+#endif 
+	return len+sizeof(long);
+}
+
+/* ---------------------------------------------------------------------- */
+
+#ifdef HDRVC_KERNEL
+
+int hdrvc_hdlcdrv_ioctl(int cmd, struct hdlcdrv_ioctl *par)
+{
+	struct ifreq ifr = ifr_h;
+	
+	if (!kernel_mode) {
+		errno = EINVAL;
+		return -1;
+	}
+	ifr.ifr_data = (caddr_t)par;
+	par->cmd = cmd;
+	return ioctl(fd, SIOCDEVPRIVATE, &ifr);
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_sm_ioctl(int cmd, struct sm_ioctl *par)
+{
+	struct ifreq ifr = ifr_h;
+	
+	if (!kernel_mode) {
+		errno = EINVAL;
+		return -1;
+	}
+	ifr.ifr_data = (caddr_t)par;
+	par->cmd = cmd;
+	return ioctl(fd, SIOCDEVPRIVATE, &ifr);
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_baycom_ioctl(int cmd, struct baycom_ioctl *par)
+{
+	struct ifreq ifr = ifr_h;
+	
+	if (!kernel_mode) {
+		errno = EINVAL;
+		return -1;
+	}
+	ifr.ifr_data = (caddr_t)par;
+	par->cmd = cmd;
+	return ioctl(fd, SIOCDEVPRIVATE, &ifr);
+}
+
+/* ---------------------------------------------------------------------- */
+
+unsigned int hdrvc_get_ifflags(void)
+{
+	struct ifreq ifr;
+
+	if (kernel_mode) {
+		memcpy(&ifr, &ifr_h, sizeof(ifr));
+		if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
+			perror("ioctl: SIOCGIFFLAGS");
+			exit(-1);
+		}
+		return ifr.ifr_flags;
+	}
+	return IFF_UP | IFF_RUNNING;
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_diag(struct sm_diag_data *diag)
+{
+	struct sm_ioctl smi;
+	int ret;
+	struct usersmmsg msg;
+
+	if (!diag) {
+		errno = EINVAL;
+		return -1;
+	}
+	if (kernel_mode) {
+		memcpy(&smi.data.diag, diag, sizeof(smi.data.diag));
+		ret = hdrvc_sm_ioctl(SMCTL_DIAGNOSE, &smi);
+		memcpy(diag, &smi.data.diag, sizeof(smi.data.diag));
+		return ret;
+	}
+	msg.hdr.type = USERSM_CMD_REQ_DIAG;
+	msg.hdr.channel = 0;
+	msg.data.diag.mode = diag->mode;
+	msg.data.diag.flags = diag->flags;
+	msg.data.diag.samplesperbit = diag->samplesperbit;
+	msg.data.diag.datalen = diag->datalen;
+	hdrvc_sendmsg(&msg, sizeof(msg.data.diag));
+	ret = hdrvc_recvmsg(&msg, sizeof(msg), USERSM_CMD_ACK_DIAG);
+	if (ret < 0)
+		return ret;
+	if (ret < sizeof(msg.data.diag) || ret < sizeof(msg.data.diag)+msg.data.diag.datalen*sizeof(short)) {
+		errno = EIO;
+		return -1;
+	}
+	diag->mode = msg.data.diag.mode;
+	diag->flags = msg.data.diag.flags;
+	diag->samplesperbit = msg.data.diag.samplesperbit;
+	diag->datalen = msg.data.diag.datalen;
+	memcpy(diag->data, msg.data.diag_out.samples, msg.data.diag.datalen*sizeof(short));
+	return 0;
+}
+
+#endif /* HDRVC_KERNEL */
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_get_samples(void)
+{
+	int ret;
+	struct hdlcdrv_ioctl bi;
+	
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_GETSAMPLES, &bi);
+		if (ret < 0) 
+			return ret;
+		return bi.data.bits & 0xff;
+	}
+#endif /* HDRVC_KERNEL */
+	errno = EAGAIN;
+	return -1;
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_get_bits(void)
+{
+	int ret;
+	struct hdlcdrv_ioctl bi;
+	
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_GETBITS, &bi);
+		if (ret < 0) 
+			return ret;
+		return bi.data.bits & 0xff;
+	}
+#endif /* HDRVC_KERNEL */
+	errno = EAGAIN;
+	return -1;
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_get_channel_access_param(struct hdrvc_channel_params *par)
+{
+	struct hdlcdrv_ioctl hi;
+	int ret;
+	struct usersmmsg msg;
+
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		if ((ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_GETCHANNELPAR, &hi)) < 0)
+			return ret;
+		if (!par) {
+			errno = EINVAL;
+			return -1;
+		}
+		par->tx_delay = hi.data.cp.tx_delay;
+		par->tx_tail = hi.data.cp.tx_tail;
+		par->slottime = hi.data.cp.slottime;
+		par->ppersist = hi.data.cp.ppersist;
+		par->fulldup = hi.data.cp.fulldup;
+		return 0;
+	}
+#endif /* HDRVC_KERNEL */
+	msg.hdr.type = USERSM_CMD_REQ_CHACCESS_PAR;
+	msg.hdr.channel = 0;
+	hdrvc_sendmsg(&msg, 0);
+	ret = hdrvc_recvmsg(&msg, sizeof(msg), USERSM_CMD_ACK_CHACCESS_PAR);
+	if (ret < 0)
+		return ret;
+	if (ret < sizeof(msg.data.cp)) {
+		errno = EIO;
+		return -1;
+	}
+	par->tx_delay = msg.data.cp.tx_delay;
+	par->tx_tail = msg.data.cp.tx_tail;
+	par->slottime = msg.data.cp.slottime;
+	par->ppersist = msg.data.cp.ppersist;
+	par->fulldup = msg.data.cp.fulldup;
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_set_channel_access_param(struct hdrvc_channel_params par)
+{
+	int ret;
+	struct usersmmsg msg;
+	
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		struct hdlcdrv_ioctl hi;
+		
+		hi.data.cp.tx_delay = par.tx_delay;
+		hi.data.cp.tx_tail = par.tx_tail;
+		hi.data.cp.slottime = par.slottime;
+		hi.data.cp.ppersist = par.ppersist;
+		hi.data.cp.fulldup = par.fulldup;
+		if ((ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_SETCHANNELPAR, &hi)) < 0)
+			return ret;
+		return 0;
+	}
+#endif /* HDRVC_KERNEL */
+	msg.hdr.type = USERSM_CMD_SET_CHACCESS_PAR;
+	msg.hdr.channel = 0;
+	msg.data.cp.tx_delay = par.tx_delay;
+	msg.data.cp.tx_tail = par.tx_tail;
+	msg.data.cp.slottime = par.slottime;
+	msg.data.cp.ppersist = par.ppersist;
+	msg.data.cp.fulldup = par.fulldup;
+	hdrvc_sendmsg(&msg, sizeof(msg.data.cp));
+	return 0;	
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_calibrate(int calib)
+{
+	struct hdlcdrv_ioctl bhi;
+	struct usersmmsg msg;
+
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		bhi.data.calibrate = calib;
+		return hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_CALIBRATE, &bhi);
+	}
+#endif /* HDRVC_KERNEL */
+	msg.hdr.type = USERSM_CMD_CALIBRATE;
+	msg.hdr.channel = 0;
+	msg.data.calib = calib;
+	hdrvc_sendmsg(&msg, sizeof(msg.data.calib));
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_get_channel_state(struct hdrvc_channel_state *st)
+{
+	struct hdlcdrv_ioctl bhi;
+	int ret;
+	struct usersmmsg msg;
+
+	if (!st) {
+		errno = EINVAL;
+		return -1;
+	}
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_GETSTAT, &bhi);
+		if (ret >= 0) {
+			st->ptt = bhi.data.cs.ptt;
+			st->dcd = bhi.data.cs.dcd;
+			st->ptt_keyed = bhi.data.cs.ptt_keyed;
+			st->tx_packets = bhi.data.cs.tx_packets;
+			st->tx_errors = bhi.data.cs.tx_errors;
+			st->rx_packets = bhi.data.cs.rx_packets;
+			st->rx_errors = bhi.data.cs.rx_errors;
+		}
+		return ret;
+	}
+#endif /* HDRVC_KERNEL */
+	msg.hdr.type = USERSM_CMD_REQ_CHANNELSTATE;
+	msg.hdr.channel = 0;
+	hdrvc_sendmsg(&msg, 0);
+	ret = hdrvc_recvmsg(&msg, sizeof(msg), USERSM_CMD_ACK_CHANNELSTATE);
+	if (ret < 0)
+		return ret;
+	if (ret < sizeof(msg.data.cs)) {
+		errno = EIO;
+		return -1;
+	}
+	st->ptt = msg.data.cs.ptt;
+	st->dcd = msg.data.cs.dcd;
+	st->ptt_keyed = msg.data.cs.ptt_keyed;
+	st->tx_packets = msg.data.cs.tx_packets;
+	st->tx_errors = msg.data.cs.tx_errors;
+	st->rx_packets = msg.data.cs.rx_packets;
+	st->rx_errors = msg.data.cs.rx_errors;
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_diag2(unsigned int mode, unsigned int flags, short *data, 
+		unsigned int maxdatalen, unsigned int *samplesperbit)
+{
+	int ret;
+	struct usersmmsg msg;
+	static unsigned int modeconvusersm[4] = {
+		USERSM_DIAGMODE_OFF, USERSM_DIAGMODE_INPUT, USERSM_DIAGMODE_DEMOD, 
+		USERSM_DIAGMODE_CONSTELLATION
+	};
+	
+	if (mode > HDRVC_DIAGMODE_CONSTELLATION) {
+		errno = EINVAL;
+		return -1;
+	}
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		struct sm_ioctl smi;
+		static unsigned int modeconvsm[4] = {
+			SM_DIAGMODE_OFF, SM_DIAGMODE_INPUT, SM_DIAGMODE_DEMOD, SM_DIAGMODE_CONSTELLATION
+		};
+
+		smi.data.diag.mode = modeconvsm[mode];
+		smi.data.diag.flags = (flags & HDRVC_DIAGFLAG_DCDGATE) ? SM_DIAGFLAG_DCDGATE : 0;
+		smi.data.diag.samplesperbit = 0;
+		smi.data.diag.datalen = maxdatalen;
+		smi.data.diag.data = data;
+		if ((ret = hdrvc_sm_ioctl(SMCTL_DIAGNOSE, &smi)) < 0)
+			return ret;
+		if (samplesperbit)
+			*samplesperbit = smi.data.diag.samplesperbit;
+		if (smi.data.diag.mode != modeconvsm[mode] || !(smi.data.diag.flags & SM_DIAGFLAG_VALID))
+			return 0;
+		return smi.data.diag.datalen;
+	}
+#endif /* HDRVC_KERNEL */
+	msg.hdr.type = USERSM_CMD_REQ_DIAG;
+	msg.hdr.channel = 0;
+	msg.data.diag.mode = modeconvusersm[mode];
+	msg.data.diag.flags = (flags & HDRVC_DIAGFLAG_DCDGATE) ? USERSM_DIAGFLAG_DCDGATE : 0;
+	msg.data.diag.samplesperbit = 0;
+	msg.data.diag.datalen = maxdatalen;
+	hdrvc_sendmsg(&msg, sizeof(msg.data.diag));
+	ret = hdrvc_recvmsg(&msg, sizeof(msg), USERSM_CMD_ACK_DIAG);
+	if (ret < 0)
+		return ret;
+	if (ret < sizeof(msg.data.diag) || ret < sizeof(msg.data.diag)+msg.data.diag.datalen*sizeof(short)) {
+		errno = EIO;
+		return -1;
+	}
+	if (samplesperbit)
+		*samplesperbit = msg.data.diag.samplesperbit;
+	if (msg.data.diag.mode != modeconvusersm[mode] || !(msg.data.diag.flags & USERSM_DIAGFLAG_VALID))
+		return 0;
+	if (!data || msg.data.diag.datalen <= 0)
+		return 0;
+	memcpy(data, msg.data.diag_out.samples, msg.data.diag.datalen*sizeof(short));
+	return msg.data.diag.datalen;
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_get_driver_name(char *buf, int bufsz)
+{
+	int ret;
+	struct usersmmsg msg;
+
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		struct hdlcdrv_ioctl bhi;
+
+		ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_DRIVERNAME, &bhi);
+		if (ret < 0)
+			return ret;
+		strncpy(buf, bhi.data.modename, bufsz);
+		return 0;
+	}
+#endif /* HDRVC_KERNEL */
+	msg.hdr.type = USERSM_CMD_REQ_DRVNAME;
+	msg.hdr.channel = 0;
+	hdrvc_sendmsg(&msg, 0);
+	ret = hdrvc_recvmsg(&msg, sizeof(msg), USERSM_CMD_ACK_DRVNAME);
+	if (ret < 0)
+		return ret;
+	if (ret < 1) {
+		errno = EIO;
+		return -1;
+	}
+	if (bufsz < ret)
+		ret = bufsz;
+	strncpy(buf, msg.data.by, ret);
+	buf[ret-1] = 0;
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
+
+int hdrvc_get_mode_name(char *buf, int bufsz)
+{
+	int ret;
+	struct usersmmsg msg;
+
+#ifdef HDRVC_KERNEL
+	if (kernel_mode) {
+		struct hdlcdrv_ioctl bhi;
+
+		ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_GETMODE, &bhi);
+		if (ret < 0)
+			return ret;
+		strncpy(buf, bhi.data.modename, bufsz);
+		return 0;
+	}
+#endif /* HDRVC_KERNEL */
+	msg.hdr.type = USERSM_CMD_REQ_DRVMODE;
+	msg.hdr.channel = 0;
+	hdrvc_sendmsg(&msg, 0);
+	ret = hdrvc_recvmsg(&msg, sizeof(msg), USERSM_CMD_ACK_DRVMODE);
+	if (ret < 0)
+		return ret;
+	if (ret < 1) {
+		errno = EIO;
+		return -1;
+	}
+	if (bufsz < ret)
+		ret = bufsz;
+	strncpy(buf, msg.data.by, ret);
+	buf[ret-1] = 0;
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
diff --git a/hdlcutil/hdrvcomm.h b/hdlcutil/hdrvcomm.h
new file mode 100644
index 0000000..fbb4965
--- /dev/null
+++ b/hdlcutil/hdrvcomm.h
@@ -0,0 +1,116 @@
+/*****************************************************************************/
+
+/*
+ *	hdrvcomm.h  -- HDLC driver communications.
+ *
+ *	Copyright (C) 1996  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ */
+
+/*****************************************************************************/
+
+#ifndef _HDRVCOMM_H
+#define _HDRVCOMM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ---------------------------------------------------------------------- */
+
+#define HDRVC_KERNEL 1
+
+/* ---------------------------------------------------------------------- */
+
+#ifdef HDRVC_KERNEL
+#include <linux/hdlcdrv.h>
+#include "soundmodem.h"
+#include <linux/baycom.h>
+#endif /* HDRVC_KERNEL */
+
+/* ---------------------------------------------------------------------- */
+
+struct hdrvc_channel_params {
+        int tx_delay;  /* the transmitter keyup delay in 10ms units */
+        int tx_tail;   /* the transmitter keyoff delay in 10ms units */
+        int slottime;  /* the slottime in 10ms; usually 10 = 100ms */
+        int ppersist;  /* the p-persistence 0..255 */
+        int fulldup;   /* some driver do not support full duplex, setting */
+                       /* this just makes them send even if DCD is on */
+};
+
+struct hdrvc_channel_state {
+        int ptt;
+        int dcd;
+        int ptt_keyed;
+        unsigned long tx_packets;
+        unsigned long tx_errors;
+        unsigned long rx_packets;
+        unsigned long rx_errors;
+};
+
+/* ---------------------------------------------------------------------- */
+
+/*
+ * diagnose modes
+ */
+#define HDRVC_DIAGMODE_OFF            0
+#define HDRVC_DIAGMODE_INPUT          1
+#define HDRVC_DIAGMODE_DEMOD          2
+#define HDRVC_DIAGMODE_CONSTELLATION  3
+
+/*
+ * diagnose flags
+ */
+#define HDRVC_DIAGFLAG_DCDGATE    (1<<0)
+
+
+/* ---------------------------------------------------------------------- */
+
+extern int hdrvc_recvpacket(char *pkt, int maxlen);
+extern int hdrvc_getfd(void);
+extern const char *hdrvc_ifname(void);
+extern void hdrvc_args(int *argc, char *argv[], const char *def_if);
+extern void hdrvc_init(void);
+extern int hdrvc_get_samples(void);
+extern int hdrvc_get_bits(void);
+extern int hdrvc_get_channel_access_param(struct hdrvc_channel_params *par);
+extern int hdrvc_set_channel_access_param(struct hdrvc_channel_params par);
+extern int hdrvc_calibrate(int calib);
+extern int hdrvc_get_channel_state(struct hdrvc_channel_state *st);
+extern unsigned int hdrvc_get_ifflags(void);
+extern int hdrvc_diag2(unsigned int mode, unsigned int flags, short *data, unsigned int maxdatalen,
+		       unsigned int *samplesperbit);
+extern int hdrvc_get_driver_name(char *buf, int bufsz);
+extern int hdrvc_get_mode_name(char *buf, int bufsz);
+
+#ifdef HDRVC_KERNEL
+extern int hdrvc_hdlcdrv_ioctl(int cmd, struct hdlcdrv_ioctl *par);
+extern int hdrvc_sm_ioctl(int cmd, struct sm_ioctl *par);
+extern int hdrvc_baycom_ioctl(int cmd, struct baycom_ioctl *par);
+extern int hdrvc_diag(struct sm_diag_data *diag);
+#endif /* HDRVC_KERNEL */
+
+/* ---------------------------------------------------------------------- */
+#ifdef __cplusplus
+	   }
+#endif
+#endif /* _HDRVCOMM_H */
diff --git a/hdlcutil/sethdlc.8 b/hdlcutil/sethdlc.8
new file mode 100644
index 0000000..0d784f3
--- /dev/null
+++ b/hdlcutil/sethdlc.8
@@ -0,0 +1,282 @@
+.\" Copyright 1996 Thomas Sailer (t.sailer at alumni.ethz.ch)
+.\" May be distributed under the GNU General Public License
+.\"
+.\" portions from setserial.8 by Rickard E. Faith (faith at cs.unc.edu)
+.\" "
+.TH SETHDLC 8 "1 October 1996" "Sethdlc 0.1" "Linux Programmer's Manual"
+.SH NAME
+sethdlc \- get/set Linux HDLC packet radio modem driver port information
+.SH SYNOPSIS
+.B sethdlc
+.B "[ \-bdhs ]"
+.B "[\-i device]"
+
+.B "sethdlc [\-i device] -c"
+cal
+
+.B "sethdlc\ -p"
+.B "[\-i\ device]"
+.BR "[\ mode\ " mode "\ ]"
+.BR "[\ io\ " iobase "\ ]"
+.BR "[\ irq\ " irq "\ ]"
+.BR "[\ dma\ " dma "\ ]"
+.BR "[\ dma2\ " dma2 "\ ]"
+.BR "[\ serio\ " seriobase "\ ]"
+.BR "[\ pario\ " pariobase "\ ]"
+.BR "[\ midiio\ " midiiobase "\ ]"
+.BR "[\ options\ " options "\ ]"
+
+.B "sethdlc\ -a"
+.B "[\-i\ device]"
+.BR "[\ txd\ " txdelay "\ ]"
+.BR "[\ txtail\ " txtail "\ ]"
+.BR "[\ slot\ " slottime "\ ]"
+.BR "[\ ppersist\ " ppersistence "\ ]"
+.BR "[\ full\ ]"
+.BR "[\ half\ ]"
+
+
+.SH DESCRIPTION
+.B sethdlc
+is a program designed to set and/or report the configuration information
+associated with a soundcard radio modem port.  This information includes the
+modem type, what I/O port, IRQ and DMA channel a particular modem
+port is using, and where to output a transmitter keying (PTT) signal.
+
+With the
+.B \-p
+option,
+.B sethdlc
+sets and/or reports the port configuration.
+
+With the
+.B \-a
+option,
+.B sethdlc
+sets and/or reports the AX.25 channel access parameters. These parameters can also
+be set with the
+.I kissparms
+utility.
+
+With the
+.B \-c
+option,
+.B sethdlc
+instructs the driver to send a calibration pattern for
+.I cal
+seconds.
+
+Without the 
+.B \-p,
+.B \-a
+and
+.B \-c
+option,
+.B sethdlc
+will stay in the foreground and display received packets. The AX.25 header
+and eventually a FlexNet compressed header are decoded. CTRL-C terminates
+.B sethdlc.
+Specifying additional options, 
+.B sethdlc
+may display additional information.
+
+
+.SH OPTIONS
+.B sethdlc
+accepts the following options:
+
+.TP
+.B \-b
+Trace the bits at the output of the demodulator, after RX clock recovery. 
+This option is only available if \fBsethdlc\fP
+and the soundcard modem kernel driver is compiled with debugging support on.
+This is useful for driver debugging.
+.TP
+.B \-d
+Trace DCD, PTT and other status information on stdout. \fBsethdlc\fP
+displays two times per second a line containing these informations.
+.TP
+.B \-h
+Display an overview of the available command line parameters and exit.
+.TP
+.B \-i
+The
+.I device
+argument specifies the HDLC modem device which should be configured or
+interrogated.  It will usually have the following form:
+\fIbc[0-3]\fP for the baycom driver and
+\fIsm[0-3]\fP for the soundcard modem driver.
+.TP
+.B \-s
+Trace the bits at the demodulator output, \fIbefore\fP
+the RX clock recovery, to stdout. This option is only available the modem driver
+is compiled with debugging support on. It may not be available on some modem, such 
+as the \fIpar96\fP.
+
+.SH PARAMETERS
+The following parameters can be assigned to a soundcard radio modem port.
+
+All numerical parameter values are assumed to be in decimal unless preceeded by "0x".
+
+The
+.B mode
+parameter sets the type of hardware and the operating mode of the driver.
+\fIser12\fP and \fIpar96\fP are valid modes for the \fBbaycom\fP driver.
+A star "\fI*\fP" may be added to enable software DCD. The \fBmode\fP string
+format of the \fBsoundmodem\fP driver is as follows: \fIhw:mode\fP.
+\fIhw\fP may be either \fIsbc\fP, \fIwss\fP or \fIwssfdx\fP. The first
+one specifies SoundBlaster compatible soundcards, the second one
+WindowsSoundSystem compatible hardware, and the third one WSS fullduplex
+operation (which currently works with Crystal Semiconductor Chipsets
+CS423[126]). The \fImode\fP portion may be \fIafsk1200\fP or \fIfsk9600\fP.
+Optionally, the receive and transmit modes may be different
+(\fIhw:txmode.rxmode\fP).
+
+The
+.B ioport
+parameter sets the I/O port address. Typical values for the \fIser12\fP modem are
+0x3f8, 0x2f8, 0x3e8 or 0x2e8, for the \fIpar96\fP modem 0x378, 0x278 or 0x3bc, for
+the \fIsbc\fP modems 0x220 and for the \fIwss\fP modems 0x530, 0x608, 0xe80 or 0xf40.
+
+The
+.B irq
+parameter sets the hardware IRQ number. Typical values for the \fIser12\fP modem are
+4 and 3, for the \fIpar96\fP modem 7 or 5, for the \fIsbc\fP modems are 7 or 5 and for
+the \fIwss\fP modems, any free IRQ from the set 2, 7, 9, 10, 11 will do. The driver
+automatically configures the WSS soundcard to the correct IRQ.
+
+The
+.B dma
+parameter sets the hardware DMA number. Typical values for the \fIsbc\fP modems are
+1 or 0 and for the \fIwss\fP modems, any free DMA from 0 to 3 (except 2) will do.
+The driver automatically configures the WSS soundcard to the correct DMA.
+The Baycom modems do not need DMA.
+
+The
+.B dma2
+parameter sets the second hardware DMA number. This is only needed for
+full duplex operation with the \fBsoundmodem\fP driver.
+
+The
+.B seriobase
+parameter optionally sets the address of a serial port, where
+the driver will output a PTT signal at the TxD and RTS pins, and a DCD
+signal at the DTR pin. As Baycom modems do have their own PTT pin, this 
+parameter is not used by the Baycom modem driver.
+
+The
+.B pariobase
+parameter optionally sets the address of a LPT port where
+the driver will output a PTT signal on the DATA0 line and a DCD signal
+on the DATA1 line. As Baycom modems do have their own PTT pin, this 
+parameter is not used by the Baycom modem driver.
+
+The
+.B midiiobase
+parameter optionally sets the address of a MPU401 compatible
+MIDI port, where the driver will output a PTT signal. Since the MIDI port is
+effectively an UART and therefore cannot output a DC signal, the output must
+be fed through a retriggerable monoflop with a period of about 15ms. See
+.I http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html
+for a sample schematic diagram. As Baycom modems do have their own PTT pin,
+this parameter is not used by the Baycom modem driver.
+
+The
+.B txdelay
+sets the transmitter keyup delay time. Unlike \fIkissparms\fP, the unit is
+\fItens of ms\fP. This is the time the transmitter needs to switch its PA
+on and for its frequency synthesizer to settle. Typical values for a handheld
+transceiver are 200ms (i.e. 20), and for a good crystal driven transceiver
+20ms (i.e. 2).
+
+The
+.B txtail
+sets the time PTT is held after the last packet. Unlike \fIkissparms\fP, the unit
+is \fItens of ms\fP. Do not set this value to 0. Most modems need some extra
+time to actually clock the last bits out to the transmitter.
+
+The
+.B slottime
+parameter specifies how often the channel access algorithm is executed.
+Unlike \fIkissparms\fP, the unit is \fItens of ms\fP. Unless you have very 
+specific requirements, set this to 100ms (i.e. 10).
+
+The
+.B ppersist
+sets how "eagerly" the station starts to transmit as soon as the channel
+gets free. The optimum value is 256 divided by the number of stations on the
+channel. (This should really be done automatically by the L2)
+
+.B full
+sets the modem to full duplex mode. Note that some modems do not actually support
+full duplex mode, in this case this parameter makes the modem start its transmission
+as soon as it gets packets from the upper layer, without waiting for the channel
+to become free. This is needed by some implementations of alternative channel
+access algorithms, e.g. \fIDAMA\fP.
+
+.B half
+sets the modem to half duplex mode.
+
+.SH CONSIDERATIONS OF CONFIGURING BAYCOM PORTS
+It is important to note that sethdlc merely tells the Linux kernel
+where it should expect to find the I/O port and IRQ lines of a
+particular serial port.  It does 
+.I not
+configure the hardware to use a
+particular I/O port.  In order to do that, you will need to physically
+program the serial board, usually by setting some jumpers or by
+switching some DIP switches.
+
+This section will provide some pointers in helping you decide how you
+would like to configure your baycom ports.
+
+The "standard MS-DOS" port associations are given below:
+
+.nf
+.RS
+COM1, port 0x3f8, irq 4
+COM2, port 0x2f8, irq 3
+COM3, port 0x3e8, irq 4
+COM4, port 0x2e8, irq 3
+LPT1, port 0x378, irq 7
+LPT1 (on hercules graphics adapter), port 0x3bc, irq 7
+LPT1, port 0x278, irq 5
+.RE
+.fi
+
+.SH CONSIDERATIONS OF CONFIGURING SOUNDCARD RADIO MODEM PORTS
+Some cards need to be initialized before they act as a WSS or SoundBlaster
+compatible card. This driver does \fInot\fP do this. You can use the standard
+linux sound driver, if compiled as a module. Just load the sound driver
+(insmod sound) and remove it again (rmmod sound). The card should then be
+configured for either soundblaster or WSS compatibility. If this does not work
+for some reason, you'll have to write your own soundcard configuration
+utility. This is not as complicated as it sounds; it can be done from
+user space (but requiring root privileges) using \fIioperm\fP and/or \fIiopl\fP.
+
+It is important that the audio levels of your radio match those of the
+soundcard. To help achieve this, there are two utilities: \fIsmdiag\fP
+and \fIsmmixer\fP. See their respective manpage.
+
+The sound driver and the soundcard modem driver are mutually exclusive, i.e. they
+cannot both access the same soundcard at the same time. Even worse, the sound driver
+reserves the soundcard as soon as it gets loaded. The souncard modem driver however
+reserves the card only when the interface is started, i.e. during ifconfig sm[0-3] up.
+
+9600 baud may not currently work on SoundBlaster cards with DSP revision 4.x, i.e.
+SB16 and SB32 AWE. This is because they seem to not be fully backwards compatible.
+
+.SH CAUTION
+CAUTION: Using an invalid port can lock up your machine.
+
+.SH "SEE ALSO"
+.nf
+.BR smdiag "\ (8), " smmixer "\ (8), " kissparms "\ (8),"
+linux/drivers/net/hdlcdrv.c,
+linux/drivers/net/baycom.c,
+linux/drivers/net/soundmodem.c
+.fi
+
+.SH AUTHOR
+sethdlc was written by Thomas Sailer, HB9JNX/AE4WA (t.sailer at alumni.ethz.ch).
+Inspired by setserial.
diff --git a/hdlcutil/sethdlc.c b/hdlcutil/sethdlc.c
new file mode 100644
index 0000000..34e1467
--- /dev/null
+++ b/hdlcutil/sethdlc.c
@@ -0,0 +1,595 @@
+/*****************************************************************************/
+
+/*
+ *	sethdlc.c  -- kernel HDLC radio modem driver setup utility.
+ *
+ *	Copyright (C) 1996,1997,2000  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *   0.1  16.10.1996  Adapted from setbaycom.c and setsm.c
+ *   0.2  20.11.1996  New mode set/query code
+ *   0.5  11.05.1997  introduced hdrvcomm.h
+ *   0.6  05.01.2000  glibc compile fixes
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <net/if.h>
+#include "hdrvcomm.h"
+
+/* ---------------------------------------------------------------------- */
+
+static unsigned char trace_stat = 0;
+static char *progname;
+
+/* ---------------------------------------------------------------------- */
+
+static void display_packet(unsigned char *bp, unsigned int len) 
+{
+	unsigned char v1=1,cmd=0;
+	unsigned char i,j;
+
+	if (!bp || !len) 
+		return;
+	if (len < 8) 
+		return;
+	if (bp[1] & 1) {
+		/*
+		 * FlexNet Header Compression
+		 */
+		v1 = 0;
+		cmd = (bp[1] & 2) != 0;
+		printf("fm ? to ");
+		i = (bp[2] >> 2) & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		i = ((bp[2] << 4) | ((bp[3] >> 4) & 0xf)) & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		i = ((bp[3] << 2) | ((bp[4] >> 6) & 3)) & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		i = bp[4] & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		i = (bp[5] >> 2) & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		i = ((bp[5] << 4) | ((bp[6] >> 4) & 0xf)) & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		printf("-%u QSO Nr %u", bp[6] & 0xf, (bp[0] << 6) | 
+		       (bp[1] >> 2));
+		bp += 7;
+		len -= 7;
+	} else {
+		/*
+		 * normal header
+		 */
+		if (len < 15) 
+			return;
+		if ((bp[6] & 0x80) != (bp[13] & 0x80)) {
+			v1 = 0;
+			cmd = (bp[6] & 0x80);
+		}
+		printf("fm ");
+		for(i = 7; i < 13; i++) 
+			if ((bp[i] &0xfe) != 0x40) 
+				printf("%c",bp[i] >> 1);
+		printf("-%u to ",(bp[13] >> 1) & 0xf);
+		for(i = 0; i < 6; i++) 
+			if ((bp[i] &0xfe) != 0x40) 
+				printf("%c", bp[i] >> 1);
+		printf("-%u", (bp[6] >> 1) & 0xf);
+		bp += 14;
+		len -= 14;
+		if ((!(bp[-1] & 1)) && (len >= 7)) 
+			printf(" via ");
+		while ((!(bp[-1] & 1)) && (len >= 7)) {
+			for(i = 0; i < 6; i++) 
+				if ((bp[i] &0xfe) != 0x40) 
+					printf("%c",bp[i] >> 1);
+			printf("-%u",(bp[6] >> 1) & 0xf);
+			bp += 7;
+			len -= 7;
+			if ((!(bp[-1] & 1)) && (len >= 7)) 
+				printf(",");
+		}
+	}
+	if(!len) 
+		return;
+	i = *bp++;
+	len--;
+	j = v1 ? ((i & 0x10) ? '!' : ' ') : 
+		((i & 0x10) ? (cmd ? '+' : '-') : (cmd ? '^' : 'v'));
+	if (!(i & 1)) {
+		/*
+		 * Info frame
+		 */
+		printf(" I%u%u%c",(i >> 5) & 7,(i >> 1) & 7,j);
+	} else if (i & 2) {
+		/*
+		 * U frame
+		 */
+		switch (i & (~0x10)) {
+		case 0x03:
+			printf(" UI%c",j);
+			break;
+		case 0x2f:
+			printf(" SABM%c",j);
+			break;
+		case 0x43:
+			printf(" DISC%c",j);
+			break;
+		case 0x0f:
+			printf(" DM%c",j);
+			break;
+		case 0x63:
+			printf(" UA%c",j);
+			break;
+		case 0x87:
+			printf(" FRMR%c",j);
+			break;
+		default:
+			printf(" unknown U (0x%x)%c",i & (~0x10),j);
+			break;
+		}
+	} else {
+		/*
+		 * supervisory
+		 */
+		switch (i & 0xf) {
+		case 0x1:
+			printf(" RR%u%c",(i >> 5) & 7,j);
+			break;
+		case 0x5:
+			printf(" RNR%u%c",(i >> 5) & 7,j);
+			break;
+		case 0x9:
+			printf(" REJ%u%c",(i >> 5) & 7,j);
+			break;
+		default:
+			printf(" unknown S (0x%x)%u%c", i & 0xf, 
+			       (i >> 5) & 7, j);
+			break;
+		}
+	}
+	if (!len) {
+		printf("\n");
+		return;
+	}
+	printf(" pid=%02X\n", *bp++);
+	len--;
+	j = 0;
+	while (len) {
+		i = *bp++;
+		if ((i >= 32) && (i < 128)) 
+			printf("%c",i);
+		else if (i == 13) {
+			if (j) 
+				printf("\n");
+			j = 0;
+		} else 
+			printf(".");
+		if (i >= 32) 
+			j = 1;
+		len--;
+	}
+	if (j) 
+		printf("\n");
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void print_bits(int (*bitproc)(void))
+{
+	int ret;
+	int i;
+	char str[9];
+	char *cp;
+	
+	for(;;) {
+		ret = bitproc();
+		if (ret < 0) {
+			if (errno == EAGAIN)
+				return;
+			fprintf(stderr, "%s: Error %s (%i), cannot ioctl\n",
+			        progname, strerror(errno), errno);
+			return;
+		}
+		strcpy(cp = str, "00000000");
+		for(i = 0; i < 8; i++, cp++, ret >>= 1) 
+			*cp += (ret & 1);
+		printf("%s", str);
+	}
+}
+
+/* ---------------------------------------------------------------------- */
+
+#ifdef HDRVC_KERNEL
+
+static void do_set_params(int argc, char **argv) 
+{
+	struct hdlcdrv_ioctl drvname, curm, newm, mlist, curp, newp, mpmask;
+	char set = 0;
+	int ret;
+	int mask;
+
+	ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_DRIVERNAME, &drvname);
+	if (ret < 0) {
+		perror("ioctl (HDLCDRVCTL_DRIVERNAME)");
+		exit(1);
+	}
+	printf("driver name: %s\n", drvname.data.drivername);
+
+	mask = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_MODEMPARMASK, &mpmask);
+	if (mask < 0)
+		mask = ~0;
+
+	ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_GETMODEMPAR, &curp);
+	if (ret < 0) {
+		perror("ioctl (HDLCDRVCTL_GETMODEMPAR)");
+		exit(1);
+	}
+	ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_GETMODE, &curm);
+	if (ret < 0) {
+		perror("ioctl (HDLCDRVCTL_GETMODE)");
+		exit(1);
+	}
+	newm = curm;
+	newp = curp;
+	while (argc >= 2) {
+		if (!strcasecmp(argv[0], "mode")) {
+			strncpy(newm.data.modename, argv[1], 
+				sizeof(newm.data.modename));
+			set |= 1;
+		} else if (!strcasecmp(argv[0], "io") && mask & HDLCDRV_PARMASK_IOBASE) {
+			newp.data.mp.iobase = strtoul(argv[1], NULL, 0);
+			set |= 2;
+		} else if (!strcasecmp(argv[0], "irq") && mask & HDLCDRV_PARMASK_IRQ) {
+			newp.data.mp.irq = strtoul(argv[1], NULL, 0);
+			set |= 2;
+		} else if (!strcasecmp(argv[0], "dma") && mask & HDLCDRV_PARMASK_DMA) {
+			newp.data.mp.dma = strtoul(argv[1], NULL, 0);
+			set |= 2;
+		} else if (!strcasecmp(argv[0], "dma2") && mask & HDLCDRV_PARMASK_DMA2) {
+			newp.data.mp.dma2 = strtoul(argv[1], NULL, 0);
+			set |= 2;
+		} else if (!strcasecmp(argv[0], "serio") && mask & HDLCDRV_PARMASK_SERIOBASE) {
+			newp.data.mp.seriobase = strtol(argv[1], NULL, 0);
+			set |= 2;
+		} else if (!strcasecmp(argv[0], "pario") && mask & HDLCDRV_PARMASK_PARIOBASE) {
+			newp.data.mp.pariobase = strtol(argv[1], NULL, 0);
+			set |= 2;
+		} else if (!strcasecmp(argv[0], "midiio") && mask & HDLCDRV_PARMASK_MIDIIOBASE) {
+			newp.data.mp.midiiobase = strtol(argv[1], NULL, 0);
+			set |= 2;       		
+		} else {
+			fprintf(stderr, "%s: invalid parameter type '%s', "
+				"valid: mode%s%s%s%s%s%s%s\n",
+				progname, argv[0], 
+				(mask & HDLCDRV_PARMASK_IOBASE) ? " io" : "", 
+				(mask & HDLCDRV_PARMASK_IRQ) ? " irq" : "", 
+				(mask & HDLCDRV_PARMASK_DMA) ? " dma" : "", 
+				(mask & HDLCDRV_PARMASK_DMA2) ? " dma2" : "", 
+				(mask & HDLCDRV_PARMASK_SERIOBASE) ? " serio" : "", 
+				(mask & HDLCDRV_PARMASK_PARIOBASE) ? " pario" : "", 
+				(mask & HDLCDRV_PARMASK_MIDIIOBASE) ? " midiio" : "");
+		}
+		argv += 2;
+		argc -= 2;
+	}
+	if (argc >= 1)
+		fprintf(stderr, "%s: orphaned parameter type '%s', no data\n",
+			progname, argv[0]);
+	printf("current parameters: mode %s", curm.data.modename);
+	if (mask & HDLCDRV_PARMASK_IOBASE)
+		printf(" io 0x%x", curp.data.mp.iobase);
+	if (mask & HDLCDRV_PARMASK_IRQ)
+		printf(" irq %u", curp.data.mp.irq);
+	if (mask & HDLCDRV_PARMASK_DMA)
+		printf(" dma %u", curp.data.mp.dma);
+	if (mask & HDLCDRV_PARMASK_DMA2)
+		printf(" dma2 %u", curp.data.mp.dma2);
+	if (mask & HDLCDRV_PARMASK_SERIOBASE)
+		printf(" serio 0x%x", curp.data.mp.seriobase);
+	if (mask & HDLCDRV_PARMASK_PARIOBASE)
+		printf(" pario 0x%x", curp.data.mp.pariobase);
+	if (mask & HDLCDRV_PARMASK_MIDIIOBASE)
+		printf(" midiio 0x%x", curp.data.mp.midiiobase);
+	printf("\n");
+
+	if (set & 1) 
+		ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_SETMODE, &newm);
+		if (ret < 0) {
+			perror("ioctl (HDLCDRVCTL_SETMODE)");
+			ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_MODELIST, &mlist);
+			if (ret < 0) {
+				perror("ioctl (HDLCDRVCTL_MODELIST)");
+				exit(1);
+			}
+			printf("driver supported modes: %s\n", 
+			       mlist.data.modename);
+			exit(1);
+		}
+	if (set & 2) {
+		ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_SETMODEMPAR, &newp);
+		if (ret < 0) {
+			perror("ioctl (HDLCDRVCTL_SETMODEMPAR)");
+			fprintf(stderr, "%s: trying to restore old "
+				"parameters\n", progname);
+			ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_SETMODEMPAR, &curp);
+			if (ret < 0) 
+				perror("ioctl (HDLCDRVCTL_SETMODEMPAR)");
+			exit(1);
+		}
+	}
+	if (set & 3) {
+		printf("new parameters:     mode %s", newm.data.modename);
+		if (mask & HDLCDRV_PARMASK_IOBASE)
+			printf(" io 0x%x", newp.data.mp.iobase);
+		if (mask & HDLCDRV_PARMASK_IRQ)
+			printf(" irq %u", newp.data.mp.irq);
+		if (mask & HDLCDRV_PARMASK_DMA)
+			printf(" dma %u", newp.data.mp.dma);
+		if (mask & HDLCDRV_PARMASK_DMA2)
+			printf(" dma2 %u", newp.data.mp.dma2);
+		if (mask & HDLCDRV_PARMASK_SERIOBASE)
+			printf(" serio 0x%x", newp.data.mp.seriobase);
+		if (mask & HDLCDRV_PARMASK_PARIOBASE)
+			printf(" pario 0x%x", newp.data.mp.pariobase);
+		if (mask & HDLCDRV_PARMASK_MIDIIOBASE)
+			printf(" midiio 0x%x", newp.data.mp.midiiobase);
+		printf("\n");
+	}
+	exit(0);
+}
+
+#endif /* HDRVC_KERNEL */
+
+/* ---------------------------------------------------------------------- */
+
+static void display_channel_params(const struct hdrvc_channel_params *par) 
+{
+	printf("TX delay %ums, TX tail %ums, slottime %ums, p-persistence "
+	       " %u/256, %s duplex\n", 10*par->tx_delay, 10*par->tx_tail,
+	       10*par->slottime, par->ppersist, 
+	       par->fulldup ? "Full" : "Half");
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void do_set_channel_params(int argc, char **argv) 
+{
+	struct hdrvc_channel_params par1, par2;
+	char set = 0;
+	int ret;
+
+	ret = hdrvc_get_channel_access_param(&par1);
+	if (ret < 0) {
+		perror("hdrvc_get_channel_access_param");
+		exit(1);
+	}
+	par2 = par1;
+	while (argc > 0) {
+		if (argc >= 2 && !strcasecmp(argv[0], "txd")) {
+			par2.tx_delay = strtoul(argv[1], NULL, 0) / 10;
+			set = 1;
+			argv += 2;
+			argc -= 2;
+		} else if (argc >= 2 && !strcasecmp(argv[0], "txtail")) {
+			par2.tx_tail = strtoul(argv[1], NULL, 0) / 10;
+			set = 1;
+			argv += 2;
+			argc -= 2;
+		} else if (argc >= 2 && !strcasecmp(argv[0], "slot")) {
+			par2.slottime = strtoul(argv[1], NULL, 0) / 10;
+			set = 1;
+			argv += 2;
+			argc -= 2;
+		} else if (argc >= 2 && !strcasecmp(argv[0], "ppersist")) {
+			par2.ppersist = strtoul(argv[1], NULL, 0);
+			set = 1;
+			argv += 2;
+			argc -= 2;
+		} else if (!strcasecmp(argv[0], "half")) {
+			par2.fulldup = 0;
+			set = 1;
+			argv += 1;
+			argc -= 1;
+		} else if (!strcasecmp(argv[0], "full")) {
+			par2.fulldup = 1;
+			set = 1;
+			argv += 1;
+			argc -= 1;
+		} else {
+
+			argv += 1;
+			argc -= 1;
+		}
+	}
+	printf("current parameters: ");
+	display_channel_params(&par1);
+	if (set) {
+		ret = hdrvc_set_channel_access_param(par2);
+		if (ret < 0) {
+			perror("hdrvc_set_channel_access_param");
+			exit(1);
+		}
+		printf("new parameters:     ");
+		display_channel_params(&par2);
+	}
+	exit(0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str = 
+"[-b] [-i] [-d] [-i <baycomif>] [-h] [-c <cal>]\n"
+"[-p] [hw <hw>] [type <type>] [io <iobase>] [irq <irq>] [dma <dma>]\n"
+"    [options <opt>] [serio <serio>] [pario <pario>] [midiio <midiio>]\n"
+"[-a] [txd <txdelay>] [txtail <txtail>] [slot <slottime>]\n"
+"    [ppersist <ppersistence>] [full] [half]\n"
+"  -a: set or display channel access parameters\n" 
+"  -b: trace demodulated bits\n"
+"  -s: trace sampled input from tcm3105 (ser12 only)\n"
+"  -d: trace dcd and ptt status on stdout\n"
+"  -i: specify the name of the baycom kernel driver interface\n"
+"  -c: calibrate (i.e. send calibration pattern) for cal seconds\n"
+#ifdef HDRVC_KERNEL
+"  -p: set or display interface parameters\n"
+#endif /* HDRVC_KERNEL */
+"  -h: this help\n\n";
+
+int main(int argc, char *argv[])
+{
+	int ret;
+	fd_set fds_read;
+	fd_set fds_write;
+	struct timeval tm;
+	char getsetparams = 0;
+	char cal = 0;
+	int cal_val = 0;
+	struct sm_ioctl bsi;
+	struct baycom_ioctl bbi;
+	struct hdrvc_channel_state chst;
+	unsigned char pktbuf[2048];
+
+	progname = *argv;
+	printf("%s: Version 0.5; (C) 1996-1997 by Thomas Sailer HB9JNX/AE4WA\n", *argv);
+	hdrvc_args(&argc, argv, "bc0");
+	while ((ret = getopt(argc, argv, "bsdhpc:a")) != -1) {
+		switch (ret) {
+		case 'b':
+			trace_stat = 2;
+			break;
+		case 's':
+			trace_stat = 3;
+			break;
+		case 'd':
+			trace_stat = 1;
+			break;
+#ifdef HDRVC_KERNEL
+		case 'p':
+			getsetparams = 1;
+			break;
+#endif /* HDRVC_KERNEL */
+		case 'a':
+			getsetparams = 2;
+			break;
+		case 'c':
+			cal = 1;
+			cal_val = strtoul(optarg, NULL, 0);
+			break;
+		default:
+			printf("usage: %s %s", *argv, usage_str);
+			exit(-1);
+		}
+	}
+	hdrvc_init();
+	if (getsetparams == 1) {
+#ifdef HDRVC_KERNEL
+		do_set_params(argc - optind, argv+optind);
+#endif /* HDRVC_KERNEL */
+		exit(0);
+	}
+	if (getsetparams == 2) {
+		do_set_channel_params(argc - optind, argv+optind);
+		exit(0);
+	}
+	if (cal) {
+		ret = hdrvc_calibrate(cal_val);
+		if (ret < 0) {
+			perror("hdrvc_calibrate");
+			exit(1);
+		}
+		fprintf(stdout, "%s: calibrating for %i seconds\n", *argv, 
+			cal_val);
+		exit(0);
+	}
+	for (;;) {
+		while ((ret = hdrvc_recvpacket(pktbuf, sizeof(pktbuf))) > 1)
+			display_packet(pktbuf+1, ret-1);
+		switch (trace_stat) {
+		case 1:
+			ret = hdrvc_get_channel_state(&chst);
+			if (ret < 0)
+				perror("hdrvc_get_channel_state");
+			printf("%c%c rx: %lu  tx: %lu  rxerr: %lu  txerr: %lu", 
+			       chst.dcd ? 'D' : '-', chst.ptt ? 'P' : '-',
+			       chst.rx_packets, chst.tx_packets, chst.rx_errors, 
+			       chst.tx_errors);
+#ifdef HDRVC_KERNEL
+			if (hdrvc_sm_ioctl(SMCTL_GETDEBUG, &bsi) >= 0) {
+				printf("   intrate: %u  modcyc: %u  "
+				       "demodcyc: %u  dmares: %u", 
+				       bsi.data.dbg.int_rate, 
+				       bsi.data.dbg.mod_cycles, 
+				       bsi.data.dbg.demod_cycles,
+				       bsi.data.dbg.dma_residue);
+			} 
+			if (hdrvc_baycom_ioctl(BAYCOMCTL_GETDEBUG, &bbi) >= 0) {
+				printf("   dbg1: %lu  dbg2: %lu  dbg3: %li", 
+				       bbi.data.dbg.debug1, bbi.data.dbg.debug2, 
+				       bbi.data.dbg.debug3);
+			} 
+#endif /* HDRVC_KERNEL */
+			printf("\n");
+			break;
+		case 2:
+			print_bits(hdrvc_get_bits);
+			printf("\n");
+			break;
+		case 3:
+			print_bits(hdrvc_get_samples);
+			printf("\n");
+			break;
+		default:
+			break;
+		}
+		tm.tv_usec = 500000L;
+		tm.tv_sec = 0L;
+		if (hdrvc_getfd() >= 0) {
+			FD_ZERO(&fds_read);
+			FD_ZERO(&fds_write);
+			FD_SET(hdrvc_getfd(), &fds_read);
+			ret = select(hdrvc_getfd()+1, &fds_read, &fds_write, NULL, &tm);
+		} else 
+			ret = select(0, NULL, NULL, NULL, &tm);
+		if (ret < 0) {
+			fprintf(stderr, "%s: Error %s (%i) in select\n", *argv,
+				strerror(errno), errno);
+			exit(-2);
+		}
+	}
+}
+
+/* ---------------------------------------------------------------------- */
diff --git a/hdlcutil/smdiag.8 b/hdlcutil/smdiag.8
new file mode 100644
index 0000000..abc960f
--- /dev/null
+++ b/hdlcutil/smdiag.8
@@ -0,0 +1,78 @@
+.\" Copyright 1996 Thomas Sailer (t.sailer at alumni.ethz.ch)
+.\" May be distributed under the GNU General Public License
+.\" "
+.TH SMDIAG 8 "1 October 1996" "Smdiag 0.1" "Linux Programmer's Manual"
+.SH NAME
+smdiag \- Linux soundcard packet radio modem driver diagnostics utility
+.SH SYNOPSIS
+.B smdiag
+.B "[\-i device]"
+.B "[\-d display]"
+.B "[ \-ce ]"
+
+.SH DESCRIPTION
+.B smdiag
+may help to adjust the audio levels of the soundcard modem driver, as well
+as to control the quality of the radio link. It may either display an
+oscilloscope like view of the input signal, or display an eye diagram.
+The display may be gated with DCD, i.e. only updated if the modem detects
+a data carrier.
+
+.SH OPTIONS
+.B smdiag
+accepts the following options:
+
+.TP
+.B \-i
+The
+.I device
+argument specifies the soundcard modem device which should be configured or
+interrogated.  It will usually have the following form:
+.I sm[0-3].
+.TP
+.B \-d
+sets the address of the X server to display the window.
+.TP
+.B \-h
+display an overview of the available command line parameters and exit.
+.TP
+.B \-c
+toggle the carrier gating of the display.
+.TP
+.B \-e
+display an eye diagram (overlay of the synchronized demodulator output)
+instead of an oscilloscope view of the input signal.
+
+.SH KEYS
+.TP
+.B C
+clears the window
+.TP
+.B D
+toggles the DCD gating.
+.TP
+.B E
+displays an eye diagram
+.TP
+.B I
+displays the input signal
+.TP
+.B Q
+quits
+.I smdiag
+
+.SH BUGS
+.B smdiag
+Reacts sluggishly to keypresses. The window size is fixed. For speed reasons,
+two square root operations per sample are not implemented in the AFSK 1200 
+baud modes. The eye diagram for the AFSK 1200 baud mode is therefore
+distorted.
+
+.SH "SEE ALSO"
+.BR smmixer " (8), " sethdlc " (8),"
+linux/drivers/net/soundmodem.c
+
+.SH AUTHOR
+smdiag was written by Thomas Sailer (t.sailer at alumni.ethz.ch).
+
+
diff --git a/hdlcutil/smdiag.c b/hdlcutil/smdiag.c
new file mode 100644
index 0000000..e9b615d
--- /dev/null
+++ b/hdlcutil/smdiag.c
@@ -0,0 +1,431 @@
+/*****************************************************************************/
+
+/*
+ *	smdiag.c  -- kernel soundcard radio modem driver diagnostics utility.
+ *
+ *	Copyright (C) 1996,1997,2000  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *   0.1  26.06.1996  Started
+ *   0.2  11.05.1997  introduced hdrvcomm.h
+ *   0.3  05.01.2000  glibc compile fixes
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <net/if.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include "hdrvcomm.h"
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+static Display *display = NULL;
+static Window window;
+static Pixmap pixmap;
+static unsigned long col_zeroline;
+static unsigned long col_background;
+static unsigned long col_trace;
+static GC gr_context;
+static int xmul;
+
+/* ---------------------------------------------------------------------- */
+
+static int x_error_handler(Display *disp, XErrorEvent *evt)
+{
+    char err_buf[256], mesg[256], number[256];
+    char *mtype = "XlibMessage";
+
+    XGetErrorText(disp, evt->error_code, err_buf, sizeof(err_buf));
+    fprintf(stderr, "X Error: %s\n", err_buf);
+    XGetErrorDatabaseText(disp, mtype, "MajorCode", "Request Major code %d", 
+			  mesg, sizeof(mesg));
+    fprintf(stderr, mesg, evt->request_code);
+    sprintf(number, "%d", evt->request_code);
+    XGetErrorDatabaseText(disp, "XRequest", number, "", err_buf, 
+			  sizeof(err_buf));
+    fprintf(stderr, " (%s)\n", err_buf);
+    abort();
+}
+
+/* ---------------------------------------------------------------------- */
+
+#define WIDTH 512
+#define HEIGHT (constell ? 512 : 256)
+
+static int openwindow(char *disp, int constell, int samplesperbit)
+{
+        XSetWindowAttributes attr;
+        XGCValues gr_values;
+        XColor color, dummy;
+        XSizeHints sizehints;
+
+        if (!(display = XOpenDisplay(NULL)))
+                return -1;
+        XSetErrorHandler(x_error_handler);
+        XAllocNamedColor(display, DefaultColormap(display, 0), "red",
+                         &color, &dummy);
+	col_zeroline = color.pixel;
+	col_background = WhitePixel(display, 0);
+	col_trace = BlackPixel(display, 0);
+        attr.background_pixel = col_background;
+        if (!(window = XCreateWindow(display, XRootWindow(display, 0), 
+				     200, 200, WIDTH, HEIGHT, 5, 
+				     DefaultDepth(display, 0), 
+				     InputOutput, DefaultVisual(display, 0),
+				     CWBackPixel, &attr))) {
+		fprintf(stderr, "smdiag: unable to open X window\n");
+		exit(1);
+	}
+	if (!(pixmap = XCreatePixmap(display, window, WIDTH, HEIGHT,
+				     DefaultDepth(display, 0)))) {
+		fprintf(stderr, "smdiag: unable to open offscreen pixmap\n");
+		exit(1);
+	}
+        xmul = WIDTH / (2*(samplesperbit > 0 ? samplesperbit : 1));
+        XSelectInput(display, window, KeyPressMask | StructureNotifyMask
+		     | ExposureMask) ;
+        XAllocNamedColor(display, DefaultColormap(display, 0), "red",
+                         &color, &dummy);
+        gr_values.foreground = col_trace;
+        gr_values.line_width = 1;
+        gr_values.line_style = LineSolid;
+        gr_context = XCreateGC(display, window, GCForeground | GCLineWidth |
+                               GCLineStyle, &gr_values);
+        XStoreName(display, window, "diagnostics");
+        /*
+         * Do not allow the window to be resized
+         */
+        memset(&sizehints, 0, sizeof(sizehints));
+        sizehints.min_width = sizehints.max_width = WIDTH;
+        sizehints.min_height = sizehints.max_height = HEIGHT;
+        sizehints.flags = PMinSize | PMaxSize;
+        XSetWMNormalHints(display, window, &sizehints);
+        XMapWindow(display, window);
+        XSynchronize(display, 1);
+        return 0;
+}
+
+#undef WIDTH
+#undef HEIGHT
+
+/* ---------------------------------------------------------------------- */
+
+static void closewindow(void)
+{
+        if (!display)
+                return;
+        XDestroyWindow(display, window);
+        XCloseDisplay(display);
+        display = NULL;
+}
+
+/* ---------------------------------------------------------------------- */
+
+#define XCOORD(x) ((x) * xm)
+#define YCOORD(y) ((SHRT_MAX - (int)(y)) * winattrs.height / USHRT_MAX)
+
+static void drawdata(short *data, int len, int replace, int xm)
+{
+	int cnt;
+        GC gc;
+        XGCValues gcv;
+        XWindowAttributes winattrs;	
+
+        if (!display || !pixmap)
+                return;
+        XGetWindowAttributes(display, window, &winattrs);
+	gcv.line_width = 1;
+        gcv.line_style = LineSolid;
+        gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv);
+        XSetState(display, gc, col_background, col_background, GXcopy, 
+		  AllPlanes);
+	if (replace)
+		XFillRectangle(display, pixmap, gc, 0, 0, 
+			       winattrs.width, winattrs.height);
+	else
+		XCopyArea(display, window, pixmap, gr_context, 0, 0, 
+			  winattrs.width, winattrs.height, 0, 0);
+        XSetForeground(display, gc, col_trace);
+	for (cnt = 0; cnt < len-1; cnt++)
+		XDrawLine(display, pixmap, gc, XCOORD(cnt), YCOORD(data[cnt]),
+			  XCOORD(cnt+1), YCOORD(data[cnt+1]));
+        XSetForeground(display, gc, col_zeroline);
+	XDrawLine(display, pixmap, gc, 0, YCOORD(0), winattrs.width,
+		  YCOORD(0));
+	XCopyArea(display, pixmap, window, gr_context, 0, 0, winattrs.width,
+                  winattrs.height, 0, 0);
+        XFreeGC(display, gc);
+	XSync(display, 0);
+}
+
+#undef XCOORD
+#undef YCOORD
+
+/* ---------------------------------------------------------------------- */
+
+#define XCOORD(x) ((SHRT_MAX - (int)(x)) * winattrs.width / USHRT_MAX)
+#define YCOORD(y) ((SHRT_MAX - (int)(y)) * winattrs.height / USHRT_MAX)
+
+static void drawconstell(short *data, int len)
+{
+	int cnt;
+        GC gc;
+        XGCValues gcv;
+        XWindowAttributes winattrs;	
+
+        if (!display || !pixmap)
+                return;
+        XGetWindowAttributes(display, window, &winattrs);
+	gcv.line_width = 1;
+        gcv.line_style = LineSolid;
+        gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv);
+        XSetState(display, gc, col_background, col_background, GXcopy, 
+		  AllPlanes);
+	XCopyArea(display, window, pixmap, gr_context, 0, 0, 
+		  winattrs.width, winattrs.height, 0, 0);
+        XSetForeground(display, gc, col_trace);
+	for (cnt = 0; cnt < len-1; cnt += 2)
+		XDrawPoint(display, pixmap, gc, 
+			   XCOORD(data[cnt]), YCOORD(data[cnt+1]));
+        XSetForeground(display, gc, col_zeroline);
+	XDrawLine(display, pixmap, gc, 0, YCOORD(0), winattrs.width, YCOORD(0));
+	XDrawLine(display, pixmap, gc, XCOORD(0), 0, XCOORD(0), winattrs.height);
+	XCopyArea(display, pixmap, window, gr_context, 0, 0, winattrs.width,
+                  winattrs.height, 0, 0);
+        XFreeGC(display, gc);
+	XSync(display, 0);
+}
+
+#undef XCOORD
+#undef YCOORD
+
+/* ---------------------------------------------------------------------- */
+
+static void clearwindow(void)
+{
+        XWindowAttributes winattrs;	
+	GC gc;
+        XGCValues gcv;
+
+        if (!display || !pixmap)
+                return;
+        XGetWindowAttributes(display, window, &winattrs);
+	gcv.line_width = 1;
+        gcv.line_style = LineSolid;
+        gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv);
+        XSetState(display, gc, col_background, col_background, GXcopy, 
+		  AllPlanes);
+	XFillRectangle(display, pixmap, gc, 0, 0, 
+		       winattrs.width, winattrs.height);
+        XSetForeground(display, gc, col_zeroline);
+        XClearArea(display, window, 0, 0, 0, 0, False);
+	XCopyArea(display, pixmap, window, gr_context, 0, 0, winattrs.width,
+                  winattrs.height, 0, 0);
+        XFreeGC(display, gc);	
+}
+
+/* ---------------------------------------------------------------------- */
+
+static Bool predicate(Display *display, XEvent *event, char *arg)
+{
+        return True;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static char *getkey(void)
+{
+        XWindowAttributes winattrs;	
+        XEvent evt;
+        static char kbuf[32];
+        int i;
+
+        if (!display)
+                return NULL;
+	XSync(display, 0);
+        while (XCheckIfEvent(display, &evt, predicate, NULL)) {
+		switch (evt.type) {
+		case KeyPress:
+			i = XLookupString((XKeyEvent *)&evt, kbuf, sizeof(kbuf)-1, 
+					  NULL, NULL);
+			if (!i)
+				return NULL;
+			kbuf[i] = 0;
+			return kbuf;
+		case DestroyNotify:
+			XCloseDisplay(display);
+			display = NULL;
+			return NULL;
+		case Expose:
+			XGetWindowAttributes(display, window, &winattrs);
+			XCopyArea(display, pixmap, window, gr_context, 0, 0, 
+				  winattrs.width, winattrs.height, 0, 0);
+			break;
+		default:
+			break;
+		}
+        }
+        return NULL;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void printmode(unsigned int mode, unsigned int trigger)
+{
+	printf("Source: %s%s\n", (mode == SM_DIAGMODE_DEMOD) ?
+	       "demodulator (eye diagram)" : "input (oscilloscope)",
+	       (trigger & SM_DIAGFLAG_DCDGATE) ? " gated with DCD" : "");
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str = 
+"[-d display] [-i smif] [-c] [-e]\n"
+"  -d: display host\n"
+"  -i: specify the name of the baycom kernel driver interface\n"
+"  -c: toggle carrier trigger\n"
+"  -e: eye diagram mode\n\n"
+"  -p: constellation plot\n\n";
+
+int main(int argc, char *argv[])
+{
+	char *disp = NULL;
+	unsigned int mode = HDRVC_DIAGMODE_INPUT;
+	unsigned int trigger = 0;
+	unsigned int ifflags;
+	short data[256];
+	char *cp;
+	int ret;
+	unsigned int samplesperbit;
+
+	progname = *argv;
+	printf("%s: Version 0.2; (C) 1996-1997 by Thomas Sailer HB9JNX/AE4WA\n", *argv);
+	hdrvc_args(&argc, argv, "sm0");
+	while ((ret = getopt(argc, argv, "d:ecp")) != -1) {
+		switch (ret) {
+		case 'd':
+			disp = optarg;
+			break;
+		case 'e':
+			mode = HDRVC_DIAGMODE_DEMOD;
+			trigger = HDRVC_DIAGFLAG_DCDGATE;
+			break;
+		case 'c':
+			trigger ^= HDRVC_DIAGFLAG_DCDGATE;
+			break;
+		case 'p':
+			mode = HDRVC_DIAGMODE_CONSTELLATION;
+			break;
+		default:
+			printf("usage: %s %s", *argv, usage_str);
+			exit(-1);
+		}
+	}
+	hdrvc_init();
+	ifflags = hdrvc_get_ifflags();
+	if (!(ifflags & IFF_UP)) {
+		fprintf(stderr, "interface %s down\n", hdrvc_ifname());
+		exit(1);
+	}
+	if (!(ifflags & IFF_RUNNING)) {
+		fprintf(stderr, "interface %s not running\n", hdrvc_ifname());
+		exit(1);
+	}
+	printmode(mode, trigger);
+	for (;;) {
+		if ((ret = hdrvc_diag2(mode, trigger, data, sizeof(data) / sizeof(short),
+				       &samplesperbit)) < 0) {
+			perror("hdrvc_diag2");
+			exit(1);
+		}
+		if (ret > 0) {
+			if (!display) {
+				openwindow(disp, mode == HDRVC_DIAGMODE_CONSTELLATION,
+					   samplesperbit);
+				clearwindow();
+			}
+			if (mode == SM_DIAGMODE_CONSTELLATION)
+				drawconstell(data, ret);
+			else
+				drawdata(data, ret, mode == HDRVC_DIAGMODE_INPUT,
+					 mode == HDRVC_DIAGMODE_INPUT ? 5:xmul);
+		} else
+			usleep(100000L);
+		if (display) {
+			if ((cp = getkey())) {
+				for (; *cp; cp++) {
+					printf("char pressed: '%c'\n", *cp);
+					switch (*cp) {
+					case 'c':
+					case 'C':
+						clearwindow();
+						printmode(mode, trigger);
+						break;
+					case 'q':
+					case 'Q':
+						closewindow();
+						break;
+					case 'i':
+					case 'I':
+						if (mode == HDRVC_DIAGMODE_CONSTELLATION)
+							break;
+						mode = HDRVC_DIAGMODE_INPUT;
+						clearwindow();
+						printmode(mode, trigger);
+						break;
+					case 'e':
+					case 'E':
+						if (mode == HDRVC_DIAGMODE_CONSTELLATION)
+							break;
+						mode = HDRVC_DIAGMODE_DEMOD;
+						clearwindow();
+						printmode(mode, trigger);
+						break;
+					case 'd':
+					case 'D':
+						trigger ^= HDRVC_DIAGFLAG_DCDGATE;
+						clearwindow();
+						printmode(mode, trigger);
+						break;
+					}
+				}
+			}
+			if (!display)
+				exit(0);
+		}
+	}
+}
+
+/* ---------------------------------------------------------------------- */
diff --git a/hdlcutil/smmixer.8 b/hdlcutil/smmixer.8
new file mode 100644
index 0000000..748e64a
--- /dev/null
+++ b/hdlcutil/smmixer.8
@@ -0,0 +1,164 @@
+.\" Copyright 1996 Thomas Sailer (t.sailer at alumni.ethz.ch)
+.\" May be distributed under the GNU General Public License
+.\" "
+.TH SMMIXER 8 "1 October 1996" "Smmixer 0.1" "Linux Programmer's Manual"
+.SH NAME
+smmixer \- get/set Linux soundcard packet radio modem driver mixer
+.SH SYNOPSIS
+.B smmixer
+.B "[\-i device]"
+.BR "[ " params " ]"
+
+.SH DESCRIPTION
+.B smmixer
+displays and/or sets the input source and input and output levels of a
+soundcard modem port.
+
+.SH OPTIONS
+.B smmixer
+accepts the following option:
+
+.TP
+.B \-i
+The
+.I device
+argument specifies the soundcard modem device which should be configured or
+interrogated.  It will usually have the following form:
+.I sm[0-3].
+
+.SH PARAMETERS
+The
+.B AD1848 (WSS)
+mixer accepts the following parameters:
+.TP
+.B ol=val
+sets the level of the left output to the specified value. Legal values are from
+-100..0dB.
+.TP
+.B or=val
+sets the level of the right output to the specified value. Legal values are from
+-100..0dB.
+.TP
+.B o=val
+sets the level of both outputs to the specified value. Legal values are from
+-100..0dB.
+.TP
+.B il=val
+sets the level of the left input to the specified value. Legal values are from
+0..43dB.
+.TP
+.B ir=val
+sets the level of the right input to the specified value. Legal values are from
+0..43dB.
+.TP
+.B i=val
+sets the level of both inputs to the specified value. Legal values are from
+0..43dB.
+.TP
+.B sl=val
+sets the source of the left input to the specified value. Legal values are
+.I line, aux1, mic
+or
+.I dac.
+.TP
+.B sr=val
+sets the source of the right input to the specified value. Legal values are
+.I line, aux1, mic
+or
+.I dac.
+.TP
+.B s=val
+sets the source of both inputs to the specified value. Legal values are
+.I line, aux1, mic
+or
+.I dac.
+
+.in \n[IN]u
+The
+.B CT1335 (SB2.x)
+mixer accepts the following parameter:
+.TP
+.B o=val
+sets the output level to the specified value. Legal values are from -46..0dB.
+
+.in \n[IN]u
+The
+.B CT1345 (SBPro)
+mixer accepts the following parameters:
+.TP
+.B ol=val
+sets the level of the left output to the specified value. Legal values are from
+-46..0dB.
+.TP
+.B or=val
+sets the level of the right output to the specified value. Legal values are from
+-46..0dB.
+.TP
+.B o=val
+sets the level of both outputs to the specified value. Legal values are from
+-46..0dB.
+.TP
+.B s=val
+sets the input source to the specified value. Legal values are
+.I mic, cd
+or
+.I line.
+
+.in \n[IN]u
+The
+.B CT1745 (SB16, SB32 AWE)
+mixer accepts the following parameters:
+.TP
+.B ol=val
+sets the level of the left output to the specified value. Legal values are from
+-62..18dB.
+.TP
+.B or=val
+sets the level of the right output to the specified value. Legal values are from
+-62..18dB.
+.TP
+.B o=val
+sets the level of both outputs to the specified value. Legal values are from
+-62..18dB.
+.TP
+.B il=val
+sets the level of the left input to the specified value. Legal values are from
+-62..18dB.
+.TP
+.B ir=val
+sets the level of the right input to the specified value. Legal values are from
+-62..18dB.
+.TP
+.B i=val
+sets the level of both inputs to the specified value. Legal values are from
+-62..18dB.
+.TP
+.B s=val
+enables the specified value as a source. Legal values are
+.I line, line.l, line.r, midi, midi.l, midi.r, cd, cd.l, cd.r
+or
+.I mic.
+
+.SH CONSIDERATIONS
+It is important that the audio levels of your radio match those of the
+soundcard. To help achieve this, use the
+.I smdiag
+utility.
+
+This utility can only be used after the interface is started up, i.e. after
+ifconfig sm? up.
+
+The sound driver and the soundcard modem driver are mutually exclusive, i.e. they
+cannot both access the same soundcard at the same time. Even worse, the sound driver
+reserves the soundcard as soon as it gets loaded. The souncard modem driver however
+reserves the card only when the interface is started, i.e. during ifconfig if up.
+
+9600 baud may not currently work on SoundBlaster cards with DSP revision 4.x, i.e.
+SB16 and SB32 AWE. This is because they seem to not be fully backwards compatible.
+
+.SH "SEE ALSO"
+.BR smdiag " (8), " sethdlc " (8),"
+linux/drivers/net/soundmodem.c
+
+.SH AUTHOR
+smmixer was written by Thomas Sailer (t.sailer at alumni.ethz.ch).
diff --git a/hdlcutil/smmixer.c b/hdlcutil/smmixer.c
new file mode 100644
index 0000000..8adca7f
--- /dev/null
+++ b/hdlcutil/smmixer.c
@@ -0,0 +1,779 @@
+/*****************************************************************************/
+
+/*
+ *	smmixer.c  -- kernel soundcard radio modem driver mixer utility.
+ *
+ *	Copyright (C) 1996,1997,2000  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *   0.1  26.06.1996  Started
+ *   0.2  11.05.1997  introduced hdrvcomm.h
+ *   0.3  05.01.2000  glibc compile fixes
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <net/if.h>
+#include "hdrvcomm.h"
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+static unsigned int mixdevice;
+
+/* ---------------------------------------------------------------------- */
+
+static int do_mix_ioctl(int cmd, struct sm_mixer_data *mixdat)
+{
+	struct sm_ioctl par;
+	int i;
+
+	par.cmd = cmd;
+	par.data.mix = *mixdat;
+	i = hdrvc_sm_ioctl(cmd, &par);
+	*mixdat = par.data.mix;
+	return i;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static unsigned char get_mixer_reg(unsigned char addr)
+{
+	int i;
+	struct sm_mixer_data mixdat;
+
+	mixdat.reg = addr;
+	if ((i = do_mix_ioctl(SMCTL_GETMIXER, &mixdat)) < 0) {
+		perror("do_mix_ioctl: SMCTL_GETMIXER");
+		exit(1);
+	}
+	if (!i)
+		fprintf(stderr, "warning: mixer device %u register %u not "
+			"accessible for reading!\n", mixdat.mixer_type,
+			addr);
+	if (mixdat.mixer_type != mixdevice) {
+		fprintf(stderr, "error: mixer type changed !?\n");
+		exit(2);
+	}
+	return mixdat.data;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void set_mixer_reg(unsigned char addr, unsigned char data)
+{
+	struct sm_mixer_data mixdat;
+
+	mixdat.reg = addr;
+	mixdat.data = data;
+	mixdat.mixer_type = mixdevice;
+	if (do_mix_ioctl(SMCTL_SETMIXER, &mixdat) < 0) {
+		perror("do_mix_ioctl: SMCTL_SETMIXER");
+		exit(1);
+	}
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void display_mixer_ad1848(void)
+{
+	static const char *src[4] = { "Line", "Aux1", "Mic", "Dac" };
+	unsigned char data;
+	
+	data = get_mixer_reg(0);
+	printf("Left input:  Source: %-4s Gain: %3ddB\n", src[(data>>6)&3],
+	       (((data & 0xe0) == 0xa0) ? 20 : 0) + (data & 0xf) * 3 / 2);
+	data = get_mixer_reg(1);
+	printf("Right input: Source: %-4s Gain: %3ddB\n", src[(data>>6)&3],
+	       (((data & 0xe0) == 0xa0) ? 20 : 0) + (data & 0xf) * 3 / 2);
+	data = get_mixer_reg(2);
+	if (!(data & 0x80))
+		printf("Left Aux1 mixing:  Gain: %3ddB\n", 
+		       (8 - (int)(data & 0x1f)) * 3 / 2);
+	data = get_mixer_reg(3);
+	if (!(data & 0x80))
+		printf("Right Aux1 mixing: Gain: %3ddB\n", 
+		       (8 - (int)(data & 0x1f)) * 3 / 2);
+	data = get_mixer_reg(4);
+	if (!(data & 0x80))
+		printf("Left Aux2 mixing:  Gain: %3ddB\n", 
+		       (8 - (int)(data & 0x1f)) * 3 / 2);
+	data = get_mixer_reg(5);
+	if (!(data & 0x80))
+		printf("Right Aux2 mixing: Gain: %3ddB\n", 
+		       (8 - (int)(data & 0x1f)) * 3 / 2);
+	data = get_mixer_reg(6);
+	if (data & 0x80) 
+		printf("Left output:  muted\n");
+	else 
+		printf("Left output:  Gain: %3ddB\n", 
+		       ((int)(data & 0x3f)) * (-3) / 2);
+	data = get_mixer_reg(7);
+	if (data & 0x80) 
+		printf("Right output: muted\n");
+	else 
+		printf("Right output: Gain: %3ddB\n", 
+		       ((int)(data & 0x3f)) * (-3) / 2);
+	data = get_mixer_reg(13);
+	if (data & 1)
+		printf("Digital mix: Gain: %3ddB\n",
+		       ((int)((data >> 2) & 0x3f)) * (-3) / 2);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void display_mixer_cs423x(void)
+{
+	unsigned char data;
+
+	display_mixer_ad1848();
+	data = get_mixer_reg(26);
+	printf("Mono: %s%s%s Gain: %3ddB\n", 
+	       (data & 0x80) ? "input muted, " : "",
+	       (data & 0x40) ? "output muted, " : "",
+	       (data & 0x20) ? "bypass, " : "",
+	       (int)(data & 0xf) * (-3));
+       	data = get_mixer_reg(27);
+	if (data & 0x80) 
+		printf("Left output:  muted\n");
+	else 
+		printf("Left output:  Gain: %3ddB\n", 
+		       ((int)(data & 0xf)) * (-2));
+	data = get_mixer_reg(29);
+	if (data & 0x80) 
+		printf("Right output: muted\n");
+	else 
+		printf("Right output: Gain: %3ddB\n", 
+		       ((int)(data & 0xf)) * (-2));
+	
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void display_mixer_ct1335(void)
+{
+	unsigned char data;
+	
+	data = get_mixer_reg(0x2);
+	printf("Master volume: %3ddB\n", 
+	       (((int)((data >> 1) & 7)) - 7) * 46 / 7);
+	data = get_mixer_reg(0xa);
+	printf("Voice volume:  %3ddB\n", 
+	       (((int)((data >> 1) & 3)) - 3) * 46 / 3);
+	data = get_mixer_reg(0x6);
+	printf("MIDI volume:   %3ddB\n", 
+	       (((int)((data >> 1) & 7)) - 7) * 46 / 7);
+	data = get_mixer_reg(0x8);
+	printf("CD volume:     %3ddB\n", 
+	       (((int)((data >> 1) & 7)) - 7) * 46 / 7);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void display_mixer_ct1345(void)
+{	
+	static const char *src[4] = { "Mic", "CD", "Mic", "Line" };
+	unsigned char data, data2;
+	
+	data = get_mixer_reg(0xc);
+	data2 = get_mixer_reg(0xe);
+	printf("Input source: %s\n", src[(data >> 1) & 3]);
+	if (!(data & data2 & 0x20)) { 
+		printf("Filter: Low pass %s kHz: ", (data & 0x8) ? 
+		       "8.8" : "3.2");
+		if (data & 0x20)
+			printf("output\n");
+		else 
+			printf("input%s\n", (data2 & 0x20) ? "" : ", output");
+	}
+	if (data2 & 2)
+		printf("stereo\n");
+	
+	data = get_mixer_reg(0x22);
+	printf("Master volume: Left: %3ddB  Right: %3ddB\n", 
+	       (((int)((data >> 5) & 7)) - 7) * 46 / 7,
+	       (((int)((data >> 1) & 7)) - 7) * 46 / 7);
+	data = get_mixer_reg(0x4);
+	printf("Voice volume:  Left: %3ddB  Right: %3ddB\n", 
+	       (((int)((data >> 5) & 7)) - 7) * 46 / 7,
+	       (((int)((data >> 1) & 7)) - 7) * 46 / 7);
+	data = get_mixer_reg(0x26);
+	printf("MIDI volume:   Left: %3ddB  Right: %3ddB\n", 
+	       (((int)((data >> 5) & 7)) - 7) * 46 / 7,
+	       (((int)((data >> 1) & 7)) - 7) * 46 / 7);
+	data = get_mixer_reg(0x28);
+	printf("CD volume:     Left: %3ddB  Right: %3ddB\n", 
+	       (((int)((data >> 5) & 7)) - 7) * 46 / 7,
+	       (((int)((data >> 1) & 7)) - 7) * 46 / 7);
+	data = get_mixer_reg(0x2e);
+	printf("Line volume:   Left: %3ddB  Right: %3ddB\n", 
+	       (((int)((data >> 5) & 7)) - 7) * 46 / 7,
+	       (((int)((data >> 1) & 7)) - 7) * 46 / 7);
+	data = get_mixer_reg(0x0a);
+	printf("Mic mixing volume:   %3ddB\n", 
+	       (((int)((data >> 1) & 3)) - 3) * 46 / 3);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void display_mixer_ct1745(void)
+{	
+	unsigned char data, data2;
+	
+	printf("Master volume: Left: %3ddB  Right: %3ddB\n",
+	       ((int)((get_mixer_reg(0x30) >> 3) & 0x1f) - 31) * 2,
+	       ((int)((get_mixer_reg(0x31) >> 3) & 0x1f) - 31) * 2);
+	printf("Voice volume:  Left: %3ddB  Right: %3ddB\n",
+	       ((int)((get_mixer_reg(0x32) >> 3) & 0x1f) - 31) * 2,
+	       ((int)((get_mixer_reg(0x33) >> 3) & 0x1f) - 31) * 2);
+	printf("MIDI volume:   Left: %3ddB  Right: %3ddB\n",
+	       ((int)((get_mixer_reg(0x34) >> 3) & 0x1f) - 31) * 2,
+	       ((int)((get_mixer_reg(0x35) >> 3) & 0x1f) - 31) * 2);
+	printf("CD volume:     Left: %3ddB  Right: %3ddB\n",
+	       ((int)((get_mixer_reg(0x36) >> 3) & 0x1f) - 31) * 2,
+	       ((int)((get_mixer_reg(0x37) >> 3) & 0x1f) - 31) * 2);
+	printf("Line volume:   Left: %3ddB  Right: %3ddB\n",
+	       ((int)((get_mixer_reg(0x38) >> 3) & 0x1f) - 31) * 2,
+	       ((int)((get_mixer_reg(0x39) >> 3) & 0x1f) - 31) * 2);
+	printf("Mic volume:          %3ddB\n",
+	       ((int)((get_mixer_reg(0x3a) >> 3) & 0x1f) - 31) * 2);
+	printf("PC speaker volume:   %3ddB\n",
+	       ((int)((get_mixer_reg(0x3b) >> 6) & 0x3) - 3) * 6);
+	printf("Mic gain:      %s\n", 
+	       (get_mixer_reg(0x43) & 1) ? "fixed 20dB" : "AGC");
+	printf("Output gain:   Left: %3ddB  Right: %3ddB\n",
+	       ((int)((get_mixer_reg(0x41) >> 6) & 3)) * 6,
+	       ((int)((get_mixer_reg(0x42) >> 6) & 3)) * 6);
+	printf("Input gain:    Left: %3ddB  Right: %3ddB\n",
+	       ((int)((get_mixer_reg(0x3f) >> 6) & 3)) * 6,
+	       ((int)((get_mixer_reg(0x40) >> 6) & 3)) * 6);
+	data = (get_mixer_reg(0x44) >> 4) & 0xf;
+	if (data > 7)
+		data--;
+	data2 = (get_mixer_reg(0x45) >> 4) & 0xf;
+	if (data2 > 7)
+		data2--;
+	printf("Treble:        Left: %3ddB  Right: %3ddB\n",
+	       ((int)data - 7) * 2, ((int)data2 - 7) * 2);
+	data = (get_mixer_reg(0x46) >> 4) & 0xf;
+	if (data > 7)
+		data--;
+	data2 = (get_mixer_reg(0x47) >> 4) & 0xf;
+	if (data2 > 7)
+		data2--;
+	printf("Bass:          Left: %3ddB  Right: %3ddB\n",
+	       ((int)data - 7) * 2, ((int)data2 - 7) * 2);
+	data = get_mixer_reg(0x3c);
+	printf("Output sources left:  PCSpeaker Voice.L%s%s%s\n",
+	       (data & 1) ? " Mic" : "", (data & 4) ? " CD.L" : "",
+	       (data & 0x10) ? " Line.L" : "");
+	printf("Output sources right: PCSpeaker Voice.R%s%s%s\n",
+	       (data & 1) ? " Mic" : "", (data & 2) ? " CD.R" : "",
+	       (data & 8) ? " Line.R" : "");
+	data = get_mixer_reg(0x3d);
+	printf("Input sources left:  %s%s%s%s%s%s%s\n",
+	       (data & 1) ? " Mic" : "", (data & 2) ? " CD.R" : "", 
+	       (data & 4) ? " CD.L" : "", (data & 8) ? " Line.R" : "", 
+	       (data & 0x10) ? " Line.L" : "", (data & 0x20) ? " Midi.R" : "",
+	       (data & 0x40) ? " Midi.L" : "");
+	data = get_mixer_reg(0x3e);
+	printf("Input sources right: %s%s%s%s%s%s%s\n",
+	       (data & 1) ? " Mic" : "", (data & 2) ? " CD.R" : "", 
+	       (data & 4) ? " CD.L" : "", (data & 8) ? " Line.R" : "", 
+	       (data & 0x10) ? " Line.L" : "", (data & 0x20) ? " Midi.R" : "",
+	       (data & 0x40) ? " Midi.L" : "");
+}
+
+/* ---------------------------------------------------------------------- */
+
+static int parse_ad_src(const char *cp)
+{
+        if (!strcasecmp(cp, "line"))
+                return 0;
+        if (!strcasecmp(cp, "aux1"))
+                return 1;
+        if (!strcasecmp(cp, "mic"))
+                return 2;
+        if (!strcasecmp(cp, "dac"))
+                return 3;
+        return -1;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static int set_mixer_ad1848(int argc, char *argv[])
+{
+	unsigned int mask = 0;
+	int olvll = 0, olvlr = 0;
+	int isrcl = 0, isrcr = 0;
+	int ilvll = 0, ilvlr = 0;
+	unsigned int data;
+
+	for (; argc >= 1; argc--, argv++) {
+		if (!strncasecmp(argv[0], "ol=", 3)) {
+			olvll = strtol(argv[0]+3, NULL, 0);
+			mask |= 1;
+			if (olvll < -46 || olvll > 0) {
+				fprintf(stderr, "output level out of range "
+					"-100..0dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "or=", 3)) {
+			olvlr = strtol(argv[0]+3, NULL, 0);
+			mask |= 2;
+			if (olvlr < -46 || olvlr > 0) {
+				fprintf(stderr, "output level out of range "
+					"-100..0dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "o=", 2)) {
+			olvll = olvlr = strtol(argv[0]+2, NULL, 0);
+			mask |= 3;
+			if (olvll < -46 || olvll > 0) {
+				fprintf(stderr, "output level out of range "
+					"-100..0dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "il=", 3)) {
+			ilvll = strtol(argv[0]+3, NULL, 0);
+			mask |= 4;
+			if (ilvll < 0 || ilvll > 43) {
+				fprintf(stderr, "input gain out of range "
+					"0..43dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "ir=", 3)) {
+			ilvlr = strtol(argv[0]+3, NULL, 0);
+			mask |= 8;
+			if (ilvll < 0 || ilvll > 43) {
+				fprintf(stderr, "input gain out of range "
+					"0..43dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "i=", 2)) {
+			ilvll = ilvlr = strtol(argv[0]+2, NULL, 0);
+			mask |= 12;
+			if (ilvll < 0 || ilvll > 43) {
+				fprintf(stderr, "input gain out of range "
+					"0..43dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "sl=", 3)) {
+			mask |= 16;
+			if ((isrcl = parse_ad_src(argv[0]+3)) < 0) {
+				fprintf(stderr, "invalid input source, must "
+					"be either line, aux1, mic or dac\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "sr=", 3)) {
+			mask |= 32;
+			if ((isrcr = parse_ad_src(argv[0]+3)) < 0) {
+				fprintf(stderr, "invalid input source, must "
+					"be either line, aux1, mic or dac\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "s=", 2)) {
+			mask |= 48;
+			if ((isrcl = isrcr = parse_ad_src(argv[0]+2)) < 0) {
+				fprintf(stderr, "invalid input source, must "
+					"be either line, aux1, mic or dac\n");
+				return -1;
+			}
+		} else {
+			fprintf(stderr, "invalid parameter \"%s\"\n", argv[0]);
+			return -1;
+		}
+	}
+	data = get_mixer_reg(0x00);
+	if (mask & 4) {
+		data &= 0xc0;
+		if (ilvll > 23) {
+			data |= 0x20;
+			ilvll -= 20;
+		}
+		data |= ilvll * 2 / 3;
+	}
+	if (mask & 16)
+		data = (data & 0x3f) | (isrcl << 6);
+	if ((data & 0xc0) != 0x80)
+		data &= ~0x20;
+	set_mixer_reg(0x00, data);
+	data = get_mixer_reg(0x01);
+	if (mask & 8) {
+		data &= 0xc0;
+		if (ilvlr > 23) {
+			data |= 0x20;
+			ilvlr -= 20;
+		}
+		data |= ilvlr * 2 / 3;
+	}
+	if (mask & 32)
+		data = (data & 0x3f) | (isrcr << 6);
+	if ((data & 0xc0) != 0x80)
+		data &= ~0x20;
+	set_mixer_reg(0x01, data);
+	set_mixer_reg(0x02, 0x80);
+	set_mixer_reg(0x03, 0x80);
+	set_mixer_reg(0x04, 0x80);
+	set_mixer_reg(0x05, 0x80);
+	if (mask & 1) {
+		if (olvll < -95)
+			set_mixer_reg(0x06, 0x80);
+		else 
+			set_mixer_reg(0x06, (olvll * (-2) / 3));
+	}
+	if (mask & 2) {
+		if (olvlr < -95)
+			set_mixer_reg(0x07, 0x80);
+		else 
+			set_mixer_reg(0x07, (olvlr * (-2) / 3));
+	}
+	set_mixer_reg(0x0d, 0x00);
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static int set_mixer_ct1335(int argc, char *argv[])
+{
+	unsigned int mask = 0;
+	int olvl = 0;
+
+	for (; argc >= 1; argc--, argv++) {
+		if (!strncasecmp(argv[0], "o=", 2)) {
+			olvl = strtol(argv[0]+2, NULL, 0);
+			mask |= 1;
+			if (olvl < -46 || olvl > 0) {
+				fprintf(stderr, "output level out of range "
+					"-46..0dB\n");
+				return -1;
+			}
+		} else {
+			fprintf(stderr, "invalid parameter \"%s\"\n", argv[0]);
+			return -1;
+		}
+	}
+	if (mask & 1)
+		set_mixer_reg(0x02, (((olvl * 7 / 46) + 7) << 1));
+	set_mixer_reg(0x06, 0x00);
+	set_mixer_reg(0x08, 0x00);
+	set_mixer_reg(0x0a, 0x06);
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static int set_mixer_ct1345(int argc, char *argv[])
+{
+	unsigned int mask = 0;
+	int olvll = 0, olvlr = 0;
+	int isrc = 0;
+	unsigned int data;
+
+	for (; argc >= 1; argc--, argv++) {
+		if (!strncasecmp(argv[0], "ol=", 3)) {
+			olvll = strtol(argv[0]+3, NULL, 0);
+			mask |= 1;
+			if (olvll < -46 || olvll > 0) {
+				fprintf(stderr, "output level out of range "
+					"-46..0dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "or=", 3)) {
+			olvlr = strtol(argv[0]+3, NULL, 0);
+			mask |= 2;
+			if (olvlr < -46 || olvlr > 0) {
+				fprintf(stderr, "output level out of range "
+					"-46..0dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "o=", 2)) {
+			olvll = olvlr = strtol(argv[0]+2, NULL, 0);
+			mask |= 3;
+			if (olvll < -46 || olvll > 0) {
+				fprintf(stderr, "output level out of range "
+					"-46..0dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "s=", 2)) {
+			mask |= 4;
+			if (!strcasecmp(argv[0]+2, "mic"))
+				isrc = 0;
+			else if (!strcasecmp(argv[0]+2, "cd"))
+				isrc = 1;
+			else if (!strcasecmp(argv[0]+2, "line"))
+				isrc = 3;
+			else {
+				fprintf(stderr, "invalid input source, must "
+					"be either mic, cd or line\n");
+				return -1;
+			}
+		} else {
+			fprintf(stderr, "invalid parameter \"%s\"\n", argv[0]);
+			return -1;
+		}
+	}
+	set_mixer_reg(0x04, 0xee);
+	set_mixer_reg(0x0a, 0x00);
+	if (mask & 4)
+		data = (isrc & 3) << 1;
+	else
+		data = get_mixer_reg(0x0c) & 0x06;
+	set_mixer_reg(0x0c, data | 0x20);
+	set_mixer_reg(0x0e, 0x20);
+	data = get_mixer_reg(0x22);
+	if (mask & 1)
+		data = (data & 0x0f) | (((olvll * 7 / 46) + 7) << 5);
+	if (mask & 2)
+		data = (data & 0xf0) | (((olvlr * 7 / 46) + 7) << 1);
+	set_mixer_reg(0x22, data);
+	set_mixer_reg(0x26, 0x00);
+	set_mixer_reg(0x28, 0x00);
+	set_mixer_reg(0x2e, 0x00);
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static int set_mixer_ct1745(int argc, char *argv[])
+{
+	unsigned int mask = 0;
+	int olvll = 0, olvlr = 0;
+	int ilvll = 0, ilvlr = 0;
+	unsigned int insrc = 0;
+	unsigned int data;
+
+	for (; argc >= 1; argc--, argv++) {
+		if (!strncasecmp(argv[0], "ol=", 3)) {
+			olvll = strtol(argv[0]+3, NULL, 0);
+			mask |= 1;
+			if (olvll < -62 || olvll > 18) {
+				fprintf(stderr, "output level out of range "
+					"-62..18dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "or=", 3)) {
+			olvlr = strtol(argv[0]+3, NULL, 0);
+			mask |= 2;
+			if (olvlr < -62 || olvlr > 18) {
+				fprintf(stderr, "output level out of range "
+					"-62..18dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "o=", 2)) {
+			olvll = olvlr = strtol(argv[0]+2, NULL, 0);
+			mask |= 3;
+			if (olvll < -62 || olvll > 18) {
+				fprintf(stderr, "output level out of range "
+					"-62..18dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "il=", 3)) {
+			ilvll = strtol(argv[0]+3, NULL, 0);
+			mask |= 4;
+			if (ilvll < -62 || ilvll > 18) {
+				fprintf(stderr, "input gain out of range "
+					"-62..18dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "ir=", 3)) {
+			ilvlr = strtol(argv[0]+3, NULL, 0);
+			mask |= 8;
+			if (ilvll < -62 || ilvll > 18) {
+				fprintf(stderr, "input gain out of range "
+					"-62..18dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "i=", 2)) {
+			ilvll = ilvlr = strtol(argv[0]+2, NULL, 0);
+			mask |= 12;
+			if (ilvll < -62 || ilvll > 18) {
+				fprintf(stderr, "input gain out of range "
+					"-62..18dB\n");
+				return -1;
+			}
+		} else if (!strncasecmp(argv[0], "s=", 2)) {
+			mask |= 16;
+			if (!strcasecmp(argv[0]+2, "mic")) 
+				insrc |= 1;
+			else if (!strcasecmp(argv[0]+2, "cd.r")) 
+				insrc |= 2;
+			else if (!strcasecmp(argv[0]+2, "cd.l")) 
+				insrc |= 4;
+			else if (!strcasecmp(argv[0]+2, "cd")) 
+				insrc |= 6;
+			else if (!strcasecmp(argv[0]+2, "line.r")) 
+				insrc |= 0x08;
+			else if (!strcasecmp(argv[0]+2, "line.l")) 
+				insrc |= 0x10;
+			else if (!strcasecmp(argv[0]+2, "line")) 
+				insrc |= 0x18;
+			else if (!strcasecmp(argv[0]+2, "midi.r")) 
+				insrc |= 0x20;
+			else if (!strcasecmp(argv[0]+2, "midi.l")) 
+				insrc |= 0x40;
+			else if (!strcasecmp(argv[0]+2, "midi")) 
+				insrc |= 0x60;
+			else {
+				fprintf(stderr, "invalid input source, must "
+					"be either line, cd, mic or midi\n");
+				return -1;
+			}
+		} else {
+			fprintf(stderr, "invalid parameter \"%s\"\n", argv[0]);
+			return -1;
+		}
+	}
+	if (mask & 3) {
+		set_mixer_reg(0x3c, 0); /* output src: only voice and pcspk */
+		set_mixer_reg(0x44, 4<<4); /* treble.l: -6dB */
+		set_mixer_reg(0x45, 4<<4); /* treble.r: -6dB */
+		set_mixer_reg(0x46, 6<<4); /* bass.l: -2dB */
+		set_mixer_reg(0x47, 6<<4); /* bass.r: -2dB */
+		set_mixer_reg(0x3b, 0); /* PC speaker vol -18dB */
+	}
+	if (mask & 12)
+		set_mixer_reg(0x43, 1); /* mic: agc off, fixed 20dB gain */
+	if (mask & 1) {
+		data = 0;
+		while (olvll > 0) {
+			olvll -= 6;
+			data += 0x40;
+		}
+		set_mixer_reg(0x41, data); /* output gain */
+		set_mixer_reg(0x30, 0xf8); /* master vol */
+		set_mixer_reg(0x32, (olvll / 2 + 31) << 3); /* voice vol */
+	}
+	if (mask & 2) {
+		data = 0;
+		while (olvlr > 0) {
+			olvlr -= 6;
+			data += 0x40;
+		}
+		set_mixer_reg(0x42, data); /* output gain */
+		set_mixer_reg(0x31, 0xf8); /* master vol */
+		set_mixer_reg(0x33, (olvlr / 2 + 31) << 3); /* voice vol */
+	}
+	if (mask & 4) {
+		data = 0;
+		while (ilvll > 0) {
+			ilvll -= 6;
+			data += 0x40;
+		}
+		set_mixer_reg(0x3f, data); /* input gain */
+		data = (ilvll / 2 + 31) << 3;
+		set_mixer_reg(0x34, data); /* midi vol */
+		set_mixer_reg(0x36, data); /* cd vol */
+		set_mixer_reg(0x38, data); /* line vol */
+		set_mixer_reg(0x3a, data); /* mic vol */
+	}
+	if (mask & 8) {
+		data = 0;
+		while (ilvlr > 0) {
+			ilvlr -= 6;
+			data += 0x40;
+		}
+		set_mixer_reg(0x40, data); /* input gain */
+		data = (ilvlr / 2 + 31) << 3;
+		set_mixer_reg(0x35, data); /* midi vol */
+		set_mixer_reg(0x37, data); /* cd vol */
+		set_mixer_reg(0x39, data); /* line vol */
+		set_mixer_reg(0x3a, data); /* mic vol */
+	}
+	if (mask & 16) {
+		set_mixer_reg(0x3d, insrc); /* input sources */
+		set_mixer_reg(0x3e, insrc); /* input sources */
+	}
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str = 
+"[-i smif]\n\n";
+
+int main(int argc, char *argv[])
+{
+	int c;
+	struct sm_mixer_data mixdat;
+
+	progname = *argv;
+	printf("%s: Version 0.2; (C) 1996-1997 by Thomas Sailer HB9JNX/AE4WA\n", *argv);
+	hdrvc_args(&argc, argv, "sm0");
+	while ((c = getopt(argc, argv, "")) != -1) {
+		switch (c) {
+		default:
+			printf("usage: %s %s", *argv, usage_str);
+			exit(-1);
+		}
+	}
+	hdrvc_init();
+	mixdat.reg = 0;
+	if (do_mix_ioctl(SMCTL_GETMIXER, &mixdat) < 0) {
+		perror("do_mix_ioctl: SMCTL_GETMIXER");
+		exit(1);
+	}
+	mixdevice = mixdat.mixer_type;
+	switch (mixdevice) {
+	case SM_MIXER_INVALID:
+		printf("invalid mixer device\n");
+		exit(1);
+	case SM_MIXER_AD1848:
+		if (optind < argc)
+			set_mixer_ad1848(argc - optind, argv + optind);
+		display_mixer_ad1848();
+		break;
+	case SM_MIXER_CRYSTAL:
+		if (optind < argc)
+			set_mixer_ad1848(argc - optind, argv + optind);
+		display_mixer_cs423x();
+		break;
+	case SM_MIXER_CT1335:
+		if (optind < argc)
+			set_mixer_ct1335(argc - optind, argv + optind);
+		display_mixer_ct1335();
+		break;
+	case SM_MIXER_CT1345:
+		if (optind < argc)
+			set_mixer_ct1345(argc - optind, argv + optind);
+		display_mixer_ct1345();
+		break;
+	case SM_MIXER_CT1745:
+		if (optind < argc)
+			set_mixer_ct1745(argc - optind, argv + optind);
+		display_mixer_ct1745();
+		break;
+	default:
+		printf("unknown mixer device %d\n", mixdevice);
+		exit(1);
+	}
+	exit(0);
+}
+
+/* ---------------------------------------------------------------------- */
diff --git a/hdlcutil/soundmodem.9 b/hdlcutil/soundmodem.9
new file mode 100644
index 0000000..c3faf9a
--- /dev/null
+++ b/hdlcutil/soundmodem.9
@@ -0,0 +1,82 @@
+.\" Copyright 1996 Thomas Sailer (t.sailer at alumni.ethz.ch)
+.\" May be distributed under the GNU General Public License
+.\" "
+.TH SOUNDMODEM 9 "2 October 1996" "Linux 2.1.x" "Kernel Reference Guide"
+.SH NAME
+soundmodem \- amateur (AX.25) packet radio network driver for soundcards
+.SH SYNOPSIS
+
+.nf
+.B #include <linux/soundmodem.h>
+.B #include <linux/hdlcdrv.h>
+.fi
+
+.SH DESCRIPTION
+The driver currently supports both 1200 baud AFSK and 9600 baud FSK
+(G3RUH compatible) using a standard SoundBlaster compatible or 
+WindowsSoundSystem compatible soundcard. The whole decoding is done
+in software, so you definitely do not want to use it on a 386SX class
+machine.
+
+.SH "KEYING THE TRANSMITTER"
+Soundcards do not have a DC coupled output that could serve as a
+PTT signal. So there are basically for possibilities for
+obtaining a PTT signal. Sample schematic diagrams can be found on
+\fIhttp://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html\fP.
+.SS "VOX circuitry"
+A simple VOX circuitry that detects output signals at the output of
+the soundcard can be used, especially as it can be built with a single
+transistor plus a few passive components and typical soundcards have
+strong output signals.
+.SS "Parallel Port"
+A parallel port line can also be used to signal PTT. If selected,
+the PTT signal is output on the DATA0 line and DCD is output on the
+DATA1 line.
+.SS "Serial Port"
+A standard serial port (8250, 16450, 16550) can also be used to output
+PTT. PTT is output on RTS and TxD, while DCD is output on DTR.
+.SS "MPU401 MIDI Port"
+The MIDI port is basically an asynchronous serial interface and
+thus cannot output a straight DC level, however it may be used if
+connected through a retriggerable monoflop with about 15ms pulse
+duration. Note that only newer SoundBlaster models have a genuine
+MPU401 MIDI port. The older SB MIDI port cannot be used.
+
+.SH "IOCTL CALLS"
+The \fBioctl\fP calls follow the implementation in the \fIhdlcdrv\fP.
+
+.TP
+.B SMCTL_GETMODEMTYPE
+returns the modem type (i.e. \fISBC1200\fP, \fISBC9600\fP, \fIWSS1200\fP
+or \fIWSS9600\fP)
+.TP
+.B SMCTL_SETMODEMTYPE
+sets the modem type. Only superuser can do this.
+.TP
+.B SMCTL_GETMIXER
+returns the mixer type and the contents of the specified
+mixer register.
+.TP
+.B SMCTL_SETMIXER
+sets the specified mixer register, if the specified
+mixer type matches the mixer type of the soundcard. Only 
+superuser can do this.
+.TP
+.B SMCTL_DIAGNOSE
+returns the contents of the diagnose buffer, which is used by
+\fIsmdiag\fP to display the eye and oscilloscope diagrams.
+.TP
+.B SMCTL_GETDEBUG
+return some debugging values. Not always available.
+
+
+.SH "SEE ALSO"
+.BR baycom " (9), " soundmodem " (9)," smdiag " (8)," smmixer " (9),"
+linux/drivers/net/hdlcdrv.c,
+
+.SH AUTHOR
+soundmodem was written by Thomas Sailer, HB9JNX/AE4WA, (t.sailer at alumni.ethz.ch).
+
+
+
+
diff --git a/hdlcutil/soundmodem.h b/hdlcutil/soundmodem.h
new file mode 100644
index 0000000..10d0799
--- /dev/null
+++ b/hdlcutil/soundmodem.h
@@ -0,0 +1,90 @@
+/*
+ * The Linux soundcard driver for 1200 baud and 9600 baud packet radio
+ * (C) 1996-1998 by Thomas Sailer, HB9JNX/AE4WA
+ */
+
+#ifndef _SOUNDMODEM_H
+#define _SOUNDMODEM_H
+
+/* -------------------------------------------------------------------- */
+/*
+ * structs for the IOCTL commands
+ */
+
+struct sm_debug_data {
+	unsigned int int_rate;
+	unsigned int mod_cycles;
+	unsigned int demod_cycles;
+	unsigned int dma_residue;
+};
+
+struct sm_diag_data {
+	unsigned int mode;
+	unsigned int flags;
+	unsigned int samplesperbit;
+	unsigned int datalen;
+	short *data;
+};
+
+struct sm_mixer_data {
+	unsigned int mixer_type;
+	unsigned int sample_rate;
+	unsigned int bit_rate;
+	unsigned int reg;
+	unsigned int data;
+};
+
+struct sm_config {
+	int hardware;
+	int mode;
+};
+
+struct sm_ioctl {
+	int cmd;
+	union {
+		struct sm_config cfg;
+		struct sm_diag_data diag;	
+		struct sm_mixer_data mix;
+		struct sm_debug_data dbg;
+	} data;
+};
+
+/* -------------------------------------------------------------------- */
+
+/*
+ * diagnose modes
+ */
+#define SM_DIAGMODE_OFF            0
+#define SM_DIAGMODE_INPUT          1
+#define SM_DIAGMODE_DEMOD          2
+#define SM_DIAGMODE_CONSTELLATION  3
+
+/*
+ * diagnose flags
+ */
+#define SM_DIAGFLAG_DCDGATE    (1<<0)
+#define SM_DIAGFLAG_VALID      (1<<1)
+
+/*
+ * mixer types
+ */
+#define SM_MIXER_INVALID       0
+#define SM_MIXER_AD1848        0x10
+#define SM_MIXER_CRYSTAL       0x11
+#define SM_MIXER_CT1335        0x20
+#define SM_MIXER_CT1345        0x21
+#define SM_MIXER_CT1745        0x22
+
+/*
+ * ioctl values
+ */
+#define SMCTL_DIAGNOSE         0x82
+#define SMCTL_GETMIXER         0x83
+#define SMCTL_SETMIXER         0x84
+#define SMCTL_GETDEBUG         0x85
+
+/* -------------------------------------------------------------------- */
+
+#endif /* _SOUNDMODEM_H */
+
+/* --------------------------------------------------------------------- */
diff --git a/hdlcutil/usersmdiag.h b/hdlcutil/usersmdiag.h
new file mode 100644
index 0000000..0fe829d
--- /dev/null
+++ b/hdlcutil/usersmdiag.h
@@ -0,0 +1,118 @@
+/*****************************************************************************/
+
+/*
+ *      usersmdiag.h  --  Diagnostics interface.
+ *
+ *      Copyright (C) 1996  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *        Swiss Federal Institute of Technology (ETH), Electronics Lab
+ *
+ *      This program 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 2 of the License, or
+ *      (at your option) any later version.
+ *
+ *      This program 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 this program; if not, write to the Free Software
+ *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ *  This is the Linux realtime sound output driver
+ */
+
+/*****************************************************************************/
+      
+#ifndef _USERSMDIAG_H
+#define _USERSMDIAG_H
+
+/* --------------------------------------------------------------------- */
+
+#define USERSM_KEY_PROJ                '0'
+
+/* --------------------------------------------------------------------- */
+
+#define USERSM_CMD_REQ_CHACCESS_PAR    0x00020
+#define USERSM_CMD_ACK_CHACCESS_PAR    0x10021
+#define USERSM_CMD_SET_CHACCESS_PAR    0x00022
+
+#define USERSM_CMD_CALIBRATE           0x00030
+#define USERSM_CMD_REQ_CHANNELSTATE    0x00031
+#define USERSM_CMD_ACK_CHANNELSTATE    0x10032
+
+#define USERSM_CMD_REQ_DIAG            0x00040
+#define USERSM_CMD_ACK_DIAG            0x10041
+
+#define USERSM_CMD_REQ_DRVNAME         0x00050
+#define USERSM_CMD_ACK_DRVNAME         0x10051
+#define USERSM_CMD_REQ_DRVMODE         0x00052
+#define USERSM_CMD_ACK_DRVMODE         0x10053
+
+/*
+ * diagnose modes; same as in <linux/soundmodem.h>
+ */
+#define USERSM_DIAGMODE_OFF            0
+#define USERSM_DIAGMODE_INPUT          1
+#define USERSM_DIAGMODE_DEMOD          2
+#define USERSM_DIAGMODE_CONSTELLATION  3
+
+/*
+ * diagnose flags; same as in <linux/soundmodem.h>
+ */
+#define USERSM_DIAGFLAG_DCDGATE    (1<<0)
+#define USERSM_DIAGFLAG_VALID      (1<<1)
+
+/* --------------------------------------------------------------------- */
+
+#define DIAGDATALEN 64
+
+/* --------------------------------------------------------------------- */
+
+struct usersmmsg {
+	struct usersm_hdr {
+		long type;
+		unsigned int channel;
+	} hdr;
+	union {
+		struct usersm_chaccess_par {
+			int tx_delay;  /* the transmitter keyup delay in 10ms units */
+			int tx_tail;   /* the transmitter keyoff delay in 10ms units */
+			int slottime;  /* the slottime in 10ms; usually 10 = 100ms */
+			int ppersist;  /* the p-persistence 0..255 */
+			int fulldup;   /* some driver do not support full duplex, setting */
+			/* this just makes them send even if DCD is on */
+		} cp;
+		
+		int calib;
+
+		struct usersm_channel_state {
+			int ptt;
+			int dcd;
+			int ptt_keyed;
+			unsigned long tx_packets;
+			unsigned long tx_errors;
+			unsigned long rx_packets;
+			unsigned long rx_errors;
+		} cs;
+		
+		struct usersm_diag {
+			unsigned int mode;
+			unsigned int flags;
+			unsigned int samplesperbit;
+			unsigned int datalen;
+		} diag;
+
+		struct usersm_diag_out {
+			struct usersm_diag diag;
+			short samples[DIAGDATALEN];
+		} diag_out;
+
+		unsigned char by[0];
+	} data;
+};
+
+/* --------------------------------------------------------------------- */
+#endif /* _USERSMDIAG_H */
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..a9244eb
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-01-19.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+	# Protect names problematic for `test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+    # Protect names problematic for `test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names problematic for `test' and other utilities.
+  case $src in
+    -* | [=\(\)!]) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+    dst=$dst_arg
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	[-=\(\)!]*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test X"$d" = X && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/kiss/Makefile.am b/kiss/Makefile.am
new file mode 100644
index 0000000..120afb4
--- /dev/null
+++ b/kiss/Makefile.am
@@ -0,0 +1,20 @@
+
+installconf:
+
+sbin_PROGRAMS = kissattach kissnetd kissparms mkiss net2kiss
+
+LDADD= $(AX25_LIB)
+
+man_MANS = kissattach.8 spattach.8 kissnetd.8 kissparms.8 mkiss.8 net2kiss.8
+
+EXTRA_DIST = $(man_MANS)
+
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR=${sysconfdir}/ax25/
+AX25_LOCALSTATEDIR=${localstatedir}/ax25/
+
+install-exec-hook:
+	(cd $(DESTDIR)$(sbindir) ; ln -sf kissattach spattach)
+
diff --git a/kiss/Makefile.in b/kiss/Makefile.in
new file mode 100644
index 0000000..93a00b1
--- /dev/null
+++ b/kiss/Makefile.in
@@ -0,0 +1,634 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+sbin_PROGRAMS = kissattach$(EXEEXT) kissnetd$(EXEEXT) \
+	kissparms$(EXEEXT) mkiss$(EXEEXT) net2kiss$(EXEEXT)
+subdir = kiss
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
+PROGRAMS = $(sbin_PROGRAMS)
+kissattach_SOURCES = kissattach.c
+kissattach_OBJECTS = kissattach.$(OBJEXT)
+kissattach_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+kissattach_DEPENDENCIES = $(am__DEPENDENCIES_1)
+kissnetd_SOURCES = kissnetd.c
+kissnetd_OBJECTS = kissnetd.$(OBJEXT)
+kissnetd_LDADD = $(LDADD)
+kissnetd_DEPENDENCIES = $(am__DEPENDENCIES_1)
+kissparms_SOURCES = kissparms.c
+kissparms_OBJECTS = kissparms.$(OBJEXT)
+kissparms_LDADD = $(LDADD)
+kissparms_DEPENDENCIES = $(am__DEPENDENCIES_1)
+mkiss_SOURCES = mkiss.c
+mkiss_OBJECTS = mkiss.$(OBJEXT)
+mkiss_LDADD = $(LDADD)
+mkiss_DEPENDENCIES = $(am__DEPENDENCIES_1)
+net2kiss_SOURCES = net2kiss.c
+net2kiss_OBJECTS = net2kiss.$(OBJEXT)
+net2kiss_LDADD = $(LDADD)
+net2kiss_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = kissattach.c kissnetd.c kissparms.c mkiss.c net2kiss.c
+DIST_SOURCES = kissattach.c kissnetd.c kissparms.c mkiss.c net2kiss.c
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+LDADD = $(AX25_LIB)
+man_MANS = kissattach.8 spattach.8 kissnetd.8 kissparms.8 mkiss.8 net2kiss.8
+EXTRA_DIST = $(man_MANS)
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR = ${sysconfdir}/ax25/
+AX25_LOCALSTATEDIR = ${localstatedir}/ax25/
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu kiss/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu kiss/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+kissattach$(EXEEXT): $(kissattach_OBJECTS) $(kissattach_DEPENDENCIES) $(EXTRA_kissattach_DEPENDENCIES) 
+	@rm -f kissattach$(EXEEXT)
+	$(LINK) $(kissattach_OBJECTS) $(kissattach_LDADD) $(LIBS)
+kissnetd$(EXEEXT): $(kissnetd_OBJECTS) $(kissnetd_DEPENDENCIES) $(EXTRA_kissnetd_DEPENDENCIES) 
+	@rm -f kissnetd$(EXEEXT)
+	$(LINK) $(kissnetd_OBJECTS) $(kissnetd_LDADD) $(LIBS)
+kissparms$(EXEEXT): $(kissparms_OBJECTS) $(kissparms_DEPENDENCIES) $(EXTRA_kissparms_DEPENDENCIES) 
+	@rm -f kissparms$(EXEEXT)
+	$(LINK) $(kissparms_OBJECTS) $(kissparms_LDADD) $(LIBS)
+mkiss$(EXEEXT): $(mkiss_OBJECTS) $(mkiss_DEPENDENCIES) $(EXTRA_mkiss_DEPENDENCIES) 
+	@rm -f mkiss$(EXEEXT)
+	$(LINK) $(mkiss_OBJECTS) $(mkiss_LDADD) $(LIBS)
+net2kiss$(EXEEXT): $(net2kiss_OBJECTS) $(net2kiss_DEPENDENCIES) $(EXTRA_net2kiss_DEPENDENCIES) 
+	@rm -f net2kiss$(EXEEXT)
+	$(LINK) $(net2kiss_OBJECTS) $(net2kiss_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kissattach.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kissnetd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kissparms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mkiss.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/net2kiss.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man8: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man8dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.8[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man8:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man8dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.8[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-man uninstall-sbinPROGRAMS
+
+uninstall-man: uninstall-man8
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-sbinPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-exec-hook install-html install-html-am \
+	install-info install-info-am install-man install-man8 \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-sbinPROGRAMS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-man uninstall-man8 \
+	uninstall-sbinPROGRAMS
+
+
+installconf:
+
+install-exec-hook:
+	(cd $(DESTDIR)$(sbindir) ; ln -sf kissattach spattach)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/kiss/kissattach.8 b/kiss/kissattach.8
new file mode 100644
index 0000000..e4fbf5b
--- /dev/null
+++ b/kiss/kissattach.8
@@ -0,0 +1,72 @@
+.TH KISSATTACH 8 "4 July 1999" Linux "Linux System Managers Manual"
+.SH NAME
+kissattach, spattach \- Attach a KISS or 6PACK interface
+.SH SYNOPSIS
+.B kissattach [-b] [-6] [-l] [-m mtu] [-v] tty port [inetaddr]
+.sp
+.B spattach [-b] [-l] [-m mtu] [-v] tty port [inetaddr]
+.SH DESCRIPTION
+.LP
+Attach a KISS or a 6PACK interface to what is normally a tty line connected
+to a TNC in KISS or 6PACK mode. This program will turn itself into a
+background process. To down an interface send its attach process a SIGTERM.
+.LP
+.B Kissattach
+takes many of the parameters for the port from the axports(5) file. If the
+speed parameter in the file is not equal to zero then it is used for the
+serial port speed, a zero value means that no speed is set. The paclen
+parameter is used for the device mtu unless overridden by a value on the
+command line.
+.LP
+The tty argument will typically be that of a serial port with a KISS or 6PACK
+TNC attached, although it could be a pseudo tty or a KISS port emulator such as
+an SCC card. Kissattach supports BSD-style pseudo-terminals as well as
+the Unix98 pty's. If the tty argument is "/dev/ptmx", then Unix98 behaviour
+will automaticaly take effekt. With Unix98 pty's, the slave tty name
+could not be forseen. That's why kissattach will print the corresponding slave
+pty name as a separate line on stdout.
+.LP
+The port argument is the name of a port as given in the
+axports(5) file.
+.LP
+The optional inetaddr argument is the IP address of the new interface. Some
+time it was mandatory argument (although due to historical reasons this
+restriction is lifted if the old -i option is used). But there's really not
+a need for the interface to have an IP address assigned to.
+.SH OPTIONS
+.TP 16
+.BI "\-6"
+Use the 6PACK line discipline instead of KISS. This is the default if
+the program is called as spattach.
+.TP 16
+.BI "\-i inetaddr"
+Set the internet address of the interface. This address may either be a
+dotted decimal address or a host name. This option is now depreciated and
+the program will complain about it, though still work.
+.TP 16
+.BI \-l
+Log messages to the system log, the default is not to.
+.TP 16
+.BI \-b
+Allow broadcasts on the interface (default no - because for e.g. samba
+broadcasts are a pain..)
+.TP 16
+.BI "\-m mtu"
+Sets the mtu of the interface. If this value is not given then the value is
+taken from the paclen parameter in axports.
+.TP 16
+.BI \-v
+Display the version.
+.SH "SEE ALSO"
+.BR kill (1),
+.BR stty (1),
+.BR ax25 (4),
+.BR axparms (4),
+.BR axports (5),
+.BR ifconfig (8).
+.SH AUTHOR
+.nf
+Alan Cox GW4PTS <alan at cymru.net>
+.br
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
+.fi
diff --git a/kiss/kissattach.c b/kiss/kissattach.c
new file mode 100644
index 0000000..6ed66a2
--- /dev/null
+++ b/kiss/kissattach.c
@@ -0,0 +1,391 @@
+#include <stdio.h>
+#define __USE_XOPEN
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <termios.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <ctype.h>
+#include <netdb.h>
+#include <syslog.h>
+#include <errno.h>
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+
+#include <net/if.h>
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/daemon.h>
+#include <netax25/axlib.h>
+#include <netax25/ttyutils.h>
+
+#include "../pathnames.h"
+
+#ifndef N_6PACK
+#define N_6PACK 7	/* This is valid for all architectures in 2.2.x */
+#endif
+
+static char *callsign;
+static int  speed	= 0;
+static int  mtu		= 0;
+static int  logging	= FALSE;
+static char *progname	= NULL;
+static char *kttyname	= NULL;
+static char *portname	= NULL;
+static char *inetaddr	= NULL;
+static int allow_broadcast = 0;
+static int i_am_unix98_pty_master = 0; /* unix98 ptmx support */
+
+static char *kiss_basename(char *s)
+{
+	char *p = strrchr(s, '/');
+	return p ? p + 1 : s;
+}
+
+static void terminate(int sig)
+{
+	if (logging) {
+		syslog(LOG_INFO, "terminating on SIGTERM\n");
+		closelog();
+	}
+
+	if (!i_am_unix98_pty_master)
+		tty_unlock(kttyname);
+
+	exit(0);
+}
+
+static int readconfig(char *port)
+{
+	FILE *fp;
+	char buffer[90], *s;
+	int n = 0;
+	
+	if ((fp = fopen(CONF_AXPORTS_FILE, "r")) == NULL) {
+		fprintf(stderr, "%s: cannot open axports file %s\n", 
+                        progname, CONF_AXPORTS_FILE);
+		return FALSE;
+	}
+
+	while (fgets(buffer, 90, fp) != NULL) {
+		n++;
+	
+		if ((s = strchr(buffer, '\n')) != NULL)
+			*s = '\0';
+
+		if (*buffer == 0 || *buffer == '#')
+			continue;
+
+		if ((s = strtok(buffer, " \t\r\n")) == NULL) {
+			fprintf(stderr, "%s: unable to parse line %d of the axports file\n", progname, n);
+			return FALSE;
+		}
+		
+		if (strcmp(s, port) != 0)
+			continue;
+			
+		if ((s = strtok(NULL, " \t\r\n")) == NULL) {
+			fprintf(stderr, "%s: unable to parse line %d of the axports file\n", progname, n);
+			return FALSE;
+		}
+
+		callsign = strdup(s);
+
+		if ((s = strtok(NULL, " \t\r\n")) == NULL) {
+			fprintf(stderr, "%s: unable to parse line %d of the axports file\n", progname, n);
+			return FALSE;
+		}
+
+		speed = atoi(s);
+
+		if ((s = strtok(NULL, " \t\r\n")) == NULL) {
+			fprintf(stderr, "%s: unable to parse line %d of the axports file\n", progname, n);
+			return FALSE;
+		}
+
+		if (mtu == 0) {
+			if ((mtu = atoi(s)) <= 0) {
+				fprintf(stderr, "%s: invalid paclen setting\n", progname);
+				return FALSE;
+			}
+		}
+
+		fclose(fp);
+		
+		return TRUE;
+	}
+	
+	fclose(fp);
+
+	fprintf(stderr, "%s: cannot find port %s in axports\n", progname, port);
+	
+	return FALSE;
+}
+
+
+static int setifcall(int fd, char *name)
+{
+	char call[7];
+
+	if (ax25_aton_entry(name, call) == -1)
+		return FALSE;
+	
+	if (ioctl(fd, SIOCSIFHWADDR, call) != 0) {
+		close(fd);
+		fprintf(stderr, "%s: ", progname);
+		perror("SIOCSIFHWADDR");
+		return FALSE;
+	}
+
+	return TRUE;
+}
+
+
+static int startiface(char *dev, struct hostent *hp)
+{
+	struct ifreq ifr;
+	int fd;
+	
+	if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+		fprintf(stderr, "%s: ", progname);
+		perror("socket");
+		return FALSE;
+	}
+
+	strcpy(ifr.ifr_name, dev);
+	
+	if (hp != NULL) {
+		ifr.ifr_addr.sa_family = AF_INET;
+		
+		ifr.ifr_addr.sa_data[0] = 0;
+		ifr.ifr_addr.sa_data[1] = 0;
+		ifr.ifr_addr.sa_data[2] = hp->h_addr_list[0][0];
+		ifr.ifr_addr.sa_data[3] = hp->h_addr_list[0][1];
+		ifr.ifr_addr.sa_data[4] = hp->h_addr_list[0][2];
+		ifr.ifr_addr.sa_data[5] = hp->h_addr_list[0][3];
+		ifr.ifr_addr.sa_data[6] = 0;
+
+		if (ioctl(fd, SIOCSIFADDR, &ifr) < 0) {
+			fprintf(stderr, "%s: ", progname);
+			perror("SIOCSIFADDR");
+			return FALSE;
+		}
+	}
+
+	ifr.ifr_mtu = mtu;
+
+	if (ioctl(fd, SIOCSIFMTU, &ifr) < 0) {
+		fprintf(stderr, "%s: ", progname);
+		perror("SIOCSIFMTU");
+		return FALSE;
+	}
+
+	if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
+		fprintf(stderr, "%s: ", progname);
+		perror("SIOCGIFFLAGS");
+		return FALSE;
+	}
+
+	ifr.ifr_flags &= IFF_NOARP;
+	ifr.ifr_flags |= IFF_UP;
+	ifr.ifr_flags |= IFF_RUNNING;
+	if (allow_broadcast)
+		ifr.ifr_flags |= IFF_BROADCAST; /* samba broadcasts are a pain.. */
+	else
+		ifr.ifr_flags &= ~(IFF_BROADCAST); /* samba broadcasts are a pain.. */
+
+	if (ioctl(fd, SIOCSIFFLAGS, &ifr) < 0) {
+		fprintf(stderr, "%s: ", progname);
+		perror("SIOCSIFFLAGS");
+		return FALSE;
+	}
+	
+	close(fd);
+	
+	return TRUE;
+}
+
+static void usage(void)
+{
+        fprintf(stderr, "usage: %s [-b] [-l] [-m mtu] [-v] tty port [inetaddr]\n", progname);
+}
+
+int main(int argc, char *argv[])
+{
+	int  fd;
+	int  disc = N_AX25;
+	char dev[64];
+	int  v = 4;
+	char *namepts = NULL;  /* name of the unix98 pts slave, which
+	                        * the client has to use */
+	struct hostent *hp = NULL;
+
+	progname = kiss_basename(argv[0]);
+
+	if (!strcmp(progname, "spattach"))
+		disc = N_6PACK;
+
+	while ((fd = getopt(argc, argv, "b6i:lm:v")) != -1) {
+		switch (fd) {
+			case '6':
+				disc = N_6PACK;
+				break;
+			case 'b':
+				allow_broadcast = 1;
+				break;
+			case 'i':
+				fprintf(stderr, "%s: -i flag depreciated, use new command line format instead.\n", progname);
+				inetaddr = optarg;
+				break;
+			case 'l':
+				logging = TRUE;
+				break;
+			case 'm':
+				if ((mtu = atoi(optarg)) <= 0) {
+					fprintf(stderr, "%s: invalid mtu size - %s\n", progname, optarg);
+					return 1;
+				}
+				break;
+			case 'v':
+				printf("%s: %s\n", progname, VERSION);
+				return 0;
+			case ':':
+			case '?':
+				usage();
+				return 1;
+		}
+	}
+
+#ifdef	notdef
+	if ((argc - optind) != 3 && ((argc - optind) != 2 || !inetaddr)) {
+#else
+	if ((argc - optind) < 2) {
+#endif
+		usage();
+		return 1;
+	}
+
+	kttyname = argv[optind++];
+	portname = argv[optind++];
+
+	if (argc-1 >= optind && !inetaddr)
+		inetaddr = argv[optind];
+
+	if (!strcmp("/dev/ptmx", kttyname))
+		i_am_unix98_pty_master = 1;
+
+	if (!i_am_unix98_pty_master) {
+		if (tty_is_locked(kttyname)) {
+			fprintf(stderr, "%s: device %s already in use\n", progname, kttyname);
+			return 1;
+		}
+	}
+
+	if (!readconfig(portname))
+		return 1;
+
+        if (inetaddr && (hp = gethostbyname(inetaddr)) == NULL) {
+		fprintf(stderr, "%s: invalid internet name/address - %s\n", progname, inetaddr);
+		return 1;
+	}
+
+	if ((fd = open(kttyname, O_RDONLY | O_NONBLOCK)) == -1) {
+		if (errno == ENOENT) {
+			fprintf(stderr, "%s: Cannot find serial device %s, no such file or directory.\n", progname, kttyname);
+		} else {
+			fprintf(stderr, "%s: %s: ", progname, kttyname);
+			perror("open");
+		}
+		return 1;
+	}
+
+	if (i_am_unix98_pty_master) {
+		/* get name of pts-device */
+		if ((namepts = ptsname(fd)) == NULL) {
+			fprintf(stderr, "%s: Cannot get name of pts-device.\n", progname);
+			return 1;
+		}
+		/* unlock pts-device */
+		if (unlockpt(fd) == -1) {
+			fprintf(stderr, "%s: Cannot unlock pts-device %s\n", progname, namepts);
+			return 1;
+		}
+	}
+
+	if (speed != 0 && !tty_speed(fd, speed))
+		return 1;
+
+	if (ioctl(fd, TIOCSETD, &disc) == -1) {
+		fprintf(stderr, "%s: Error setting line discipline: ", progname);
+		perror("TIOCSETD");
+		fprintf(stderr, "Are you sure you have enabled %s support in the kernel\n", 
+			disc == N_AX25 ? "MKISS" : "6PACK");
+		fprintf(stderr, "or, if you made it a module, that the module is loaded?\n");
+		return 1;
+	}
+
+	if (ioctl(fd, SIOCGIFNAME, dev) == -1) {
+		fprintf(stderr, "%s: ", progname);
+		perror("SIOCGIFNAME");
+		return 1;
+	}
+
+	if (!setifcall(fd, callsign))
+		return 1;
+
+	/* Now set the encapsulation */
+	if (ioctl(fd, SIOCSIFENCAP, &v) == -1) {
+		fprintf(stderr, "%s: ", progname);
+		perror("SIOCSIFENCAP");
+		return 1;
+	}
+
+	/* ax25 ifaces should not really need to have an IP address assigned to */
+	if (!startiface(dev, hp))
+		return 1;		
+
+	printf("AX.25 port %s bound to device %s\n", portname, dev);
+	if (i_am_unix98_pty_master) {
+		/* Users await the slave pty to be referenced in the 3d line */
+		printf("Awaiting client connects on\n%s\n", namepts);
+	}
+	if (logging) {
+		openlog(progname, LOG_PID, LOG_DAEMON);
+		syslog(LOG_INFO, "AX.25 port %s bound to device %s%s%s\n", portname, dev, (i_am_unix98_pty_master ? " with slave pty " : ""), (i_am_unix98_pty_master ? namepts : ""));
+
+	}
+
+	signal(SIGHUP, SIG_IGN);
+	signal(SIGTERM, terminate);
+
+	/*
+	 * Become a daemon if we can.
+	 */
+	if (!daemon_start(FALSE)) {
+		fprintf(stderr, "%s: cannot become a daemon\n", progname);
+		return 1;
+	}
+	if (!i_am_unix98_pty_master) {
+		if (!tty_lock(kttyname))
+			return 1;
+	}
+
+	fflush(stdout);
+	fflush(stderr);
+	close(0);
+	close(1);
+	close(2);
+
+	while (1)
+		sleep(10000);
+
+	/* NOT REACHED */
+	return 0;
+}
diff --git a/kiss/kissnetd.8 b/kiss/kissnetd.8
new file mode 100644
index 0000000..77fabb9
--- /dev/null
+++ b/kiss/kissnetd.8
@@ -0,0 +1,31 @@
+.TH KISSNETD 8 "13 October 1996" Linux "Linux System Managers Manual"
+.SH NAME
+kissnetd \- Create a virtual network.
+.SH SYNOPSIS
+.B kissnetd [-f size] [-v] [-p <num> | tty... ]
+.SH DESCRIPTION
+.LP
+.B Kissnetd
+allows the creation of a virtual network of AX.25 systems that use the KISS
+protocol. Each tty named on the command line is opened and any KISS frames
+received on tty is copied to the other ttys. This allows a number of AX.25
+systems to share the same packets.
+.SH OPTIONS
+.TP 10
+.BI "\-p num"
+Automaticaly allocate num Unix98 slave pty's via /dev/ptmx.
+These are written to stdout and could be parsed by your startup scripts.
+"kissnetd -p 3" is an comfortable alternative to "kissnetd /dev/ptmx /dev/ptmx /dev/ptmx".
+.TP 10
+.BI "\-f size"
+This sets the maximum KISS frame size that the program will handle. The
+default is 512 bytes which will be adequate under most circumstances.
+.TP 10
+.BI \-v
+Enables verbose mode, tracing of data passed is sent to standard output.
+.SH "SEE ALSO"
+.BR kissattach (8),
+.BR kissparms (8),
+.BR mkiss (8).
+.SH AUTHOR
+Frederic Rible F1OAT <frible at teaser.fr>
diff --git a/kiss/kissnetd.c b/kiss/kissnetd.c
new file mode 100644
index 0000000..d993e4a
--- /dev/null
+++ b/kiss/kissnetd.c
@@ -0,0 +1,380 @@
+/*
+ * kissnetd.c : Simple kiss broadcast daemon between several
+ *		pseudo-tty devices.
+ *		Each kiss frame received on one pty is broadcasted
+ *		to each other one.
+ *
+ * ATEPRA FPAC/Linux Project
+ *
+ * F1OAT 960804 - Frederic RIBLE
+ */
+ 
+#include <stdio.h>
+#define __USE_XOPEN
+#include <stdlib.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <string.h>
+#include <unistd.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+#include <time.h>
+#include <limits.h>
+
+static char *Version = "1.5";
+static int VerboseMode = 0;
+static int MaxFrameSize = 512;
+
+#define REOPEN_TIMEOUT	30	/* try tio reopen every 10 s */
+
+struct PortDescriptor {
+	char		Name[PATH_MAX];
+	int		Fd;
+	unsigned char	*FrameBuffer;
+	int		BufferIndex;
+	time_t		TimeLastOpen;
+	char		namepts[PATH_MAX];  /* name of the unix98 pts slaves, which
+				       * the client has to use */
+	int		is_active;
+};
+
+static struct PortDescriptor *PortList[FD_SETSIZE];
+
+static int NbPort = 0;
+
+static void Usage(void)
+{
+	fprintf(stderr, "\nUsage : kissnetd [-v] [-f size] [-p num | /dev/pty?? [/dev/pty??]* ]\n");
+	fprintf(stderr, " -v       : Verbose mode, trace on stdout\n");
+	fprintf(stderr, " -f size  : Set max frame size to size bytes (default 512)\n");
+	fprintf(stderr, " -p num   : Number of /dev/ptmx-master-devices has to open\n");
+	exit(1);
+} 
+
+static void Banner(int Small)
+{
+	if (Small) {
+		printf("kissnetd V %s by Frederic RIBLE F1OAT - ATEPRA FPAC/Linux Project\n", Version);
+	}
+	else {
+		printf("****************************************\n");
+		printf("* Network broadcast between kiss ports *\n");
+		printf("*      ATEPRA FPAC/Linux Project       *\n");
+		printf("****************************************\n");
+		printf("*         kissnetd Version %-4s        *\n", Version); 
+		printf("*        by Frederic RIBLE F1OAT       *\n");
+		printf("****************************************\n");
+	}
+}
+
+static void NewPort(char *Name)
+{
+	struct PortDescriptor *MyPort;
+	
+	if (VerboseMode) {
+		printf("Opening port %s\n", Name);
+	}
+	
+	if (NbPort == FD_SETSIZE) {
+		fprintf(stderr, "Cannot handle %s : too many ports\n", Name);
+		exit(1);
+	}
+	
+	MyPort = calloc(sizeof(struct PortDescriptor), 1);
+	if (MyPort) MyPort->FrameBuffer = calloc(sizeof (unsigned char), MaxFrameSize);
+	if (!MyPort || !MyPort->FrameBuffer) {
+		perror("cannot allocate port descriptor");
+		exit(1);
+	}
+	
+	strncpy(MyPort->Name, Name, PATH_MAX-1);
+	MyPort->Name[PATH_MAX-1] = '\0';
+	MyPort->Fd = -1;
+	MyPort->FrameBuffer[0] = 0xC0;
+	MyPort->BufferIndex = 1;
+	MyPort->namepts [0] = '\0';
+	MyPort->is_active = 0;
+	PortList[NbPort++] = MyPort;
+}
+
+static void ReopenPort(int PortNumber)
+{
+	char MyString[80];
+	PortList[PortNumber]->TimeLastOpen = time(NULL);
+		
+	if (VerboseMode) {
+		printf("Reopening port %d\n", PortNumber);
+	}
+	
+	if (PortList[PortNumber]->namepts[0] == '\0') {
+		
+		syslog(LOG_WARNING, "kissnetd : Opening port %s\n", PortList[PortNumber]->Name);
+		PortList[PortNumber]->Fd = open(PortList[PortNumber]->Name, O_RDWR | O_NONBLOCK);
+		if (PortList[PortNumber]->Fd < 0) {
+			syslog(LOG_WARNING, "kissnetd : Error opening port %s : %s\n", 
+				PortList[PortNumber]->Name, strerror(errno));
+			if (VerboseMode) {
+				sprintf(MyString, "cannot reopen %s", PortList[PortNumber]->Name);
+				perror(MyString);
+			}
+			return;
+		}
+		PortList[PortNumber]->is_active = 1;
+		if (!strcmp(PortList[PortNumber]->Name, "/dev/ptmx")) {
+			char *npts;
+			/* get name of pts-device */
+			if ((npts = ptsname(PortList[PortNumber]->Fd)) == NULL) {
+				sprintf(MyString, "Cannot get name of pts-device.\n");
+				syslog(LOG_WARNING, "kissnetd : Cannot get name of pts-device\n"); 
+				exit(1);
+			}
+			strncpy(PortList[PortNumber]->namepts, npts, PATH_MAX-1);
+			PortList[PortNumber]->namepts[PATH_MAX-1] = '\0';
+
+			/* unlock pts-device */
+			if (unlockpt(PortList[PortNumber]->Fd) == -1) {
+				sprintf(MyString, "Cannot unlock pts-device %s\n", PortList[PortNumber]->namepts);
+				syslog(LOG_WARNING, "kissnetd : Cannot unlock pts-device %s\n", PortList[PortNumber]->namepts);
+				exit(1);
+			}
+			syslog(LOG_WARNING, "kissnetd : Using /dev/ptmx with slave pty %s\n", PortList[PortNumber]->namepts);
+		}
+	} else {
+		if (PortList[PortNumber]->Fd == -1) {
+			syslog(LOG_WARNING, "kissnetd : Cannot reopen port ptmx (slave %s) : not supported by ptmx-device\n", 
+		       	PortList[PortNumber]->namepts);
+			if (VerboseMode) {
+				sprintf(MyString, "cannot reopen ptmx (slave %s).", PortList[PortNumber]->namepts);
+				perror(MyString);
+			}
+			return;
+		}
+		syslog(LOG_WARNING, "kissnetd : Trying to poll port ptmx (slave %s).\n", 
+		       	PortList[PortNumber]->namepts);
+		PortList[PortNumber]->is_active = 1;
+	}
+}
+
+static void TickReopen(void)
+{
+	int i;
+	static int wrote_info = 0;
+	time_t CurrentTime = time(NULL);
+	
+	for (i=0; i<NbPort; i++) {
+		if (PortList[i]->Fd >= 0 &&  PortList[i]->is_active == 1) continue;
+		if ( (CurrentTime - PortList[i]->TimeLastOpen) > REOPEN_TIMEOUT ) ReopenPort(i);
+	}
+	
+	if (!wrote_info) {
+		for (i=0; i<NbPort; i++) {
+			if (PortList[i]->namepts[0] != '\0') {
+				if (wrote_info == 0)
+					printf("\nAwaiting client connects on:\n");
+				else
+					printf(" ");
+				printf("%s", PortList[i]->namepts);
+				wrote_info = 1;
+			}
+		}
+		if (wrote_info > 0) {
+			printf("\n");
+			if (!VerboseMode) {
+				fflush(stdout);
+				fflush(stderr);
+				close(0);
+				close(1);
+				close(2);
+			}
+		}
+	}
+}
+
+static void Broadcast(int InputPort)
+{
+	int i;
+	int rc;
+	
+	/* Broadcast only info frames */
+	
+	if (PortList[InputPort]->FrameBuffer[1] != 0x00 && \
+	    PortList[InputPort]->FrameBuffer[1] != 0x20 && \
+	    PortList[InputPort]->FrameBuffer[1] != 0x80)
+		return;
+	
+	for (i=0; i<NbPort; i++) {
+		int offset = 0;
+		if (i == InputPort) continue;
+		if (PortList[i]->Fd < 0 || PortList[i]->is_active == 0) continue;
+again:
+		rc = write(PortList[i]->Fd, 
+			   PortList[InputPort]->FrameBuffer+offset, 
+			   PortList[InputPort]->BufferIndex-offset);
+		if (rc < 0) {
+			if (errno == EAGAIN) {
+				if (PortList[i]->namepts[0] == '\0')
+					syslog(LOG_WARNING, "kissnetd : write buffer full on port %s. dropping frame. %s", 
+						PortList[i]->Name, strerror(errno));
+				else
+					syslog(LOG_WARNING, "kissnetd : write buffer full on ptmx port %s. dropping frame. %s", 
+						PortList[i]->namepts, strerror(errno));
+				continue;
+			}
+			if (PortList[i]->namepts[0] == '\0')
+				syslog(LOG_WARNING, "kissnetd : Error writing to port %s : %s\n", 
+					PortList[i]->Name, strerror(errno));
+			else
+				syslog(LOG_WARNING, "kissnetd : Error writing to port ptmx (slave %s) : %s\n", 
+					PortList[i]->namepts, strerror(errno));
+			if (VerboseMode) perror("write");
+			PortList[i]->is_active = 0;
+			if (PortList[i]->namepts[0] == '\0') {
+				close(PortList[i]->Fd);
+				PortList[i]->Fd = -1;
+			}
+			continue;
+		}
+		if (VerboseMode) {
+			printf("Sending %d bytes on port %d : rc=%d\n",
+				PortList[InputPort]->BufferIndex,
+				i, rc);
+		}	   
+		if (rc < PortList[InputPort]->BufferIndex-offset) {
+			offset += rc;
+			goto again;
+		}
+	}
+}
+
+static void ProcessInput(int PortNumber)
+{
+	static unsigned char MyBuffer[2048];
+	int Length;
+	int i;
+	struct PortDescriptor *MyPort = PortList[PortNumber];
+	
+	Length = read(MyPort->Fd, MyBuffer, sizeof(MyBuffer));
+	if (VerboseMode) {
+		printf("Read port %d : rc=%d\n", PortNumber, Length);
+	}
+	if (!Length) return;
+	if (Length < 0) {
+		if (errno == EAGAIN)
+			return;
+		if (MyPort->namepts[0] == '\0')
+			syslog(LOG_WARNING, "kissnetd : Error reading from port %s : %s\n", 
+				PortList[PortNumber]->Name, strerror(errno));
+		else
+			syslog(LOG_WARNING, "kissnetd : Error reading from port ptmx (slave %s) : %s\n", 
+				PortList[PortNumber]->namepts, strerror(errno));
+		if (VerboseMode) perror("read");
+		MyPort->is_active = 0;
+		if (MyPort->namepts[0] == '\0') {
+			close(MyPort->Fd);
+			MyPort->Fd = -1;
+		}
+		return;
+	}
+	for (i=0; i<Length; i++) {
+		if (MyPort->BufferIndex == MaxFrameSize) {
+			if (MyBuffer[i] == 0xC0) {
+				if (VerboseMode) printf("Drop frame too long\n");
+				MyPort->BufferIndex = 1;
+			}
+		}
+		else {		
+			MyPort->FrameBuffer[MyPort->BufferIndex++] = MyBuffer[i];
+			if (MyBuffer[i] == 0xC0) {
+				Broadcast(PortNumber);
+				MyPort->BufferIndex = 1; 
+			}
+		}
+	}
+}
+
+static void ProcessPortList(void)
+{
+	static fd_set MyFdSet;
+	int i, rc;
+	struct timeval Timeout;
+	
+	Timeout.tv_sec = 1;
+	Timeout.tv_usec = 0;
+	
+	FD_ZERO(&MyFdSet);
+	for (i=0; i<NbPort; i++) {
+		if (PortList[i]->Fd >= 0 && PortList[i]->is_active) FD_SET(PortList[i]->Fd, &MyFdSet);
+	}
+	rc = select(FD_SETSIZE, &MyFdSet, NULL, NULL, &Timeout);
+	
+	if (VerboseMode) printf("select : rc=%d\n", rc);
+	if (!rc ) TickReopen();
+	
+	if (rc > 0) {
+		for (i=0; i<NbPort && rc; i++) {
+			if (PortList[i]->Fd < 0) continue;
+			if (FD_ISSET(PortList[i]->Fd, &MyFdSet)) {
+				ProcessInput(i);
+				rc--;
+			}
+		}
+	}	
+}
+
+static void ProcessArgv(int argc, char *argv[])
+{
+	int opt;
+	int i=0;
+	int ptmxdevices = 0;
+	
+	while ((opt = getopt(argc, argv, "vf:p:")) != -1) {
+		switch (opt) {
+		case 'v':
+			VerboseMode = 1;
+			break;
+		case 'f':
+			MaxFrameSize = atoi(argv[optind]);
+			break;
+		case 'p':
+			ptmxdevices = atoi(optarg);
+			if (ptmxdevices < 1) {
+				fprintf(stderr, "error: too many devices\n");
+				exit(1);
+			}
+			for (i=0; i < ptmxdevices; i++)
+				NewPort("/dev/ptmx");
+			break;
+		default:
+			fprintf(stderr, "Invalid option %s\n", argv[optind]);
+			Usage();
+			exit(1);
+		}
+	}
+		
+	while (optind < argc)
+		NewPort(argv[optind++]);
+
+	if (NbPort < 2) {
+		fprintf(stderr, "This multiplexer needs at least two pty's\n");
+		exit(1);
+	}
+}
+
+
+int main(int argc, char *argv[]) 
+{
+	if (argc < 2) {
+		Banner(0);
+		Usage();
+	}
+	else {
+		Banner(1);
+	}
+	
+	ProcessArgv(argc, argv);
+	while (1) ProcessPortList();
+	return 0;	
+}
diff --git a/kiss/kissparms.8 b/kiss/kissparms.8
new file mode 100644
index 0000000..99dfd64
--- /dev/null
+++ b/kiss/kissparms.8
@@ -0,0 +1,76 @@
+.TH KISSPARMS 8 "15 October 1996" Linux "Linux System Managers Manual"
+.SH NAME
+kissparms \- Configure KISS TNCs.
+.SH SYNOPSIS
+.B kissparms [-c crc-type] -p <port> [-f y|n] [-h hw] [-l txtail] [-r pers] [-s slot] [-t txd] [-e feclevel] [-v] [-x] [-X raw] 
+.SH DESCRIPTION
+.LP
+.B Kissparms
+is used to dynamically configure KISS TNCs that have been setup for AX.25
+use by
+.B kissattach.
+This program uses the packet interface to allow it to communicate with the
+KISS TNC without interrupting the AX.25 data stream. Therefore the KISS
+parameters may be set at any time during the operation of the AX.25 port.
+.LP
+A full description of the KISS protocol can be found in the ARRL 6th Computer
+Networking Conference papers pp 38-43. While use of the Tx Tail value is
+now deprecated, it has been included to satisfy the requirements of users of
+old TNC firmware.
+.LP
+Although this utility was originally designed for controlling KISS TNCs
+connected to a serial port, it is used by a number of other Linux packet
+radio devices such as the Z8530 SCC driver for controlling their parameters
+in exactly the same manner. Therefore
+.B kissparms
+functionality extends to more than KISS TNCs.
+.SH OPTIONS
+.TP 12
+.BI "\-c crc-type"
+Sets the crc-type to use. For e.g. kernel mkiss: 0 = auto, 1 = none, 2 = flexnet, 3 = smack
+.TP 12
+.BI "\-p port"
+Sets the port that is being configured.
+.TP 12
+.BI "\-f y|n"
+This sets the TNC into either full duplex ``y'', or half duplex ``n'' mode.
+.TP 12
+.BI "\-h hardware"
+This is used to set hardware specific parameters.
+.TP 12
+.BI "\-e FEC error correction level"
+Sets the FEC error correction level in a DSP card based modem (KISS parameter
+8). Larger correction level means better noise resistance, but slower
+throughput on a good connection. This is an experimental feature found in a
+QPSK modem for the Motorola DSP56001 based DSP4 and EVM cards only.
+.TP 12
+.BI "\-l txtail"
+Sets the TX Tail time in milliseconds. Note that the command to the TNC only
+operates in steps of ten milliseconds, so only use values like 10, 20 etc.
+.TP 12
+.BI "\-r persist"
+Sets the persist value. This parameter is scaled to the range 0 to 255.
+.TP 12
+.BI "\-s slottime"
+Sets the slottime in milliseconds. Note that the command to the TNC only
+operates in steps of ten milliseconds, so only use values like 10, 20 etc.
+.TP 12
+.BI "\-t txdelay"
+Sets the TX Delay in milliseconds. Note that the command to the TNC only
+operates in steps of ten milliseconds, so only use values like 10, 20 etc.
+.TP 12
+.BI \-v
+Display the version.
+.TP 12
+.BI \-x
+Takes the TNC out of KISS mode back into ``normal'' mode. This command is
+manufacturer specific but works in many cases. This option overrides all
+options except the port number.
+.TP 12
+.BI \-X raw
+Sends the specified raw value to the kiss driver.
+.SH "SEE ALSO"
+.BR axports (5),
+.BR kissattach (8).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/kiss/kissparms.c b/kiss/kissparms.c
new file mode 100644
index 0000000..9d7192c
--- /dev/null
+++ b/kiss/kissparms.c
@@ -0,0 +1,257 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <config.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <net/if.h>
+
+#ifdef __GLIBC__ 
+#include <net/ethernet.h>
+#else
+#include <linux/if_ether.h>
+#endif
+
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axconfig.h>
+
+#define	PARAM_TXDELAY	1
+#define	PARAM_PERSIST	2
+#define	PARAM_SLOTTIME	3
+#define	PARAM_TXTAIL	4
+#define	PARAM_FULLDUP	5
+#define	PARAM_HARDWARE	6
+#define	PARAM_FECLEVEL	8
+#define	PARAM_RETURN	255
+
+#define USAGE "usage: kissparms [-c crc-type] -p <port> [-f y|n] [-h hw] [-l txtail]\n                 [-r pers ] [-s slot] [-t txd] [-e feclevel] [-v] [-x] [-X raw]\n"
+
+int main(int argc, char *argv[])
+{
+	unsigned char buffer[256];
+	struct sockaddr sa;
+	int proto = ETH_P_AX25;
+	int txdelay  = -1;
+	int txtail  = -1;
+	int persist  = -1;
+	int slottime = -1;
+	int fulldup  = -1;
+	int hardware = -1;
+	int feclevel = -1;
+	int crcmode = -1;
+	int kissoff  = 0;
+	int buflen = 0;
+	int s;
+	int X = 0;
+	char *port   = NULL;
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "kissparms: no AX.25 ports configured\n");
+		return 1;
+	}
+
+	while ((s = getopt(argc, argv, "c:e:f:h:l:p:r:s:t:X:vx")) != -1) {
+		switch (s) {
+			case 'c':
+				crcmode  = atoi(optarg);
+				break;
+			case 'e':
+				feclevel = atoi(optarg);
+				if (feclevel < 0 || feclevel > 3) {
+					fprintf(stderr, "kissparms: invalid FEC level value\n");
+					return 1;
+				}
+				break;
+
+			case 'f':
+				if (*optarg != 'y' && *optarg != 'n') {
+					fprintf(stderr, "kissparms: invalid full duplex setting\n");
+					return 1;
+				}
+				fulldup = *optarg == 'y';
+				break;
+
+			case 'l':
+				txtail = atoi(optarg) / 10;
+				if (txtail < 0 || txtail > 255) {
+					fprintf(stderr, "kissparms: invalid txtail value\n");
+					return 1;
+				}
+				break;
+
+
+			case 'h':
+				hardware = atoi(optarg);
+				if (hardware < 0 || hardware > 255) {
+					fprintf(stderr, "kissparms: invalid hardware value\n");
+					return 1;
+				}
+				break;
+
+			case 'p':
+				port = optarg;
+				if (ax25_config_get_addr(port) == NULL) {
+					fprintf(stderr, "kissparms: invalid port name - %s\n", port);
+					return 1;
+				}
+				break;
+
+			case 'r':
+				persist = atoi(optarg);
+				if (persist < 0 || persist > 255) {
+					fprintf(stderr, "kissparms: invalid persist value\n");
+					return 1;
+				}
+				break;
+
+			case 's':
+				slottime = atoi(optarg) / 10;
+				if (slottime < 0 || slottime > 255) {
+					fprintf(stderr, "kissparms: invalid slottime value\n");
+					return 1;
+				}
+				break;
+
+			case 't':
+				txdelay = atoi(optarg) / 10;
+				if (txdelay < 0 || txdelay > 255) {
+					fprintf(stderr, "kissparms: invalid txdelay value\n");
+					return 1;
+				}
+				break;
+
+			case 'v':
+				printf("kissparms: %s\n", VERSION);
+				return 0;
+
+			case 'x':
+				kissoff = 1;
+				break;
+
+			case 'X':
+				do {
+					buffer[buflen++] = atoi(optarg);
+					while (*optarg && isalnum(*optarg & 0xff))
+						optarg++;
+					while (*optarg && isspace(*optarg & 0xff))
+						optarg++;
+				} while (*optarg);
+				X = 1;
+				break;
+			case ':':
+			case '?':
+				fprintf(stderr, USAGE);
+				return 1;
+		}
+	}
+
+	if (port == NULL) {
+		fprintf(stderr, USAGE);
+		return 1;
+	}
+
+	if ((s = socket(PF_PACKET, SOCK_PACKET, htons(proto))) < 0) {
+		perror("kissparms: socket");
+		return 1;
+	}
+
+	strcpy(sa.sa_data, ax25_config_get_dev(port));
+
+	if (X && buflen)
+		goto rawsend;
+	if (kissoff) {
+		buffer[0] = PARAM_RETURN;
+		buflen    = 1;
+rawsend:
+		if (sendto(s, buffer, buflen, 0, &sa, sizeof(struct sockaddr)) == -1) {
+			perror("kissparms: sendto");
+			return 1;
+		}
+	} else {
+		if (txdelay != -1) {
+			buffer[0] = PARAM_TXDELAY;
+			buffer[1] = txdelay;
+			buflen    = 2;
+			if (sendto(s, buffer, buflen, 0, &sa, sizeof(struct sockaddr)) == -1) {
+				perror("kissparms: sendto");
+				return 1;
+			}
+		}
+		if (txtail != -1) {
+			buffer[0] = PARAM_TXTAIL;
+			buffer[1] = txtail;
+			buflen    = 2;
+			if (sendto(s, buffer, buflen, 0, &sa, sizeof(struct sockaddr)) == -1) {
+				perror("kissparms: sendto");
+				return 1;
+			}
+		}
+		if (persist != -1) {
+			buffer[0] = PARAM_PERSIST;
+			buffer[1] = persist;
+			buflen    = 2;
+			if (sendto(s, buffer, buflen, 0, &sa, sizeof(struct sockaddr)) == -1) {
+				perror("kissparms: sendto");
+				return 1;
+			}
+		}
+		if (slottime != -1) {
+			buffer[0] = PARAM_SLOTTIME;
+			buffer[1] = slottime;
+			buflen    = 2;
+			if (sendto(s, buffer, buflen, 0, &sa, sizeof(struct sockaddr)) == -1) {
+				perror("kissparms: sendto");
+				return 1;
+			}
+		}
+		if (fulldup != -1) {
+			buffer[0] = PARAM_FULLDUP;
+			buffer[1] = fulldup;
+			buflen    = 2;
+			if (sendto(s, buffer, buflen, 0, &sa, sizeof(struct sockaddr)) == -1) {
+				perror("kissparms: sendto");
+				return 1;
+			}
+		}
+		if (hardware != -1) {
+			buffer[0] = PARAM_HARDWARE;
+			buffer[1] = hardware;
+			buflen    = 2;
+			if (sendto(s, buffer, buflen, 0, &sa, sizeof(struct sockaddr)) == -1) {
+				perror("kissparms: sendto");
+				return 1;
+			}
+		}
+
+		if (feclevel != -1) {
+			buffer[0] = PARAM_FECLEVEL;
+			buffer[1] = feclevel;
+
+			buflen    = 2;
+			if (sendto(s, buffer, buflen, 0, &sa, sizeof(struct sockaddr)) == -1) {
+				perror("kissparms: sendto");
+				return 1;
+			}
+		}
+
+		if (crcmode != -1) {
+			buffer[0] = 0x85;
+			buffer[1] = crcmode;
+			buflen    = 2;
+			if (sendto(s, buffer, buflen, 0, &sa, sizeof(struct sockaddr)) == -1) {
+				perror("kissparms: sendto");
+				return 1;
+			}
+		}
+	}
+	
+	close(s);
+	
+	return 0;
+}
diff --git a/kiss/mkiss.8 b/kiss/mkiss.8
new file mode 100644
index 0000000..46beafc
--- /dev/null
+++ b/kiss/mkiss.8
@@ -0,0 +1,82 @@
+.TH MKISS 8 "4 July 1999" Linux "Linux System Managers Manual"
+.SH NAME
+mkiss \- Attach a multi KISS interface
+.SH SYNOPSIS
+.B mkiss [-c] [-f] [-h] [-l] [-s speed] [-p pollrate] [-v] [-x n_ptmx] ttyinterface pty ..
+.SH DESCRIPTION
+.LP
+.B Mkiss
+allows dual port TNCs or multiple TNCs sharing the same serial port to be
+used with the Linux AX.25 kernel software. The AX.25 software has no support
+for dual port TNCs or multiple TNCs charing the same serial line. The
+different ports are addressed by encoding the port number in the control
+byte of every kiss frame.
+.B Mkiss
+watches a serial port, and routes kiss frames to/from the pseudo ttys. The
+other side of the pseudo ttys are then attached with
+.B kissattach
+as normal.
+.sp 1
+Statistics about the operation of
+.B mkiss
+may be obtained by sending the SIGUSR1 signal to the running program. On
+reception of such a signal
+.B mkiss
+will print a set of statistics to the system log if logging has been
+enabled.
+.sp 1
+Although mention is made of using pseudo ttys as the last arguments,
+these devices may be normal serial ports. However
+.B mkiss
+provides no way in which to set their speed, the speed must therefore be set
+by some other method.
+.sp 1
+If the pty argument is "/dev/ptmx", then Unix98 behaviour
+will automaticaly take effekt. With Unix98 pty's, the slave pty name
+could not be forseen. That's why mkiss will print the corresponding slave
+pty name as a separate line on stdout.
+.sp 1
+If the pty name is the special name "none", no pty is opened. This is useful if you have multiport tnc like the KPC-9612 on i.e. /dev/ttyUSB0 and you only like to handle packets for the second port. The KPC has no option to configure the second tnc to listen on kiss port number 0. Thus, if you like to send all frames from the pty to the kiss port number 1, we need to tell mkiss to tag them for port number 1. This is done by "mkiss /dev/ttyUSB0 none /dev/ptmx". Frames received with port n [...]
+.SH OPTIONS
+.TP 10
+.BI \-c
+This enables a one-byte checksum on each incoming and outgoing KISS frame on
+the serial port. This checksum is used by G8BPQ KISS roms to maintain the
+integrity of KISS frames.
+.TP 10
+.BI \-f
+This enables a 16-bit checksum on each incoming and outgoing KISS frame on
+the serial port. This checksum is used by Flexnet Node and BayCom Mailbox
+to maintain the integrity of KISS frames.
+.TP 10
+.BI \-h
+Enables hardware handshaking on the serial line to the TNC. The KISS
+specification states that no hardware flow control shall be used so the
+default is off. But some KISS implementations do use hardware flow control.
+.TP 10
+.BI \-l
+Enables system logging, the default is off.
+.TP 10
+.BI "\-s speed"
+Set the speed of the serial port.
+.TP 10
+.BI "\-p pollrate"
+Enables polling. Polled mode is used by G8BPQ KISS roms to prevent
+contention on systems where multiple TNCs share the same serial line.
+Pollrate is interval between polls (in 100ms units).
+.TP 10
+.BI \-v
+Display the version.
+.TP 10
+.BI "\-x number"
+This option is for Unix98 PTYs. It allocates "number" ptys; their names are written to stdout. When -x is used, the pty arguments are optional. "mkiss -x 3 ttyname" is an comfortable alternative to "mkiss ttyname /dev/ptmx /dev/ptmx /dev/ptmx".
+.SH "SEE ALSO"
+.BR kissattach (8),
+.BR ifconfig (8),
+.BR kill (1).
+.SH AUTHORS
+Tomi Manninen OH2BNS <oh2bns at sral.fi>
+.br
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
+.br
+Kevin Uhlir N0BEL <kevinu at flochart.com>
diff --git a/kiss/mkiss.c b/kiss/mkiss.c
new file mode 100644
index 0000000..4ad4852
--- /dev/null
+++ b/kiss/mkiss.c
@@ -0,0 +1,731 @@
+/*
+ * mkiss.c
+ * Fake out AX.25 code into supporting dual port TNCS by routing serial
+ * port data to/from two pseudo ttys.
+ *
+ * Version 1.03
+ *
+ * N0BEL
+ * Kevin Uhlir
+ * kevinu at flochart.com
+ *
+ * 1.01 12/30/95 Ron Curry - Fixed FD_STATE bug where FD_STATE was being used for
+ * three state machines causing spurious writes to wrong TNC port. FD_STATE is
+ * now used for real serial port, FD0_STATE for first psuedo tty, and FD1_STATE
+ * for second psuedo tty. This was an easy fix but a MAJOR bug.
+ *
+ * 1.02 3/1/96 Jonathan Naylor - Make hardware handshaking default to off.
+ * Allowed for true multiplexing of the data from the two pseudo ttys.
+ * Numerous formatting changes.
+ *
+ * 1.03 4/20/96 Tomi Manninen - Rewrote KISS en/decapsulation (much of the
+ * code taken from linux/drivers/net/slip.c). Added support for all the 16
+ * possible kiss ports and G8BPQ-style checksumming on ttyinterface. Now
+ * mkiss also sends a statistic report to stderr if a SIGUSR1 is sent to it.
+ *
+ * 1.04 25/5/96 Jonathan Naylor - Added check for UUCP style tty lock files.
+ * As they are now supported by kissattach as well.
+ *
+ * 1.05 20/8/96 Jonathan Naylor - Convert to becoming a daemon and added
+ * system logging.
+ *
+ * 1.06 23/11/96 Tomi Manninen - Added simple support for polled kiss.
+ *
+ * 1.07 12/24/97 Deti Fliegl - Added Flexnet/BayCom CRC mode with commandline
+ * parameter -f    
+ *
+ * 1.08 xx/xx/99 Tom Mazouch - Adjustable poll interval
+ */
+
+#include <stdio.h>
+#define __USE_XOPEN
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <termios.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <ctype.h>
+#include <syslog.h>
+#include <limits.h>
+
+#include <netax25/ttyutils.h>
+#include <netax25/daemon.h>
+
+#include <config.h>
+
+#define FLEX_CRC	2
+#define G8BPQ_CRC	1
+
+#define	SIZE		4096
+
+#define FEND		0300	/* Frame End			(0xC0)	*/
+#define FESC		0333	/* Frame Escape			(0xDB)	*/
+#define TFEND		0334	/* Transposed Frame End		(0xDC)	*/
+#define TFESC		0335	/* Transposed Frame Escape	(0xDD)	*/
+
+#define ACKREQ		0x0C
+#define POLL		0x0E
+
+/*
+ * Keep these off the stack.
+ */
+static unsigned char ibuf[SIZE];	/* buffer for input operations	*/
+static unsigned char obuf[SIZE];	/* buffer for kiss_tx()		*/
+
+static int crc_errors		= 0;
+static int invalid_ports	= 0;
+static int return_polls		= 0;
+
+static char *usage_string	= "usage: mkiss [-p interval] [-c] [-f] [-h] [-l] [-s speed] [-v] [-x <num_ptmx_devices>] ttyinterface pty ..\n";
+
+static int dump_report		= FALSE;
+
+static int logging              = FALSE;
+static int crcflag		= FALSE;
+static int hwflag		= FALSE;
+static int pollspeed		= 0;
+
+/* CRC-stuff */
+typedef unsigned short int u16;
+#define CRCTYP 0x20
+static u16 crctab[256];
+
+struct iface
+{
+	char		*name;		/* Interface name (/dev/???)	*/
+	int		fd;		/* File descriptor		*/
+	int		escaped;	/* FESC received?		*/
+	u16		crc;		/* Incoming frame crc		*/
+	unsigned char	obuf[SIZE];	/* TX buffer			*/
+	unsigned char	*optr;		/* Next byte to transmit	*/
+	unsigned int	errors;		/* KISS protocol error count	*/
+	unsigned int	nondata;	/* Non-data frames rx count	*/
+	unsigned int	rxpackets;	/* RX frames count		*/
+	unsigned int	txpackets;	/* TX frames count		*/
+	unsigned long	rxbytes;	/* RX bytes count		*/
+	unsigned long	txbytes;	/* TX bytes count		*/
+	char		namepts[PATH_MAX];  /* name of the unix98 pts slaves, which
+				       * the client has to use */
+};
+
+static struct iface *tty	= NULL;
+static struct iface *pty[16]	= { NULL };
+static int numptys		= 0;
+
+static void init_crc(void)
+{
+	short int i, j;
+	u16 accum, data;
+
+	for (i = 0; i < 256; i++) {	/* fill table with CRC of values... */
+		accum = 0xffff;
+		data = i;
+		for (j = 0; j < 8; ++j) {
+			if ((data^accum) & 0x0001)
+				/* if msb of data^accum is TRUE */
+				/* then shift and subtract poly */
+				accum = (accum >> 1) ^ 0x8408;
+			else
+				/* otherwise: transparent shift */
+				accum >>= 1;
+			data >>= 1;	/* move up next bit for XOR     */
+		}
+		crctab[i] = accum;
+	}
+}
+
+static int poll(int fd, int ports)
+{
+	char buffer[3];
+	static int port = 0;
+
+	buffer[0] = FEND;
+	buffer[1] = POLL | (port << 4);
+	buffer[2] = FEND;
+	if (write(fd, buffer, 3) == -1) {
+		perror("mkiss: poll: write");
+		return 1;
+	}
+	if (++port >= ports)
+		port = 0;
+	return 0;
+}
+
+static int put_ubyte(unsigned char* s, u16* crc, unsigned char c, int usecrc)
+{ 
+  	int len = 1;
+
+  	if (c == FEND) { 
+		*s++ = FESC;
+		*s++ = TFEND;
+		len++;
+  	} else { 
+		*s++ = c;
+		if (c == FESC) {
+			*s++ = TFESC;
+			len++;
+		}
+	}
+
+	switch (usecrc) {
+	case G8BPQ_CRC:
+		*crc ^= c;	/* Adjust checksum */
+		break;
+	case FLEX_CRC:
+		*crc = (*crc<<8)^crctab[(*crc>>8)^((u16)((c)&255))];
+		break;
+	}
+
+	return len;
+}
+
+static int kiss_tx(int fd, int port, unsigned char *s, int len, int usecrc)
+{
+	unsigned char *ptr = obuf;
+	unsigned char c, cmd;
+	u16 crc = 0;
+	int i;
+
+	cmd = s[0] & 0x0F;
+
+	/* Non-data frames don't get a checksum byte */
+	if (usecrc == G8BPQ_CRC && cmd != 0 && cmd != ACKREQ)
+		usecrc = FALSE;
+
+	/*
+	 * Send an initial FEND character to flush out any
+	 * data that may have accumulated in the receiver
+	 * due to line noise.
+	 */
+	*ptr++ = FEND;
+
+    	if (usecrc == FLEX_CRC) {
+		crc = 0xffff;
+		ptr += put_ubyte(ptr, &crc, CRCTYP, usecrc);
+		c = *s++;
+	} else {
+		c = *s++;
+		c = (c & 0x0F) | (port << 4);
+		ptr += put_ubyte(ptr, &crc, c, usecrc);
+	}
+	
+	/*
+	 * For each byte in the packet, send the appropriate
+	 * character sequence, according to the SLIP protocol.
+	 */
+	for(i = 0; i < len - 1; i++)
+		ptr += put_ubyte(ptr, &crc, s[i], usecrc);
+
+	/*
+	 * Now the checksum...
+	 */
+	switch (usecrc) {
+	case G8BPQ_CRC:
+		c = crc & 0xFF;
+		ptr += put_ubyte(ptr, &crc, c, usecrc);
+		break;
+	case FLEX_CRC:
+		{
+			u16 u = crc;
+			ptr += put_ubyte(ptr, &crc, u / 256, usecrc);
+			ptr += put_ubyte(ptr, &crc, u & 255, usecrc);
+		}
+		break;
+	}
+	
+	*ptr++ = FEND;
+	return write(fd, obuf, ptr - obuf);
+}
+
+static int kiss_rx(struct iface *ifp, unsigned char c, int usecrc)
+{
+	int len;
+
+	switch (c) {
+	case FEND:
+		len = ifp->optr - ifp->obuf;
+
+		if (len != 0 && ifp->escaped) {	/* protocol error...	*/
+			len = 0;		/* ...drop frame	*/
+			ifp->errors++;
+		}
+		
+		if (len != 0) {
+			switch (usecrc) {
+			case G8BPQ_CRC:
+				if ((ifp->obuf[0] & 0x0F) != 0) {
+					/*
+					 * Non-data frames don't have checksum.
+					 */
+					usecrc = 0;
+					if ((ifp->obuf[0] & 0x0F) == POLL) {
+						/* drop returned polls	*/
+						len = 0;
+						return_polls++;
+					} else
+						ifp->nondata++;
+				} else {
+					if ((ifp->crc & 0xFF) != 0) {
+						/* checksum failed...	*/
+						/* ...drop frame	*/
+						len = 0;
+						crc_errors++;
+					} else
+						/* delete checksum byte	*/
+						len--;
+				}
+				break;
+			case FLEX_CRC:
+				if (len > 14 && ifp->crc == 0x7070) {
+					len -= 2;
+					*ifp->obuf = 0;
+				} else {
+					len = 0;
+					crc_errors++;
+				}
+				break;
+			}
+		}
+
+		if (len != 0) {
+			ifp->rxpackets++;
+			ifp->rxbytes += len;
+		}
+
+		/*
+		 * Clean up.
+		 */
+		ifp->optr = ifp->obuf;
+		if (usecrc == FLEX_CRC)
+			ifp->crc = 0xffff;
+		else
+			ifp->crc = 0;
+		ifp->escaped = FALSE;
+		return len;
+	case FESC:
+		ifp->escaped = TRUE;
+		return 0;
+	case TFESC:
+		if (ifp->escaped) {
+			ifp->escaped = FALSE;
+			c = FESC;
+		}
+		break;
+	case TFEND:
+		if (ifp->escaped) {
+			ifp->escaped = FALSE;
+			c = FEND;
+		}
+		break;
+	default:
+		if (ifp->escaped) {		/* protocol error...	*/
+			ifp->escaped = FALSE;
+			ifp->errors++;
+		}
+		break;
+	}
+
+	*ifp->optr++ = c;
+
+	switch (usecrc) {
+	case G8BPQ_CRC:	
+		ifp->crc ^= c;
+		break;
+	case FLEX_CRC:
+		ifp->crc = (ifp->crc << 8) ^ crctab[(ifp->crc >> 8) ^ c];
+		break;
+	default:
+		break;
+	}
+
+	return 0;
+}
+
+static void sigterm_handler(int sig)
+{
+	int i;
+
+	if (logging) {
+		syslog(LOG_INFO, "terminating on SIGTERM\n");
+		closelog();
+	}
+
+	tty_unlock(tty->name);
+	close(tty->fd);
+	free(tty);
+
+	for (i = 0; i < numptys; i++) {
+		if (pty[i]->fd == -1)
+			continue;
+		if (pty[i]->namepts[0] != '\0')
+			continue;
+		tty_unlock(pty[i]->name);
+		close(pty[i]->fd);
+		free(pty[i]);
+	}
+
+	exit(0);
+}
+
+static void sigusr1_handler(int sig)
+{
+	signal(SIGUSR1, sigusr1_handler);
+	dump_report = TRUE;
+}
+
+static void report(void)
+{
+	int i;
+	long t;
+
+	time(&t);
+	syslog(LOG_INFO, "version %s.", VERSION);
+	syslog(LOG_INFO, "Status report at %s", ctime(&t));
+	syslog(LOG_INFO, "Hardware handshaking %sabled.",
+	       hwflag  ? "en" : "dis");
+	syslog(LOG_INFO, "G8BPQ checksumming %sabled.",
+	       crcflag == G8BPQ_CRC ? "en" : "dis");
+	syslog(LOG_INFO, "FLEX checksumming %sabled.",
+	       crcflag == FLEX_CRC ? "en" : "dis");
+	       
+	syslog(LOG_INFO, "polling %sabled.",
+	       pollspeed ? "en" : "dis");
+	if (pollspeed)
+		syslog(LOG_INFO, "Poll interval %d00ms", pollspeed);
+	syslog(LOG_INFO, "ttyinterface is %s (fd=%d)", tty->name, tty->fd);
+	for (i = 0; i < numptys; i++)
+		syslog(LOG_INFO, "pty%d is %s (fd=%d)", i, pty[i]->name,
+			pty[i]->fd);
+	syslog(LOG_INFO, "Checksum errors: %d", crc_errors);
+	syslog(LOG_INFO, "Invalid ports: %d", invalid_ports);
+	syslog(LOG_INFO, "Returned polls: %d", return_polls);
+	syslog(LOG_INFO, "Interface   TX frames TX bytes  RX frames RX bytes  Errors");
+	syslog(LOG_INFO, "%-11s %-9u %-9lu %-9u %-9lu %u",
+	       tty->name,
+	       tty->txpackets, tty->txbytes,
+	       tty->rxpackets, tty->rxbytes,
+	       tty->errors);
+	for (i = 0; i < numptys; i++) {
+		syslog(LOG_INFO, "%-11s %-9u %-9lu %-9u %-9lu %u",
+		       pty[i]->name,
+		       pty[i]->txpackets, pty[i]->txbytes,
+		       pty[i]->rxpackets, pty[i]->rxbytes,
+		       pty[i]->errors);
+	}
+	return;
+}
+
+int main(int argc, char *argv[])
+{
+	unsigned char *icp;
+	int topfd;
+	fd_set readfd;
+	struct timeval timeout, pollinterval;
+	int retval, i, size, len;
+	int speed	= -1;
+	int ptmxdevices = 0;
+	char *npts;
+	int wrote_info = 0;
+
+	while ((size = getopt(argc, argv, "cfhlp:s:vx:")) != -1) {
+		switch (size) {
+		case 'c':
+			crcflag = G8BPQ_CRC;
+			break;
+		case 'f':
+			crcflag = FLEX_CRC;
+			break;
+		case 'h':
+			hwflag = TRUE;
+			break;
+		case 'l':
+		        logging = TRUE;
+		        break;
+		case 'p':
+			pollspeed = atoi(optarg);
+			pollinterval.tv_sec = pollspeed / 10;
+			pollinterval.tv_usec = (pollspeed % 10) * 100000L;
+		        break;
+		case 's':
+			speed = atoi(optarg);
+			break;
+		case 'x':
+			ptmxdevices = atoi(optarg);
+			if (ptmxdevices < 1 || ptmxdevices > 16) {
+				fprintf(stderr, "mkiss: too %s devices\n", ptmxdevices < 1 ? "few" : "many");
+				return 1;
+			}
+			break;
+		case 'v':
+			printf("mkiss: %s\n", VERSION);
+			return 1;
+		case ':':
+		case '?':
+			fprintf(stderr, usage_string);
+			return 1;
+		}
+	}
+
+	if ((argc - optind) < 2 && ptmxdevices == 0) {
+		fprintf(stderr, usage_string);
+		return 1;
+	}
+
+	if ((argc - optind) < 1 && ptmxdevices > 0) {
+		fprintf(stderr, usage_string);
+		return 1;
+	}
+
+        numptys = argc - optind - 1;
+	if ((numptys + ptmxdevices) > 16) {
+		fprintf(stderr, "mkiss: max 16 pty interfaces allowed.\n");
+		return 1;
+	}
+
+	/*
+	 * Check for lock files before opening any TTYs
+	 */
+	if (tty_is_locked(argv[optind])) {
+		fprintf(stderr, "mkiss: tty %s is locked by another process\n", argv[optind]);
+		return 1;
+	}
+	for (i = 0; i < numptys; i++) {
+		if (!strcmp("/dev/ptmx", argv[optind + i + 1]))
+			continue;
+		if (!strcmp("none", argv[optind + i + 1]))
+			continue;
+		if (tty_is_locked(argv[optind + i + 1])) {
+			fprintf(stderr, "mkiss: pty %s is locked by another process\n", argv[optind + i + 1]);
+			return 1;
+		}
+	}
+
+	/*
+	 * Open and configure the tty interface. Open() is
+	 * non-blocking so it won't block regardless of the modem
+	 * status lines.
+	 */
+	if ((tty = calloc(1, sizeof(struct iface))) == NULL) {
+		perror("mkiss: malloc");
+		return 1;
+	}
+
+	if ((tty->fd = open(argv[optind], O_RDWR | O_NDELAY)) == -1) {
+		perror("mkiss: open");
+		return 1;
+	}
+
+	tty->name = argv[optind];
+	tty_raw(tty->fd, hwflag);
+	if (speed != -1 && !tty_speed(tty->fd, speed)) {
+		close(tty->fd);
+		return 1;
+	}
+	tty->optr = tty->obuf;
+	topfd = tty->fd;
+	tty->namepts[0] = '\0';
+
+	/*
+	 * Make it block again...
+	 */
+	fcntl(tty->fd, F_SETFL, 0);
+
+	/*
+	 * Open and configure the pty interfaces
+	 */
+	for (i = 0; i < numptys+ptmxdevices; i++) {
+		static char name_ptmx[] = "/dev/ptmx";
+		char *pty_name = (i < numptys ? argv[optind+i+1] : name_ptmx);
+
+		if ((pty[i] = calloc(1, sizeof(struct iface))) == NULL) {
+			perror("mkiss: malloc");
+			return 1;
+		}
+		if (!strcmp(pty_name, "none")) {
+			pty[i]->fd = -1;
+			strcpy(pty[i]->namepts, "none");
+		} else {
+			if ((pty[i]->fd = open(pty_name, O_RDWR)) == -1) {
+				perror("mkiss: open");
+				free(pty[i]);
+				pty[i] = 0;
+				return 1;
+			}
+			tty_raw(pty[i]->fd, FALSE);
+			topfd = (pty[i]->fd > topfd) ? pty[i]->fd : topfd;
+			pty[i]->namepts[0] = '\0';
+		}
+		pty[i]->name = pty_name;
+		pty[i]->optr = pty[i]->obuf;
+		if (!strcmp(pty[i]->name, "/dev/ptmx")) {
+			/* get name of pts-device */
+			if ((npts = ptsname(pty[i]->fd)) == NULL) {
+				fprintf(stderr, "mkiss: Cannot get name of pts-device.\n");
+				free(pty[i]);
+				pty[i] = 0;
+				return 1;
+			}
+			strncpy(pty[i]->namepts, npts, PATH_MAX-1);
+			pty[i]->namepts[PATH_MAX-1] = '\0';
+
+			/* unlock pts-device */
+			if (unlockpt(pty[i]->fd) == -1) {
+				fprintf(stderr, "mkiss: Cannot unlock pts-device %s\n", pty[i]->namepts);
+				free(pty[i]);
+				pty[i] = 0;
+				return 1;
+			}
+			if (wrote_info == 0)
+				printf("\nAwaiting client connects on:\n");
+			else
+				printf(" ");
+			printf("%s", pty[i]->namepts);
+			wrote_info = 1;
+		}
+	}
+
+	if (wrote_info > 0)
+		printf("\n");
+
+	numptys=numptys+ptmxdevices;
+
+	/*
+	 * Now all the ports are open, lock them.
+	 */
+	tty_lock(tty->name);
+	for (i = 0; i < numptys; i++) {
+		if (pty[i]->namepts[0] == '\0')
+			tty_lock(pty[i]->name);
+	}
+
+	if (logging) {
+		openlog("mkiss", LOG_PID, LOG_DAEMON);
+		syslog(LOG_INFO, "starting");
+	}
+
+	if (wrote_info > 0) {
+		fflush(stdout);
+		fflush(stderr);
+		close(0);
+		close(1);
+		close(2);
+	}
+
+	signal(SIGHUP, SIG_IGN);
+	signal(SIGUSR1, sigusr1_handler);
+	signal(SIGTERM, sigterm_handler);
+
+	if (!daemon_start(FALSE)) {
+		fprintf(stderr, "mkiss: cannot become a daemon\n");
+		return 1;
+	}
+
+	init_crc();
+	/*
+	 * Loop until an error occurs on a read.
+	 */
+	while (TRUE) {
+		FD_ZERO(&readfd);
+		FD_SET(tty->fd, &readfd);
+		for (i = 0; i < numptys; i++)
+			if (pty[i]->fd != -1)
+				FD_SET(pty[i]->fd, &readfd);
+
+		if (pollspeed)
+			timeout = pollinterval;
+
+		errno = 0;
+		retval = select(topfd + 1, &readfd, NULL, NULL, pollspeed ? &timeout : NULL);
+
+		if (retval == -1) {
+			if (dump_report) {
+				if (logging)
+					report();
+				dump_report = FALSE;
+				continue;
+			} else {
+				perror("mkiss: select");
+				continue;
+			}
+		}
+
+		/*
+		 * Timer expired - let's poll...
+		 */
+		if (retval == 0 && pollspeed) {
+			poll(tty->fd, numptys);
+			continue;
+		}
+
+		/*
+		 * A character has arrived on the ttyinterface.
+		 */
+		if (tty->fd > -1 && FD_ISSET(tty->fd, &readfd)) {
+			if ((size = read(tty->fd, ibuf, SIZE)) < 0 && errno != EINTR) {
+				if (logging)
+					syslog(LOG_ERR, "tty->fd: %m");
+				break;
+			}
+			for (icp = ibuf; size > 0; size--, icp++) {
+				if ((len = kiss_rx(tty, *icp, crcflag)) != 0) {
+					if ((i = (*tty->obuf & 0xF0) >> 4) < numptys) {
+						if (pty[i]->fd != -1) {
+							kiss_tx(pty[i]->fd, 0, tty->obuf, len, FALSE);
+							pty[i]->txpackets++;
+							pty[i]->txbytes += len;
+						}
+					} else
+						invalid_ports++;
+					if (pollspeed)
+						poll(tty->fd, numptys);
+				}
+			}
+		}
+
+		for (i = 0; i < numptys; i++) {
+			/*
+			 * A character has arrived on pty[i].
+			 */
+			if (pty[i]->fd > -1 && FD_ISSET(pty[i]->fd, &readfd)) {
+				if ((size = read(pty[i]->fd, ibuf, SIZE)) < 0 && errno != EINTR) {
+					if (logging)
+						syslog(LOG_ERR, "pty[%d]->fd: %m\n", i);
+					goto end;
+				}
+				for (icp = ibuf; size > 0; size--, icp++) {
+					if ((len = kiss_rx(pty[i], *icp, FALSE)) != 0) {
+						kiss_tx(tty->fd, i, pty[i]->obuf, len, crcflag);
+						tty->txpackets++;
+						tty->txbytes += len;
+					}
+				}
+			}
+		}
+	}
+
+end:
+	if (logging)
+		closelog();
+
+	tty_unlock(tty->name);
+	close(tty->fd);
+	free(tty);
+
+	for (i = 0; i < numptys; i++) {
+		if (pty[i]->fd == -1)
+			continue;
+		if (pty[i]->namepts[0] != '\0')
+			continue;
+		tty_unlock(pty[i]->name);
+		close(pty[i]->fd);
+		free(pty[i]);
+	}
+
+	return 1;
+}
diff --git a/kiss/net2kiss.8 b/kiss/net2kiss.8
new file mode 100644
index 0000000..68538a0
--- /dev/null
+++ b/kiss/net2kiss.8
@@ -0,0 +1,45 @@
+.TH NET2KISS 8 "15 October 1996" "" ""
+.SH NAME
+net2kiss \- convert a network AX.25 driver to a KISS stream on a pseudo-tty
+.SH SYNOPSIS
+.B "net2kiss [-sfzva] [-i ifname] ptyname"
+.br
+.SH DESCRIPTION
+.B net2kiss
+takes AX.25 packets from an AX.25 kernel network interface and converts them
+into a KISS data stream via a pseudo-tty.
+.SH PARAMETERS
+.TP
+.B ptyname
+specifies the path to the pseudo-tty. If you use the special name "/dev/ptmx", then a Unix98-PTY pair is used; the pty name is written to stdout.
+.SH OPTIONS
+.TP
+.B "\-i ifname"
+specifies the name of the kernel AX.25 network interface. The default
+is bc0.
+.TP
+.B \-s
+tells net2kiss to search by itself for a free pseudoterminal, open the
+master side and create a symlink named by -p to the slave side.
+.TP
+.B \-f
+can be used in conjunction with -s to force the creation of the symlink
+even if the target file does already exist. *DANGEROUS*
+.TP
+.B \-v
+Verbose output. Displays error messages during operation and decoded
+packets to stdout.
+.TP
+.B \-z
+put the network interface into promiscious mode.
+.TP
+.B \-a
+receive every packet instead of only AX.25 from the kernel AX.25 network
+interface.
+.SH BUGS
+None known.
+.SH SEE ALSO
+.BR ifconfig (8),
+.BR kissattach (8).
+.SH AUTHORS
+Thomas M. Sailer, HB9JNX/AE4WA, <t.sailer at alumni.ethz.ch>
diff --git a/kiss/net2kiss.c b/kiss/net2kiss.c
new file mode 100644
index 0000000..716107d
--- /dev/null
+++ b/kiss/net2kiss.c
@@ -0,0 +1,694 @@
+/*****************************************************************************/
+
+/*
+ *      net2kiss.c - convert a network interface to KISS data stream
+ *
+ *	Copyright (C) 1996  Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *  0.1  18.09.96  Started
+ */
+
+/*****************************************************************************/
+
+#include <stdio.h>
+#define __USE_XOPEN
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <errno.h>
+#include <syslog.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+#include <endian.h>
+#include <netinet/in.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <grp.h>
+#include <string.h>
+#include <termios.h>
+#include <limits.h>
+
+#include <sys/socket.h>
+#include <net/if.h>
+
+#ifdef __GLIBC__
+#include <net/ethernet.h>
+#else
+#include <linux/if_ether.h>
+#endif
+
+
+/* --------------------------------------------------------------------- */
+
+static int fdif, fdpty;
+static struct ifreq ifr;
+static char *progname;
+static int verbose = 0;
+static int i_am_unix98_pty_master = 0; /* unix98 ptmx support */
+static char *namepts = NULL;  /* name of the unix98 pts slave, which
+	                       * the client has to use */
+
+/* --------------------------------------------------------------------- */
+
+static void die(char *func) 
+{
+	fprintf(stderr, "%s: %s (%i)%s%s\n", progname, strerror(errno),
+		errno, func ? " in " : "", func ? func : "");
+	syslog(LOG_WARNING, "%s (%i)%s%s\n", strerror(errno),
+		errno, func ? " in " : "", func ? func : "");
+	exit(-1);
+}
+
+/* --------------------------------------------------------------------- */
+
+static void display_packet(unsigned char *bp, unsigned int len)
+{
+	unsigned char v1=1,cmd=0;
+	unsigned char i,j;
+
+	if (!bp || !len) 
+		return;
+	if (len < 8)
+		return;
+	if (bp[1] & 1) {
+		/*
+		 * FlexNet Header Compression
+		 */
+		v1 = 0;
+		cmd = (bp[1] & 2) != 0;
+		printf("fm ? to ");
+		i = (bp[2] >> 2) & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		i = ((bp[2] << 4) | ((bp[3] >> 4) & 0xf)) & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		i = ((bp[3] << 2) | ((bp[4] >> 6) & 3)) & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		i = bp[4] & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		i = (bp[5] >> 2) & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		i = ((bp[5] << 4) | ((bp[6] >> 4) & 0xf)) & 0x3f;
+		if (i) 
+			printf("%c",i+0x20);
+		printf("-%u QSO Nr %u", bp[6] & 0xf, (bp[0] << 6) | 
+		       (bp[1] >> 2));
+		bp += 7;
+		len -= 7;
+	} else {
+		/*
+		 * normal header
+		 */
+		if (len < 15)
+			return;
+		if ((bp[6] & 0x80) != (bp[13] & 0x80)) {
+			v1 = 0;
+			cmd = (bp[6] & 0x80);
+		}
+		printf("fm ");
+		for(i = 7; i < 13; i++) 
+			if ((bp[i] &0xfe) != 0x40) 
+				printf("%c",bp[i] >> 1);
+		printf("-%u to ",(bp[13] >> 1) & 0xf);
+		for(i = 0; i < 6; i++) 
+			if ((bp[i] &0xfe) != 0x40) 
+				printf("%c",bp[i] >> 1);
+		printf("-%u",(bp[6] >> 1) & 0xf);
+		bp += 14;
+		len -= 14;
+		if ((!(bp[-1] & 1)) && (len >= 7)) printf(" via ");
+		while ((!(bp[-1] & 1)) && (len >= 7)) {
+			for(i = 0; i < 6; i++) 
+				if ((bp[i] &0xfe) != 0x40) 
+					printf("%c",bp[i] >> 1);
+			printf("-%u",(bp[6] >> 1) & 0xf);
+			bp += 7;
+			len -= 7;
+			if ((!(bp[-1] & 1)) && (len >= 7)) 
+				printf(",");
+		}
+	}
+	if(!len) 
+		return;
+	i = *bp++;
+	len--;
+	j = v1 ? ((i & 0x10) ? '!' : ' ') : 
+		((i & 0x10) ? (cmd ? '+' : '-') : (cmd ? '^' : 'v'));
+	if (!(i & 1)) {
+		/*
+		 * Info frame
+		 */
+		printf(" I%u%u%c",(i >> 5) & 7,(i >> 1) & 7,j);
+	} else if (i & 2) {
+		/*
+		 * U frame
+		 */
+		switch (i & (~0x10)) {
+		case 0x03:
+			printf(" UI%c",j);
+			break;
+		case 0x2f:
+			printf(" SABM%c",j);
+			break;
+		case 0x43:
+			printf(" DISC%c",j);
+			break;
+		case 0x0f:
+			printf(" DM%c",j);
+			break;
+		case 0x63:
+			printf(" UA%c",j);
+			break;
+		case 0x87:
+			printf(" FRMR%c",j);
+			break;
+		default:
+			printf(" unknown U (0x%x)%c",i & (~0x10),j);
+			break;
+		}
+	} else {
+		/*
+		 * supervisory
+		 */
+		switch (i & 0xf) {
+		case 0x1:
+			printf(" RR%u%c",(i >> 5) & 7,j);
+			break;
+		case 0x5:
+			printf(" RNR%u%c",(i >> 5) & 7,j);
+			break;
+		case 0x9:
+			printf(" REJ%u%c",(i >> 5) & 7,j);
+			break;
+		default:
+			printf(" unknown S (0x%x)%u%c", i & 0xf, 
+			       (i >> 5) & 7, j);
+			break;
+		}
+	}
+	if (!len) {
+		printf("\n");
+		return;
+	}
+	printf(" pid=%02X\n", *bp++);
+	len--;
+	j = 0;
+	while (len) {
+		i = *bp++;
+		if ((i >= 32) && (i < 128)) 
+			printf("%c",i);
+		else if (i == 13) {
+			if (j) 
+				printf("\n");
+			j = 0;
+		} else 
+			printf(".");
+		if (i >= 32) 
+			j = 1;
+		len--;
+	}
+	if (j) 
+		printf("\n");
+}
+
+/* ---------------------------------------------------------------------- */
+
+static int openpty(int *amaster, int *aslave, char *name, 
+		   struct termios *termp, struct winsize *winp)
+{
+	char line[PATH_MAX];
+        const char *cp1, *cp2;
+	int master, slave;
+	struct group *gr = getgrnam("tty");
+
+	strcpy(line, "/dev/ptyXX");
+	for (cp1 = "pqrstuvwxyzPQRST"; *cp1; cp1++) {
+		line[8] = *cp1;
+		for (cp2 = "0123456789abcdef"; *cp2; cp2++) {
+			line[9] = *cp2;
+			if ((master = open(line, O_RDWR, 0)) == -1) {
+				if (errno == ENOENT)
+					return (-1);	/* out of ptys */
+			} else {
+				line[5] = 't';
+				(void) chown(line, getuid(), 
+					     gr ? gr->gr_gid : -1);
+				(void) chmod(line, S_IRUSR|S_IWUSR|S_IWGRP);
+#if 0
+				(void) revoke(line);
+#endif
+				if ((slave = open(line, O_RDWR, 0)) != -1) {
+					*amaster = master;
+					*aslave = slave;
+					if (name)
+						strcpy(name, line);
+					if (termp)
+						(void) tcsetattr(slave,
+								 TCSAFLUSH, 
+								 termp);
+					if (winp)
+						(void) ioctl(slave, 
+							     TIOCSWINSZ, 
+							     (char *)winp);
+					return 0;
+				}
+				(void) close(master);
+				line[5] = 'p';
+			}
+		}
+	}
+	errno = ENOENT;	/* out of ptys */
+	return (-1);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void restore_ifflags(int signum)
+{
+	if (ioctl(fdif, SIOCSIFFLAGS, &ifr) < 0)
+		die("ioctl SIOCSIFFLAGS");
+	close(fdif);
+	close(fdpty);
+	exit(0);
+}
+
+/* --------------------------------------------------------------------- */
+
+#define KISS_FEND   ((unsigned char)0300)
+#define KISS_FESC   ((unsigned char)0333)
+#define KISS_TFEND  ((unsigned char)0334)
+#define KISS_TFESC  ((unsigned char)0335)
+
+#define KISS_CMD_DATA       0
+#define KISS_CMD_TXDELAY    1
+#define KISS_CMD_PPERSIST   2
+#define KISS_CMD_SLOTTIME   3
+#define KISS_CMD_TXTAIL     4
+#define KISS_CMD_FULLDUP    5
+
+#define KISS_HUNT    0
+#define KISS_RX      1
+#define KISS_ESCAPED 2
+
+/* --------------------------------------------------------------------- */
+
+static void kiss_overflow(void) 
+{
+	if (verbose)
+		printf("KISS: packet overflow\n");
+}
+
+static void kiss_bad_escape(void) 
+{
+	if (verbose)
+		printf("KISS: bad escape sequence\n");
+}
+
+static void display_kiss_packet(char *pfx, unsigned char *pkt, 
+				unsigned int pktlen) 
+{
+	if (!verbose) 
+		return;
+	switch (*pkt) {
+	case KISS_CMD_DATA:
+		printf("%s: ", pfx);
+		display_packet(pkt+1, pktlen-1);
+		break;
+
+	case KISS_CMD_TXDELAY:
+		printf("%s: txdelay = %dms\n", pfx, (int)pkt[1] * 10);
+		break;
+     
+	case KISS_CMD_PPERSIST:
+		printf("%s: p persistence = %d\n", pfx, pkt[1]);
+		break;
+
+	case KISS_CMD_SLOTTIME:
+		printf("%s: slottime = %dms\n", pfx, (int)pkt[1] * 10);
+		break;
+
+	case KISS_CMD_TXTAIL:
+		printf("%s: txtail = %dms\n", pfx, (int)pkt[1] * 10);
+		break;
+
+	case KISS_CMD_FULLDUP:
+		printf("%s: %sduplex\n", pfx, pkt[1] ? "full" : "half");
+		break;
+
+	default:
+		printf("%s: unknown frame type 0x%02x, length %d\n", pfx,
+		       *pkt, pktlen);
+	}
+}
+
+static void kiss_packet(int fdif, char *addr, 
+			unsigned char *pkt, unsigned int pktlen) 
+{
+	struct sockaddr to;
+	int i;
+
+	if (pktlen < 2)
+		return;
+	display_kiss_packet("KISS", pkt, pktlen);
+	strncpy(to.sa_data, addr, sizeof(to.sa_data));
+	i = sendto(fdif, pkt, pktlen, 0, &to, sizeof(to));
+	if (i >= 0)
+		return;
+	if (errno == EMSGSIZE) {
+		if (verbose)
+			printf("sendto: %s: packet (size %d) too "
+			       "long\n", addr, pktlen-1);
+		return;
+	}
+	if (errno == EWOULDBLOCK) {
+		if (verbose)
+			printf("sendto: %s: busy\n", addr);
+		return;
+	}
+	die("sendto");
+	return;
+}
+
+/* --------------------------------------------------------------------- */
+
+static int doio(int fdif, int fdpty, char *ifaddr)
+{
+	unsigned char ibuf[2048];
+	unsigned char *bp;
+	unsigned char pktbuf[2048];
+	unsigned char *pktptr = pktbuf;
+	unsigned char pktstate = KISS_HUNT;
+      	unsigned char obuf[16384];
+	unsigned int ob_wp = 0, ob_rp = 0, ob_wpx;
+	int i;
+	fd_set rmask, wmask;
+	struct sockaddr from;
+	socklen_t from_len;
+	
+#define ADD_CHAR(c) \
+	obuf[ob_wpx] = c; \
+	ob_wpx = (ob_wpx + 1) % sizeof(obuf); \
+	if (ob_wpx == ob_rp) goto kissencerr;
+ 
+#define ADD_KISSCHAR(c) \
+	if (((c) & 0xff) == KISS_FEND) \
+                { ADD_CHAR(KISS_FESC); ADD_CHAR(KISS_TFEND); } \
+	else if (((c) & 0xff) == KISS_FESC) \
+                { ADD_CHAR(KISS_FESC); ADD_CHAR(KISS_TFESC); } \
+	else { ADD_CHAR(c); }
+	 
+	for (;;) {
+		FD_ZERO(&rmask);
+		FD_ZERO(&wmask);
+		FD_SET(fdif, &rmask);
+		FD_SET(fdpty, &rmask);
+		if (ob_rp != ob_wp)
+			FD_SET(fdpty, &wmask);
+		i = select((fdif > fdpty) ? fdif+1 : fdpty+1, &rmask, &wmask,
+			   NULL, NULL);
+		if (i < 0)
+			die("select");
+		if (FD_ISSET(fdpty, &wmask)) {
+			if (ob_rp > ob_wp)
+				i = write(fdpty, obuf+ob_rp, 
+					  sizeof(obuf)-ob_rp);
+			else 
+				i = write(fdpty, obuf+ob_rp, ob_wp - ob_rp);
+			if (i < 0)
+				die("write");
+			ob_rp = (ob_rp + i) % sizeof(obuf);
+		}
+		if (FD_ISSET(fdpty, &rmask)) {
+			i = read(fdpty, bp = ibuf, sizeof(ibuf));
+			if (i < 0) {
+				if (errno != EIO)
+					die("read");
+				return 0;
+			}
+			for (; i > 0; i--, bp++) {
+				switch (pktstate) {
+				default:
+				case KISS_HUNT:
+					if (*bp != KISS_FEND)
+						break;
+					pktptr = pktbuf;
+					pktstate = KISS_RX;
+					break;
+
+				case KISS_RX:
+					if (*bp == KISS_FESC) {
+						pktstate = KISS_ESCAPED;
+						break;
+					}
+					if (*bp == KISS_FEND) {
+						kiss_packet(fdif, ifaddr,
+							    pktbuf, 
+							    pktptr - pktbuf);
+						pktptr = pktbuf;
+						break;
+					}
+					if (pktptr >= pktbuf+sizeof(pktbuf)) {
+						kiss_overflow();
+						pktstate = KISS_HUNT;
+						break;
+					}
+					*pktptr++ = *bp;
+					break;
+
+				case KISS_ESCAPED:
+					if (pktptr >= pktbuf+sizeof(pktbuf)) {
+						kiss_overflow();
+						pktstate = KISS_HUNT;
+						break;
+					}
+					if (*bp == KISS_TFESC)
+						*pktptr++ = KISS_FESC;
+					else if (*bp == KISS_TFEND)
+						*pktptr++ = KISS_FEND;
+					else {
+						kiss_bad_escape();
+						pktstate = KISS_HUNT;
+						break;
+					}
+					pktstate = KISS_RX;
+					break;
+				}
+			}				
+		}
+		if (FD_ISSET(fdif, &rmask)) {
+			from_len = sizeof(from);
+			i = recvfrom(fdif, bp = ibuf, sizeof(ibuf), 0, &from,
+				     &from_len);
+			if (i < 0) {
+				if (errno == EWOULDBLOCK)
+					continue;
+				die("recvfrom");
+			}
+			if (verbose)
+				display_kiss_packet(from.sa_data, ibuf, i);
+			ob_wpx = ob_wp;
+			ADD_CHAR(KISS_FEND);
+			for (; i > 0; i--, bp++) {
+				ADD_KISSCHAR(*bp);
+			}
+			ADD_CHAR(KISS_FEND);
+			ob_wp = ob_wpx;
+		}
+		continue;
+	kissencerr:
+		if (verbose)
+			printf("KISS: Encoder out of memory\n");
+	}
+#undef ADD_CHAR
+#undef ADD_KISSCHAR
+}
+
+/* --------------------------------------------------------------------- */
+
+int main(int argc, char *argv[])
+{
+	struct ifreq ifr_new;
+	struct sockaddr sa;
+	char *name_iface = "bc0";
+	char *name_pname = NULL;
+	char slavename[PATH_MAX];
+	char *master_name;
+	struct termios termios;
+	int c;
+	int errflg = 0;
+	int symlnk = 0;
+	int symlnkforce = 0;
+	short if_newflags = 0;
+	int proto = htons(ETH_P_AX25);
+
+	progname = argv[0];
+	while ((c = getopt(argc, argv, "sfzvai:")) != EOF) {
+		switch (c) {
+		case 's':
+			symlnk = 1;
+			break;
+		case 'f':
+			symlnkforce = 1;
+			break;
+		case 'i':
+			name_iface = optarg;
+			break;
+		case 'z':
+			if_newflags |= IFF_PROMISC;
+			break;
+		case 'v':
+			verbose++;
+			break;
+		case 'a':
+			proto = htons(ETH_P_ALL);
+			break;
+		default:
+			errflg++;
+			break;
+		}
+	}
+	if (argc > optind)
+		name_pname = argv[optind];
+	else
+		errflg++;
+	if (errflg) {
+		fprintf(stderr, "usage: %s [-s] [-f] [-i iface] "
+			"[-z] [-v] ptyname\n", progname);
+		exit(1);
+	}
+	openlog(progname, LOG_PID, LOG_DAEMON);
+	if (symlnk) {
+		int fdtty;
+
+		if (openpty(&fdpty, &fdtty, slavename, NULL, NULL)) {
+			fprintf(stderr, "%s: out of pseudoterminals\n",
+				progname);
+			exit(1);
+		}
+		close(fdtty);
+		fcntl(fdpty, F_SETFL, fcntl(fdpty, F_GETFL, 0) | O_NONBLOCK);
+		if (symlnkforce)
+			unlink(name_pname);
+		if (symlink(slavename, name_pname))
+			perror("symlink");
+		/* Users await the slave pty to be referenced in the 2nd line */
+		printf("Awaiting client connects on\n%s\n", slavename);
+		slavename[5] = 'p';
+		master_name = slavename;
+	} else {
+		if ((fdpty = open(name_pname, 
+				  O_RDWR | O_NOCTTY | O_NONBLOCK)) < 0) {
+			fprintf(stderr, "%s: cannot open \"%s\"\n", progname,
+				name_pname);
+			exit(1);
+		}
+		if (!strcmp("/dev/ptmx", name_pname))
+			i_am_unix98_pty_master = 1;
+		master_name = name_pname;
+	}
+	if ((fdif = socket(PF_INET, SOCK_PACKET, proto)) < 0) 
+		die("socket");
+	memset(&sa, 0, sizeof(struct sockaddr));
+	memcpy(sa.sa_data, name_iface, sizeof(sa.sa_data));
+	sa.sa_family = AF_INET;
+	if (bind(fdif, &sa, sizeof(struct sockaddr)) < 0)
+		die("bind"); 
+	memcpy(ifr.ifr_name, name_iface, IFNAMSIZ);
+	if (ioctl(fdif, SIOCGIFFLAGS, &ifr) < 0)
+		die("ioctl SIOCGIFFLAGS");
+       	ifr_new = ifr;	
+	ifr_new.ifr_flags |= if_newflags;
+	if (ioctl(fdif, SIOCSIFFLAGS, &ifr_new) < 0)
+		die("ioctl SIOCSIFFLAGS");
+	if (i_am_unix98_pty_master) {
+		/* get name of pts-device */
+		if ((namepts = ptsname(fdpty)) == NULL) {
+			fprintf(stderr, "%s: Cannot get name of pts-device.\n", progname);
+			exit (1);
+		}
+		/* unlock pts-device */
+		if (unlockpt(fdpty) == -1) {
+			fprintf(stderr, "%s: Cannot unlock pts-device %s\n", progname, namepts);
+			exit (1);
+		}
+		/* Users await the slave pty to be referenced in the 2nd line */
+		printf("Awaiting client connects on\n%s\n", namepts);
+		if (!verbose){
+			fflush(stdout);
+			fflush(stderr);
+			close(0);
+			close(1);
+			close(2);
+		}
+	}
+	signal(SIGHUP, restore_ifflags);
+	signal(SIGINT, restore_ifflags);
+	signal(SIGTERM, restore_ifflags);
+	signal(SIGQUIT, restore_ifflags);
+	signal(SIGUSR1, restore_ifflags);
+	signal(SIGUSR2, restore_ifflags);
+
+	for (;;) {
+		if (tcgetattr(fdpty, &termios))
+			die("tcgetattr");
+		termios.c_iflag = IGNBRK;
+		termios.c_oflag = 0;
+		termios.c_lflag = 0;
+		termios.c_cflag &= ~(CSIZE|CSTOPB|PARENB|HUPCL|CRTSCTS);
+		termios.c_cflag |= CS8|CREAD|CLOCAL;
+		if (tcsetattr(fdpty, TCSANOW, &termios))
+			die("tsgetattr");
+		if (doio(fdif, fdpty, name_iface))
+			break;
+		if (i_am_unix98_pty_master) {
+			if (verbose)
+				printf("%s: Trying to poll port ptmx (slave %s).\nWaiting 30s...\n", progname, namepts);
+			syslog(LOG_WARNING, "Trying to poll port ptmx (slave %s). Waiting 30s...\n", namepts);
+			sleep(30);
+		} else {
+			/*
+			 * try to reopen master
+		 	 */
+			if (verbose)
+				printf("reopening master tty: %s\n", master_name);
+			close(fdpty);
+
+			if ((fdpty = open(master_name, O_RDWR | O_NOCTTY | O_NONBLOCK)) < 0) {
+				fprintf(stderr, "%s: cannot reopen \"%s\"\n", progname,
+					master_name);
+				exit(1);
+			}
+		}
+	}
+
+	restore_ifflags(0);
+	exit(0);
+}
+
+/* --------------------------------------------------------------------- */
diff --git a/kiss/spattach.8 b/kiss/spattach.8
new file mode 100644
index 0000000..2a2db22
--- /dev/null
+++ b/kiss/spattach.8
@@ -0,0 +1 @@
+.so man8/kissattach.8
diff --git a/missing b/missing
new file mode 100755
index 0000000..86a8fc3
--- /dev/null
+++ b/missing
@@ -0,0 +1,331 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2012-01-06.13; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program 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 2, or (at your option)
+# any later version.
+
+# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te*)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison*|yacc*)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG=\${$#}
+	case $LASTARG in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f y.tab.h; then
+	echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex*|flex*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG=\${$#}
+	case $LASTARG in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f lex.yy.c; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit $?
+    fi
+    ;;
+
+  makeinfo*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+	/^@setfilename/{
+	  s/.* \([^ ]*\) *$/\1/
+	  p
+	  q
+	}' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/netrom/Makefile.am b/netrom/Makefile.am
new file mode 100644
index 0000000..0678996
--- /dev/null
+++ b/netrom/Makefile.am
@@ -0,0 +1,33 @@
+
+etcfiles = nrbroadcast 
+
+installconf:
+	$(mkinstalldirs) $(DESTDIR)$(AX25_SYSCONFDIR)
+	@list='$(etcfiles)'; for p in $$list; do \
+	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p"; \
+	  $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p; \
+	done
+
+
+sbin_PROGRAMS = netromd nodesave nrattach nrparms nrsdrv
+
+LDADD = $(AX25_LIB)
+
+man_MANS = netrom.4 nrbroadcast.5 netromd.8 nodesave.8 \
+	   nrattach.8 nrparms.8 nrsdrv.8
+
+EXTRA_DIST = $(man_MANS) $(etcfiles)
+
+netromd_SOURCES = \
+	netromd.c \
+	netromd.h \
+	netromr.c \
+	netromt.c 
+
+
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR=${sysconfdir}/ax25/
+AX25_LOCALSTATEDIR=${localstatedir}/ax25/
+
diff --git a/netrom/Makefile.in b/netrom/Makefile.in
new file mode 100644
index 0000000..a515c54
--- /dev/null
+++ b/netrom/Makefile.in
@@ -0,0 +1,737 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+sbin_PROGRAMS = netromd$(EXEEXT) nodesave$(EXEEXT) nrattach$(EXEEXT) \
+	nrparms$(EXEEXT) nrsdrv$(EXEEXT)
+subdir = netrom
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man4dir)" \
+	"$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
+PROGRAMS = $(sbin_PROGRAMS)
+am_netromd_OBJECTS = netromd.$(OBJEXT) netromr.$(OBJEXT) \
+	netromt.$(OBJEXT)
+netromd_OBJECTS = $(am_netromd_OBJECTS)
+netromd_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+netromd_DEPENDENCIES = $(am__DEPENDENCIES_1)
+nodesave_SOURCES = nodesave.c
+nodesave_OBJECTS = nodesave.$(OBJEXT)
+nodesave_LDADD = $(LDADD)
+nodesave_DEPENDENCIES = $(am__DEPENDENCIES_1)
+nrattach_SOURCES = nrattach.c
+nrattach_OBJECTS = nrattach.$(OBJEXT)
+nrattach_LDADD = $(LDADD)
+nrattach_DEPENDENCIES = $(am__DEPENDENCIES_1)
+nrparms_SOURCES = nrparms.c
+nrparms_OBJECTS = nrparms.$(OBJEXT)
+nrparms_LDADD = $(LDADD)
+nrparms_DEPENDENCIES = $(am__DEPENDENCIES_1)
+nrsdrv_SOURCES = nrsdrv.c
+nrsdrv_OBJECTS = nrsdrv.$(OBJEXT)
+nrsdrv_LDADD = $(LDADD)
+nrsdrv_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(netromd_SOURCES) nodesave.c nrattach.c nrparms.c nrsdrv.c
+DIST_SOURCES = $(netromd_SOURCES) nodesave.c nrattach.c nrparms.c \
+	nrsdrv.c
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man4dir = $(mandir)/man4
+man5dir = $(mandir)/man5
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+etcfiles = nrbroadcast 
+LDADD = $(AX25_LIB)
+man_MANS = netrom.4 nrbroadcast.5 netromd.8 nodesave.8 \
+	   nrattach.8 nrparms.8 nrsdrv.8
+
+EXTRA_DIST = $(man_MANS) $(etcfiles)
+netromd_SOURCES = \
+	netromd.c \
+	netromd.h \
+	netromr.c \
+	netromt.c 
+
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR = ${sysconfdir}/ax25/
+AX25_LOCALSTATEDIR = ${localstatedir}/ax25/
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu netrom/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu netrom/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+netromd$(EXEEXT): $(netromd_OBJECTS) $(netromd_DEPENDENCIES) $(EXTRA_netromd_DEPENDENCIES) 
+	@rm -f netromd$(EXEEXT)
+	$(LINK) $(netromd_OBJECTS) $(netromd_LDADD) $(LIBS)
+nodesave$(EXEEXT): $(nodesave_OBJECTS) $(nodesave_DEPENDENCIES) $(EXTRA_nodesave_DEPENDENCIES) 
+	@rm -f nodesave$(EXEEXT)
+	$(LINK) $(nodesave_OBJECTS) $(nodesave_LDADD) $(LIBS)
+nrattach$(EXEEXT): $(nrattach_OBJECTS) $(nrattach_DEPENDENCIES) $(EXTRA_nrattach_DEPENDENCIES) 
+	@rm -f nrattach$(EXEEXT)
+	$(LINK) $(nrattach_OBJECTS) $(nrattach_LDADD) $(LIBS)
+nrparms$(EXEEXT): $(nrparms_OBJECTS) $(nrparms_DEPENDENCIES) $(EXTRA_nrparms_DEPENDENCIES) 
+	@rm -f nrparms$(EXEEXT)
+	$(LINK) $(nrparms_OBJECTS) $(nrparms_LDADD) $(LIBS)
+nrsdrv$(EXEEXT): $(nrsdrv_OBJECTS) $(nrsdrv_DEPENDENCIES) $(EXTRA_nrsdrv_DEPENDENCIES) 
+	@rm -f nrsdrv$(EXEEXT)
+	$(LINK) $(nrsdrv_OBJECTS) $(nrsdrv_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netromd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netromr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netromt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nodesave.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nrattach.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nrparms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nrsdrv.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man4: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man4dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man4dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man4dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.4[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man4dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man4dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man4:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man4dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.4[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man4dir)'; $(am__uninstall_files_from_dir)
+install-man5: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man5dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.5[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man5:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man5dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.5[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
+install-man8: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man8dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.8[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man8:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man8dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.8[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man4 install-man5 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-man uninstall-sbinPROGRAMS
+
+uninstall-man: uninstall-man4 uninstall-man5 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-sbinPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-man4 install-man5 \
+	install-man8 install-pdf install-pdf-am install-ps \
+	install-ps-am install-sbinPROGRAMS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-man uninstall-man4 uninstall-man5 \
+	uninstall-man8 uninstall-sbinPROGRAMS
+
+
+installconf:
+	$(mkinstalldirs) $(DESTDIR)$(AX25_SYSCONFDIR)
+	@list='$(etcfiles)'; for p in $$list; do \
+	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p"; \
+	  $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p; \
+	done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/netrom/netrom.4 b/netrom/netrom.4
new file mode 100644
index 0000000..cceae77
--- /dev/null
+++ b/netrom/netrom.4
@@ -0,0 +1,50 @@
+.TH NETROM 4 "25 July 1996" Linux "Linux Programmer's Manual"
+.SH NAME
+AF_NETROM \- NET/ROM amateur packet radio protocol family
+.SH DESCRIPTION
+.LP
+.B NET/ROM
+is a protocol used extensively by radio amateurs. The Linux
+NET/ROM protocol family permits access to these protocols via
+the standard networking
+.B socket
+metaphor.
+.LP
+The NET/ROM protocol layer only supports connected mode. IP traffic may be
+stacked on top of NET/ROM frames using a non-standard extension to the
+NET/ROM protocol.
+.LP
+The only mode of operation is connected mode which is the mode used for a
+socket of type SOCK_SEQPACKET (stream sockets are not available in NET/ROM).
+This requires that the user ensures output data is suitably packetised, and
+that input data is read a packet at a time into a buffer of suitable size.
+.LP
+NET/ROM addresses consist of 6 ascii characters and a number called the
+SSID. These are encoded into a sockaddr_ax25 structure which is provided to
+the relevant system calls.
+.LP
+NET/ROM has some unusual properties. Notably in a multi-user system an AX.25
+address is often associated with a user, and some users may not have such an
+association. a set of ioctl calls are provided to manage an association
+table.
+.LP 
+NET/ROM supports the following socket options for SOL_NETROM. NETROM_T1 is
+the T1 timer in 1/10ths of a second, NETROM_T2 is the T2 timer in 1/10ths of
+a second. NETROM_N2, the retry counter is also configurable. There is no 'infinite
+retry' option supported however. It is possible for an application
+to request that the NET/ROM layer return the NET/ROM header as well as the
+application data, this is done via the NETROM_HDRINCL socket option.
+.SH "SEE ALSO"
+.BR call (1),
+.BR socket (2),
+.BR setsockopt(2),
+.BR getsockopt(2),
+.BR nrbroadcast (5),
+.BR nrports (5),
+.BR netromd (8),
+.BR noderest (8),
+.BR nodesave (8),
+.BR nrparms (8).
+.LP
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/netrom/netromd.8 b/netrom/netromd.8
new file mode 100644
index 0000000..ef1860e
--- /dev/null
+++ b/netrom/netromd.8
@@ -0,0 +1,97 @@
+.TH NETROMD 8 "20 August 1996" Linux "Linux System Managers Manual"
+.SH NAME
+netromd \- Send and receive NET/ROM routing messages
+.SH SYNOPSIS
+.B netromd [-c] [-d] [-i] [-l] [-p pause] [-q quality] [-t interval] [-v]
+.SH DESCRIPTION
+.LP
+For a NET/ROM based network to operate correctly, a periodic broadcast of
+routing information needs to occur. Typically this occurs once every hour on
+every port which is expected to carry NET/ROM traffic. The purpose of
+.B netromd
+is to send and receive NET/ROM routing broadcasts. To operate correctly a
+set of parameters that corresponds to each AX.25 port needs to be passed to
+the program. This information is encoded in a configuration file, by default
+which is /etc/ax25/nrbroadcast with each line representing one
+port, see the manual page for
+.BR nrbroadcast (5).
+.LP
+To cut down the length of these routing broadcasts, only the information
+about the highest quality neighbour for a particular node is transmitted.
+The transmission is also limited to those node that have a certain minimum
+value in their obsolesence count, this value is decremented every time a
+routing broadcast is transmitted, and is refreshed by receiving a routing
+broadcast which contains that particular node.
+.LP
+The value of the default quality is traditionally assigned a value that
+represents the quality of the radio links on that port. A higher number
+representing better radio links with 255 (the maximum) reserved for wire
+connections. The practise in the UK is to set the default quality to a low
+value, typically 10, and manually set up the trusted neighbouring nodes in
+the neighbour list manually. The worst quality for auto-updates value is a
+way to filter out low quality (ie distant) nodes.
+.LP
+The verbose flag may be either 0 or 1, representing no and yes. By
+specifying no, the program will only generate a routing message containing
+information about the node on which it is running, by specifying the yes
+option, all the information in the nodes routing tables will be transmitted.
+The quality advertised for the other node callsigns on this machine may be
+set using the \-q option.
+.LP
+Between each transmission
+.B netromd
+pauses for five seconds (default) in order to avoid flooding the channels
+that it must broadcast on. The value of this delay is settable with the \-p
+option.
+.SH OPTIONS
+.TP 16
+.BI \-c
+Forces strict compliance to Software 2000 specifications. At present this
+only determines how node mnemonics with lower case characters will be handled.
+With compliance enabled mixed case node mnemonics will be ignored. The default
+is to accept node mnemonics of mixed case.
+.TP 16
+.BI \-d
+Switches on debugging messages, the default is off. Logging must be enabled
+for them to be output.
+.TP 16
+.BI \-i
+Transmit a routing broadcast immediately, the default is to wait for the
+time interval to elapse before transmitting the first routing broadcast.
+.TP 16
+.BI \-l
+Enables logging of errors and debug messages to the system log. The default
+is off.
+.TP 16
+.BI "\-p pause"
+Sets the delay between transmissions of individual routing broadcast
+packets. The default is five seconds.
+.TP 16
+.BI "\-q quality"
+Sets the quality of the subsidiary nodes relative to the main node. The
+default is 255.
+.TP 16
+.BI "\-t interval"
+The time interval between routing broadcasts, in minutes. The default is 60
+minutes.
+.TP 16
+.BI \-v
+Display the version.
+.SH FILES
+.nf
+/proc/net/nr_neigh
+.br
+/proc/net/nr_nodes
+.br
+/etc/ax25/axports
+.br
+/etc/ax25/nrbroadcast
+.fi
+.SH "SEE ALSO"
+.BR ax25 (4),
+.BR axports (5),
+.BR nrbroadcast (5),
+.BR netrom (4),
+.BR nrparms (8).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/netrom/netromd.c b/netrom/netromd.c
new file mode 100644
index 0000000..e7a0362
--- /dev/null
+++ b/netrom/netromd.c
@@ -0,0 +1,261 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <signal.h>
+#include <time.h>
+#include <sys/time.h>
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+#include <net/if.h>
+
+#ifdef __GLIBC__ 
+#include <net/ethernet.h>
+#else
+#include <linux/if_ether.h>
+#endif
+
+#include <netax25/ax25.h>
+#include <netrom/netrom.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/daemon.h>
+#include <netax25/nrconfig.h>
+
+#include "../pathnames.h"
+#include "netromd.h"
+
+struct port_struct port_list[20];
+
+int port_count = FALSE;
+int compliant  = FALSE;
+int logging    = FALSE;
+int debug      = 0;
+
+ax25_address my_call;
+ax25_address node_call;
+
+static void terminate(int sig)
+{
+	if (logging) {
+		syslog(LOG_INFO, "terminating on SIGTERM\n");
+		closelog();
+	}
+	
+	exit(0);
+}
+
+static int bcast_config_load_ports(void)
+{
+	char buffer[255], port[32], *s;
+	FILE *fp;
+	
+	if ((fp = fopen(CONF_NETROMD_FILE, "r")) == NULL) {
+		fprintf(stderr, "netromd: cannot open config file\n");
+		return -1;
+	}
+		
+	while (fgets(buffer, 255, fp) != NULL) {
+		if ((s = strchr(buffer, '\n')) != NULL)
+			*s = '\0';
+
+		if (strlen(buffer) == 0 || buffer[0] == '#')
+			continue;
+
+		if (sscanf(buffer, "%s %d %d %d %d",
+				port,
+				&port_list[port_count].minimum_obs,
+				&port_list[port_count].default_qual,
+				&port_list[port_count].worst_qual,
+				&port_list[port_count].verbose) == -1) {
+			fprintf(stderr, "netromd: unable to parse: %s", buffer);
+			return -1;
+		}
+
+		if (ax25_config_get_addr(port) == NULL) {
+			fprintf(stderr, "netromd: invalid port name - %s\n", port);
+			return -1;
+		}
+
+		port_list[port_count].port   = strdup(port);
+		port_list[port_count].device = strdup(ax25_config_get_dev(port_list[port_count].port));
+
+		if (port_list[port_count].minimum_obs < 0 || port_list[port_count].minimum_obs > 6) {
+			fprintf(stderr, "netromd: invalid minimum obsolescence\n");
+			return -1;
+		}
+
+		if (port_list[port_count].default_qual < 0 || port_list[port_count].default_qual > 255) {
+			fprintf(stderr, "netromd: invalid default quality\n");
+			return -1;
+		}
+
+		if (port_list[port_count].worst_qual < 0 || port_list[port_count].worst_qual > 255) {
+			fprintf(stderr, "netromd: invalid worst quality\n");
+			return -1;
+		}
+
+		if (port_list[port_count].verbose != 0 && port_list[port_count].verbose != 1) {
+			fprintf(stderr, "netromd: invalid verbose setting\n");
+			return -1;
+		}
+		
+		port_count++;
+	}
+	
+	fclose(fp);
+
+	if (port_count == 0)
+		return -1;
+	
+	return 0;	
+}
+
+int main(int argc, char **argv)
+{
+	unsigned char buffer[512];
+	int size, s, i;
+	struct sockaddr sa;
+	socklen_t asize;
+	struct timeval timeout;
+	time_t timenow, timelast;
+	int interval = 3600;
+	int localval = 255;
+	int pause    = 5;
+	fd_set fdset;
+
+	time(&timelast);
+
+	while ((i = getopt(argc, argv, "cdilp:q:t:v")) != -1) {
+		switch (i) {
+			case 'c':
+				compliant = TRUE;
+				break;
+			case 'd':
+				debug++;
+				break;
+			case 'i':
+				timelast = 0;
+				break;
+			case 'l':
+				logging = TRUE;
+				break;
+			case 'p':
+				pause = atoi(optarg);
+				if (pause < 1 || pause > 120) {
+					fprintf(stderr, "netromd: invalid pause value\n");
+					return 1;
+				}
+				break;
+			case 'q':
+				localval = atoi(optarg);
+				if (localval < 10 || localval > 255) {
+					fprintf(stderr, "netromd: invalid local quality\n");
+					return 1;
+				}
+				break;
+			case 't':
+				interval = atoi(optarg) * 60;
+				if (interval < 60 || interval > 7200) {
+					fprintf(stderr, "netromd: invalid time interval\n");
+					return 1;
+				}
+				break;
+			case 'v':
+				printf("netromd: %s\n", VERSION);
+				return 0;
+			case '?':
+			case ':':
+				fprintf(stderr, "usage: netromd [-d] [-i] [-l] [-q quality] [-t interval] [-v]\n");
+				return 1;
+		}
+	}
+
+	signal(SIGTERM, terminate);
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "netromd: no AX.25 ports defined\n");
+		return 1;
+	}
+	
+	if (nr_config_load_ports() == 0) {
+		fprintf(stderr, "netromd: no NET/ROM ports defined\n");
+		return 1;
+	}
+
+	if (bcast_config_load_ports() == -1) {
+		fprintf(stderr, "netromd: no NET/ROM broadcast ports defined\n");
+		return 1;
+	}
+
+	ax25_aton_entry(nr_config_get_addr(NULL), (char *)&my_call);
+	ax25_aton_entry("NODES", (char *)&node_call);
+	
+	if ((s = socket(PF_PACKET, SOCK_PACKET, htons(ETH_P_AX25))) == -1) {
+		perror("netromd: socket");
+		return 1;
+	}
+
+	if (!daemon_start(TRUE)) {
+		fprintf(stderr, "netromd: cannot become a daemon\n");
+		return 1;
+	}
+	
+	if (logging) {
+		openlog("netromd", LOG_PID, LOG_DAEMON);
+		syslog(LOG_INFO, "starting");
+	}
+
+	for (;;) {
+		FD_ZERO(&fdset);
+		FD_SET(s, &fdset);
+
+		timeout.tv_sec  = 30;
+		timeout.tv_usec = 0;
+	
+		if (select(s + 1, &fdset, NULL, NULL, &timeout) == -1)
+			continue;		/* Signal received ? */
+
+		if (FD_ISSET(s, &fdset)) {
+			asize = sizeof(sa);
+
+			if ((size = recvfrom(s, buffer, sizeof(buffer), 0, &sa, &asize)) == -1) {
+				if (logging) {
+					syslog(LOG_ERR, "recvfrom: %m");
+					closelog();
+				}
+				return 1;
+			}
+
+			if (ax25_cmp((ax25_address *)(buffer + 1), &node_call) == 0 &&
+			    ax25_cmp((ax25_address *)(buffer + 8), &my_call)   != 0 && 
+			    buffer[16] == NETROM_PID && buffer[17] == NODES_SIG) {
+				for (i = 0; i < port_count; i++) {
+					if (strcmp(port_list[i].device, sa.sa_data) == 0) {
+						if (debug && logging)
+							syslog(LOG_DEBUG, "receiving NODES broadcast on port %s from %s\n", port_list[i].port, ax25_ntoa((ax25_address *)(buffer + 8)));
+						receive_nodes(buffer + 18, size - 18, (ax25_address *)(buffer + 8), i);
+						break;
+					}
+				}
+			}
+		}
+
+		time(&timenow);
+
+		if ((timenow - timelast) > interval) {
+			timelast = timenow;
+			transmit_nodes(localval, pause);
+		}
+	}
+}
diff --git a/netrom/netromd.h b/netrom/netromd.h
new file mode 100644
index 0000000..3007b02
--- /dev/null
+++ b/netrom/netromd.h
@@ -0,0 +1,41 @@
+#ifndef	TRUE
+#define	TRUE	1
+#endif
+#ifndef	FALSE
+#define	FALSE	0
+#endif
+
+#define	NETROM_PID	0xCF
+
+#define	NODES_SIG	0xFF
+
+#define	CALLSIGN_LEN	7
+#define	MNEMONIC_LEN	6
+#define	QUALITY_LEN	1
+
+#define	NODES_PACLEN	256
+#define	ROUTE_LEN	(CALLSIGN_LEN+MNEMONIC_LEN+CALLSIGN_LEN+QUALITY_LEN)
+
+struct port_struct {
+	char *device;
+	char *port;
+	int  minimum_obs;
+	int  default_qual;
+	int  worst_qual;
+	int  verbose;
+};
+
+extern struct port_struct port_list[];
+
+extern int port_count;
+extern int debug;
+extern int logging;
+
+extern ax25_address my_call;
+extern ax25_address node_call;
+
+/* In netromt.c */
+extern void transmit_nodes(int, int);
+
+/* In netromr.c */
+extern void receive_nodes(unsigned char *, int, ax25_address *, int);
diff --git a/netrom/netromr.c b/netrom/netromr.c
new file mode 100644
index 0000000..9ed716f
--- /dev/null
+++ b/netrom/netromr.c
@@ -0,0 +1,246 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <string.h>
+#include <syslog.h>
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <net/if.h>
+
+#ifdef __GLIBC__ 
+#include <net/ethernet.h>
+#else
+#include <linux/if_ether.h>
+#endif
+
+#include <netax25/ax25.h>
+#include <netrom/netrom.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include "../pathnames.h"
+
+#include "netromd.h"
+
+extern int compliant;
+
+static int validcallsign(ax25_address *a)
+{
+	char c;
+	int n, end = 0;
+
+	for (n = 0; n < 6; n++) {
+		c = (a->ax25_call[n] >> 1) & 0x7F;
+
+		if (!end && (isupper(c) || isdigit(c)))
+			continue;
+
+		if (c == ' ') {
+			end = 1;
+			continue;
+		}
+
+		return FALSE;
+        }
+
+	return TRUE;
+}
+
+static int validmnemonic(char *mnemonic)
+{
+	if (compliant) {
+		if (strspn(mnemonic, "#_&-/ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") == strlen(mnemonic))
+			return TRUE;
+	} else {
+		if (strspn(mnemonic, "#_&-/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") == strlen(mnemonic))
+			return TRUE;
+	}
+
+	return FALSE;
+}
+
+static int add_node(int s, unsigned char *buffer, struct nr_route_struct *nr_node, int quality, int index)
+{
+	ax25_address best_neighbour;
+	int best_quality;
+	char *p;
+
+	memcpy(&nr_node->callsign, buffer + 0,  CALLSIGN_LEN);
+	memcpy(nr_node->mnemonic,  buffer + 7,  MNEMONIC_LEN);
+	memcpy(&best_neighbour,    buffer + 13, CALLSIGN_LEN);
+
+	best_quality = buffer[20];
+
+	nr_node->mnemonic[MNEMONIC_LEN] = '\0';
+	if ((p = strchr(nr_node->mnemonic, ' ')) != NULL)
+		*p = '\0';
+
+	if (!validcallsign(&nr_node->callsign)) {
+		if (debug && logging)
+			syslog(LOG_DEBUG, "netromr: add_node: invalid node callsign - %s", ax25_ntoa(&nr_node->callsign));
+		return -1;
+	}
+
+	if (!validmnemonic(nr_node->mnemonic)) {
+		if (debug && logging)
+			syslog(LOG_DEBUG, "netromr: add_node: invalid mnemonic - %s", nr_node->mnemonic);
+		return -1;
+	}
+
+	if (!validcallsign(&best_neighbour)) {
+		if (debug && logging)
+			syslog(LOG_DEBUG, "netromr: add_node: invalid best neighbour callsign - %s", ax25_ntoa(&best_neighbour));
+		return -1;
+	}
+
+	if (ax25_cmp(&my_call, &best_neighbour) == 0) {
+		if (debug && logging)
+			syslog(LOG_DEBUG, "netromr: add_node: route to me");
+		return FALSE;
+	}
+
+	if (best_quality < port_list[index].worst_qual) {
+		if (debug && logging)
+			syslog(LOG_DEBUG, "netromr: add_node: quality less than worst_qual");
+		return FALSE;
+	}
+
+	nr_node->quality = ((quality * best_quality) + 128) / 256;
+
+	/* log this only when logging verbosely */
+	if (debug > 1 && logging) {
+		syslog(LOG_DEBUG, "Node update: %s:%s",
+		       ax25_ntoa(&nr_node->callsign), nr_node->mnemonic);
+		syslog(LOG_DEBUG, "Neighbour: %s device: %s",
+		       ax25_ntoa(&nr_node->neighbour), nr_node->device);
+		syslog(LOG_DEBUG, "Quality: %d obs: %d ndigis: %d",
+		       nr_node->quality, nr_node->obs_count, nr_node->ndigis);
+	}
+
+	if (ioctl(s, SIOCADDRT, nr_node) == -1) {
+		if (logging)
+			syslog(LOG_ERR, "netromr: SIOCADDRT: %m");
+		return -1;
+	}
+
+	return TRUE;
+}
+
+void receive_nodes(unsigned char *buffer, int length, ax25_address *neighbour, int index)
+{
+	struct nr_route_struct nr_node;
+	char neigh_buffer[90], *portcall, *p;
+	FILE *fp;
+	int s;
+	int quality, obs_count, qual, lock;
+	char *addr, *callsign, *device;
+
+	if (!validcallsign(neighbour)) {
+		if (debug && logging)
+			syslog(LOG_DEBUG, "rejecting frame, invalid neighbour callsign - %s\n", ax25_ntoa(neighbour));
+		return;
+	}
+
+	nr_node.type   = NETROM_NODE;
+	nr_node.ndigis = 0;
+
+	sprintf(neigh_buffer, "%s/obsolescence_count_initialiser", PROC_NR_SYSCTL_DIR);
+
+	if ((fp = fopen(neigh_buffer, "r")) == NULL) {
+		if (logging)
+			syslog(LOG_ERR, "netromr: cannot open %s\n", neigh_buffer);
+		return;
+	}
+
+	fgets(neigh_buffer, 90, fp);
+	
+	obs_count = atoi(neigh_buffer);
+
+	fclose(fp);
+
+	if ((s = socket(AF_NETROM, SOCK_SEQPACKET, 0)) < 0) {
+		if (logging)
+			syslog(LOG_ERR, "netromr: socket: %m");
+		return;
+	}
+
+	if ((fp = fopen(PROC_NR_NEIGH_FILE, "r")) == NULL) {
+		if (logging)
+			syslog(LOG_ERR, "netromr: cannot open %s\n", PROC_NR_NEIGH_FILE);
+		close(s);
+		return;
+	}
+
+	fgets(neigh_buffer, 90, fp);
+	
+	portcall = ax25_ntoa(neighbour);
+
+	quality = port_list[index].default_qual;
+
+	while (fgets(neigh_buffer, 90, fp) != NULL) {
+		addr     = strtok(neigh_buffer, " ");
+		callsign = strtok(NULL, " ");
+		device   = strtok(NULL, " ");
+		qual     = atoi(strtok(NULL, " "));
+		lock     = atoi(strtok(NULL, " "));
+
+		if (strcmp(callsign, portcall) == 0 &&
+		    strcmp(device, port_list[index].device) == 0 &&
+		    lock == 1) {
+			quality = qual;
+			break;
+		}
+	}
+
+	fclose(fp);
+
+	nr_node.callsign    = *neighbour;
+	memcpy(nr_node.mnemonic, buffer, MNEMONIC_LEN);
+	nr_node.mnemonic[MNEMONIC_LEN] = '\0';
+
+	if ((p = strchr(nr_node.mnemonic, ' ')) != NULL)
+		*p = '\0';
+
+	if (!validmnemonic(nr_node.mnemonic)) {
+		if (debug && logging)
+			syslog(LOG_DEBUG, "rejecting route, invalid mnemonic - %s\n", nr_node.mnemonic);
+	} else {
+		nr_node.neighbour   = *neighbour;
+		strcpy(nr_node.device, port_list[index].device);
+		nr_node.quality     = quality;
+		nr_node.obs_count   = obs_count;
+
+		if (ioctl(s, SIOCADDRT, &nr_node) == -1) {
+			if (logging)
+				syslog(LOG_ERR, "netromr: SIOCADDRT: %m");
+			close(s);
+			return;
+		}
+	}
+
+	buffer += MNEMONIC_LEN;
+	length -= MNEMONIC_LEN;
+
+	while (length >= ROUTE_LEN) {
+		nr_node.neighbour   = *neighbour;
+		strcpy(nr_node.device, port_list[index].device);
+		nr_node.obs_count   = obs_count;
+
+		if (add_node(s, buffer, &nr_node, quality, index) == -1) {
+			close(s);
+			return;
+		}
+
+		buffer += ROUTE_LEN;
+		length -= ROUTE_LEN;
+	}
+
+	close(s);
+}
diff --git a/netrom/netromt.c b/netrom/netromt.c
new file mode 100644
index 0000000..b3f99b3
--- /dev/null
+++ b/netrom/netromt.c
@@ -0,0 +1,271 @@
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <syslog.h>
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+
+#include <netax25/ax25.h>
+#include <netrom/netrom.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/nrconfig.h>
+
+#include "../pathnames.h"
+#include "netromd.h"
+
+static int build_header(unsigned char *message)
+{
+	message[0] = NODES_SIG;
+	
+	strcpy(message + 1, nr_config_get_alias(NULL));
+	strncat(message + 1, "       ", MNEMONIC_LEN - strlen(message + 1));
+
+	return 7;
+}
+
+static void build_mine(int s, struct full_sockaddr_ax25 *dest, int dlen, int localval, int pause)
+{
+	unsigned char message[100];
+	char buffer[255], *port, *p;
+	FILE *fp;
+	int len;
+
+	len = build_header(message);
+
+	if ((fp = fopen(CONF_NRPORTS_FILE, "r")) == NULL) {
+		if (logging)
+			syslog(LOG_ERR, "netromt: cannot open nrports file\n");
+		return;
+	}
+
+	while (fgets(buffer, 255, fp) != NULL) {
+		if ((p = strchr(buffer, '\n')) != NULL)
+			*p = '\0';
+
+		if (strlen(buffer) == 0 || buffer[0] == '#')
+			continue;
+
+		port = strtok(buffer, " \t");
+
+		if (nr_config_get_addr(port) == NULL)
+			continue;
+
+		if (strcmp(nr_config_get_addr(port), nr_config_get_addr(NULL)) == 0)
+			continue;
+
+		if (ax25_aton_entry(nr_config_get_addr(port), message + len) == -1) {
+			if (logging)
+				syslog(LOG_ERR, "netromt: invalid callsign in nrports\n");
+			fclose(fp);
+			return;
+		}
+		len += CALLSIGN_LEN;
+
+		strcpy(message + len, nr_config_get_alias(port));
+		strncat(message + len, "       ", MNEMONIC_LEN - strlen(message + len));
+		len += MNEMONIC_LEN;
+
+		ax25_aton_entry(nr_config_get_addr(NULL), message + len);
+		len += CALLSIGN_LEN;
+
+		message[len] = localval;
+		len += QUALITY_LEN;
+	}
+
+	fclose(fp);
+	
+	if (sendto(s, message, len, 0, (struct sockaddr *)dest, dlen) == -1) {
+		if (logging)
+			syslog(LOG_ERR, "netromt: sendto: %m");
+	}
+	
+	sleep(pause);
+}
+
+static void build_others(int s, int min_obs, struct full_sockaddr_ax25 *dest, int dlen, int port, int pause)
+{
+	unsigned char message[300];
+	FILE *fpnodes, *fpneigh;
+	char nodes_buffer[90];
+	char neigh_buffer[90];
+	char *callsign, *mnemonic, *neighbour;
+	int  which, number, quality, neigh_no, obs_count;
+	int  olen, len;
+
+	if ((fpnodes = fopen(PROC_NR_NODES_FILE, "r")) == NULL) {
+		if (logging)
+			syslog(LOG_ERR, "netromt: cannot open %s\n", PROC_NR_NODES_FILE);
+		return;
+	}
+
+	if ((fpneigh = fopen(PROC_NR_NEIGH_FILE, "r")) == NULL) {
+		if (logging)
+			syslog(LOG_ERR, "netromt: cannot open %s\n", PROC_NR_NEIGH_FILE);
+		fclose(fpnodes);
+		return;
+	}
+
+	fgets(nodes_buffer, 90, fpnodes);
+
+	do {
+		len = olen = build_header(message);
+
+		while (fgets(nodes_buffer, 90, fpnodes) != NULL) {
+			callsign  = strtok(nodes_buffer, " ");
+			mnemonic  = strtok(NULL, " ");
+			which     = atoi(strtok(NULL, " "));
+			number    = atoi(strtok(NULL, " "));
+			quality   = atoi(strtok(NULL, " "));
+			obs_count = atoi(strtok(NULL, " "));
+			neigh_no  = atoi(strtok(NULL, " "));
+			neighbour = NULL;
+			
+			if (obs_count < min_obs || quality == 0) continue;
+
+			/* "Blank" mnemonic */
+			if (strcmp(mnemonic, "*") == 0)
+				mnemonic = "";
+
+			fseek(fpneigh, 0L, SEEK_SET);
+
+			fgets(neigh_buffer, 90, fpneigh);
+			
+			while (fgets(neigh_buffer, 90, fpneigh) != NULL) {
+				if (atoi(strtok(neigh_buffer, " ")) == neigh_no) {
+					neighbour = strtok(NULL, " ");
+					break;
+				}
+			}
+
+			if (neighbour == NULL) {
+				if (logging)
+					syslog(LOG_ERR, "netromt: corruption in nodes/neighbour matching\n");
+				continue;
+			}
+
+			if (ax25_aton_entry(callsign, message + len) == -1) {
+				if (logging)
+					syslog(LOG_ERR, "netromt: invalid callsign '%s' in /proc/net/nr_nodes\n", callsign);
+				continue;
+			}
+			len += CALLSIGN_LEN;
+
+			strcpy(message + len, mnemonic);
+			strncat(message + len, "       ", MNEMONIC_LEN - strlen(message + len));
+			len += MNEMONIC_LEN;
+
+			if (ax25_aton_entry(neighbour, message + len) == -1) {
+				if (logging)
+					syslog(LOG_ERR, "netromt: invalid callsign '%s' in /proc/net/nr_neigh\n", neighbour);
+				len -= (CALLSIGN_LEN + MNEMONIC_LEN);
+				continue;
+			}
+			len += CALLSIGN_LEN;
+
+			message[len] = quality;		
+			len += QUALITY_LEN;
+
+			/* No room for another entry? */
+			if (len + ROUTE_LEN > NODES_PACLEN)
+				break;
+		}
+
+		/* Only send it if there is more that just the header */
+		if (len > olen) {
+			if (sendto(s, message, len, 0, (struct sockaddr *)dest, dlen) == -1) {
+				if (logging)
+					syslog(LOG_ERR, "netromt: sendto: %m");
+			}
+			
+			sleep(pause);
+		}
+
+	/* If the packet was not full then we are done */
+	} while (len + ROUTE_LEN > NODES_PACLEN);
+
+	fclose(fpnodes);
+	fclose(fpneigh);
+}
+
+void transmit_nodes(int localval, int pause)
+{
+	struct full_sockaddr_ax25 dest;
+	struct full_sockaddr_ax25 src;
+	int s, dlen, slen;
+	char path[25], *addr;
+	int i;
+
+	switch (fork()) {
+		case 0:
+			break;
+		case -1:
+			if (logging)
+				syslog(LOG_ERR, "netromt: fork: %m\n");
+			return;
+		default:
+			return;
+	}
+
+	dlen = ax25_aton("NODES", &dest);
+
+	for (i = 0; i < port_count; i++) {
+
+		addr = ax25_config_get_addr(port_list[i].port);
+
+		if (addr == NULL) continue;
+
+		if (debug && logging)
+			syslog(LOG_DEBUG, "transmitting NODES broadcast on port %s\n", port_list[i].port);
+
+		sprintf(path, "%s %s", nr_config_get_addr(NULL), addr);
+
+		ax25_aton(path, &src);
+		slen = sizeof(struct full_sockaddr_ax25);
+
+		if ((s = socket(AF_AX25, SOCK_DGRAM, NETROM_PID)) < 0) {
+			if (logging)
+				syslog(LOG_ERR, "netromt: socket: %m");
+			continue;
+		}
+
+		if (bind(s, (struct sockaddr *)&src, slen) == -1) {
+			if (logging)
+				syslog(LOG_ERR, "netromt: bind: %m");
+			close(s);
+			continue;
+		}
+
+		build_mine(s, &dest, dlen, localval, pause);
+
+		if (port_list[i].verbose)
+			build_others(s, port_list[i].minimum_obs, &dest, dlen, i, pause);
+
+		close(s);
+	}
+
+	if ((s = socket(AF_NETROM, SOCK_SEQPACKET, 0)) < 0) {
+		if (logging)
+			syslog(LOG_ERR, "netromt: socket: %m");
+		exit(1);
+	}
+
+	if (ioctl(s, SIOCNRDECOBS, &i) == -1) {
+		if (logging)
+			syslog(LOG_ERR, "netromt: SIOCNRDECOBS: %m");
+		exit(1);
+	}
+
+	close(s);
+
+	exit(0);
+}
diff --git a/netrom/nodesave.8 b/netrom/nodesave.8
new file mode 100644
index 0000000..7797fda
--- /dev/null
+++ b/netrom/nodesave.8
@@ -0,0 +1,39 @@
+.TH NODESAVE 8 "4 July 1999" Linux "Linux System Managers Manual"
+.SH NAME
+nodesave \- Saves NET/ROM routing information
+.SH SYNOPSIS
+.B nodesave [-p path] [-v] [filename]
+.SH DESCRIPTION
+.LP
+.B Nodesave
+saves the contents of the /proc filesystem entries for the NET/ROM routing
+tables. The output of the program is in the form of a Bourne shell script
+that calls nrparms(8) to recreate the NET/ROM routing information. If no
+filename is given on the command line, the program writes the script to
+stdout.
+.LP
+Typically
+.B nodesave
+would be used when taking a system off-air so that the NET/ROM routing may
+be quickly restored when the system is brought back on-line.
+.SH OPTIONS
+.TP 10
+.BI "\-p path"
+Set the path to the nrparms binary. This only affects the output of the
+program. Default is /usr/sbin.
+.TP 10
+.BI "\-v"
+Display the version.
+.SH FILES
+.nf
+/proc/net/nr_neigh
+.br
+/proc/net/nr_nodes
+.fi
+.SH "SEE ALSO"
+.BR netrom (4),
+.BR netromd (8),
+.BR nrparms (8).
+.LP
+.SH AUTHOR
+Tomi Manninen OH2BNS <oh2bns at sral.fi>
diff --git a/netrom/nodesave.c b/netrom/nodesave.c
new file mode 100644
index 0000000..1258c36
--- /dev/null
+++ b/netrom/nodesave.c
@@ -0,0 +1,160 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+
+#include <netax25/ax25.h>
+
+#include <netax25/axconfig.h>
+#include <netax25/nrconfig.h>
+
+#include <netax25/procutils.h>
+
+static char *Nrparms = "/usr/sbin/nrparms";
+static char *Usage   = "Usage: nodesave [-p <path>] [-v] [<file>]\n";
+
+int main(int argc, char **argv)
+{
+	FILE *fp = stdout;
+	struct proc_nr_nodes *nodes, *nop;
+	struct proc_nr_neigh *neighs, *nep;
+	char buf[256];
+	int s;
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "nodesave: no AX.25 port data configured\n");
+		return 1;
+	}
+
+	if (nr_config_load_ports() == 0) {
+		fprintf(stderr, "nodesave: no NET/ROM port data configured\n");
+		return 1;
+	}
+
+	while ((s = getopt(argc, argv, "p:v")) != -1) {
+		switch (s) {
+			case 'p':
+				sprintf(buf, "%s/nrparms", optarg);
+				Nrparms = strdup(buf);
+				break;
+			case 'v':
+				printf("nodesave: %s\n", VERSION);
+				return 0;
+			case ':':
+			case '?':
+				fputs(Usage, stderr);
+				return 1;
+		}
+	}
+
+	if ((argc - optind) > 1) {
+		fputs(Usage, stderr);
+		return 1;
+	}
+
+	if ((argc - optind) == 1) {
+		if ((fp = fopen(argv[optind], "w")) == NULL) {
+			fprintf(stderr, "nodesave: cannot open file %s\n", argv[optind]);
+			return 1;
+		}
+	}
+
+	if ((neighs = read_proc_nr_neigh()) == NULL && errno != 0) {
+		perror("nodesave: read_proc_nr_neigh");
+		fclose(fp);
+		return 1;
+	}
+
+	if ((nodes = read_proc_nr_nodes()) == NULL && errno != 0) {
+		perror("nodesave: read_proc_nr_nodes");
+		free_proc_nr_neigh(neighs);
+		fclose(fp);
+		return 1;
+	}
+
+	fprintf(fp, "#! /bin/sh\n#\n# Locked routes:\n#\n");
+
+	for (nep = neighs; nep != NULL; nep = nep->next) {
+		if (nep->lock) {
+			fprintf(fp, "%s -routes ", Nrparms);
+			sprintf(buf, "\"%s\"", ax25_config_get_name(nep->dev));
+			fprintf(fp, "%-8s %-9s + %d\n",
+				buf,
+				nep->call,
+				nep->qual);
+		}
+	}
+
+	fprintf(fp, "#\n# Nodes:\n#\n");
+
+	for (nop = nodes; nop != NULL; nop = nop->next) {
+		/*
+		 * nop->n == 0 indicates a local node with no routes.
+		 */
+		if (nop->n > 0 && (nep = find_neigh(nop->addr1, neighs)) != NULL) {
+			fprintf(fp, "%s -nodes %-9s + ",
+				Nrparms,
+				nop->call);
+			sprintf(buf, "\"%s\"", nop->alias);
+			fprintf(fp, "%-8s %-3d %d ",
+				buf,
+				nop->qual1,
+				nop->obs1);
+			sprintf(buf, "\"%s\"", ax25_config_get_name(nep->dev));
+			fprintf(fp, "%-8s %s\n",
+				buf,
+				nep->call);
+		}
+
+		if (nop->n > 1 && (nep = find_neigh(nop->addr2, neighs)) != NULL) {
+			fprintf(fp, "%s -nodes %-9s + ",
+				Nrparms,
+				nop->call);
+			sprintf(buf, "\"%s\"", nop->alias);
+			fprintf(fp, "%-8s %-3d %d ",
+				buf,
+				nop->qual2,
+				nop->obs2);
+			sprintf(buf, "\"%s\"", ax25_config_get_name(nep->dev));
+			fprintf(fp, "%-8s %s\n",
+				buf,
+				nep->call);
+		}
+
+		if (nop->n > 2 && (nep = find_neigh(nop->addr3, neighs)) != NULL) {
+			fprintf(fp, "%s -nodes %-9s + ",
+				Nrparms,
+				nop->call);
+			sprintf(buf, "\"%s\"", nop->alias);
+			fprintf(fp, "%-8s %-3d %d ",
+				buf,
+				nop->qual3,
+				nop->obs3);
+			sprintf(buf, "\"%s\"", ax25_config_get_name(nep->dev));
+			fprintf(fp, "%-8s %s\n",
+				buf,
+				nep->call);
+		}
+	}
+
+	free_proc_nr_neigh(neighs);
+	free_proc_nr_nodes(nodes);
+
+	fclose(fp);
+
+	if ((argc - optind) == 1) {
+		if (chmod(argv[optind], 0755) == -1) {
+			perror("nodesave: chmod");
+			return 1;
+		}
+	}
+
+	return 0;
+}
diff --git a/netrom/nrattach.8 b/netrom/nrattach.8
new file mode 100644
index 0000000..692e3f2
--- /dev/null
+++ b/netrom/nrattach.8
@@ -0,0 +1,39 @@
+.TH NRATTACH 8 "21 May 1996" Linux "Linux System Managers Manual"
+.SH NAME
+nrattach \- Start a NET/ROM interface
+.SH SYNOPSIS
+.B nrattach [-i inetaddr] [-m mtu] [-v] port
+.SH DESCRIPTION
+.LP
+.B Nrattach
+takes many of the parameters for the port from the nrports(5) file. The
+paclen parameter is used for the device mtu unless overridden by a value on
+the command line. The port argument is the name of a port as given in the
+nrports(5) file.
+.LP
+.B Nrattach
+tries to find the first free NET/ROM device in the system. The devices
+checked are nr0, nr1, nr2 and nr3 in that order. If no free NET/ROM device
+is available an error is generated and the program terminates.
+.SH OPTIONS
+.TP 16
+.BI "\-i inetaddr"
+Set the internet address of the interface. This address may either be a
+dotted decimal address or a host name.
+.TP 16
+.BI "\-m mtu"
+Sets the mtu of the interface. If this value is not given then the value is
+taken from the paclen parameter in nrports.
+.TP 16
+.BI \-v
+Display the version.
+.SH "SEE ALSO"
+.BR netrom (4),
+.BR nrparms (4),
+.BR nrports (5),
+.BR ifconfig (8).
+.SH BUGS
+The program can be run many times with the same arguments creating many
+instances of the same attributes on different devices. Not a good idea.
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/netrom/nrattach.c b/netrom/nrattach.c
new file mode 100644
index 0000000..49c5553
--- /dev/null
+++ b/netrom/nrattach.c
@@ -0,0 +1,244 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <termios.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <ctype.h>
+#include <netdb.h>
+
+#include <config.h>
+
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <net/if.h>
+#include <net/if_arp.h>
+
+
+#include <netax25/ax25.h>
+#include <netrom/netrom.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/nrconfig.h>
+
+#include "../pathnames.h"
+
+char *callsign;
+int  mtu   = 0;
+
+int readconfig(char *port)
+{
+	FILE *fp;
+	char buffer[90], *s;
+	int n = 0;
+	
+	if ((fp = fopen(CONF_NRPORTS_FILE, "r")) == NULL) {
+		fprintf(stderr, "nrattach: cannot open nrports file\n");
+		return FALSE;
+	}
+
+	while (fgets(buffer, 90, fp) != NULL) {
+		n++;
+	
+		if ((s = strchr(buffer, '\n')) != NULL)
+			*s = '\0';
+
+		if (strlen(buffer) > 0 && *buffer == '#')
+			continue;
+
+		if ((s = strtok(buffer, " \t\r\n")) == NULL) {
+			fprintf(stderr, "nrattach: unable to parse line %d of the nrports file\n", n);
+			return FALSE;
+		}
+		
+		if (strcmp(s, port) != 0)
+			continue;
+			
+		if ((s = strtok(NULL, " \t\r\n")) == NULL) {
+			fprintf(stderr, "nrattach: unable to parse line %d of the nrports file\n", n);
+			return FALSE;
+		}
+
+		callsign = strdup(s);
+
+		if ((s = strtok(NULL, " \t\r\n")) == NULL) {
+			fprintf(stderr, "nrattach: unable to parse line %d of the nrports file\n", n);
+			return FALSE;
+		}
+
+		if ((s = strtok(NULL, " \t\r\n")) == NULL) {
+			fprintf(stderr, "nrattach: unable to parse line %d of the nrports file\n", n);
+			return FALSE;
+		}
+
+		if (mtu == 0) {
+			if ((mtu = atoi(s)) <= 0) {
+				fprintf(stderr, "nrattach: invalid paclen setting\n");
+				return FALSE;
+			}
+		}
+
+		fclose(fp);
+		
+		return TRUE;
+	}
+	
+	fclose(fp);
+
+	fprintf(stderr, "nrattach: cannot find port %s in nrports\n", port);
+	
+	return FALSE;
+}
+
+int getfreedev(char *dev)
+{
+	struct ifreq ifr;
+	int fd;
+	int i;
+	
+	if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+		perror("nrattach: socket");
+		return FALSE;
+	}
+
+	for (i = 0; i < 4; i++) {
+		sprintf(dev, "nr%d", i);
+		strcpy(ifr.ifr_name, dev);
+	
+		if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
+			perror("nrattach: SIOCGIFFLAGS");
+			return FALSE;
+		}
+
+		if (!(ifr.ifr_flags & IFF_UP)) {
+			close(fd);
+			return TRUE;
+		}
+	}
+
+	close(fd);
+
+	return FALSE;
+}
+
+int startiface(char *dev, struct hostent *hp)
+{
+	struct ifreq ifr;
+	char call[7];
+	int fd;
+	
+	if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+		perror("nrattach: socket");
+		return FALSE;
+	}
+
+	strcpy(ifr.ifr_name, dev);
+	
+	if (hp != NULL) {
+		ifr.ifr_addr.sa_family = AF_INET;
+		
+		ifr.ifr_addr.sa_data[0] = 0;
+		ifr.ifr_addr.sa_data[1] = 0;
+		ifr.ifr_addr.sa_data[2] = hp->h_addr_list[0][0];
+		ifr.ifr_addr.sa_data[3] = hp->h_addr_list[0][1];
+		ifr.ifr_addr.sa_data[4] = hp->h_addr_list[0][2];
+		ifr.ifr_addr.sa_data[5] = hp->h_addr_list[0][3];
+		ifr.ifr_addr.sa_data[6] = 0;
+
+		if (ioctl(fd, SIOCSIFADDR, &ifr) < 0) {
+			perror("nrattach: SIOCSIFADDR");
+			return FALSE;
+		}
+	}
+
+	if (ax25_aton_entry(callsign, call) == -1)
+		return FALSE;
+
+	ifr.ifr_hwaddr.sa_family = ARPHRD_NETROM;
+	memcpy(ifr.ifr_hwaddr.sa_data, call, 7);
+	
+	if (ioctl(fd, SIOCSIFHWADDR, &ifr) != 0) {
+		perror("nrattach: SIOCSIFHWADDR");
+		return FALSE;
+	}
+
+	ifr.ifr_mtu = mtu;
+
+	if (ioctl(fd, SIOCSIFMTU, &ifr) < 0) {
+		perror("nrattach: SIOCSIFMTU");
+		return FALSE;
+	}
+
+	if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
+		perror("nrattach: SIOCGIFFLAGS");
+		return FALSE;
+	}
+
+	ifr.ifr_flags &= IFF_NOARP;
+	ifr.ifr_flags |= IFF_UP;
+	ifr.ifr_flags |= IFF_RUNNING;
+
+	if (ioctl(fd, SIOCSIFFLAGS, &ifr) < 0) {
+		perror("nrattach: SIOCSIFFLAGS");
+		return FALSE;
+	}
+	
+	close(fd);
+	
+	return TRUE;
+}
+	
+
+int main(int argc, char *argv[])
+{
+	int fd;
+	char dev[64];
+	struct hostent *hp = NULL;
+
+	while ((fd = getopt(argc, argv, "i:m:v")) != -1) {
+		switch (fd) {
+			case 'i':
+				if ((hp = gethostbyname(optarg)) == NULL) {
+					fprintf(stderr, "nrattach: invalid internet name/address - %s\n", optarg);
+					return 1;
+				}
+				break;
+			case 'm':
+				if ((mtu = atoi(optarg)) <= 0) {
+					fprintf(stderr, "nrattach: invalid mtu size - %s\n", optarg);
+					return 1;
+				}
+				break;
+			case 'v':
+				printf("nrattach: %s\n", VERSION);
+				return 0;
+			case ':':
+			case '?':
+				fprintf(stderr, "usage: nrattach [-i inetaddr] [-m mtu] [-v] port\n");
+				return 1;
+		}
+	}
+	
+	if ((argc - optind) != 1) {
+		fprintf(stderr, "usage: nrattach [-i inetaddr] [-m mtu] [-v] port\n");
+		return 1;
+	}
+
+	if (!readconfig(argv[optind]))
+		return 1;
+
+	if (!getfreedev(dev)) {
+		fprintf(stderr, "nrattach: cannot find free NET/ROM device\n");
+		return 1;
+	}
+	
+	if (!startiface(dev, hp))
+		return 1;		
+
+	printf("NET/ROM port %s bound to device %s\n", argv[optind], dev);
+		
+	return 0;
+}
diff --git a/netrom/nrbroadcast b/netrom/nrbroadcast
new file mode 100644
index 0000000..8584b22
--- /dev/null
+++ b/netrom/nrbroadcast
@@ -0,0 +1,8 @@
+# /etc/ax25/nrbroadcast
+#
+# The format of this file is:
+#
+# ax25_name min_obs def_qual worst_qual verbose
+#
+1	5	192	100	0
+2	5	255	100	1
diff --git a/netrom/nrbroadcast.5 b/netrom/nrbroadcast.5
new file mode 100644
index 0000000..7258bc7
--- /dev/null
+++ b/netrom/nrbroadcast.5
@@ -0,0 +1,49 @@
+.TH NRBROADCAST 5 "2 August 1996" Linux "Linux Programmer's Manual"
+.SH NAME
+nrbroadcast \- NET/ROM routing broadcast configuration file.
+.SH DESCRIPTION
+.LP
+.B Nrbroadcast
+is an ASCII file that contains information about each of the physical AX.25
+ports that are to have NET/ROM routing broadcasts transmitted from them.
+.LP
+Each line has the following format, each field being delimited by white space:
+.sp
+.RS
+port minobs defqual worstqual verbose
+.RE
+.sp
+The field descriptions are:
+.sp
+.RS
+.TP 14
+.B port
+the port name of the AX.25 port to broadcast on.
+.TP
+.B minobs
+this is the minimum obsolescence count of a routing table entry to be
+broadcast on this port.
+.TP
+.B defqual
+this is the default quality of an incoming routing broadcast from an unknown
+neighbour.
+.TP
+.B worstqual
+this is the worst quality node received from a routing broadcast that will
+be added to our routing table.
+.TP
+.B verbose
+whether the routes to all of my nodes in my routing table, or just the nodes
+resident on my machine are to be broadcast.
+.RE
+.SH FILES
+.LP
+/etc/ax25/nrbroadcast
+.br
+/etc/ax25/axports
+.SH "SEE ALSO"
+.BR call (1),
+.BR netrom (4),
+.BR axports (5),
+.BR netromd (8),
+.BR nrparms (8).
diff --git a/netrom/nrparms.8 b/netrom/nrparms.8
new file mode 100644
index 0000000..96b0a98
--- /dev/null
+++ b/netrom/nrparms.8
@@ -0,0 +1,75 @@
+.TH NRPARMS 8 "25 January 1997" Linux "Linux System Managers Manual"
+.SH NAME
+nrparms \- Configure the NET/ROM interface.
+.SH SYNOPSIS
+.B nrparms -nodes node +|- ident quality count port neighbour [digicall...]
+.LP
+.B nrparms -routes port nodecall [digicall...] +|- quality
+.LP
+.B nrparms -version
+.SH DESCRIPTION
+.LP
+This program is used to manipulate the routing tables of the NET/ROM network
+layer, or to get and set many of the network and transport layer parameters
+for the NET/ROM protocol. The program has three basic modes of operation,
+node setting, neighbour setting and general parameter setting. The syntax
+for the node and neighbour setting is taken from the original NET/ROM manual
+and is therefore not very UNIXy but should be familiar to those familiar
+with NET/ROMs or TheNet.
+.LP
+To set up a new route to a NET/ROM node in the routing tables you must use
+the nodes option. All of the parameters are needed to add the node. It is
+probably best to illustrate with an example:
+.LP
+.B 	nrparms -nodes GB7BPQ + NMCLUS 120 6 vhf G8ROU-3
+.LP
+This creates a new route to a distant node with the callsign GB7BPQ and the
+alias NMCLUS, it has a quality of 120 (out of 255) and has an obsolescence
+count of six and packets for that node should be sent on the AX.25 port named
+vhf to my immediate neighbour G8ROU-3. The callsigns of the node and the
+neighbour may be the same. For example to set up the node G8ROU-3 which is
+also my immediate neighbour, I would use:
+.LP
+.B 	nrparms -nodes G8ROU-3 + MATLCK 200 6 vhf G8ROU-3
+.LP
+If the ident of the remote node is not known, it is possible to add a
+node with a blank ident. To do this an ident of '*' must be entered on
+the command line. Because of the command line expansion that shells do, the *
+must be escaped by enclosing it in quotes.
+.LP
+It is also possible to remove a route to a distant node with the same
+command except that the + is replaced by a -. The other parameters must also
+be present. If the node has not other routes then the node will be deleted,
+and the neighbour node that the connections go via may also be deleted if no
+other node route uses it, and it is not a locked neighbour entry.
+.LP
+When setting up a new node, a new neighbour entry may also be created. This
+will have a default value. For that neighbour to be meaningful in the
+automatic routing process, it must have a more reasonable entry in the
+neighbours list. To do this the routes option of the command must be used.
+An example:
+.LP
+.B 	nrparms -routes ax0 G8ROU-3 + 120
+.LP
+This will create (or update) the neighbour entry for G8ROU-3 with a quality
+of 120 and it will be locked, it will not create a node entry for the
+neighbour. This quality will be used by the
+.BR netromd (8)
+program when calculating route qualities via this neighbour. Normally once a
+neighbour has zero node routes going via it, it will be deleted. Locking a
+neighbour prevents the deletion from occurring. To unlock a neighbour entry,
+the same command is used but with the + replaced by a -.
+.SH FILES
+.LP
+/etc/ax25/axports
+.br
+/etc/ax25/nrports
+.SH "SEE ALSO"
+.BR call (1),
+.BR netrom (4),
+.BR nrports (5),
+.BR axparms (8),
+.BR netromd (8),
+.BR nrparms (8).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/netrom/nrparms.c b/netrom/nrparms.c
new file mode 100644
index 0000000..ff8b60e
--- /dev/null
+++ b/netrom/nrparms.c
@@ -0,0 +1,238 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <netax25/ax25.h>
+#include <netrom/netrom.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/nrconfig.h>
+
+char nodes_usage[]  = "usage: nrparms -nodes nodecall +|- ident quality count port neighbour [digicall...]\n";
+char routes_usage[] = "usage: nrparms -routes port nodecall [digicall...] +|- pathquality\n";
+
+void nodes(int s, char *nodecall, char *op, char *ident, int quality, int count, char *port, char *neighbour, char *digis[])
+{
+	struct nr_route_struct nr_node;
+	char *p, *q, *dev;
+	int i;
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "nrparms: nodes: no AX.25 ports configured\n");
+		exit(1);
+	}
+
+	nr_node.type   = NETROM_NODE;
+	nr_node.ndigis = 0;
+
+	if (op[0] != '+' && op[0] != '-') {
+		fprintf(stderr, "nrparms: nodes: invalid operation %s\n", op);
+		close(s);
+		exit(1);
+	}
+
+	if (quality < 1 || quality > 255) {
+		fprintf(stderr, "nrparms: nodes: invalid quality %d\n", quality);
+		close(s);
+		exit(1);
+	}
+
+	if (count < 1 || count > 6) {
+		fprintf(stderr, "nrparms: nodes: invalid obs count %d\n", count);
+		close(s);
+		exit(1);
+	}
+
+	if (ax25_aton_entry(nodecall, nr_node.callsign.ax25_call) != 0) {
+		fprintf(stderr, "nrparms: nodes: invalid callsign %s\n", nodecall);
+		close(s);
+		exit(1);
+	}
+
+	if (strlen(ident) > 7) {
+		fprintf(stderr, "nrparms: nodes: invalid length of mnemonic %s\n", ident);
+		close(s);
+		exit(1);
+	}
+		
+	if (strcmp(ident, "*") != 0) {
+		for (p = ident, q = nr_node.mnemonic; *p != '\0'; p++, q++)
+			*q = toupper(*p);
+		*q = '\0';
+		
+		if (strspn(nr_node.mnemonic, "&#-_/ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") != strlen(nr_node.mnemonic)) {
+			fprintf(stderr, "nrparms: nodes: invalid ident %s\n", ident);
+			close(s);
+			exit(1);
+		}
+	} else {
+		strcpy(nr_node.mnemonic, "");
+	}
+
+	if (ax25_aton_entry(neighbour, nr_node.neighbour.ax25_call) != 0) {
+		fprintf(stderr, "nrparms: nodes: invalid callsign %s\n", neighbour);
+		close(s);
+		exit(1);
+	}
+
+	for (i = 0; i < AX25_MAX_DIGIS && digis[i] != NULL; i++) {
+		if (ax25_aton_entry(digis[i], nr_node.digipeaters[i].ax25_call) != 0) {
+			fprintf(stderr, "nrparms: invalid callsign %s\n", digis[i]);
+			close(s);
+			exit(1);
+		}
+		nr_node.ndigis++;
+	}
+
+	if ((dev = ax25_config_get_dev(port)) == NULL) {
+		fprintf(stderr, "nrparms: nodes: invalid port name - %s\n", port);
+		close(s);
+		exit(1);
+	}
+
+	strcpy(nr_node.device, dev);
+	
+	nr_node.quality   = quality;
+	nr_node.obs_count = count;
+
+	if (op[0] == '+') {
+		if (ioctl(s, SIOCADDRT, &nr_node) == -1) {
+			perror("nrparms: SIOCADDRT");
+			close(s);
+			exit(1);
+		}
+	} else {
+		if (ioctl(s, SIOCDELRT, &nr_node) == -1) {
+			perror("nrparms: SIOCDELRT");
+			close(s);
+			exit(1);
+		}
+	}
+}
+
+void routes(int s, char *port, char *nodecall, char *rest[])
+{
+	struct nr_route_struct nr_neigh;
+	char *dev, *op;
+	int i, quality;
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "nrparms: routes: no AX.25 ports configured\n");
+		exit(1);
+	}
+
+	nr_neigh.type   = NETROM_NEIGH;
+	nr_neigh.ndigis = 0;
+
+	for (i = 0; i < AX25_MAX_DIGIS && rest[i][0] != '-' && rest[i][0] != '+'; i++) {
+		if (ax25_aton_entry(rest[i], nr_neigh.digipeaters[i].ax25_call) != 0) {
+			fprintf(stderr, "nrparms: routes: invalid callsign %s\n", rest[i]);
+			close(s);
+			exit(1);
+		}
+		nr_neigh.ndigis++;
+	}
+
+	op      = rest[i + 0];
+	quality = atoi(rest[i + 1]);
+
+	if (op[0] != '+' && op[0] != '-') {
+		fprintf(stderr, "nrparms: routes: invalid operation %s\n", op);
+		close(s);
+		exit(1);
+	}
+
+	if (quality < 1 || quality > 255) {
+		fprintf(stderr, "nrparms: routes: invalid quality %d\n", quality);
+		close(s);
+		exit(1);
+	}
+
+	if ((dev = ax25_config_get_dev(port)) == NULL) {
+		fprintf(stderr, "nrparms: routes: invalid port name - %s\n", port);
+		close(s);
+		exit(1);
+	}
+
+	strcpy(nr_neigh.device, dev);
+
+	if (ax25_aton_entry(nodecall, nr_neigh.callsign.ax25_call) != 0) {
+		fprintf(stderr, "nrparms: routes: invalid callsign %s\n", nodecall);
+		close(s);
+		exit(1);
+	}
+
+	nr_neigh.quality   = quality;
+
+	if (op[0] == '+') {
+		if (ioctl(s, SIOCADDRT, &nr_neigh) == -1) {
+			perror("nrparms: SIOCADDRT");
+			close(s);
+			exit(1);
+		}
+	} else {
+		if (ioctl(s, SIOCDELRT, &nr_neigh) == -1) {
+			perror("nrparms: SIOCDELRT");
+			close(s);
+			exit(1);
+		}
+	}
+}
+
+int main(int argc, char *argv[])
+{
+	int s;
+	
+	if (argc == 1) {
+		fprintf(stderr, "usage: nrparms -nodes|-routes|-version ...\n");
+		return 1;
+	}
+
+	if (strncmp(argv[1], "-v", 2) == 0) {
+		printf("nrparms: %s\n", VERSION);
+		return 0;
+	}
+	
+	if ((s = socket(AF_NETROM, SOCK_SEQPACKET, 0)) < 0) {
+		perror("nrparms: socket");
+		return 1;
+	}
+	
+	if (strncmp(argv[1], "-n", 2) == 0) {
+		if (argc < 9) {
+			fprintf(stderr, nodes_usage);
+			close(s);
+			return 1;
+		}
+		nodes(s, argv[2], argv[3], argv[4], atoi(argv[5]), atoi(argv[6]), argv[7], argv[8], argv + 9);
+		close(s);
+		return 0;
+	}
+
+	if (strncmp(argv[1], "-r", 2) == 0) {
+		if (argc < 6) {
+			fprintf(stderr, routes_usage);
+			close(s);
+			return 1;
+		}
+		routes(s, argv[2], argv[3], argv + 4);
+		close(s);
+		return 0;
+	}
+
+	fprintf(stderr, "usage: nrparms -nodes|-routes|-version ...\n");
+	
+	close(s);
+	
+	return 1;
+}
diff --git a/netrom/nrsdrv.8 b/netrom/nrsdrv.8
new file mode 100644
index 0000000..fb27562
--- /dev/null
+++ b/netrom/nrsdrv.8
@@ -0,0 +1,44 @@
+.TH NRSDRV 8 "22 December 1996" Linux "Linux System Managers Manual"
+.SH NAME
+nrsdrv \- KISS to NET/ROM serial converter
+.SH SYNOPSIS
+.B nrsdrv [-f] [-l] [-s speed] [-v] kissdev nrsdev
+.SH DESCRIPTION
+.LP
+.B Nrsdrv
+is a program designed to convert from the KISS protocol to the NET/ROM
+serial protocol used by real NET/ROM's and TheNet's. The protocols are
+fairly similar, although the NET/ROM serial protocol does include a one byte
+checksum which KISS does not.
+.sp 1
+Typically
+.B nrsdrv
+will be attached to one end of a pseudo-tty of which the other end has been
+attached to a KISS capable program. The NET/ROM device will probably be a
+real serial port attached to a TNC or a Hexipus. The full specification of
+the NET/ROM serial protocol can be found in the original Software 2000
+documentation that accompanied NET/ROMs.
+.SH OPTIONS
+.TP 10
+.BI \-f
+Flow control enabled for use with a Hexipus, the default is disabled.
+See the file hexipus.txt in the source distribution for wiring details.
+
+.TP 10
+.BI \-l
+Log messages to the system log, the default is not to.
+.TP 10
+.BI "\-s speed"
+Sets the speed of both interfaces. If no value is specified then no speed
+will be set.
+.TP 10
+.BI \-v
+Display the version.
+.SH BUGS
+None known.
+.SH "SEE ALSO"
+.BR kill (1),
+.BR stty (1),
+.BR ax25 (4).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/netrom/nrsdrv.c b/netrom/nrsdrv.c
new file mode 100644
index 0000000..92b3d6a
--- /dev/null
+++ b/netrom/nrsdrv.c
@@ -0,0 +1,457 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <termios.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <ctype.h>
+#include <netdb.h>
+#include <syslog.h>
+
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <netax25/daemon.h>
+#include <netax25/ttyutils.h>
+
+#include <config.h>
+
+#include "../pathnames.h"
+
+static int kissfd, nrsfd;
+static int logging = FALSE;
+static int debugging = FALSE;
+static int flowcontrol = FALSE;
+static char *kissdev, *nrsdev;
+
+#define	NUL		000
+#define	STX		002
+#define	ETX		003
+#define	DLE		020
+
+#define	NRS_WAIT	0
+#define	NRS_DATA	1
+#define	NRS_ESCAPE	2
+#define	NRS_CKSUM	3
+static int nrs_state = NRS_WAIT;
+
+static unsigned char nrs_cksum = 0;
+
+static unsigned char nrs_rxbuffer[512];
+static int nrs_rxcount = 0;
+
+#define	FEND		0300
+#define	FESC		0333
+#define	FESCEND		0334
+#define	FESCESC		0335
+
+#define	KISS_WAIT	0
+#define	KISS_CTRL	1
+#define	KISS_DATA	2
+#define	KISS_ESCAPE	3
+static int kiss_state = KISS_WAIT;
+
+static unsigned char kiss_rxbuffer[512];
+static int kiss_rxcount = 0;
+
+static void terminate(int sig)
+{
+	if (logging) {
+		syslog(LOG_INFO, "terminating on SIGTERM\n");
+		closelog();
+	}
+
+	tty_unlock(kissdev);
+	tty_unlock(nrsdev);
+
+	exit(0);
+}
+
+static void key_rts(int fd)
+{
+	int status;
+
+	if (!flowcontrol)
+		return;
+
+	/* Wait for CTS to be low */
+	while (1) {
+		/* Get CTS status */
+                if (ioctl(fd, TIOCMGET, &status) < 0) {
+			syslog(LOG_INFO|LOG_ERR, "TIOCMGET failed: flowcontrol disabled (%m)\n");
+			flowcontrol = 0;
+                        return;
+                }
+		if (status & TIOCM_CTS) {
+			if (debugging) {
+				fprintf(stderr,"CTS high: waiting\n");
+			}
+                	ioctl(fd, TIOCMIWAIT, &status);
+		} else {
+			break;
+		}
+	}
+
+	if (debugging) {
+		fprintf(stderr,"CTS low: keying RTS\n");
+	}
+	status |= TIOCM_RTS | TIOCM_DTR;
+        if (ioctl(fd, TIOCMSET, &status) < 0) {
+		syslog(LOG_INFO|LOG_ERR, "TIOCMGET failed: flowcontrol disabled (%m)\n");
+		flowcontrol = 0;
+        }
+}
+
+static void unkey_rts(int fd)
+{
+	int status;
+
+	if (!flowcontrol)
+		return;
+
+	if (debugging) {
+		fprintf(stderr,"Transmission finished: unkeying RTS\n");
+	}
+        ioctl(fd, TIOCMGET, &status);
+	status &= ~TIOCM_RTS;
+        status |= TIOCM_DTR;
+        if (ioctl(fd, TIOCMSET, &status) < 0) {
+		syslog(LOG_INFO|LOG_ERR, "TIOCMGET failed: flowcontrol disabled (%m)\n");
+		flowcontrol = 0;
+        }
+}
+
+static void nrs_esc(unsigned char *s, int len)
+{
+	static unsigned char buffer[512];
+	unsigned char *ptr = buffer;
+	unsigned char csum = 0;
+	unsigned char c;
+
+	*ptr++ = STX;
+
+	while (len-- > 0) {
+		switch (c = *s++) {
+			case STX:
+			case ETX:
+			case DLE:
+				*ptr++ = DLE;
+				/* Fall through */
+			default:
+				*ptr++ = c;
+				break;
+		}
+		
+		csum += c;
+	}
+
+	*ptr++ = ETX;
+	*ptr++ = csum;
+	*ptr++ = NUL;
+	*ptr++ = NUL;
+
+	key_rts(nrsfd);
+	write(nrsfd, buffer, ptr - buffer);
+	unkey_rts(nrsfd);
+}
+
+static void kiss_esc(unsigned char *s, int len)
+{
+	static unsigned char buffer[512];
+	unsigned char *ptr = buffer;
+	unsigned char c;
+
+	*ptr++ = FEND;
+	*ptr++ = 0x00;		/* KISS DATA */
+
+	while (len-- > 0) {
+		switch (c = *s++) {
+			case FESC:
+				*ptr++ = FESC;
+				*ptr++ = FESCESC;
+				break;
+			case FEND:
+				*ptr++ = FESC;
+				*ptr++ = FESCEND;
+				break;
+			default:
+				*ptr++ = c;
+				break;
+		}
+	}
+
+	*ptr++ = FEND;
+
+	write(kissfd, buffer, ptr - buffer);
+}
+
+static void nrs_unesc(unsigned char *buffer, int len)
+{
+	int i;
+	
+	for (i = 0; i < len; i++) {
+		switch (nrs_state) {
+			case NRS_WAIT:
+				if (buffer[i] == STX) {
+					nrs_state   = NRS_DATA;
+					nrs_rxcount = 0;
+					nrs_cksum   = 0;
+				}
+				break;
+
+			case NRS_DATA:
+				switch (buffer[i]) {	
+					case STX:	/* !! */
+						nrs_rxcount = 0;
+						nrs_cksum   = 0;
+						break;
+					case DLE:
+						nrs_state = NRS_ESCAPE;
+						break;
+					case ETX:
+						nrs_state = NRS_CKSUM;
+						break;
+					default:
+						if (nrs_rxcount < 512) {
+							nrs_cksum += buffer[i];
+							nrs_rxbuffer[nrs_rxcount++] = buffer[i];
+						}
+						break;
+				}
+				break;
+
+			case NRS_ESCAPE:
+				nrs_state = NRS_DATA; 
+				if (nrs_rxcount < 512) {
+					nrs_cksum += buffer[i];
+					nrs_rxbuffer[nrs_rxcount++] = buffer[i];
+				}
+				break;
+
+			case NRS_CKSUM:
+				if (buffer[i] == nrs_cksum)
+					kiss_esc(nrs_rxbuffer, nrs_rxcount);
+				nrs_state   = NRS_WAIT;
+				nrs_cksum   = 0;
+				nrs_rxcount = 0;
+				break;
+		}
+	}
+}
+
+static void kiss_unesc(unsigned char *buffer, int len)
+{
+	int i;
+	
+	for (i = 0; i < len; i++) {
+		switch (kiss_state) {
+			case KISS_WAIT:
+				if (buffer[i] == FEND) {
+					kiss_state   = KISS_CTRL;
+					kiss_rxcount = 0;
+				}
+				break;
+
+			case KISS_CTRL:
+				if ((buffer[i] & 0x0F) == 0x00) {
+					kiss_state   = KISS_DATA;
+					kiss_rxcount = 0;
+				} else {
+					kiss_state   = KISS_WAIT;
+					kiss_rxcount = 0;
+				}
+				break;
+
+			case KISS_DATA:
+				switch (buffer[i]) {	
+					case FEND:
+						if (kiss_rxcount > 2)
+							nrs_esc(kiss_rxbuffer, kiss_rxcount);
+						kiss_state   = KISS_WAIT;
+						kiss_rxcount = 0;
+						break;
+					case FESC:
+						kiss_state = KISS_ESCAPE;
+						break;
+					default:
+						if (kiss_rxcount < 512)
+							kiss_rxbuffer[kiss_rxcount++] = buffer[i];
+						break;
+				}
+				break;
+
+			case KISS_ESCAPE:
+				kiss_state = KISS_DATA;
+				switch (buffer[i]) {
+					case FESCESC:
+						if (kiss_rxcount < 512)
+							kiss_rxbuffer[kiss_rxcount++] = FESC;
+						break;
+					case FESCEND:
+						if (kiss_rxcount < 512)
+							kiss_rxbuffer[kiss_rxcount++] = FEND;
+						break;
+				}
+				break;
+		}
+	}
+}
+
+int main(int argc, char *argv[])
+{
+	static char buffer[512];
+	unsigned int speed = 0;
+	fd_set read_fd;
+	int c, n;
+
+	while ((c = getopt(argc, argv, "dfls:v")) != -1) {
+		switch (c) {
+			case 'd':
+				debugging = TRUE;
+				break;
+			case 'f':
+				flowcontrol = TRUE;
+				break;
+			case 'l':
+				logging = TRUE;
+				break;
+			case 's':
+				if ((speed = atoi(optarg)) <= 0) {
+					fprintf(stderr, "nrsdrv: invalid speed %s\n", optarg);
+					return 1;
+				}
+				break;
+			case 'v':
+				printf("kissattach: %s\n", VERSION);
+				return 0;
+			case ':':
+			case '?':
+				fprintf(stderr, "usage: nrsdrv [-f] [-l] [-s speed] [-v] kisstty nrstty\n");
+				return 1;
+		}
+	}
+
+	if (debugging) {
+		fprintf(stderr,"Flow control %s\n", 
+			flowcontrol ? "enabled" : "disabled");
+	}
+
+	if ((argc - optind) != 2) {
+		fprintf(stderr, "usage: nrsdrv [-f] [-l] [-s speed] [-v] kisstty nrstty\n");
+		return 1;
+	}
+
+	kissdev = argv[optind + 0];
+	nrsdev  = argv[optind + 1];
+
+	if (tty_is_locked(kissdev)) {
+		fprintf(stderr, "nrsdrv: device %s already in use\n", argv[optind]);
+		return 1;
+	}
+
+	if (tty_is_locked(nrsdev)) {
+		fprintf(stderr, "nrsdrv: device %s already in use\n", argv[optind + 1]);
+		return 1;
+	}
+
+	if ((kissfd = open(kissdev, O_RDWR)) == -1) {
+		perror("nrsdrv: open kiss device");
+		return 1;
+	}
+
+	if ((nrsfd = open(nrsdev, O_RDWR)) == -1) {
+		perror("nrsdrv: open nrs device");
+		return 1;
+	}
+
+	tty_lock(kissdev);
+	tty_lock(nrsdev);
+
+	if (!tty_raw(kissfd, FALSE)) {
+		tty_unlock(kissdev);
+		tty_unlock(nrsdev);
+		return 1;
+	}
+
+	if (!tty_raw(nrsfd, FALSE)) {
+		tty_unlock(kissdev);
+		tty_unlock(nrsdev);
+		return 1;
+	}
+
+	if (speed != 0 && !tty_speed(kissfd, speed)) {
+		tty_unlock(kissdev);
+		tty_unlock(nrsdev);
+		return 1;
+	}
+
+	if (speed != 0 && !tty_speed(nrsfd, speed)) {
+		tty_unlock(kissdev);
+		tty_unlock(nrsdev);
+		return 1;
+	}
+
+	if (logging) {
+		openlog("nrsdrv", LOG_PID, LOG_DAEMON);
+		syslog(LOG_INFO, "KISS device %s connected to NRS device %s\n", argv[optind + 0], argv[optind + 1]);
+	}
+		
+	signal(SIGHUP, SIG_IGN);
+	signal(SIGTERM, terminate);
+
+	/*
+	 * Become a daemon if we can.
+	 */
+	if (!daemon_start(FALSE)) {
+		fprintf(stderr, "nrsdrv: cannot become a daemon\n");
+		tty_unlock(kissdev);
+		tty_unlock(nrsdev);
+		return 1;
+	}
+
+	if (flowcontrol) {
+		unkey_rts(nrsfd);
+	}
+
+	c = ((kissfd > nrsfd) ? kissfd : nrsfd) + 1;
+
+	for (;;) {
+		FD_ZERO(&read_fd);
+		
+		FD_SET(kissfd, &read_fd);
+		FD_SET(nrsfd, &read_fd);
+
+		n = select(c, &read_fd, NULL, NULL, NULL);
+
+		if (FD_ISSET(kissfd, &read_fd)) {
+			if ((n = read(kissfd, buffer, 512)) <= 0) {
+				if (logging) {
+					syslog(LOG_INFO, "terminating on KISS device closure\n");
+					closelog();
+				}
+				break;
+			}
+			kiss_unesc(buffer, n);
+		}
+		
+		if (FD_ISSET(nrsfd, &read_fd)) {
+			if ((n = read(nrsfd, buffer, 512)) <= 0) {
+				if (logging) {
+					syslog(LOG_INFO, "terminating on NRS device closure\n");
+					closelog();
+				}
+				break;
+			}
+			nrs_unesc(buffer, n);
+		}
+	}
+
+	tty_unlock(kissdev);
+	tty_unlock(nrsdev);
+
+	return 0;
+}
diff --git a/pathnames.h b/pathnames.h
new file mode 100644
index 0000000..f5e871c
--- /dev/null
+++ b/pathnames.h
@@ -0,0 +1,28 @@
+
+#define	CONF_AX25D_FILE		AX25_SYSCONFDIR"ax25d.conf"
+#define	CONF_AXPORTS_FILE	AX25_SYSCONFDIR"axports"
+#define	CONF_AXSPAWN_FILE	AX25_SYSCONFDIR"axspawn.conf"
+#define	CONF_AXSPAWN_PROF_FILE	AX25_SYSCONFDIR"ax25.profile"
+#define	CONF_NETROMD_FILE	AX25_SYSCONFDIR"nrbroadcast"
+#define	CONF_NRPORTS_FILE	AX25_SYSCONFDIR"nrports"
+#define	CONF_RIP98D_FILE	AX25_SYSCONFDIR"rip98d.conf"
+#define	CONF_RSPORTS_FILE	AX25_SYSCONFDIR"rsports"
+#define	CONF_RXECHO_FILE	AX25_SYSCONFDIR"rxecho.conf"
+#define	CONF_TTYLINKD_FILE	AX25_SYSCONFDIR"ttylinkd.conf"
+
+#define	DATA_MHEARD_FILE	AX25_LOCALSTATEDIR"mheard/mheard.dat"
+
+#define	LOCK_AXSPAWN_FILE	"/var/lock/axspawn"
+#define	LOCK_SERIAL_DIR		"/var/lock"
+
+#define	PROC_AX25_FILE		"/proc/net/ax25"
+#define	PROC_AX25_ROUTE_FILE	"/proc/net/ax25_route"
+#define	PROC_IP_ROUTE_FILE	"/proc/net/route"
+#define	PROC_NR_SYSCTL_DIR	"/proc/sys/net/netrom"
+#define	PROC_RS_NEIGH_FILE	"/proc/net/rose_neigh"
+#define	PROC_RS_NODES_FILE	"/proc/net/rose_nodes"
+#define PROC_AX25_CALLS_FILE	"/proc/net/ax25_calls"
+#define PROC_NR_NEIGH_FILE	"/proc/net/nr_neigh"
+#define PROC_NR_NODES_FILE	"/proc/net/nr_nodes"
+
+
diff --git a/rose/Makefile.am b/rose/Makefile.am
new file mode 100644
index 0000000..5596113
--- /dev/null
+++ b/rose/Makefile.am
@@ -0,0 +1,19 @@
+
+sbin_PROGRAMS = rsattach rsdwnlnk rsmemsiz rsparms rsuplnk 
+
+LDADD = $(AX25_LIB)
+
+rsmemsiz_LDADD = 
+
+sbin_SCRIPTS = rsusers.sh
+
+
+man_MANS = rose.4 rsattach.8 rsparms.8 rsdwnlnk.8 rsuplnk.8
+
+EXTRA_DIST = $(man_MANS) $(sbin_SCRIPTS)
+
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR=${sysconfdir}/ax25/
+AX25_LOCALSTATEDIR=${localstatedir}/ax25/
diff --git a/rose/Makefile.in b/rose/Makefile.in
new file mode 100644
index 0000000..e57fa38
--- /dev/null
+++ b/rose/Makefile.in
@@ -0,0 +1,712 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+sbin_PROGRAMS = rsattach$(EXEEXT) rsdwnlnk$(EXEEXT) rsmemsiz$(EXEEXT) \
+	rsparms$(EXEEXT) rsuplnk$(EXEEXT)
+subdir = rose
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)" \
+	"$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man8dir)"
+PROGRAMS = $(sbin_PROGRAMS)
+rsattach_SOURCES = rsattach.c
+rsattach_OBJECTS = rsattach.$(OBJEXT)
+rsattach_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+rsattach_DEPENDENCIES = $(am__DEPENDENCIES_1)
+rsdwnlnk_SOURCES = rsdwnlnk.c
+rsdwnlnk_OBJECTS = rsdwnlnk.$(OBJEXT)
+rsdwnlnk_LDADD = $(LDADD)
+rsdwnlnk_DEPENDENCIES = $(am__DEPENDENCIES_1)
+rsmemsiz_SOURCES = rsmemsiz.c
+rsmemsiz_OBJECTS = rsmemsiz.$(OBJEXT)
+rsmemsiz_DEPENDENCIES =
+rsparms_SOURCES = rsparms.c
+rsparms_OBJECTS = rsparms.$(OBJEXT)
+rsparms_LDADD = $(LDADD)
+rsparms_DEPENDENCIES = $(am__DEPENDENCIES_1)
+rsuplnk_SOURCES = rsuplnk.c
+rsuplnk_OBJECTS = rsuplnk.$(OBJEXT)
+rsuplnk_LDADD = $(LDADD)
+rsuplnk_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+SCRIPTS = $(sbin_SCRIPTS)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = rsattach.c rsdwnlnk.c rsmemsiz.c rsparms.c rsuplnk.c
+DIST_SOURCES = rsattach.c rsdwnlnk.c rsmemsiz.c rsparms.c rsuplnk.c
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+man4dir = $(mandir)/man4
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+LDADD = $(AX25_LIB)
+rsmemsiz_LDADD = 
+sbin_SCRIPTS = rsusers.sh
+man_MANS = rose.4 rsattach.8 rsparms.8 rsdwnlnk.8 rsuplnk.8
+EXTRA_DIST = $(man_MANS) $(sbin_SCRIPTS)
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR = ${sysconfdir}/ax25/
+AX25_LOCALSTATEDIR = ${localstatedir}/ax25/
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu rose/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu rose/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+rsattach$(EXEEXT): $(rsattach_OBJECTS) $(rsattach_DEPENDENCIES) $(EXTRA_rsattach_DEPENDENCIES) 
+	@rm -f rsattach$(EXEEXT)
+	$(LINK) $(rsattach_OBJECTS) $(rsattach_LDADD) $(LIBS)
+rsdwnlnk$(EXEEXT): $(rsdwnlnk_OBJECTS) $(rsdwnlnk_DEPENDENCIES) $(EXTRA_rsdwnlnk_DEPENDENCIES) 
+	@rm -f rsdwnlnk$(EXEEXT)
+	$(LINK) $(rsdwnlnk_OBJECTS) $(rsdwnlnk_LDADD) $(LIBS)
+rsmemsiz$(EXEEXT): $(rsmemsiz_OBJECTS) $(rsmemsiz_DEPENDENCIES) $(EXTRA_rsmemsiz_DEPENDENCIES) 
+	@rm -f rsmemsiz$(EXEEXT)
+	$(LINK) $(rsmemsiz_OBJECTS) $(rsmemsiz_LDADD) $(LIBS)
+rsparms$(EXEEXT): $(rsparms_OBJECTS) $(rsparms_DEPENDENCIES) $(EXTRA_rsparms_DEPENDENCIES) 
+	@rm -f rsparms$(EXEEXT)
+	$(LINK) $(rsparms_OBJECTS) $(rsparms_LDADD) $(LIBS)
+rsuplnk$(EXEEXT): $(rsuplnk_OBJECTS) $(rsuplnk_DEPENDENCIES) $(EXTRA_rsuplnk_DEPENDENCIES) 
+	@rm -f rsuplnk$(EXEEXT)
+	$(LINK) $(rsuplnk_OBJECTS) $(rsuplnk_LDADD) $(LIBS)
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-sbinSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rsattach.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rsdwnlnk.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rsmemsiz.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rsparms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rsuplnk.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man4: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man4dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man4dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man4dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.4[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man4dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man4dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man4:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man4dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.4[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man4dir)'; $(am__uninstall_files_from_dir)
+install-man8: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man8dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.8[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man8:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man8dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.8[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man8dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man4 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-man uninstall-sbinPROGRAMS \
+	uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man4 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-sbinPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-man4 install-man8 \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-sbinPROGRAMS install-sbinSCRIPTS install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-man uninstall-man4 uninstall-man8 \
+	uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/rose/rose.4 b/rose/rose.4
new file mode 100644
index 0000000..a06f324
--- /dev/null
+++ b/rose/rose.4
@@ -0,0 +1,43 @@
+.TH ROSE 4 "27 August 1996" Linux "Linux Programmer's Manual"
+.SH NAME
+AF_ROSE \- Rose amateur packet radio protocol family
+.SH DESCRIPTION
+.LP
+.B Rose
+is a protocol used extensively by radio amateurs. The Linux
+Rose protocol family permits access to these protocols via
+the standard networking
+.B socket
+metaphor.
+.LP
+The Rose protocol layer only supports connected mode.
+.LP
+The only mode of operation is connected mode which is the mode used for a
+socket of type SOCK_SEQPACKET (stream sockets are not available in Rose).
+This requires that the user ensures output data is suitably packetised, and
+that input data is read a packet at a time into a buffer of suitable size.
+.LP
+Rose addresses consist of 10 digits. These are encoded into a sockaddr_rose
+structure which is provided to the relevant system calls.
+.LP
+Rose has some unusual properties. Notably in a multi-user system an AX.25
+address is often associated with a user, and some users may not have such an
+association. a set of ioctl calls are provided to manage an association
+table.
+.LP 
+Rose supports the following socket options for SOL_ROSE. ROSE_T1 is the
+T11/T21 timer in 1/10ths of a second, ROSE_T2 is the T12/T22 timer in
+1/10ths of a second. ROSE_T3, is the T13/T23 timer in 1/10ths of a second.
+It is possible for an application to request that the Rose layer return
+the Rose header as well as the application data, this is done via the
+ROSE_HDRINCL socket option.
+.SH "SEE ALSO"
+.BR call (1),
+.BR socket (2),
+.BR setsockopt(2),
+.BR getsockopt(2),
+.BR rsports (5),
+.BR rsparms (8).
+.LP
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/rose/rsattach.8 b/rose/rsattach.8
new file mode 100644
index 0000000..1a67769
--- /dev/null
+++ b/rose/rsattach.8
@@ -0,0 +1,33 @@
+.TH RSATTACH 8 "27 August 1996" Linux "Linux System Managers Manual"
+.SH NAME
+rsattach \- Start a Rose interface
+.SH SYNOPSIS
+.B rsattach [-i inetaddr] [-v] port
+.SH DESCRIPTION
+.LP
+.B Rsattach
+takes many of the parameters for the port from the rsports(5) file. The port
+argument is the name of a port as given in the rsports(5) file.
+.LP
+.B Rsattach
+tries to find the free Rose device in the system. The device name checked is
+rose0. If no free Rose device is available an error is generated and the
+program terminates.
+.SH OPTIONS
+.TP 16
+.BI "\-i inetaddr"
+Set the internet address of the interface. This address may either be a
+dotted decimal address or a host name.
+.TP 16
+.BI \-v
+Display the version.
+.SH "SEE ALSO"
+.BR rose (4),
+.BR rsparms (4),
+.BR rsports (5),
+.BR ifconfig (8).
+.SH BUGS
+The program can be run many times with the same arguments creating many
+instances of the same attributes on different devices. Not a good idea.
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/rose/rsattach.c b/rose/rsattach.c
new file mode 100644
index 0000000..924d152
--- /dev/null
+++ b/rose/rsattach.c
@@ -0,0 +1,222 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <termios.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <ctype.h>
+#include <netdb.h>
+
+#include <config.h>
+
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+/* #include <linux/netdevice.h> */
+#include <net/if.h>
+#include <net/if_arp.h>
+/* #include <linux/sockios.h> */
+
+
+#include <netax25/ax25.h>
+#include <netrom/netrom.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+
+#include "../pathnames.h"
+
+char *address;
+int  mtu = 128;
+
+int readconfig(char *port)
+{
+	FILE *fp;
+	char buffer[90], *s;
+	int n = 0;
+	
+	if ((fp = fopen(CONF_RSPORTS_FILE, "r")) == NULL) {
+		fprintf(stderr, "rsattach: cannot open rsports file\n");
+		return FALSE;
+	}
+
+	while (fgets(buffer, 90, fp) != NULL) {
+		n++;
+	
+		if ((s = strchr(buffer, '\n')) != NULL)
+			*s = '\0';
+
+		if (strlen(buffer) > 0 && *buffer == '#')
+			continue;
+
+		if ((s = strtok(buffer, " \t\r\n")) == NULL) {
+			fprintf(stderr, "rsattach: unable to parse line %d of the rsports file\n", n);
+			return FALSE;
+		}
+		
+		if (strcmp(s, port) != 0)
+			continue;
+			
+		if ((s = strtok(NULL, " \t\r\n")) == NULL) {
+			fprintf(stderr, "rsattach: unable to parse line %d of the rsports file\n", n);
+			return FALSE;
+		}
+
+		address = strdup(s);
+
+		fclose(fp);
+		
+		return TRUE;
+	}
+	
+	fclose(fp);
+
+	fprintf(stderr, "rsattach: cannot find port %s in rsports\n", port);
+	
+	return FALSE;
+}
+
+int getfreedev(char *dev)
+{
+	struct ifreq ifr;
+	int fd;
+	int i;
+	
+	if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+		perror("rsattach: socket");
+		return FALSE;
+	}
+
+	for (i = 0; i < 6; i++) {
+		sprintf(dev, "rose%d", i);
+		strcpy(ifr.ifr_name, dev);
+	
+		if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
+			perror("rsattach: SIOCGIFFLAGS");
+			return FALSE;
+		}
+
+		if (!(ifr.ifr_flags & IFF_UP)) {
+			close(fd);
+			return TRUE;
+		}
+	}
+
+	close(fd);
+
+	return FALSE;
+}
+
+int startiface(char *dev, struct hostent *hp)
+{
+	struct ifreq ifr;
+	char addr[5];
+	int fd;
+	
+	if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+		perror("rsattach: socket");
+		return FALSE;
+	}
+
+	strcpy(ifr.ifr_name, dev);
+	
+	if (hp != NULL) {
+		ifr.ifr_addr.sa_family = AF_INET;
+		
+		ifr.ifr_addr.sa_data[0] = 0;
+		ifr.ifr_addr.sa_data[1] = 0;
+		ifr.ifr_addr.sa_data[2] = hp->h_addr_list[0][0];
+		ifr.ifr_addr.sa_data[3] = hp->h_addr_list[0][1];
+		ifr.ifr_addr.sa_data[4] = hp->h_addr_list[0][2];
+		ifr.ifr_addr.sa_data[5] = hp->h_addr_list[0][3];
+		ifr.ifr_addr.sa_data[6] = 0;
+
+		if (ioctl(fd, SIOCSIFADDR, &ifr) < 0) {
+			perror("rsattach: SIOCSIFADDR");
+			return FALSE;
+		}
+	}
+
+	if (rose_aton(address, addr) == -1)
+		return FALSE;
+
+	ifr.ifr_hwaddr.sa_family = ARPHRD_ROSE;
+	memcpy(ifr.ifr_hwaddr.sa_data, addr, 5);
+	
+	if (ioctl(fd, SIOCSIFHWADDR, &ifr) != 0) {
+		perror("rsattach: SIOCSIFHWADDR");
+		return FALSE;
+	}
+
+	ifr.ifr_mtu = mtu;
+
+	if (ioctl(fd, SIOCSIFMTU, &ifr) < 0) {
+		perror("rsattach: SIOCSIFMTU");
+		return FALSE;
+	}
+
+	if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
+		perror("rsattach: SIOCGIFFLAGS");
+		return FALSE;
+	}
+
+	ifr.ifr_flags &= IFF_NOARP;
+	ifr.ifr_flags |= IFF_UP;
+	ifr.ifr_flags |= IFF_RUNNING;
+
+	if (ioctl(fd, SIOCSIFFLAGS, &ifr) < 0) {
+		perror("rsattach: SIOCSIFFLAGS");
+		return FALSE;
+	}
+	
+	close(fd);
+	
+	return TRUE;
+}
+	
+
+int main(int argc, char *argv[])
+{
+	int fd;
+	char dev[64];
+	struct hostent *hp = NULL;
+
+	while ((fd = getopt(argc, argv, "i:m:v")) != -1) {
+		switch (fd) {
+			case 'i':
+				if ((hp = gethostbyname(optarg)) == NULL) {
+					fprintf(stderr, "rsattach: invalid internet name/address - %s\n", optarg);
+					return 1;
+				}
+				break;
+			case 'v':
+				printf("rsattach: %s\n", VERSION);
+				return 0;
+			case ':':
+			case '?':
+				fprintf(stderr, "usage: rsattach [-i inetaddr] [-v] port\n");
+				return 1;
+		}
+	}
+	
+	if ((argc - optind) != 1) {
+		fprintf(stderr, "usage: rsattach [-i inetaddr] [-v] port\n");
+		return 1;
+	}
+
+	if (!readconfig(argv[optind]))
+		return 1;
+
+	if (!getfreedev(dev)) {
+		fprintf(stderr, "rsattach: cannot find free Rose device\n");
+		return 1;
+	}
+	
+	if (!startiface(dev, hp))
+		return 1;		
+
+	printf("Rose port %s bound to device %s\n", argv[optind], dev);
+		
+	return 0;
+}
diff --git a/rose/rsdwnlnk.8 b/rose/rsdwnlnk.8
new file mode 100644
index 0000000..f0d4c2d
--- /dev/null
+++ b/rose/rsdwnlnk.8
@@ -0,0 +1,58 @@
+.TH RSDWNLNK 8 "29 April 1997" Linux "Linux Programmer's Manual"
+.SH NAME
+rsdwnlnk \- User exit from the ROSE network.
+.SH SYNOPSIS
+.B rsdwnlnk <port> <call>
+.SH DESCRIPTION
+.LP
+The
+.B rdwnplnk
+program allows a user to leave the ROSE network using the standard
+pseudo-digipeating method. Recent Linux kernels are aware of this form of
+operation and the
+.B ax25d
+program can create such connections. The normal mode of operation of a
+ROSE switch is to have one ROSE address (ie port) per physical AX.25 port.
+Therefore ROSE users coming in on a given ROSE port will come out of the
+associated AX.25 port.
+.LP
+To use
+.B rsdwnlnk
+you need an entry in
+.B ax25d.conf
+to listen for incoming ROSE connections to any callsigns that are not
+matched by the more specific ROSE entries. In the example below, I will be
+listening for ROSE connections on my ROSE port rs144, the exiting AX.25
+connection will be via the associated AX.25 port, 144, using the callsign 
+KE4GAJ-10. Please note that the callsign should be on the same line as the
+rest of the command, it may be wrapped onto the next line on your screen.
+.LP
+#
+.br
+{* VIA rs144}
+.br
+NOCALL  * * * * * * L
+.br
+default * * * * * * - root /usr/sbin/rsdwnlnk rsdwnlnk 144 KE4GAJ-10
+.br
+#
+.LP
+There would typically be one
+.B rsdwnlnk
+per ROSE port. The associated program for entering a ROSE network is
+.B rsuplnk.
+.LP
+All errors generated by
+.B rsdwnlnk
+are written to the system debug log file.
+.SH FILES
+.br
+/etc/ax25/axports
+.SH "SEE ALSO"
+.BR rose (4),
+.BR ax25d.conf (5),
+.BR ax25d (8),
+.BR rsuplnk (8),
+.BR rose_call (8).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/rose/rsdwnlnk.c b/rose/rsdwnlnk.c
new file mode 100644
index 0000000..9ff6f31
--- /dev/null
+++ b/rose/rsdwnlnk.c
@@ -0,0 +1,273 @@
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <signal.h>
+#include <syslog.h>
+
+#include <config.h>
+
+#include <sys/time.h>
+#include <sys/types.h>
+
+#include <sys/socket.h>
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+
+#define	AX25_HBIT	0x80
+
+void alarm_handler(int sig)
+{
+}
+
+int main(int argc, char **argv)
+{
+	unsigned char buffer[512], *addr;
+	fd_set read_fd;
+	int n = 0, s, yes = 1;
+	struct full_sockaddr_ax25 axbind, axconnect;
+	struct sockaddr_rose rosesock, rosepeer;
+	socklen_t addrlen;
+
+	openlog("rsdwnlnk", LOG_PID, LOG_DAEMON);
+
+	/*
+	 * Arguments should be "rsdwnlnk ax25port ax25call"
+	 */
+	if (argc != 3) {
+		syslog(LOG_ERR, "invalid number of parameters\n");
+		closelog();
+		return 1;
+	}
+
+	if (ax25_config_load_ports() == 0) {
+		syslog(LOG_ERR, "problem with axports file\n");
+		closelog();
+		return 1;
+	}
+
+	addrlen = sizeof(struct sockaddr_rose);
+
+	if (getsockname(STDIN_FILENO, (struct sockaddr *)&rosesock, &addrlen) == -1) {
+		syslog(LOG_ERR, "cannot getsockname - %s\n", strerror(errno));
+		closelog();
+		return 1;
+	}
+
+	addrlen = sizeof(struct sockaddr_rose);
+
+	if (getpeername(STDIN_FILENO, (struct sockaddr *)&rosepeer, &addrlen) == -1) {
+		syslog(LOG_ERR, "cannot getpeername - %s\n", strerror(errno));
+		closelog();
+		return 1;
+	}
+
+	if (setsockopt(STDIN_FILENO, SOL_ROSE, ROSE_QBITINCL, &yes, sizeof(yes)) == -1) {
+		syslog(LOG_ERR, "cannot setsockopt(ROSE_QBITINCL) - %s\n", strerror(errno));
+		closelog();
+		return 1;
+	}
+
+	/*
+	 * Parse the passed values for correctness.
+	 */
+	axbind.fsa_ax25.sax25_family = AF_AX25;
+	axbind.fsa_ax25.sax25_ndigis = 1;
+	axbind.fsa_ax25.sax25_call   = rosepeer.srose_call;
+
+	if ((addr = ax25_config_get_addr(argv[1])) == NULL) {
+		syslog(LOG_ERR, "invalid AX.25 port name - %s\n", argv[1]);
+		closelog();
+		return 1;
+	}
+
+	if (ax25_aton_entry(addr, axbind.fsa_digipeater[0].ax25_call) == -1) {
+		syslog(LOG_ERR, "invalid AX.25 port callsign - %s\n", argv[1]);
+		closelog();
+		return 1;
+	}
+
+	axconnect.fsa_ax25.sax25_family = AF_AX25;
+	axconnect.fsa_ax25.sax25_call   = rosesock.srose_call;
+
+	/*
+	 *	The path at the far end has a digi in it.
+	 */
+	if (rosepeer.srose_ndigis == 1) {
+		axconnect.fsa_digipeater[n] = rosepeer.srose_digi;
+		axconnect.fsa_digipeater[n].ax25_call[6] |= AX25_HBIT;
+		n++;
+	}
+
+	/*
+	 *	Incoming call has a different DNIC
+	 */
+	if (memcmp(rosepeer.srose_addr.rose_addr, rosesock.srose_addr.rose_addr, 2) != 0) {
+		addr = rose_ntoa(&rosepeer.srose_addr);
+		addr[4] = '\0';
+		if (ax25_aton_entry(addr, axconnect.fsa_digipeater[n].ax25_call) == -1) {
+			syslog(LOG_ERR, "invalid callsign - %s\n", addr);
+			closelog();
+			return 1;
+		}
+		axconnect.fsa_digipeater[n].ax25_call[6] |= AX25_HBIT;
+		n++;		
+	}
+
+	/*
+	 *	Put the remote address sans DNIC into the digi chain.
+	 */
+	addr = rose_ntoa(&rosepeer.srose_addr);
+	if (ax25_aton_entry(addr + 4, axconnect.fsa_digipeater[n].ax25_call) == -1) {
+		syslog(LOG_ERR, "invalid callsign - %s\n", addr + 4);
+		closelog();
+		return 1;
+	}
+	axconnect.fsa_digipeater[n].ax25_call[6] |= AX25_HBIT;
+	n++;		
+
+	/*
+	 *	And my local ROSE callsign.
+	 */
+	if (ax25_aton_entry(argv[2], axconnect.fsa_digipeater[n].ax25_call) == -1) {
+		syslog(LOG_ERR, "invalid callsign - %s\n", argv[2]);
+		closelog();
+		return 1;
+	}
+	axconnect.fsa_digipeater[n].ax25_call[6] |= AX25_HBIT;
+	n++;
+
+	/*
+	 *	A digi has been specified for this end.
+	 */
+	if (rosesock.srose_ndigis == 1) {
+		axconnect.fsa_digipeater[n] = rosesock.srose_digi;
+		n++;
+	}
+
+	axconnect.fsa_ax25.sax25_ndigis = n;
+
+	addrlen = sizeof(struct full_sockaddr_ax25);
+
+	/*
+	 * Open the socket into the kernel.
+	 */
+	if ((s = socket(AF_AX25, SOCK_SEQPACKET, 0)) < 0) {
+		syslog(LOG_ERR, "cannot open AX.25 socket, %s\n", strerror(errno));
+		closelog();
+		return 1;
+	}
+#ifdef HAVE_AX25_IAMDIGI
+	if (setsockopt(s, SOL_AX25, AX25_IAMDIGI, &yes, sizeof(yes)) == -1) {
+		syslog(LOG_ERR, "cannot setsockopt(AX25_IAMDIGI), %s\n", strerror(errno));
+		close(s);
+		closelog();
+		return 1;
+	}
+#endif /* HAVE_AX25_IAMDIGI */
+#ifdef HAVE_AX25_PIDINCL
+	if (setsockopt(s, SOL_AX25, AX25_PIDINCL, &yes, sizeof(yes)) == -1) {
+		syslog(LOG_ERR, "cannot setsockopt(AX25_PIDINCL), %s\n", strerror(errno));
+		close(s);
+		closelog();
+		return 1;
+	}
+#endif /* HAVE_AX25_PIDINCL */
+	/*
+	 * Set our AX.25 callsign and AX.25 port callsign accordingly.
+	 */
+	if (bind(s, (struct sockaddr *)&axbind, addrlen) != 0) {
+		syslog(LOG_ERR, "cannot bind AX.25 socket, %s\n", strerror(errno));
+		close(s);
+		closelog();
+		return 1;
+	}
+
+	/*
+	 * If no response in 60 seconds, go away.
+	 */
+	alarm(60);
+
+	signal(SIGALRM, alarm_handler);
+
+	/*
+	 * Lets try and connect to the far end.
+	 */
+	if (connect(s, (struct sockaddr *)&axconnect, addrlen) != 0) {
+		switch (errno) {
+			case ECONNREFUSED:
+				strcpy(buffer, "*** Connection refused\r");
+				break;
+			case ENETUNREACH:
+				strcpy(buffer, "*** No known route\r");
+				break;
+			case EINTR:
+				strcpy(buffer, "*** Connection timed out\r");
+				break;
+			default:
+				sprintf(buffer, "ERROR: cannot connect to AX.25 callsign, %s\r", strerror(errno));
+				break;
+		}
+
+		close(s);
+
+		write(STDOUT_FILENO, buffer, strlen(buffer));
+		
+		sleep(20);
+		
+		return 0;
+	}
+
+	/*
+	 * We got there.
+	 */
+	alarm(0);
+
+	strcpy(buffer, "*** Connected\r");
+	write(STDOUT_FILENO, buffer, strlen(buffer));
+
+	/*
+	 * Loop until one end of the connection goes away.
+	 */
+	for (;;) {
+		FD_ZERO(&read_fd);
+		FD_SET(STDIN_FILENO, &read_fd);
+		FD_SET(s, &read_fd);
+		
+		select(s + 1, &read_fd, NULL, NULL, NULL);
+
+		if (FD_ISSET(s, &read_fd)) {
+			if ((n = read(s, buffer + 2, sizeof(buffer)-2)) == -1)
+				break;
+			if (buffer[2] == 0xF0) {
+				buffer[2] = 0;
+				write(STDOUT_FILENO, buffer + 2, n);
+			} else {
+				buffer[0] = 1;		/* Set Q Bit on */
+				buffer[1] = 0x7F;	/* Q Bit escape */
+				write(STDOUT_FILENO, buffer, n + 2);
+			}
+		}
+
+		if (FD_ISSET(STDIN_FILENO, &read_fd)) {
+			if ((n = read(STDIN_FILENO, buffer, 512)) == -1) {
+				close(s);
+				break;
+			}
+			if (buffer[0] == 0) {		/* Q Bit not set */
+				buffer[0] = 0xF0;
+				write(s, buffer, n);
+			} else {
+				/* Lose the leading 0x7F */
+				write(s, buffer + 2, n - 2);
+			}
+		}
+	}
+
+	closelog();
+
+	return 0;
+}
diff --git a/rose/rsmemsiz.c b/rose/rsmemsiz.c
new file mode 100644
index 0000000..c71737c
--- /dev/null
+++ b/rose/rsmemsiz.c
@@ -0,0 +1,204 @@
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/utsname.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+enum meminfo_row { meminfo_main = 0,
+		   meminfo_swap };
+
+enum meminfo_col { meminfo_total = 0, meminfo_used, meminfo_free,
+		   meminfo_shared, meminfo_buffers, meminfo_cached
+};
+
+unsigned read_total_main(void);
+
+/*
+ * This code is slightly modified from the procps package.
+ */
+
+#define UPTIME_FILE  "/proc/uptime"
+#define LOADAVG_FILE "/proc/loadavg"
+#define MEMINFO_FILE "/proc/meminfo"
+
+static char buf[300];
+
+/* This macro opens FILE only if necessary and seeks to 0 so that successive
+   calls to the functions are more efficient.  It also reads the current
+   contents of the file into the global buf.
+*/
+#define FILE_TO_BUF(FILE) {					\
+    static int n, fd = -1;					\
+    if (fd == -1 && (fd = open(FILE, O_RDONLY)) == -1) {	\
+	fprintf(stdout, "ERROR: file %s, %s\r", FILE, strerror(errno));	\
+	close(fd);						\
+	return 0;						\
+    }								\
+    lseek(fd, 0L, SEEK_SET);					\
+    if ((n = read(fd, buf, sizeof buf - 1)) < 0) {		\
+	fprintf(stdout, "ERROR: file %s, %s\r", FILE, strerror(errno));	\
+	close(fd);						\
+	fd = -1;						\
+	return 0;						\
+    }								\
+    buf[n] = '\0';						\
+}
+
+#define SET_IF_DESIRED(x,y)  if (x) *(x) = (y)	/* evals 'x' twice */
+
+int uptime(double *uptime_secs, double *idle_secs) {
+    double up=0, idle=0;
+    
+    FILE_TO_BUF(UPTIME_FILE)
+    if (sscanf(buf, "%lf %lf", &up, &idle) < 2) {
+	fprintf(stdout, "ERROR: Bad data in %s\r", UPTIME_FILE);
+	return 0;
+    }
+    SET_IF_DESIRED(uptime_secs, up);
+    SET_IF_DESIRED(idle_secs, idle);
+    return up;	/* assume never be zero seconds in practice */
+}
+
+int loadavg(double *av1, double *av5, double *av15) {
+    double avg_1=0, avg_5=0, avg_15=0;
+    
+    FILE_TO_BUF(LOADAVG_FILE)
+    if (sscanf(buf, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3) {
+	fprintf(stdout, "ERROR: Bad data in %s\r", LOADAVG_FILE);
+	return 0;
+    }
+    SET_IF_DESIRED(av1,  avg_1);
+    SET_IF_DESIRED(av5,  avg_5);
+    SET_IF_DESIRED(av15, avg_15);
+    return 1;
+}
+
+/* The following /proc/meminfo parsing routine assumes the following format:
+   [ <label> ... ]				# header lines
+   [ <label> ] <num> [ <num> ... ]		# table rows
+   [ repeats of above line ]
+   
+   Any lines with fewer <num>s than <label>s get trailing <num>s set to zero.
+   The return value is a NULL terminated unsigned** which is the table of
+   numbers without labels.  Convenient enumeration constants for the major and
+   minor dimensions are available in the header file.  Note that this version
+   requires that labels do not contain digits.  It is readily extensible to
+   labels which do not *begin* with digits, though.
+*/
+
+#define MAX_ROW 3	/* these are a little liberal for flexibility */
+#define MAX_COL 7
+
+unsigned** meminfo(void) {
+    static unsigned *row[MAX_ROW + 1];		/* row pointers */
+    static unsigned num[MAX_ROW * MAX_COL];	/* number storage */
+    char *p;
+    int i, j, k, l;
+    
+    FILE_TO_BUF(MEMINFO_FILE)
+    if (!row[0])				/* init ptrs 1st time through */
+	for (i=0; i < MAX_ROW; i++)		/* std column major order: */
+	    row[i] = num + MAX_COL*i;		/* A[i][j] = A + COLS*i + j */
+    p = buf;
+    for (i=0; i < MAX_ROW; i++)			/* zero unassigned fields */
+	for (j=0; j < MAX_COL; j++)
+	    row[i][j] = 0;
+    for (i=0; i < MAX_ROW && *p; i++) {		/* loop over rows */
+	while(*p && !isdigit(*p)) p++;		/* skip chars until a digit */
+	for (j=0; j < MAX_COL && *p; j++) {	/* scanf column-by-column */
+	    l = sscanf(p, "%u%n", row[i] + j, &k);
+	    p += k;				/* step over used buffer */
+	    if (*p == '\n' || l < 1)		/* end of line/buffer */
+		break;
+	}
+    }
+/*    row[i+1] = NULL;	terminate the row list, currently unnecessary */
+    return row;					/* NULL return ==> error */
+}
+
+
+/*
+ * by Heikki Hannikainen <oh7lzb at sral.fi> 
+ * The following was mostly learnt from the procps package and the
+ * gnu sh-utils (mainly uname).
+ */
+
+int main(int argc, char **argv)
+{
+	int upminutes, uphours, updays;
+	double uptime_secs, idle_secs;
+	double av[3];
+	unsigned **mem;
+	char *p;
+	struct utsname name;
+	time_t t;
+
+	fprintf(stdout, "Linux/ROSE 001. System parameters\r");
+
+	time(&t);
+	p = ctime(&t);
+	p[24] = '\r';
+	fprintf(stdout, "System time:       %s", p);
+
+	if (uname(&name) == -1)
+		fprintf(stdout, "Cannot get system name\r");
+	else {
+		fprintf(stdout, "Hostname:          %s\r", name.nodename);
+		fprintf(stdout, "Operating system:  %s %s (%s)\r", name.sysname,
+			name.release, name.machine);
+	}
+
+	/* read and calculate the amount of uptime and format it nicely */
+	uptime(&uptime_secs, &idle_secs);
+	updays = (int) uptime_secs / (60*60*24);
+	upminutes = (int) uptime_secs / 60;
+	uphours = upminutes / 60;
+	uphours = uphours % 24;
+	upminutes = upminutes % 60;
+	fprintf(stdout, "Uptime:            ");
+
+  	if (updays)
+		fprintf(stdout, "%d day%s, ", updays, (updays != 1) ? "s" : "");
+
+	if (uphours)
+		fprintf(stdout, "%d hour%s ", uphours, (uphours != 1) ? "s" : "");
+	fprintf(stdout, "%d minute%s\r", upminutes, (upminutes != 1) ? "s" : "");
+
+	loadavg(&av[0], &av[1], &av[2]);
+  	fprintf(stdout, "Load average:      %.2f, %.2f, %.2f\r", av[0], av[1], av[2]);
+
+	if (!(mem = meminfo()) || mem[meminfo_main][meminfo_total] == 0) {
+		/* cannot normalize mem usage */
+		fprintf(stdout, "Cannot get memory information!\r");
+	} else {
+		fprintf(stdout, "Memory:            %5d KB available, %5d KB used, %5d KB free\r",
+			mem[meminfo_main][meminfo_total]    >> 10,
+			(mem[meminfo_main][meminfo_used] -
+		 	mem[meminfo_main][meminfo_buffers] -
+			mem[meminfo_total][meminfo_cached]) >> 10,
+			(mem[meminfo_main][meminfo_free] +
+		 	mem[meminfo_main][meminfo_buffers] +
+			mem[meminfo_total][meminfo_cached]) >> 10);
+
+		fprintf(stdout, "Swap:              %5d KB available, %5d KB used, %5d KB free\r",
+			mem[meminfo_swap][meminfo_total]   >> 10,
+			mem[meminfo_swap][meminfo_used]    >> 10,
+			mem[meminfo_swap][meminfo_free]    >> 10);
+	}
+
+	fprintf(stdout, "\r");
+	fflush(stdout);
+
+	while (1) {
+		if (read(STDIN_FILENO, av, 3) <= 0)
+			break;
+	}
+
+	return 0;
+}
diff --git a/rose/rsparms.8 b/rose/rsparms.8
new file mode 100644
index 0000000..0ed3bcd
--- /dev/null
+++ b/rose/rsparms.8
@@ -0,0 +1,63 @@
+.TH RSPARMS 8 "25 July 1997" Linux "Linux System Managers Manual"
+.SH NAME
+rsparms \- Configure the Rose interface.
+.SH SYNOPSIS
+.B rsparms -nodes add|del address[/mask] port neigh [digis...]
+.LP
+.B rsparms -nodes list
+.LP
+.B rsparms -call <callsign>|none
+.LP
+.B rsparms -version
+.SH DESCRIPTION
+.LP
+This program is used to manipulate the routing tables of the Rose network
+layer. To set up a new route to a Rose node in the routing tables you must
+use the nodes option. All of the parameters are needed to add the node. It
+is probably best to illustrate with an example:
+.LP
+.B 	rsparms -nodes add 2080192303 144 F1OAT-11
+.LP
+This creates a new route to a distant node with the address 2080192303 and
+the packets for that node should be sent on AX.25 port 144 to my immediate
+neighbour F1OAT-11 without going through any digipeaters. For
+example to set up the same node but via a digipeater I would use:
+.LP
+.B 	rsparms -nodes add 2080192303 144 F1OAT-11 F6PRA-9
+.LP
+It is also possible to remove a route to a distant node with the same
+command except that the \(lqadd\(rq is replaced by a \(lqdel\(rq. The other
+parameters must also be present. If the node has no other routes then the
+node will be deleted, and the neighbour node that the connections go via may
+also be deleted if no other node route uses it.
+.LP
+You may list the configured Rose routes using the following syntax:
+.LP
+.B 	rsparms -nodes list
+.LP
+This program may also be used to set up a common AX.25 level 2 callsign that
+will be used for the ROSE node. By default no special level 2 callsign is
+set, but setting it will replace any existing level 2 callsign and register
+another one. Setting the callsign to \(lqnone\(rq will remove the level 2
+callsign. For example:
+.LP
+.B 	rsparms -call VK2KTJ-10
+.LP
+would set the callsign used by Rose internode traffic to VK2KTJ-10.
+.SH OPTIONS
+.TP 10
+.BI \-version
+Display the version information.
+.SH FILES
+.LP
+/etc/ax25/axports
+.br
+/etc/ax25/rsports
+.SH "SEE ALSO"
+.BR call (1),
+.BR rose (4),
+.BR axports (5),
+.BR rsports (5),
+.BR rsparms (8).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/rose/rsparms.c b/rose/rsparms.c
new file mode 100644
index 0000000..4de807e
--- /dev/null
+++ b/rose/rsparms.c
@@ -0,0 +1,258 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/rsconfig.h>
+
+#include "../pathnames.h"
+
+char nodes_usage[]  = "usage: rsparms -nodes add|del nodeaddr[/mask] port neighbour [digis...]\n       rsparms -nodes list\n";
+
+/* print the Rose neighbour whose number is supplied */
+void printnb(char *neigh)
+{
+	FILE* fp;
+	char addr[10], callsign[10], port[10], digi[10];
+	char buff[80];
+	int args;
+
+	if ((fp=fopen(PROC_RS_NEIGH_FILE,"r"))==NULL) {
+		fprintf(stderr,"rsparms: Couldn't open %s file\n",PROC_RS_NEIGH_FILE);
+		exit(1);
+	}
+
+	while (fgets(buff, 80, fp)) {
+		addr[0] = '\0';
+		callsign[0] = '\0';
+		port[0] = '\0';
+		digi[0] = '\0';
+
+		args=sscanf(buff,"%9s %9s %9s %*s %*s %*s %*s %*s %*s %9s",addr,callsign,port,digi);
+
+		if (args==4) {		/* We have a digi */
+			if (strcmp(addr,neigh)==0)
+				printf("%-6s %-9s via %-9s",port,callsign,digi);
+		} else
+		if (args==3) {		/* No digi */
+			if (strcmp(addr,neigh)==0)
+				printf("%-6s %-9s",port,callsign);
+		}
+	}
+	fclose(fp);
+}
+
+void nodes(int s, int argc, char *argv[])
+{
+	struct rose_route_struct rs_node;
+	char *dev;
+	char *mask;
+	char nodeaddr[11];
+	int i, n;
+
+	FILE *fn;
+	char address[12], rmask[5], neigh1[10], neigh2[10], neigh3[10];
+	char buff[80];
+	int args;
+
+	if (argc < 3) {
+		fprintf(stderr, nodes_usage);
+		exit(1);
+	}
+
+	if (ax25_config_load_ports() == 0) {
+		fprintf(stderr, "rsparms: nodes: no AX.25 ports configured\n");
+		exit(1);
+	}
+
+	if (argv[2][0] != 'a' && argv[2][0] != 'd' && argv[2][0] != 'l') {
+		fprintf(stderr, "rsparms: nodes: invalid operation %s\n", argv[2]);
+		close(s);
+		exit(1);
+	}
+
+	if (argv[2][0] == 'l') {
+		if ((fn=fopen(PROC_RS_NODES_FILE,"r"))==NULL) {
+			fprintf(stderr,"rsparms: Couldn't open %s file\n",PROC_RS_NODES_FILE);
+			exit(1);
+		}
+
+		while(fgets(buff,80,fn)) {
+			args=sscanf(buff,"%10s %4s %*s %9s %9s %9s",address, rmask, neigh1, neigh2, neigh3);
+			if (strcmp(address,"address")==0)
+				continue;
+
+			if (args>2) {
+				printf("%10s/%4s -> ",address,rmask);
+				printnb(neigh1);
+				putchar('\n');
+			}
+			if (args>3) {
+				printf("%15s -> ","");
+				printnb(neigh2);
+				putchar('\n');
+			}
+			if (args>4) {
+				printf("%15s -> ","");
+				printnb(neigh3);
+				putchar('\n');
+			}
+		}
+		exit(0);
+	}
+
+	if (argc < 6) {
+		fprintf(stderr, nodes_usage);
+		exit(1);
+	}
+
+	if ((mask = strchr(argv[3], '/')) != NULL) {
+		*mask = '\0';
+		mask++;
+
+		if (sscanf(mask, "%hd", &rs_node.mask) != 1) {
+			fprintf(stderr, "rsparms: nodes: no mask supplied!\n");
+			close(s);
+			exit(1);
+		}
+
+		if (rs_node.mask > 10) {
+			fprintf(stderr, "rsparms: nodes: invalid mask size: %s\n", mask);;
+			close(s);
+			exit(1);
+		}
+	} else {
+		rs_node.mask = 10;
+	}
+
+	/* Make all non significant digits equal to zero */
+	strcpy(nodeaddr, argv[3]);
+
+	for (i = rs_node.mask; i < 10; i++)
+		nodeaddr[i] = '0';
+
+	nodeaddr[i] = '\0';
+
+	if (rose_aton(nodeaddr, rs_node.address.rose_addr) != 0) {
+		fprintf(stderr, "rsparms: nodes: invalid address %s\n", nodeaddr);
+		close(s);
+		exit(1);
+	}
+
+	if ((dev = ax25_config_get_dev(argv[4])) == NULL) {
+		fprintf(stderr, "rsparms: nodes: invalid port name - %s\n", argv[4]);
+		close(s);
+		exit(1);
+	}
+
+	strcpy(rs_node.device, dev);
+
+	if (ax25_aton_entry(argv[5], rs_node.neighbour.ax25_call) != 0) {
+		fprintf(stderr, "rsparms: nodes: invalid callsign %s\n", argv[5]);
+		close(s);
+		exit(1);
+	}
+
+	for (i = 6, n = 0; i < argc && n < AX25_MAX_DIGIS; i++, n++) {
+		if (ax25_aton_entry(argv[i], rs_node.digipeaters[n].ax25_call) != 0) {
+			fprintf(stderr, "rsparms: nodes: invalid callsign %s\n", argv[i]);
+			close(s);
+			exit(1);
+		}
+	}
+
+	rs_node.ndigis = n;
+
+	if (argv[2][0] == 'a') {
+		if (ioctl(s, SIOCADDRT, &rs_node) == -1) {
+			perror("rsparms: SIOCADDRT");
+			close(s);
+			exit(1);
+		}
+	} else {
+		if (ioctl(s, SIOCDELRT, &rs_node) == -1) {
+			perror("rsparms: SIOCDELRT");
+			close(s);
+			exit(1);
+		}
+	}
+}
+
+
+
+
+int main(int argc, char *argv[])
+{
+	ax25_address rose_call;
+	int s = 0;
+	
+	if (argc == 1) {
+		fprintf(stderr, "usage: rsparms -call|-nodes|-version ...\n");
+		return 1;
+	}
+
+	if (strncmp(argv[1], "-v", 2) == 0) {
+		printf("rsparms: %s\n", VERSION);
+		return 0;
+	}
+
+	if (strncmp(argv[1], "-c", 2) == 0) {
+		if (argc < 3) {
+			fprintf(stderr, "usage: rsparms -call <callsign>|none\n");
+			return 1;
+		}
+
+		if (strcmp(argv[2], "none") != 0) {
+			if (ax25_aton_entry(argv[2], rose_call.ax25_call) == -1) {
+				fprintf(stderr, "rsparms: invalid callsign %s\n", argv[2]);
+				return 1;
+			}
+		} else {
+			rose_call = null_ax25_address;
+		}
+
+		if ((s = socket(AF_ROSE, SOCK_SEQPACKET, 0)) < 0) {
+			perror("rsparms: socket");
+			return 1;
+		}
+		
+		if (ioctl(s, SIOCRSL2CALL, &rose_call) == -1) {
+			perror("rsparms: ioctl");
+			close(s);
+			return 1;
+		}
+
+		close(s);
+
+		return 0;
+	}
+
+	if (strncmp(argv[1], "-n", 2) == 0) {
+
+		if ((s = socket(AF_ROSE, SOCK_SEQPACKET, 0)) < 0) {
+			perror("rsparms: socket");
+			return 1;
+		}
+		nodes(s, argc, argv);
+		close(s);
+		return 0;
+	}
+
+	fprintf(stderr, "usage: rsparms -call|-nodes|-version ...\n");
+	
+	close(s);
+	
+	return 1;
+}
diff --git a/rose/rsuplnk.8 b/rose/rsuplnk.8
new file mode 100644
index 0000000..b9a65f1
--- /dev/null
+++ b/rose/rsuplnk.8
@@ -0,0 +1,63 @@
+.TH RSUPLNK 8 "29 April 1997" Linux "Linux Programmer's Manual"
+.SH NAME
+rsuplnk \- User entry into the ROSE network.
+.SH SYNOPSIS
+.B rsuplnk [-q] <port>
+.SH DESCRIPTION
+.LP
+The
+.B rsuplnk
+program allows a user to gain entry into the ROSE network using the standard
+pseudo-digipeating method. Recent Linux kernels are aware of this form
+of operation and the
+.B ax25d
+program can listen for such connections. The normal mode of operation of a
+ROSE switch is to have one ROSE address (ie port) per physical AX.25 port.
+Therefore ROSE users coming in on a given AX.25 port will appear as if they
+come from the associated ROSE port. This is the reason for the need for a
+ROSE port as an argument.
+.LP
+To use
+.B rsuplnk
+you need an entry in
+.B ax25d.conf
+to listen for incoming connections. In the example below, I will be
+listening for ROSE connections on my AX.25 port 144 using the callsign
+KE4GAJ-10 and the ROSE port associated with the AX.25 port is rs144.
+.LP
+#
+.br
+[KE4GAJ-10* VIA 144]
+.br
+NOCALL  * * * * * * L
+.br
+default * * * * * * - root /usr/sbin/rsuplnk rsuplnk rs144
+.br
+#
+.LP
+There would typically be one
+.B rsuplnk
+per user access AX.25 port. The associated program for exiting a ROSE
+network is
+.B rsdwnlnk.
+.LP
+All errors generated by
+.B rsuplnk
+are written to the system debug log file.
+.SH OPTIONS
+.TP 8
+.BI \-q
+Supresses the messages generated by
+.B rsuplnk
+when making the connection.
+.SH FILES
+.br
+/etc/ax25/rsports
+.SH "SEE ALSO"
+.BR rose (4),
+.BR ax25d.conf (5),
+.BR ax25d (8),
+.BR rsdwnlnk (8),
+.BR rose_call (8).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/rose/rsuplnk.c b/rose/rsuplnk.c
new file mode 100644
index 0000000..eadb0ed
--- /dev/null
+++ b/rose/rsuplnk.c
@@ -0,0 +1,289 @@
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <signal.h>
+#include <syslog.h>
+
+#include <config.h>
+
+#include <sys/time.h>
+#include <sys/types.h>
+
+#include <sys/socket.h>
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/rsconfig.h>
+
+void alarm_handler(int sig)
+{
+}
+
+int main(int argc, char **argv)
+{
+	unsigned char buffer[512], *addr, *p;
+	char rose_address[11];
+	fd_set read_fd;
+	int n, s, dnicindex = -1, addrindex = -1;
+	int yes = 1, verbose = 1;
+	socklen_t addrlen;
+	struct sockaddr_rose rosebind, roseconnect;
+	struct full_sockaddr_ax25 ax25sock, ax25peer;
+
+	openlog("rsuplnk", LOG_PID, LOG_DAEMON);
+
+	/*
+	 * Arguments should be "rsuplnk [-q] roseport"
+	 */
+	if (argc > 2 && strcmp(argv[1], "-q") == 0) {
+		verbose = 0;
+		--argc;
+		++argv;
+	}
+
+	if (argc != 2) {
+		syslog(LOG_ERR, "invalid number of parameters\n");
+		closelog();
+		return 1;
+	}
+
+	if (rs_config_load_ports() == 0) {
+		syslog(LOG_ERR, "problem with rsports file\n");
+		closelog();
+		return 1;
+	}
+
+	addrlen = sizeof(struct full_sockaddr_ax25);
+
+	if (getsockname(STDIN_FILENO, (struct sockaddr *)&ax25sock, &addrlen) == -1) {
+		syslog(LOG_ERR, "cannot getsockname, %s\n", strerror(errno));
+		closelog();
+		return 1;
+	}
+
+	addrlen = sizeof(struct full_sockaddr_ax25);
+
+	if (getpeername(STDIN_FILENO, (struct sockaddr *)&ax25peer, &addrlen) == -1) {
+		syslog(LOG_ERR, "cannot getpeername, %s\n", strerror(errno));
+		closelog();
+		return 1;
+	}
+#ifdef HAVE_AX25_PIDINCL
+	if (setsockopt(STDIN_FILENO, SOL_AX25, AX25_PIDINCL, &yes, sizeof(yes)) == -1) {
+		syslog(LOG_ERR, "cannot setsockopt(AX25_PIDINCL) - %s\n", strerror(errno));
+		closelog();
+		return 1;
+	}
+#endif /* HAVE_AX25_PIDINCL */
+	roseconnect.srose_family = rosebind.srose_family = AF_ROSE;
+	roseconnect.srose_ndigis = rosebind.srose_ndigis = 0;
+	addrlen = sizeof(struct sockaddr_rose);
+
+	if ((addr = rs_config_get_addr(argv[1])) == NULL) {
+		syslog(LOG_ERR, "invalid Rose port name - %s\n", argv[1]);
+		closelog();
+		return 1;
+	}
+
+	if (rose_aton(addr, rosebind.srose_addr.rose_addr) == -1) {
+		syslog(LOG_ERR, "invalid ROSE port address - %s\n", argv[1]);
+		closelog();
+		return 1;
+	}
+
+	/*
+	 *	Copy our DNIC in as default.
+	 */
+	memset(rose_address, 0x00, 11);
+	memcpy(rose_address, addr, 4);
+
+	for (n = 0; n < ax25peer.fsa_ax25.sax25_ndigis; n++) {
+		addr = ax25_ntoa(&ax25peer.fsa_digipeater[n]);
+		
+		if (strspn(addr, "0123456789-") == strlen(addr)) {
+			if ((p = strchr(addr, '-')) != NULL)
+				*p = '\0';
+			switch (strlen(addr)) {
+				case 4:
+					memcpy(rose_address + 0, addr, 4);
+					dnicindex = n;
+					break;
+				case 6:
+					memcpy(rose_address + 4, addr, 6);
+					addrindex = n;
+					break;
+				default:
+					break;
+			}
+		}
+	}
+
+	/*
+	 *	The user didn't give an address.
+	 */
+	if (addrindex == -1) {
+		strcpy(buffer, "*** No ROSE address given\r");
+		write(STDOUT_FILENO, buffer, strlen(buffer));
+		sleep(20);
+		closelog();
+		return 1;
+	}
+
+	if (rose_aton(rose_address, roseconnect.srose_addr.rose_addr) == -1) {
+		syslog(LOG_ERR, "invalid Rose address - %s\n", argv[4]);
+		closelog();
+		return 1;
+	}
+
+	rosebind.srose_call    = ax25peer.fsa_ax25.sax25_call;
+
+	roseconnect.srose_call = ax25sock.fsa_ax25.sax25_call;
+
+	/*
+	 *	A far end digipeater was specified.
+	 */
+	if (addrindex > 0) {
+		roseconnect.srose_ndigis = 1;
+		roseconnect.srose_digi   = ax25peer.fsa_digipeater[addrindex - 1];
+	}
+
+	/*
+	 *	Check for a local digipeater.
+	 */
+	if (dnicindex != -1) {
+		if (ax25peer.fsa_ax25.sax25_ndigis - dnicindex > 2) {
+			rosebind.srose_ndigis = 1;
+			rosebind.srose_digi   = ax25peer.fsa_digipeater[dnicindex + 2];
+		}
+	} else {
+		if (ax25peer.fsa_ax25.sax25_ndigis - addrindex > 2) {
+			rosebind.srose_ndigis = 1;
+			rosebind.srose_digi   = ax25peer.fsa_digipeater[addrindex + 2];
+		}
+	}
+
+	/*
+	 * Open the socket into the kernel.
+	 */
+	if ((s = socket(AF_ROSE, SOCK_SEQPACKET, 0)) < 0) {
+		syslog(LOG_ERR, "cannot open ROSE socket, %s\n", strerror(errno));
+		closelog();
+		return 1;
+	}
+
+	/*
+	 * Set our AX.25 callsign and Rose address accordingly.
+	 */
+	if (bind(s, (struct sockaddr *)&rosebind, addrlen) != 0) {
+		syslog(LOG_ERR, "cannot bind ROSE socket, %s\n", strerror(errno));
+		closelog();
+		close(s);
+		return 1;
+	}
+
+	if (setsockopt(s, SOL_ROSE, ROSE_QBITINCL, &yes, sizeof(yes)) == -1) {
+		syslog(LOG_ERR, "cannot setsockopt(ROSE_QBITINCL) - %s\n", strerror(errno));
+		closelog();
+		close(s);
+		return 1;
+	}
+
+	if (verbose) {
+		strcpy(buffer, "*** Connection in progress\r");
+		write(STDOUT_FILENO, buffer, strlen(buffer));
+	}
+
+	/*
+	 * If no response in 5 minutes, go away.
+	 */
+	alarm(300);
+
+	signal(SIGALRM, alarm_handler);
+
+	/*
+	 * Lets try and connect to the far end.
+	 */
+	if (connect(s, (struct sockaddr *)&roseconnect, addrlen) != 0) {
+		switch (errno) {
+			case ECONNREFUSED:
+				strcpy(buffer, "*** Disconnected - 0100 - Number Busy\r");
+				break;
+			case ENETUNREACH:
+				strcpy(buffer, "*** Disconnected - 0D00 - Not Obtainable\r");
+				break;
+			case EINTR:
+				strcpy(buffer, "*** Disconnected - 3900 - Ship Absent\r");
+				break;
+			default:
+				sprintf(buffer, "*** Disconnected - %d - %s\r", errno, strerror(errno));
+				break;
+		}
+
+		close(s);
+
+		if (verbose) {
+			write(STDOUT_FILENO, buffer, strlen(buffer));
+			sleep(20);
+		}
+
+		return 0;
+	}
+
+	/*
+	 * We got there.
+	 */
+	alarm(0);
+
+	if (verbose) {
+		strcpy(buffer, "*** Connected\r");
+		write(STDOUT_FILENO, buffer, strlen(buffer));
+	}
+
+	/*
+	 * Loop until one end of the connection goes away.
+	 */
+	for (;;) {
+		FD_ZERO(&read_fd);
+		FD_SET(STDIN_FILENO, &read_fd);
+		FD_SET(s, &read_fd);
+		
+		select(s + 1, &read_fd, NULL, NULL, NULL);
+
+		if (FD_ISSET(s, &read_fd)) {
+			if ((n = read(s, buffer, 512)) == -1) {
+				strcpy(buffer, "\r*** Disconnected - 0000 - DTE Originated\r");
+				write(STDOUT_FILENO, buffer, strlen(buffer));
+				break;
+			}
+			if (buffer[0] == 0) {		/* Q Bit not set */
+				buffer[0] = 0xF0;
+				write(STDOUT_FILENO, buffer, n);
+			} else {
+				/* Lose the leading 0x7F */
+				write(STDOUT_FILENO, buffer + 2, n - 2);
+			}
+		}
+
+		if (FD_ISSET(STDIN_FILENO, &read_fd)) {
+			if ((n = read(STDIN_FILENO, buffer + 2, sizeof(buffer)-2)) == -1) {
+				close(s);
+				break;
+			}
+			if (buffer[2] == 0xF0) {
+				buffer[2] = 0;
+				write(s, buffer + 2, n);
+			} else {
+				buffer[0] = 1;		/* Set Q bit on */
+				buffer[1] = 0x7F;	/* PID Escape   */
+				write(s, buffer, n + 2);
+			}
+		}
+	}
+
+	closelog();
+
+	return 0;
+}
diff --git a/rose/rsusers.sh b/rose/rsusers.sh
new file mode 100755
index 0000000..6dff1ce
--- /dev/null
+++ b/rose/rsusers.sh
@@ -0,0 +1,128 @@
+#! /bin/sh
+
+ALL=n
+
+if [ $# = 1 ]; then
+    ALL=y
+fi
+
+printf "Linux/ROSE 001. AX.25, NET/ROM and ROSE Users.\r"
+
+if [ -r /proc/net/ax25 ]; then
+    cat /proc/net/ax25 | awk '
+	BEGIN  {
+		printf "Active AX.25 Sessions\r"
+		printf "Dest       Source     State\r"
+		n = 0
+	       }
+	NR > 1 {
+		if ($4 == 0) {
+		    state = "LISTENING"
+		} else if ($4 == 1) {
+		    state = "CONNECTING"
+		} else if ($4 == 2) {
+		    state = "DISCONNECTING"
+		} else if ($4 == 3) {
+		    state = "CONNECTED"
+		} else {
+		    state = "RECOVERY"
+		}
+		if ($4 != 0) {
+		    printf "%-9s  %-9s  %s\r", $1, $2, state
+		    n++
+		} else {
+		    if (ALL == "y") {
+			printf "%-9s  %-9s  %s\r", $1, $2, state
+			n++
+		    }
+		}
+	       }
+	END    {
+		    if (n == 0) {
+			printf "None active\r"
+		    }
+	       }' ALL=$ALL
+
+	printf "\r"
+fi
+
+if [ -r /proc/net/nr ]; then
+    cat /proc/net/nr | awk '
+	BEGIN  {
+		printf "Active NET/ROM Sessions\r"
+		printf "User       Dest       Source     State\r"
+		n = 0
+	       }
+	NR > 1 {
+		if ($7 == 0) {
+		    state = "LISTENING"
+		} else if ($7 == 1) {
+		    state = "CONNECTING"
+		} else if ($7 == 2) {
+		    state = "DISCONNECTING"
+		} else if ($7 == 3) {
+		    state = "CONNECTED"
+		} else {
+		    state = "RECOVERY"
+		}
+		if ($7 != 0) {
+		    printf "%-9s  %-9s  %-9s  %s\r", $1, $2, $3, state
+		    n++
+		} else {
+		    if (ALL == "y") {
+			printf "%-9s  %-9s  %-9s  %s\r", $1, $2, $3, state
+			n++
+		    }
+		}
+	       }
+	END    {
+		    if (n == 0) {
+			printf "None active\r"
+		    }
+	       }' ALL=$ALL
+
+	printf "\r"
+fi
+
+if [ -r /proc/net/rose ]; then
+    cat /proc/net/rose | awk '
+	BEGIN  {
+		printf "Active ROSE Sessions\r"
+		printf "Dest                   Source                 State\r"
+		n = 0
+	       }
+	NR > 1 {
+		if ($7 == 0) {
+		    state = "LISTENING"
+		} else if ($7 == 1) {
+		    state = "CONNECTING"
+		} else if ($7 == 2) {
+		    state = "DISCONNECTING"
+		} else if ($7 == 3) {
+		    state = "CONNECTED"
+		} else {
+		    state = "RESETTING"
+		}
+		if ($7 != 0) {
+		    printf "%-10s  %-9s  %-10s  %-9s  %s\r", $1, $2, $3, $4, state
+		    n++
+		} else {
+		    if (ALL == "y") {
+			printf "%-10s  %-9s  %-10s  %-9s  %s\r", $1, $2, $3, $4, state
+			n++
+		    }
+		}
+	       }
+	END    {
+		    if (n == 0) {
+			printf "None active\r"
+		    }
+	       }' ALL=$ALL
+
+	printf "\r"
+fi
+
+read x
+
+exit 0
+
diff --git a/tcpip/Makefile.am b/tcpip/Makefile.am
new file mode 100644
index 0000000..7a5a2cb
--- /dev/null
+++ b/tcpip/Makefile.am
@@ -0,0 +1,32 @@
+
+etcfiles = rip98d.conf ttylinkd.conf
+
+installconf:
+	$(mkinstalldirs) $(DESTDIR)$(AX25_SYSCONFDIR)
+	@list='$(etcfiles)'; for p in $$list; do \
+	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p"; \
+	  $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p; \
+	done
+
+sbin_PROGRAMS = rip98d ttylinkd
+
+man_MANS = rip98d.conf.5 rip98d.8 ttylinkd.conf.5 ttylinkd.8
+
+doc_DATA= ttylinkd.README ttylinkd.INSTALL
+
+EXTRA_DIST = $(man_MANS) $(etcfiles) $(doc_DATA)
+
+rip98d_SOURCES = 	\
+	rip98d.c	\
+	rip98r.c	\
+	rip98t.c	\
+	rip98d.h
+
+rip98d_LDADD = $(AX25_LIB)
+
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR=${sysconfdir}/ax25/
+AX25_LOCALSTATEDIR=${localstatedir}/ax25/
+
diff --git a/tcpip/Makefile.in b/tcpip/Makefile.in
new file mode 100644
index 0000000..cc6f16c
--- /dev/null
+++ b/tcpip/Makefile.in
@@ -0,0 +1,686 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+sbin_PROGRAMS = rip98d$(EXEEXT) ttylinkd$(EXEEXT)
+subdir = tcpip
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man5dir)" \
+	"$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)"
+PROGRAMS = $(sbin_PROGRAMS)
+am_rip98d_OBJECTS = rip98d.$(OBJEXT) rip98r.$(OBJEXT) rip98t.$(OBJEXT)
+rip98d_OBJECTS = $(am_rip98d_OBJECTS)
+am__DEPENDENCIES_1 =
+rip98d_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ttylinkd_SOURCES = ttylinkd.c
+ttylinkd_OBJECTS = ttylinkd.$(OBJEXT)
+ttylinkd_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(rip98d_SOURCES) ttylinkd.c
+DIST_SOURCES = $(rip98d_SOURCES) ttylinkd.c
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man5dir = $(mandir)/man5
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man_MANS)
+DATA = $(doc_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+etcfiles = rip98d.conf ttylinkd.conf
+man_MANS = rip98d.conf.5 rip98d.8 ttylinkd.conf.5 ttylinkd.8
+doc_DATA = ttylinkd.README ttylinkd.INSTALL
+EXTRA_DIST = $(man_MANS) $(etcfiles) $(doc_DATA)
+rip98d_SOURCES = \
+	rip98d.c	\
+	rip98r.c	\
+	rip98t.c	\
+	rip98d.h
+
+rip98d_LDADD = $(AX25_LIB)
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+	   -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\" 
+
+AX25_SYSCONFDIR = ${sysconfdir}/ax25/
+AX25_LOCALSTATEDIR = ${localstatedir}/ax25/
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tcpip/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu tcpip/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+rip98d$(EXEEXT): $(rip98d_OBJECTS) $(rip98d_DEPENDENCIES) $(EXTRA_rip98d_DEPENDENCIES) 
+	@rm -f rip98d$(EXEEXT)
+	$(LINK) $(rip98d_OBJECTS) $(rip98d_LDADD) $(LIBS)
+ttylinkd$(EXEEXT): $(ttylinkd_OBJECTS) $(ttylinkd_DEPENDENCIES) $(EXTRA_ttylinkd_DEPENDENCIES) 
+	@rm -f ttylinkd$(EXEEXT)
+	$(LINK) $(ttylinkd_OBJECTS) $(ttylinkd_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rip98d.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rip98r.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rip98t.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ttylinkd.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man5: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man5dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.5[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man5:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man5dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.5[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
+install-man8: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man8dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.8[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man8:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man8dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.8[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
+install-docDATA: $(doc_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+	done
+
+uninstall-docDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-docDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man5 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-docDATA uninstall-man uninstall-sbinPROGRAMS
+
+uninstall-man: uninstall-man5 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-sbinPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-docDATA install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-man5 \
+	install-man8 install-pdf install-pdf-am install-ps \
+	install-ps-am install-sbinPROGRAMS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-docDATA uninstall-man uninstall-man5 \
+	uninstall-man8 uninstall-sbinPROGRAMS
+
+
+installconf:
+	$(mkinstalldirs) $(DESTDIR)$(AX25_SYSCONFDIR)
+	@list='$(etcfiles)'; for p in $$list; do \
+	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p"; \
+	  $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p; \
+	done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tcpip/rip98d.8 b/tcpip/rip98d.8
new file mode 100644
index 0000000..9c67c58
--- /dev/null
+++ b/tcpip/rip98d.8
@@ -0,0 +1,59 @@
+.TH RIP98D 8 "20 August 1996" Linux "Linux System Managers Manual"
+.SH NAME
+rip98d \- Send and receive RIP98 routing messages
+.SH SYNOPSIS
+.B rip98d [-d] [-l] [-r] [-t interval] [-v]
+.SH DESCRIPTION
+.LP
+The RIP98 routing protocol was devised by John Wiseman G8BPQ as an
+alternative to both traditional RIP and RSPF for use in an RF environment.
+Its main advantage is that each routing element only takes six bytes and is
+therefore much more efficient in terms of bandwidth than other routing
+protocols.
+.LP
+In operation
+.B rip98d
+that each neighbour that also uses RIP98 must be listed. RIP98 is not a
+broadcast protocol and each neighbour is individually contacted. Any
+incoming RIP98 message is also validated against this list. The list of
+neighbours is held in /etc/ax25/rip98d.conf, and each line is
+either the name or the dotted decimal IP address of the neighbour.
+.LP
+The time interval between RIP98 transmissions is set to one hour by default
+but other intervals can be set with the \-t option. The routes advertised
+and received can be restricted by the \-r option which only allows
+processing of ampr.org addresses. At present
+.B rip98d
+is under development and any feedback on its operation would be welcome.
+.SH OPTIONS
+.TP 16
+.BI \-d
+Set debugging on. Information is only output if the logging option is also
+enabled.
+.TP 16
+.BI \-l
+Enable logging to the system log, the default is off.
+.TP 16
+.BI \-r
+Restricts the transmitting and receiving of routes to ampr.org (44.x.x.x)
+addresses only.
+.TP 16
+.BI "\-t interval"
+The time interval between routing broadcasts, in minutes. The default is 60
+minutes.
+.TP 16
+.BI \-v
+Display the version.
+.SH FILES
+.nf
+/proc/net/route
+.br
+/etc/ax25/rip98d.conf
+.fi
+.SH "SEE ALSO"
+.BR rip98.conf (5),
+.BR arp (8),
+.BR ifconfig (8),
+.BR route (8).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
diff --git a/tcpip/rip98d.c b/tcpip/rip98d.c
new file mode 100644
index 0000000..8688177
--- /dev/null
+++ b/tcpip/rip98d.c
@@ -0,0 +1,365 @@
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <netdb.h>
+#include <syslog.h>
+#include <signal.h>
+#include <sys/time.h>
+#include <time.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <net/route.h>
+
+#include <netax25/daemon.h>
+
+
+#include "../pathnames.h"
+#include "rip98d.h"
+
+struct dest_struct dest_list[50];
+
+int dest_count = 0;
+
+int debug            = FALSE;
+int route_restrict   = FALSE;
+int logging          = FALSE;
+
+struct route_struct *first_route = NULL;
+
+static struct mask_struct {
+	unsigned long int mask;
+	unsigned int bits;
+} mask_table[] = {
+	{0xFFFFFFFF, 32},
+	{0xFFFFFFFE, 31},
+	{0xFFFFFFFC, 30},
+	{0xFFFFFFF8, 29},
+	{0xFFFFFFF0, 28},
+	{0xFFFFFFE0, 27},
+	{0xFFFFFFC0, 26},
+	{0xFFFFFF80, 25},
+	{0xFFFFFF00, 24},
+	{0xFFFFFE00, 23},
+	{0xFFFFFC00, 22},
+	{0xFFFFF800, 21},
+	{0xFFFFF000, 20},
+	{0xFFFFE000, 19},
+	{0xFFFFC000, 18},
+	{0xFFFF8000, 17},
+	{0xFFFF0000, 16},
+	{0xFFFE0000, 15},
+	{0xFFFC0000, 14},
+	{0xFFF80000, 13},
+	{0xFFF00000, 12},
+	{0xFFE00000, 11},
+	{0xFFC00000, 10},
+	{0xFF800000,  9},
+	{0xFF000000,  8},
+	{0xFE000000,  7},
+	{0xFC000000,  6},
+	{0xF8000000,  5},
+	{0xF0000000,  4},
+	{0xE0000000,  3},
+	{0xC0000000,  2},
+	{0x80000000,  1},
+	{0x00000000,  0},
+};
+
+static void terminate(int sig)
+{
+	if (logging) {
+		syslog(LOG_INFO, "terminating on SIGTERM\n");
+		closelog();
+	}
+	
+	exit(0);
+}
+
+unsigned int mask2bits(unsigned long int mask)
+{
+	struct mask_struct *t;
+	
+	for (t = mask_table; t->mask != 0; t++)
+		if (mask == t->mask)
+			return t->bits;
+
+	return 0;
+}
+
+unsigned long int bits2mask(unsigned int bits)
+{
+	struct mask_struct *t;
+	
+	for (t = mask_table; t->mask != 0; t++)
+		if (bits == t->bits)
+			return htonl(t->mask);
+
+	return 0;
+}
+
+static unsigned long int hex2intrev(char *buffer)
+{
+	unsigned long int result = 0L;
+
+	if (buffer[0] >= 'A')
+		result += (buffer[0] - 'A' + 10) * 16;
+	else
+		result += (buffer[0] - '0') * 16;
+
+	if (buffer[1] >= 'A')
+		result += buffer[1] - 'A' + 10;
+	else
+		result += buffer[1] - '0';
+
+	if (buffer[2] >= 'A')
+		result += (buffer[2] - 'A' + 10) * 16 * 16 * 16;
+	else
+		result += (buffer[2] - '0') * 16 * 16 * 16;
+
+	if (buffer[3] >= 'A')
+		result += (buffer[3] - 'A' + 10) * 16 * 16;
+	else
+		result += (buffer[3] - '0') * 16 * 16;
+
+	if (buffer[4] >= 'A')
+		result += (buffer[4] - 'A' + 10) * 16 * 16 * 16 * 16 * 16;
+	else
+		result += (buffer[4] - '0') * 16 * 16 * 16 * 16 * 16;
+
+	if (buffer[5] >= 'A')
+		result += (buffer[5] - 'A' + 10) * 16 * 16 * 16 * 16;
+	else
+		result += (buffer[5] - '0') * 16 * 16 * 16 * 16;
+
+	if (buffer[6] >= 'A')
+		result += (buffer[6] - 'A' + 10) * 16 * 16 * 16 * 16 * 16 * 16 * 16;
+	else
+		result += (buffer[6] - '0') * 16 * 16 * 16 * 16 * 16 * 16 * 16;
+
+	if (buffer[7] >= 'A')
+		result += (buffer[7] - 'A' + 10) * 16 * 16 * 16 * 16 * 16 * 16;
+	else
+		result += (buffer[7] - '0') * 16 * 16 * 16 * 16 * 16 * 16;
+
+	return result;
+}
+
+static int read_routes(void)
+{
+	struct route_struct *route, *temp;
+	char buffer[1023], iface[16], net_addr[64], gate_addr[64], mask_addr[64];
+	int n, iflags, refcnt, use, metric, mss, window;
+	struct in_addr address;
+	unsigned long int netmask;
+	unsigned long int network;
+	FILE *fp;
+
+	if (first_route != NULL) {
+		route = first_route;
+		
+		while (route != NULL) {
+			temp = route->next;
+			free(route);
+			route = temp;
+		}
+
+		first_route = NULL;
+	}
+	
+	if ((fp = fopen(PROC_IP_ROUTE_FILE, "r")) == NULL) {
+		if (logging)
+			syslog(LOG_ERR, "error cannot open %s\n", PROC_IP_ROUTE_FILE);
+		return FALSE;
+	}
+
+	while (fgets(buffer, 1023, fp) != NULL) {
+		n = sscanf(buffer, "%s %s %s %X %d %d %d %s %d %d\n",
+			iface, net_addr, gate_addr, &iflags, &refcnt, &use,
+			&metric, mask_addr, &mss, &window);
+
+		if (n != 10)
+			continue;
+
+		address.s_addr = htonl(hex2intrev(net_addr));
+		netmask        = mask2bits(hex2intrev(mask_addr));
+
+		network = inet_netof(address);
+		
+		if (network == 0 || network == 127) {
+			if (debug && logging)
+				syslog(LOG_DEBUG, "rejecting route to %s/%ld - should not be propogated\n", inet_ntoa(address), netmask);
+			continue;
+		}
+
+		if (route_restrict) {
+			if (inet_netof(address) != 44) {
+				if (debug && logging)
+					syslog(LOG_DEBUG, "rejecting route to %s/%ld - not ampr.org\n", inet_ntoa(address), netmask);
+				continue;
+			}
+		}
+
+		if ((route = malloc(sizeof(struct route_struct))) == NULL) {
+			if (logging)
+				syslog(LOG_ERR, "out of memory !\n");
+			return FALSE;
+		}
+
+		route->addr   = address;
+		route->bits   = netmask;
+		route->metric = metric;
+		route->action = (iflags & RTF_DYNAMIC) ? ORIG_ROUTE : FIXED_ROUTE;
+
+		route->next = first_route;
+		first_route = route;
+	}
+	
+	fclose(fp);
+	
+	return TRUE;
+}
+
+static int load_dests(void)
+{
+	struct hostent *host;
+	char buffer[255], *s;
+	FILE *fp;
+	
+	if ((fp = fopen(CONF_RIP98D_FILE, "r")) == NULL) {
+		fprintf(stderr, "rip98d: cannot open config file\n");
+		return FALSE;
+	}
+		
+	while (fgets(buffer, 255, fp) != NULL) {
+		if ((s = strchr(buffer, '\n')) != NULL) *s = '\0';
+
+		if ((host = gethostbyname(buffer)) == NULL) {
+			fprintf(stderr, "rip98d: cannot resolve name %s\n", buffer);
+			fclose(fp);
+			return FALSE;
+		}
+
+		memcpy((char *)&dest_list[dest_count].dest_addr, host->h_addr, host->h_length);
+		dest_count++;
+	}
+	
+	fclose(fp);
+
+	if (dest_count == 0)
+		return FALSE;
+	
+	return TRUE;
+}
+
+int main(int argc, char **argv)
+{
+	int s, i;
+	struct sockaddr_in loc_addr;
+	struct timeval timeout;
+	time_t timenow, timelast = 0;
+	int interval = 3600;
+	fd_set fdset;
+
+	if (!load_dests()) {
+		fprintf(stderr, "rip98d: no destination routers defined\n");
+		return 1;
+	}
+
+	while ((i = getopt(argc, argv, "dlrt:v")) != -1) {
+		switch (i) {
+			case 'd':
+				debug = TRUE;
+				break;
+			case 'l':
+				logging = TRUE;
+				break;
+			case 'r':
+				route_restrict = TRUE;
+				break; 
+			case 't':
+				interval = atoi(optarg) * 60;
+				if (interval < 60 || interval > 7200) {
+					fprintf(stderr, "rip98d: invalid time interval\n");
+					return 1;
+				}
+				break;
+			case 'v':
+				printf("rip98d: %s\n", VERSION);
+				return 0;
+			case ':':
+				fprintf(stderr, "rip98d: invalid time interval\n");
+				return 1;
+			case '?':
+				fprintf(stderr, "usage: rip98d [-d] [-l] [-r] [-t interval] [-v]\n");
+				return 1;
+		}
+	}
+
+	signal(SIGTERM, terminate);
+
+	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+		perror("rip98d: socket");
+		return 1;
+	}
+
+	memset((char *)&loc_addr, 0, sizeof(loc_addr));
+	loc_addr.sin_family      = AF_INET;
+	loc_addr.sin_addr.s_addr = htonl(INADDR_ANY);
+	loc_addr.sin_port        = htons(RIP_PORT);	
+
+	if (bind(s, (struct sockaddr *)&loc_addr, sizeof(loc_addr)) < 0) {
+		perror("rip98d: bind");
+		close(s);
+		return 1;
+	}
+
+	if (!daemon_start(FALSE)) {
+		fprintf(stderr, "rip98d: cannot become a daemon\n");
+		close(s);
+		return 1;
+	}
+
+	if (logging) {
+		openlog("rip98d", LOG_PID, LOG_DAEMON);
+		syslog(LOG_INFO, "starting");
+	}
+
+	for (;;) {
+		FD_ZERO(&fdset);
+		FD_SET(s, &fdset);
+
+		timeout.tv_sec  = 60;
+		timeout.tv_usec = 0;
+	
+		select(s + 1, &fdset, NULL, NULL, &timeout);
+
+		if (!read_routes()) {
+			if (logging)
+				closelog();
+			return 1;
+		}
+
+		if (FD_ISSET(s, &fdset))
+			receive_routes(s);
+
+		time(&timenow);
+
+		if ((timenow - timelast) > interval) {
+			timelast = timenow;
+			if (first_route != NULL)
+				transmit_routes(s);
+		}
+	}
+}
diff --git a/tcpip/rip98d.conf b/tcpip/rip98d.conf
new file mode 100644
index 0000000..3574d56
--- /dev/null
+++ b/tcpip/rip98d.conf
@@ -0,0 +1 @@
+44.131.4.7
diff --git a/tcpip/rip98d.conf.5 b/tcpip/rip98d.conf.5
new file mode 100644
index 0000000..77d15e2
--- /dev/null
+++ b/tcpip/rip98d.conf.5
@@ -0,0 +1,19 @@
+.TH RIP98.CONF 5 "2 August 1996" Linux "Linux Programmer's Manual"
+.SH NAME
+rip98d.conf \- control RIP98 routing messages.
+.SH DESCRIPTION
+.LP
+.B Rip98d.conf
+controls the transmission of RIP98 routing messages. RIP98 is not a
+broadcast protocol but instead is transmitted individually to each other
+known RIP98 capable system. The list of these systems is kept in the RIP98
+configuration file as a list of host names or IP numbers that are to be
+transmitted to, and messages received from.
+.SH FILES
+.LP
+/etc/ax25/rip98d.conf
+.SH "SEE ALSO"
+.BR arp (8),
+.BR ifconfig (8),
+.BR rip98d (8),
+.BR route (8).
diff --git a/tcpip/rip98d.h b/tcpip/rip98d.h
new file mode 100644
index 0000000..fc4ef8f
--- /dev/null
+++ b/tcpip/rip98d.h
@@ -0,0 +1,58 @@
+#ifndef	TRUE
+#define	TRUE	1
+#endif
+#ifndef	FALSE
+#define	FALSE	0
+#endif
+
+#define	RIP_PORT	520
+
+#define	RIPCMD_REQUEST	1
+#define	RIPCMD_RESPONSE	2
+
+#define	RIP98_INFINITY	16
+
+#define	RIP_VERSION_98	98
+
+#define	RIP_AF_INET	2
+
+#define	RIP98_HEADER	4
+#define	RIP98_ENTRY	6
+
+#define	RIP98_MAX_FRAME	30
+
+struct route_struct {
+	struct route_struct *next;
+	struct in_addr addr;
+	int bits;
+	int metric;
+#define	ORIG_ROUTE	0
+#define	FIXED_ROUTE	1
+#define	NEW_ROUTE	2
+#define	DEL_ROUTE	3
+	int action;
+};
+
+extern struct route_struct *first_route;
+
+struct dest_struct {
+	struct in_addr dest_addr;
+};
+
+extern struct dest_struct dest_list[];
+
+extern int dest_count;
+
+extern int debug;
+extern int route_restrict;
+extern int logging;
+
+/* In rip98d.c */
+extern unsigned int mask2bits(unsigned long int);
+extern unsigned long int bits2mask(unsigned int);
+
+/* In rip98t.c */
+extern void transmit_routes(int);
+
+/* In rip98r.c */
+extern void receive_routes(int);
diff --git a/tcpip/rip98r.c b/tcpip/rip98r.c
new file mode 100644
index 0000000..f8d8090
--- /dev/null
+++ b/tcpip/rip98r.c
@@ -0,0 +1,256 @@
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <net/route.h>
+
+
+#include "rip98d.h"
+
+#define	UNMATCH_ROUTE		0
+#define	NO_ROUTE		1
+#define	REPLACE_ROUTE		2
+#define	ADDITIONAL_ROUTE	3
+
+static int cmp_route(struct route_struct *route, struct in_addr addr, int bits, int metric)
+{
+	unsigned long int old_mask, new_mask;
+	unsigned long int old_addr, new_addr;
+
+	old_mask = ntohl(bits2mask(route->bits));
+	new_mask = ntohl(bits2mask(bits));
+
+	old_addr = route->addr.s_addr;
+	new_addr = addr.s_addr;
+
+	if (bits < route->bits) {
+		new_addr = ntohl(new_addr) & new_mask;
+		old_addr = ntohl(old_addr) & new_mask;
+	} else {
+		new_addr = ntohl(new_addr) & old_mask;
+		old_addr = ntohl(old_addr) & old_mask;
+	}
+
+	if (route->action == DEL_ROUTE || route->action == NEW_ROUTE)
+		return UNMATCH_ROUTE;
+		
+	if (old_addr != new_addr)
+		return UNMATCH_ROUTE;
+
+	if (route->metric <= metric)
+		return NO_ROUTE;
+
+	if (debug && logging) {
+		syslog(LOG_DEBUG, "comparing old: %s/%d to\n", inet_ntoa(route->addr), route->bits);
+		syslog(LOG_DEBUG, "          new: %s/%d\n", inet_ntoa(addr), bits);
+	}
+
+	if (route->bits <= bits) {
+		if (route->action == ORIG_ROUTE) {
+			if (debug && logging)
+				syslog(LOG_DEBUG, "    better route, replacing existing route\n");
+			return REPLACE_ROUTE;
+		} else {
+			if (debug && logging)
+				syslog(LOG_DEBUG, "    better route, adding additional route\n");
+			return ADDITIONAL_ROUTE;
+		}
+	} else {
+		if (debug && logging)
+			syslog(LOG_DEBUG, "    better route, adding additional route\n");
+		return ADDITIONAL_ROUTE;
+	}
+}
+
+void receive_routes(int s)
+{
+	unsigned char message[500], *p;
+	struct sockaddr_in rem_addr;
+	struct in_addr addr;
+	struct route_struct *route, *new;
+	struct sockaddr_in trg;
+	struct rtentry rt;
+	unsigned long int netmask;
+	unsigned long int network;
+	int bits, metric;
+	int found, matched;
+	socklen_t size;
+	int mess_len;
+	int i;
+
+	size = sizeof(struct sockaddr_in);
+
+	mess_len = recvfrom(s, message, 500, 0, (struct sockaddr *)&rem_addr, &size);
+
+	if (message[0] != RIPCMD_RESPONSE || message[1] != RIP_VERSION_98) {
+		if (debug && logging) {
+			syslog(LOG_DEBUG, "invalid RIP98 header received\n");
+			syslog(LOG_DEBUG, "    cmd: %d vers: %d\n", message[0], message[1]);
+		}
+		return;
+	}
+
+	for (found = FALSE, i = 0; i < dest_count; i++) {
+		if (rem_addr.sin_addr.s_addr == dest_list[i].dest_addr.s_addr) {
+			found = TRUE;
+			break;
+		}
+	}
+
+	if (!found) {
+		if (debug && logging)
+			syslog(LOG_DEBUG, "RIP98 message from unknown address %s\n", inet_ntoa(rem_addr.sin_addr));
+		return;
+	}
+
+	if (debug && logging)
+		syslog(LOG_DEBUG, "RIP98 message received from %s\n", inet_ntoa(rem_addr.sin_addr));
+
+	for (p = message + RIP98_HEADER; p < message + mess_len; p += RIP98_ENTRY) {
+		memcpy((char *)&addr, (char *)p, sizeof(addr));
+		bits   = p[4];
+		metric = p[5];	
+
+		network = inet_netof(addr);
+
+		if (network == 0 || network == 127) {
+			if (debug && logging)
+				syslog(LOG_DEBUG, "    route to %s/%d metric %d - rejected\n", inet_ntoa(addr), bits, metric);
+			continue;
+		}
+
+		if (route_restrict) {
+			if (network != 44) {
+				if (debug && logging)
+					syslog(LOG_DEBUG, "    route to %s/%d metric %d - rejected\n", inet_ntoa(addr), bits, metric);
+				continue;
+			}
+		}
+
+		if (debug && logging)
+			syslog(LOG_DEBUG, "    route to %s/%d metric %d\n", inet_ntoa(addr), bits, metric);
+
+		metric++;
+		
+		if (metric > RIP98_INFINITY)
+			metric = RIP98_INFINITY;
+
+		found   = FALSE;
+		matched = FALSE;
+
+		for (route = first_route; route != NULL; route = route->next) {
+
+			switch (cmp_route(route, addr, bits, metric)) {
+
+				case NO_ROUTE:
+					matched = TRUE;
+					break;
+
+				case REPLACE_ROUTE:
+					route->action = DEL_ROUTE;
+				
+				case ADDITIONAL_ROUTE:
+					if (!found) {
+						if ((new = malloc(sizeof(struct route_struct))) == NULL) {
+							if (logging)
+								syslog(LOG_ERR, "out of memory\n");
+							return;
+						}
+
+						new->addr   = addr;
+						new->bits   = bits;
+						new->metric = metric;
+						new->action = NEW_ROUTE;
+				
+						new->next   = first_route;
+						first_route = new;
+	
+						found = TRUE;
+					}
+
+					matched = TRUE;
+					break;
+
+				default:
+					break;
+			}
+		}
+
+		if (!matched) {
+			if ((new = malloc(sizeof(struct route_struct))) == NULL) {
+				if (logging)
+					syslog(LOG_ERR, "out of memory\n");
+				return;
+			}
+
+			new->addr   = addr;
+			new->bits   = bits;
+			new->metric = metric;
+			new->action = NEW_ROUTE;
+				
+			new->next   = first_route;
+			first_route = new;
+		}
+	}
+	
+	for (route = first_route; route != NULL; route = route->next) {
+		if (route->action == DEL_ROUTE) {
+			memset((char *)&rt, 0, sizeof(rt));
+
+			trg.sin_family = AF_INET;
+			trg.sin_addr   = route->addr;
+			trg.sin_port   = 0;
+			memcpy((char *)&rt.rt_dst, (char *)&trg, sizeof(struct sockaddr));
+
+			if (ioctl(s, SIOCDELRT, &rt) < 0) {
+				if (logging)
+					syslog(LOG_ERR, "SIOCDELRT: %m");
+			}
+		}
+	}
+
+	for (route = first_route; route != NULL; route = route->next) {
+		if (route->action == NEW_ROUTE) {
+			memset((char *)&rt, 0, sizeof(rt));
+
+			trg.sin_family = AF_INET;
+			trg.sin_addr   = route->addr;
+			trg.sin_port   = 0;
+			memcpy((char *)&rt.rt_dst, (char *)&trg, sizeof(struct sockaddr));
+
+			rt.rt_flags = RTF_UP | RTF_GATEWAY | RTF_DYNAMIC;
+
+			if (route->bits == 32) {
+				rt.rt_flags |= RTF_HOST;
+			} else {
+				netmask = bits2mask(route->bits);
+			
+				trg.sin_family = AF_INET;
+				memcpy((char *)&trg.sin_addr, (char *)&netmask, sizeof(struct in_addr));
+				trg.sin_port   = 0;
+				memcpy((char *)&rt.rt_genmask, (char *)&trg, sizeof(struct sockaddr));
+			}
+
+			rt.rt_metric = route->metric + 1;
+
+			trg.sin_family = AF_INET;
+			trg.sin_addr   = rem_addr.sin_addr;
+			trg.sin_port   = 0;
+			memcpy((char *)&rt.rt_gateway, (char *)&trg, sizeof(struct sockaddr));
+
+			if (ioctl(s, SIOCADDRT, &rt) < 0) {
+				if (logging)
+					syslog(LOG_ERR, "SIOCADDRT: %m");
+			}
+		}
+	}
+}
diff --git a/tcpip/rip98t.c b/tcpip/rip98t.c
new file mode 100644
index 0000000..2441c49
--- /dev/null
+++ b/tcpip/rip98t.c
@@ -0,0 +1,76 @@
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+
+#include <netinet/in.h>
+
+#include <arpa/inet.h>
+
+#include "rip98d.h"
+
+static int build_header(unsigned char *message)
+{
+	message[0] = RIPCMD_RESPONSE;
+	message[1] = RIP_VERSION_98;
+
+	message[2] = 0;
+	message[3] = 0;
+
+	return RIP98_HEADER;
+}
+
+
+void transmit_routes(int s)
+{
+	unsigned char message[500];
+	struct route_struct *route;
+	struct sockaddr_in rem_addr;
+	int mess_len;
+	int size;
+	int i;
+
+	size = sizeof(struct sockaddr_in);
+
+	for (i = 0; i < dest_count; i++) {
+
+		if (debug && logging)
+			syslog(LOG_DEBUG, "transmit_routes: sending routing message to %s\n", inet_ntoa(dest_list[i].dest_addr));
+
+		memset((char *)&rem_addr, 0, sizeof(rem_addr));
+		rem_addr.sin_family = AF_INET;
+		rem_addr.sin_addr   = dest_list[i].dest_addr;
+		rem_addr.sin_port   = htons(RIP_PORT);		
+
+		route = first_route;
+
+		while (route != NULL) {
+
+			mess_len = build_header(message);
+
+			while (mess_len < 184 && route != NULL) {
+				if (route->action != DEL_ROUTE) {
+					memcpy(message + mess_len + 0, (char *)&route->addr, sizeof(struct in_addr));
+					message[mess_len + 4] = route->bits;
+					message[mess_len + 5] = route->metric;
+				
+					mess_len += RIP98_ENTRY;
+				}
+
+				route = route->next;
+			}
+
+			if (mess_len > RIP98_HEADER) {
+				if (sendto(s, message, mess_len, 0, (struct sockaddr *)&rem_addr, size) < 0) {
+					if (logging)
+						syslog(LOG_ERR, "sendto: %m");
+				}
+			}
+		}
+	}
+}
diff --git a/tcpip/ttylinkd.8 b/tcpip/ttylinkd.8
new file mode 100644
index 0000000..bd427b6
--- /dev/null
+++ b/tcpip/ttylinkd.8
@@ -0,0 +1,56 @@
+.TH TTYLINKD 8 "5 March 1997" Linux "Linux System Managers Manual"
+.SH NAME
+ttylinkd \- TTYlink daemon for AX.25, NET/ROM, ROSE and IP. 
+.SH SYNOPSIS
+.B ttylinkd [-hv] [-c callsign] [-f file]
+.SH DESCRIPTION
+.LP
+.B ttylinkd
+is a simple daemon that allows incoming ttylink calls to be routed through
+to Linux's normal talkd(8)
+system and provides a pipe between the two.
+.LP
+.B ttylinkd 
+is usually setup to be spawned from ax25d(8) or inetd(8)
+but can, since version 0.03, be used on the command line, although
+talk(1) is a much better idea for interactive users.
+.LP 
+Use splitscreen(1)
+for outgoing ttylink sessions.
+.SH OPTIONS
+.TP 10
+.BI \-v
+Display the version.
+.TP 10
+.BI \-h
+Display some help and information on it.
+.TP 10
+.BI "\-c callsign"
+Disable callsign checking and use the given callsign for a name for this
+end of the link.
+.TP 10
+.BI "\-f file"
+Use <file> for the configuration file, instead of the default
+/etc/ax25/ttylinkd.conf
+.SH FILES
+.LP
+/etc/ax25/ttylinkd.conf  the configuration file for ttylinkd
+.SH "SEE ALSO"
+.BR talk (1),
+.BR splitscreen (1),
+.BR ttylinkd.conf (5),
+.BR ax25d (8),
+.BR inetd (8),
+.BR talkd (8).
+.SH BUGS
+.LP
+There is still some need for some checking of who is still logged on.  
+.LP
+The daemon may hang if you disconnect from it strangely.
+.LP
+There is no real way of working out what is going on with talkd.
+.LP
+If you do not have a talk daemon going on the specified host then the program
+will tend to sit there and do nothing.
+.SH AUTHOR
+Craig Small VK2XLZ <csmall at small.dropbear.id.au>
diff --git a/tcpip/ttylinkd.INSTALL b/tcpip/ttylinkd.INSTALL
new file mode 100644
index 0000000..70de9b3
--- /dev/null
+++ b/tcpip/ttylinkd.INSTALL
@@ -0,0 +1,36 @@
+To install ttylinkd;
+
+To create binary:
+	make
+
+To install binary and man pages:
+	make install
+
+Then edit the file /etc/ax25/ttylinkd.conf to change the sysops login to
+whoever you want.
+
+That should hopefully be it, although you may want to do/check the
+following;
+
+  * Ensure that there is a line in /etc/services that says
+	'link	87/tcp	ttylink'.
+  * Add the following line to /etc/inetd.conf,
+	'ttylink stream tcp   nowait root   /usr/sbin/ttylinkd ttylinkd'
+  * Get inetd to re-read config file by sending a HUP signal to it.
+	To do this find the process number of inetd with ps and then type
+	'kill -SIGHUP <number>'
+
+If you want connections from AX25, Net/ROM or ROSE ports, you will have to
+edit your ax25d.conf file too, for example mine has;
+[VK2XLZ-1 VIA VHF]
+NOCALL	 * * * * * *  L
+default  * * * * * *  - root /usr/bin/node node
+[VK2XLZ-6 VIA VHF]
+NOCALL   * * * * * *  L
+default  * * * * * *  - root /usr/sbin/ttylinkd ttylinkd
+
+etc, pretty simple stuff.
+
+For programs like node etc to connect to sysop, specify the callers callsign
+as a parameter, eg ttylinkd <callsign>.  This will send a message to the
+sysop's screen that <callsign> wants to talk to them.
diff --git a/tcpip/ttylinkd.README b/tcpip/ttylinkd.README
new file mode 100644
index 0000000..eecdf0c
--- /dev/null
+++ b/tcpip/ttylinkd.README
@@ -0,0 +1,34 @@
+README file for ttylinkd: The ttylink daemon, dated 5 Mar 1997
+
+This program allows you to recieve ttylink requests from NOS or other
+stations.  It uses the normal Un*x talk protocol for the sysop end and inetd
+for the user's end.
+
+As of 0.02, we now accept connections for Net/ROM and AX.25.
+As of 0.03, we now accept connections from ROSE (not tested!)
+
+USAGE
+=====
+When someone connects to the ttylink port of you system (usually port 87)
+the inetd program will spawn a ttylinkd process.  This process will send a
+welcome and then ask the user to type in their callsign.
+A talk invitation is then sent to the sysop with the given user name to
+reply.  If the sysop wants to talk to the user, they then use the talk
+command.
+Either party can finish the conversation in the usual way.
+
+
+BUGS / TO DO
+============
+- Get some real documentation on ntalkd to make sure that I am doing things
+	right.
+- Allow the sysop to be on another system (if users of ttylinkd want this).
+
+
+CREDITS
+=======
+This program and documentation Copyright (C) 1997 Craig Small VK2XLZ
+<csmall at small.dropbear.id.au>
+Please read the file ttylinkd.c for full notice.
+Thanks to Tomi Manninen OH2BNS for the AX.25 patches in 0.02
+Thanks to Tomi again for the short callsign fix in 0.03
diff --git a/tcpip/ttylinkd.c b/tcpip/ttylinkd.c
new file mode 100644
index 0000000..792969e
--- /dev/null
+++ b/tcpip/ttylinkd.c
@@ -0,0 +1,723 @@
+/*
+ * ttylinkd:  A ttylink daemon using the ntalkd protocol.
+ * Copyright (C) 1996,1197,2000 Craig Small (csmall at small.dropbear.id.au)
+ *
+ * This program 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 recieved a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 675 Mass Ave, Cambridge. MA 02139, USA.
+ */
+ /*
+  * Versions:
+  *  13/01/96   cs  Original Version
+  *  29/01/96   cs  Added AX.25 proper support, thanks Tomi OH2BNS!!
+  *  27/01/97   cs  Added support for stdin/stdout.
+  *  04/03/97   cs  Added config file, no more defines.
+  *  09/03/97   tjd Enhanced to allow specifying user at hostname.wherever.
+  *                 rather than be confined to localhost.
+  *  04/01/00   cs  Minor stuff with email addresses
+  */
+#include <ctype.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <netdb.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <config.h>
+
+#include <protocols/talkd.h>
+
+#include <syslog.h>
+#include <sys/types.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include "../pathnames.h"
+
+
+static char version[] = "ttylink daemon (Version 0.05, 9 March 1997) ready.\n";
+
+#define SYSOP_USER "root"
+
+/* TTY control characters from the sysop's talk screen */
+char erasec;
+char killc;
+char werasec;
+
+/* Users address family */
+int userfamily;
+
+#define ADDR_SIZE 256
+char sysop_addr[ADDR_SIZE];
+char *sysop_user=NULL, *sysop_host=NULL;
+char config_file[128];
+
+int send_control(int skt, struct in_addr addr, CTL_MSG msg, CTL_RESPONSE *resp);
+void alarm_handle(int i);
+void do_talk(int skt);
+void read_config_file(int dummy);
+
+/*static char *Commands[] = {
+	"leaving invitation",
+	"look-up",
+	"delete",
+	"announce" };
+*/	
+static char *Responses[] = {
+	"success",
+	"sysop not logged on",
+	"failed for unknown reason",
+	"sysop's machine unknown",
+	"permission denied",
+	"unknown request",
+	"bad version",
+	"bad address",
+	"bad control address" };
+
+
+int main(int argc, char *argv[])
+{
+	struct sockaddr_in ctl_sin;
+	struct in_addr my_addr, rem_addr;
+	int ctl_skt, skt, new_skt;
+	CTL_RESPONSE resp;
+	CTL_MSG msg;
+	struct protoent *ppe;
+	struct hostent *phe, *rhe=NULL;
+	char hostname[256];
+	int local_id, remote_id;
+	char buf[256];
+	char user[NAME_SIZE];
+	struct sockaddr sa, msg_sa;
+	struct sockaddr_in *peer_sin=NULL, *msg_sin;
+	struct sockaddr_ax25 *peer_sax;
+	struct sockaddr_rose *peer_srose;
+	socklen_t sa_len, length;
+	int i;
+		
+	/* Open up the system logger */
+	openlog(argv[0], LOG_PID, LOG_DAEMON);
+	
+	write(STDOUT_FILENO, version, strlen(version));
+	
+	/* Work out who is calling us */
+	userfamily = AF_UNSPEC;
+	memset(user, 0, NAME_SIZE);
+	strcpy(sysop_addr, SYSOP_USER);
+	strcpy(config_file, CONF_TTYLINKD_FILE);
+	for(i=1 ; i < argc ; i++)
+	{
+		if (argv[i][0] == '-')
+		{
+			switch (argv[i][1])
+			{
+			case 'v':
+				return 0;
+				break;
+			case 'h':
+				printf("ttylinkd comes with ABSOLUTELY NO WARRANY, see the file COPYING\n");
+				printf("This is free software, and you are welcome to redistribute it\n");
+				printf("under the terms of the GNU General Public License.\n\n");
+				printf("Usage: %s [-hv] [-c <callsign>] [-f <config_file>]\n", argv[0]);
+				return 0;
+				break;
+			case 'f':
+				if (i+2 > argc)
+				{
+					printf("The -f flag needs a parameter.\n");
+					return 0;
+					break;
+				}
+				strncpy(config_file, argv[++i], 127);
+				break;
+			case 'c':
+				if ( i+2 > argc)
+				{
+					printf("The -c flag need a parameter.\n");
+					return 0;
+					break;
+				}
+				strncpy(user, argv[++i], NAME_SIZE);
+				break;
+			default:
+				fprintf(stderr, "%s: Unknown flag, type %s -h for help\n", argv[0], argv[0]);
+				return -1;
+				break;
+			} /*switch */
+		} /* - */
+	} /* for */ 
+	if (user[0] == '\0')
+	{
+		sa_len = sizeof(sa);
+		if (getpeername(STDOUT_FILENO, &sa, &sa_len) < 0)		
+		{
+			fprintf(stderr, "%s: getpeername() failed, you must specify a callsign in stdin mode.\n", argv[0]);
+			syslog(LOG_CRIT | LOG_DAEMON, "main(): getpeername() failed.");
+			return 0;
+		} else {
+			userfamily = sa.sa_family;
+			switch(sa.sa_family) {
+				case AF_INET:
+					peer_sin = (struct sockaddr_in*)&sa;
+					write(STDOUT_FILENO, buf, strlen(buf));			
+					sprintf(buf, "Please enter your callsign: ");
+					write(STDOUT_FILENO, buf, strlen(buf));
+					fflush(stdout);
+					if (fgets(user, NAME_SIZE-1, stdin) == NULL)
+						return 0;
+					for (i = 0; user[i] != '\0' && user[i] != '\n' && user[i] != '\r'; i++)
+						;
+					user[i] = '\0';
+					if (strlen(user) < 1)
+						return 0;
+					userfamily = AF_INET;
+					break;
+				case AF_AX25:
+				case AF_NETROM:
+					peer_sax = (struct sockaddr_ax25*)&sa;
+					for(i=0 ; i < 6 ; i++)
+					{
+						user[i] = tolower(((peer_sax->sax25_call.ax25_call[i]) >>1)&0x7f);
+						if (user[i] == ' ')
+						break;
+					}
+					user[i] = '\0';
+					break;
+				case AF_ROSE:
+					peer_srose = (struct sockaddr_rose*)&sa;
+					for(i=0 ; i < 6 ; i++)
+					{
+						user[i] = tolower(((peer_srose->srose_call.ax25_call[i]) >>1)&0x7f);
+						if (user[i] == ' ')
+						break;
+					}
+					user[i] = '\0';
+					break;
+				default:
+					syslog(LOG_DAEMON | LOG_CRIT, "Unsupported address family.");
+					exit(1);
+			}
+			
+		}													
+	} /* argc */
+
+	/* Read the configuration file to find the System Operator. */
+	read_config_file(0);
+	/* ... and parse it into user at host */
+	sysop_user=strtok(sysop_addr,"@");
+	sysop_host=strtok(NULL,"@");
+
+	if ((ppe = getprotobyname("udp")) == 0)
+	{
+		syslog(LOG_DAEMON | LOG_CRIT, "Cannot find udp protocol entry.");
+		exit(1);
+	}
+
+	/* Obtain our local hostname */
+	gethostname(hostname,256);
+
+	/* Get the remote address, or use ours if remote isn't specified */
+	if (sysop_host)
+	{
+		if ((rhe = gethostbyname(sysop_host)) == NULL)
+		{
+			syslog(LOG_DAEMON | LOG_CRIT, "main(): gethostbyname failed.");
+			exit(1);
+		}
+	}
+	else
+	{
+		if ((rhe = gethostbyname(hostname)) == NULL)
+		{
+			syslog(LOG_DAEMON | LOG_CRIT, "main(): gethostbyname failed.");
+			exit(1);
+		}
+	}
+	memcpy((char*)&rem_addr, rhe->h_addr, rhe->h_length);
+
+	/* Get our local address */
+	if ((phe = gethostbyname(hostname)) == NULL)
+	{
+		syslog(LOG_DAEMON | LOG_CRIT, "main(): gethostbyname failed.");
+		exit(1);
+	}
+	memcpy((char*)&my_addr, phe->h_addr, phe->h_length);
+
+	/* Create local data socket */
+	memset((char*)&msg_sa, 0, sizeof(msg_sa));
+
+	msg_sa.sa_family = AF_INET;
+        msg_sin = (struct sockaddr_in*)&msg_sa;
+	msg_sin->sin_port = htons(0);
+	memcpy((char*)&(msg_sin->sin_addr), phe->h_addr, phe->h_length);
+	
+	if ((skt = socket(PF_INET, SOCK_STREAM, 0)) < 0)
+	{
+		syslog(LOG_DAEMON | LOG_CRIT, "main(): socket() failed.");
+		exit(1);
+	}
+	
+	if (bind( skt, &msg_sa, sizeof(msg_sa)) != 0)
+	{
+		syslog(LOG_DAEMON | LOG_CRIT, "main(): bind() failed.");
+		exit(1);
+	}
+	
+	length = sizeof(msg_sa);
+	if (getsockname(skt, &msg_sa, &length) < 0)
+	{
+		syslog(LOG_DAEMON | LOG_CRIT, "main(): getsockname() failed.");
+		exit(1);
+	}
+
+	/* Create local control socket */
+	memset((char*)&ctl_sin, 0, sizeof(ctl_sin));
+
+	ctl_sin.sin_family = AF_INET;
+	memcpy((char*)&ctl_sin.sin_addr, phe->h_addr, phe->h_length);
+	ctl_sin.sin_port = htons(0);
+	
+	if ((ctl_skt = socket(PF_INET, SOCK_DGRAM, 0)) < 0)
+	{
+		syslog(LOG_DAEMON | LOG_CRIT, "main(): socket() while attempting to create control socket.");
+		close(skt);
+		exit(1);
+	}
+	
+	if (bind(ctl_skt, (struct sockaddr*)&ctl_sin, sizeof(ctl_sin)) != 0)
+	{
+		syslog(LOG_DAEMON | LOG_CRIT, "main(): Error when trying to bind() control socket.");
+		close(skt);
+		exit(1);
+	}
+	
+	length = sizeof(ctl_sin);
+	if (getsockname(ctl_skt, (struct sockaddr*)&ctl_sin, &length) < 0)
+	{
+		syslog(LOG_DAEMON | LOG_CRIT,"main(): Error when trying to getsockname() for control socket.");
+		close(skt);
+		close(ctl_skt);
+		exit(1);
+	}
+	
+	/* Start talking to the talk daemon */
+	memset((char*)&msg, 0, sizeof(msg));
+	msg.vers = TALK_VERSION;
+	msg.id_num = htonl(0);
+	msg.addr.sa_family = ntohs(AF_INET);
+        memcpy(&(msg.ctl_addr), &msg_sa, sizeof(struct osockaddr));
+	/*msg.ctl_addr = *(struct sockaddr*)&ctl_sin;
+	msg.ctl_addr = *(struct sockaddr*)&ctl_sin;*/
+	msg.ctl_addr.sa_family = ntohs(AF_INET);
+	msg.pid = htonl(getpid());
+	strncpy(msg.l_name, user, NAME_SIZE-1);
+	strncpy(msg.r_name, sysop_user, NAME_SIZE-1);
+	
+	
+	/* Now look for an invite */
+	msg.type = LOOK_UP;
+	(void) send_control(ctl_skt, rem_addr, msg, &resp);
+
+	/* The person not there? Send an announce and wake him up */
+	msg.type = ANNOUNCE;
+	memcpy((char*)&(msg.addr), (char*)&msg_sa, sizeof(struct osockaddr));
+	msg.addr.sa_family = htons(AF_INET);
+	msg.id_num = -1;
+	i = send_control(ctl_skt, rem_addr, msg, &resp);
+	if ( i != SUCCESS)
+	{
+		if (i > BADCTLADDR)
+			printf("Cannot talk to sysop errno=%d.\n",i);
+		else
+			printf("Cannot talk to sysop, reason: %s.\n",Responses[i]);
+		
+		close(skt);
+		close(ctl_skt);
+		return 0;
+	}
+	/* Update the ID number so that we both know what we're talking about. */
+	remote_id = resp.id_num;
+
+	/* Get the TCP port ready for a connection */
+	if (listen(skt, 5) != 0)
+	{
+		syslog(LOG_DAEMON | LOG_CRIT, "main(): Error when trying to listen() on socket.");
+		exit(1);
+	}
+			
+	/* Now we have to make an invitation for the other user */
+	msg.type = LEAVE_INVITE;
+	if (send_control(ctl_skt, my_addr, msg, &resp) != SUCCESS)
+	{
+		printf("Problem with leaving an invitation\n");
+		syslog(LOG_DAEMON | LOG_CRIT, "main(): Cannot leave invititation.");
+		close(skt);
+		close(ctl_skt);
+		return 0;
+	}
+	local_id = resp.id_num;
+	
+	sprintf(buf, "Paging sysop.\n");
+	write(STDOUT_FILENO, buf, strlen(buf));
+	
+	/* Wait for the sysop to connect to us */
+	signal(SIGALRM, alarm_handle);
+	alarm(30);
+	
+	if ((new_skt = accept(skt, 0, 0)) < 0)
+	{
+		if (errno == EINTR)
+		{
+			/* Delete invitations from both daemons */
+			msg.type = DELETE;
+			msg.id_num = htonl(local_id);
+			send_control(ctl_skt, my_addr, msg, &resp);
+			msg.id_num = htonl(remote_id);
+			send_control(ctl_skt, rem_addr, msg, &resp);
+
+			close(skt);
+			close(ctl_skt);
+			return 0;
+		}
+		syslog(LOG_DAEMON | LOG_WARNING, "main(): accept() failed. (%m)");
+	}
+	alarm(0);
+	signal(SIGALRM, SIG_DFL);
+	
+	close(skt);
+	skt = new_skt;
+	
+	/* Delete invitations from both daemons */
+	msg.type = DELETE;
+	msg.id_num = htonl(local_id);
+	send_control(ctl_skt, my_addr, msg, &resp);
+	msg.id_num = htonl(remote_id);
+	send_control(ctl_skt, rem_addr, msg, &resp);
+	
+	sprintf(buf, "Sysop has responded.\n");		
+	write(STDOUT_FILENO, buf, strlen(buf));
+	
+	/* 
+	 * A little thing that they don't mention anywhere is the fact that the
+	 * first three characters on a connection are used to work out to erase,
+	 * kill and word erase characters. Nice to know eh?
+	 */
+	/* We send ours first, but then again we get data in cooked form, so
+	 * we don't use this. */
+	buf[0] = '\0';
+	buf[1] = '\0';
+	buf[2] = '\0';
+	if (write(skt, buf, 3) != 3)
+	{
+		printf("Connnection lost\n");
+		close(skt);
+		close(ctl_skt);
+		return 0;
+	}
+	/* Get their character stuff */
+	if (read(skt, buf, 3) != 3)
+	{
+		printf("Connection lost\n");
+		close(skt);
+		close(ctl_skt);
+		return 0;
+	}
+	erasec = buf[0];
+	killc = buf[1];
+	werasec = buf[2];
+		
+	/* Tell the sysop who this person is */
+	if (sa.sa_family == AF_AX25)
+	{
+		sprintf(buf, "Incoming ttylink from %s.\n", user);
+		write(skt, buf, strlen(buf));
+	}
+	if (sa.sa_family == AF_INET)
+	{
+		sprintf(buf, "Incoming ttylink from %s@%s.\n", user, inet_ntoa(peer_sin->sin_addr));
+		write(skt, buf, strlen(buf));
+	}
+				
+	
+	do_talk(skt);
+
+	close(skt);
+	close(ctl_skt);					
+	return 0;
+}
+
+/*
+ * Used to send control messages to our friendly local talk daemon
+ */ 
+int send_control(int skt, struct in_addr addr, CTL_MSG msg, CTL_RESPONSE *resp)
+{
+	fd_set fdvar;
+	struct timeval timeout;
+	struct sockaddr_in sin;
+	static int talk_port = 0;
+	struct servent *pse;
+	
+	/* Look up talk port once only */
+	if (talk_port == 0)
+	{
+		if ((pse = getservbyname("ntalk", "udp")) == NULL)
+		{
+			perror("getservbyname, assuming 518");
+			talk_port = 518;
+		} else {
+			talk_port = pse->s_port;
+		}
+	}
+
+	/* Create the socket address */
+	memset((char*)&sin, 0, sizeof(sin));
+	sin.sin_addr = addr;
+	sin.sin_family = AF_INET;
+	sin.sin_port = talk_port;
+	
+	if (sendto(skt, (char*)&msg, sizeof(msg), 0, (struct sockaddr*)&sin, sizeof(sin)) != sizeof(msg))
+	{
+		syslog(LOG_DAEMON | LOG_ERR, "send_control(): sendto failed (%m).");
+		return -1;
+	}
+
+	/* Wait for reply */
+	FD_ZERO(&fdvar);
+	FD_SET(skt, &fdvar);
+	timeout.tv_sec = RING_WAIT;
+	timeout.tv_usec = 0;
+	
+	if (select(32, &fdvar, NULL, NULL, &timeout) < 0)
+		syslog(LOG_DAEMON | LOG_ERR, "send_control(): select failed. (%m)");
+	
+	/*
+	 * The server is ignoring us, see ya later
+	 */			
+	if (!(FD_ISSET(skt, &fdvar)))
+	{
+		printf("Talk server not responding after %d seconds, aborting.\n", RING_WAIT);
+		return -1;
+	}
+	
+	/* Get the message */
+	if(recv(skt, resp, sizeof(resp),0) ==0)	
+		syslog(LOG_DAEMON | LOG_ERR, "send_control(): recv failed. (%m)");
+		
+	return resp->answer;
+}
+
+/* Used to process the data from the sysop */
+int send_sysop_data(char *buf, int len)
+{
+	static char outbuf[82];
+	static char *bptr = outbuf;
+	int i;
+	
+	for(i = 0; i < len; i++)
+	{
+		/* Check for erase character */
+		if (buf[i] == erasec)
+		{
+			if (bptr > outbuf)
+				bptr--;
+			continue;
+		}
+		
+		/* Check for kill character */
+		if (buf[i] == killc)
+		{
+			bptr = outbuf;
+			continue;
+		}
+		
+		/* Check for word-erase character */
+		if (buf[i] == werasec)
+		{
+			while( (bptr > outbuf) && (*bptr != ' ') )
+				bptr--;
+			continue;
+		}
+
+		/* Check for newline character */
+		if (buf[i] == '\n')
+		{
+			if ( (userfamily == AF_AX25) || (userfamily == AF_NETROM) || (userfamily == AF_ROSE) )
+			{
+				*bptr = '\r';
+				bptr++;
+			} else {
+				*bptr = '\r';
+				bptr++;
+				*bptr = '\n';
+				bptr++;
+			}
+		} else {
+			*bptr = buf[i];
+			bptr++;
+		}
+				
+		/* Check for carriage return, which means send it */
+		/* We also send if we have more than 80 characters */
+		if (buf[i] == '\n' || (bptr - outbuf) > 80 )
+		{
+			if (write(STDOUT_FILENO, outbuf, (bptr - outbuf) ) != (bptr - outbuf) )
+			{
+				return -1;
+			}
+			bptr = outbuf;
+		}
+	} /* for */
+	return 0;
+}
+		
+/* Used to process the data from the user - len must not exceed 256 */
+int send_user_data(int skt, char *buf, int len)
+{
+	char outbuf[256];
+	char *bptr = outbuf;
+	int i;
+
+	for(i = 0; i < len; i++)
+	{
+		if (buf[i] == '\r')
+		{
+			if (userfamily == AF_INET)
+			{
+				*bptr = '\n';
+				bptr++;
+				/*
+				 * check if this is a <CR><LF> or a <CR><NUL>
+				 * and skip the <LF> or <NUL>.
+				 */
+				if (buf[i + 1] == '\n' || buf[i + 1] == '\0')
+				{
+					i++;
+				}
+			} else
+			{
+				*bptr = '\n';
+				bptr++;
+			}
+			continue;
+		}
+		*bptr = buf[i];
+		bptr++;
+	} /* for */
+
+	if (write(skt, outbuf, bptr - outbuf) != bptr - outbuf)
+	{
+		return -1;
+	}
+	return 0;
+}
+
+
+/* The main talking loop */
+void do_talk(int skt)
+{
+	fd_set fdvar;
+	char inbuf[256], outbuf[256];
+	struct timeval timeout;
+	int i;
+	
+	
+	while(1)
+	{
+		FD_ZERO(&fdvar);
+		FD_SET(skt, &fdvar);
+		FD_SET(STDIN_FILENO, &fdvar);
+		
+		timeout.tv_sec = 30;
+		timeout.tv_usec = 0;
+		if (select(32, &fdvar, NULL, NULL, &timeout) == 0)
+		{
+			if (ioctl(STDIN_FILENO, FIONREAD, (struct sgttyb *)&i) < 0)
+				return;
+			if (ioctl(skt, FIONREAD, (struct sgttyb*)&i) < 0)
+				return;
+		}
+		
+		if (FD_ISSET(skt, &fdvar))
+		{
+			if ((i = read(skt, inbuf, 256)) <= 0)
+			{
+				strcpy(inbuf,"Sysop closed connection.\n");
+				write(STDOUT_FILENO, inbuf, strlen(inbuf));
+				return;
+			}
+			if (send_sysop_data(inbuf, i) < 0)
+			{
+				strcpy(outbuf, "User closed connection.\n");
+				(void) write(skt, outbuf, strlen(outbuf));
+				return;
+			}
+		}
+		if (FD_ISSET(STDIN_FILENO, &fdvar))
+		{
+			if ((i = read(STDIN_FILENO, outbuf, 256)) <= 0)
+			{
+				strcpy(outbuf, "User closed connection.\n");
+				(void) write(skt, outbuf, strlen(outbuf));
+				return;
+			}
+			if (send_user_data(skt, outbuf, i) < 0)
+				{
+					strcpy(inbuf,"Sysop closed connection.\n");
+					write(STDOUT_FILENO, inbuf, strlen(inbuf));
+					return;
+			}
+		}
+	}
+}			
+
+void alarm_handle(int i)
+{
+	char buf[256];
+	
+	strcpy(buf, "Sysop not responding.\n");
+	write(STDOUT_FILENO, buf, strlen(buf));
+}
+
+void read_config_file(int dummy)
+{
+	char buf[128];
+	char param[20], value[108];
+	FILE *fp;
+	
+	if ( (fp = fopen(config_file, "r")) == NULL) {
+		syslog(LOG_DAEMON | LOG_ERR, "Cannot find configuration file: %s (%m)\n",config_file); 
+		return;
+	}
+	/* Reset any variables here */
+	
+	while ( fgets(buf, 128, fp) != NULL) {
+		if ( buf[0] == '#')
+			continue;
+		if (sscanf(buf, "%[^=]%*c%[^\n]", param, value) == 2) {
+			/* A big wierdo switch */
+			if (strcasecmp(param, "sysop") == 0) {
+				strncpy(sysop_addr, value, ADDR_SIZE);
+			}
+		}
+	} /* while */
+	fclose(fp);
+	signal(SIGHUP, read_config_file);
+}
diff --git a/tcpip/ttylinkd.conf b/tcpip/ttylinkd.conf
new file mode 100644
index 0000000..ae65749
--- /dev/null
+++ b/tcpip/ttylinkd.conf
@@ -0,0 +1,10 @@
+# /etc/ax25/ttylinkd.conf : config file for ttylinkd(8)
+#
+# We just have one line, who gets the incoming ttylink calls.
+#
+# sysop=user at hostname.domain.name
+# or:
+# sysop=user
+#
+sysop=root
+
diff --git a/tcpip/ttylinkd.conf.5 b/tcpip/ttylinkd.conf.5
new file mode 100644
index 0000000..7af2dd8
--- /dev/null
+++ b/tcpip/ttylinkd.conf.5
@@ -0,0 +1,22 @@
+.TH TTYLINKD.CONF 5 "9 March 1997" Linux "Linux Programmer's Manual"
+.SH NAME
+ttylinkd.conf \- ttylinkd configuration file.
+.SH DESCRIPTION
+.LP
+.B ttylinkd.conf
+allows the super user to determine certain parameters with ttylinkd(8). 
+Current there is only one field, with the view of not extending this further
+(ttylinkd is about a resourceful as it is going to get).
+.SH PARAMETERS
+.TP 10
+.B #
+Any line beginning with the hash (#) symbol is a comment and wille be ignored.
+.TP 10
+.B "sysop=<user>[@hostname.domain.name]"
+The login <user> will be attempted to be contacted with ttylinkd(8) is
+launched. If you do not supply a hostname then the local host will be assumed.
+.SH SEE ALSO
+.BR ttylinkd (8).
+.SH AUTHOR
+Craig Small VK2XLZ <csmall at small.dropbear.id.au>
+
diff --git a/user_call/Makefile.am b/user_call/Makefile.am
new file mode 100644
index 0000000..1911d6f
--- /dev/null
+++ b/user_call/Makefile.am
@@ -0,0 +1,30 @@
+
+installconf:
+
+
+sbin_PROGRAMS = ax25_call netrom_call rose_call tcp_call
+
+man_MANS = ax25_call.8 netrom_call.8 rose_call.8 tcp_call.8
+
+doc_DATA= README.user_call
+
+EXTRA_DIST = $(man_MANS) $(doc_DATA)
+
+LDADD = $(AX25_LIB) $(Z_LIB)
+
+ax25_call_SOURCES =	ax25_call.c \
+			user_io.c \
+			user_io.h
+
+netrom_call_SOURCES =	netrom_call.c \
+			user_io.c \
+			user_io.h
+
+rose_call_SOURCES =	rose_call.c \
+			user_io.c \
+			user_io.h
+
+tcp_call_SOURCES =	tcp_call.c \
+			user_io.c \
+			user_io.h
+
diff --git a/user_call/Makefile.in b/user_call/Makefile.in
new file mode 100644
index 0000000..bcb3739
--- /dev/null
+++ b/user_call/Makefile.in
@@ -0,0 +1,661 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+sbin_PROGRAMS = ax25_call$(EXEEXT) netrom_call$(EXEEXT) \
+	rose_call$(EXEEXT) tcp_call$(EXEEXT)
+subdir = user_call
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" \
+	"$(DESTDIR)$(docdir)"
+PROGRAMS = $(sbin_PROGRAMS)
+am_ax25_call_OBJECTS = ax25_call.$(OBJEXT) user_io.$(OBJEXT)
+ax25_call_OBJECTS = $(am_ax25_call_OBJECTS)
+ax25_call_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+ax25_call_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_netrom_call_OBJECTS = netrom_call.$(OBJEXT) user_io.$(OBJEXT)
+netrom_call_OBJECTS = $(am_netrom_call_OBJECTS)
+netrom_call_LDADD = $(LDADD)
+netrom_call_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_rose_call_OBJECTS = rose_call.$(OBJEXT) user_io.$(OBJEXT)
+rose_call_OBJECTS = $(am_rose_call_OBJECTS)
+rose_call_LDADD = $(LDADD)
+rose_call_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_tcp_call_OBJECTS = tcp_call.$(OBJEXT) user_io.$(OBJEXT)
+tcp_call_OBJECTS = $(am_tcp_call_OBJECTS)
+tcp_call_LDADD = $(LDADD)
+tcp_call_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(ax25_call_SOURCES) $(netrom_call_SOURCES) \
+	$(rose_call_SOURCES) $(tcp_call_SOURCES)
+DIST_SOURCES = $(ax25_call_SOURCES) $(netrom_call_SOURCES) \
+	$(rose_call_SOURCES) $(tcp_call_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man_MANS)
+DATA = $(doc_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+man_MANS = ax25_call.8 netrom_call.8 rose_call.8 tcp_call.8
+doc_DATA = README.user_call
+EXTRA_DIST = $(man_MANS) $(doc_DATA)
+LDADD = $(AX25_LIB) $(Z_LIB)
+ax25_call_SOURCES = ax25_call.c \
+			user_io.c \
+			user_io.h
+
+netrom_call_SOURCES = netrom_call.c \
+			user_io.c \
+			user_io.h
+
+rose_call_SOURCES = rose_call.c \
+			user_io.c \
+			user_io.h
+
+tcp_call_SOURCES = tcp_call.c \
+			user_io.c \
+			user_io.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu user_call/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu user_call/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+ax25_call$(EXEEXT): $(ax25_call_OBJECTS) $(ax25_call_DEPENDENCIES) $(EXTRA_ax25_call_DEPENDENCIES) 
+	@rm -f ax25_call$(EXEEXT)
+	$(LINK) $(ax25_call_OBJECTS) $(ax25_call_LDADD) $(LIBS)
+netrom_call$(EXEEXT): $(netrom_call_OBJECTS) $(netrom_call_DEPENDENCIES) $(EXTRA_netrom_call_DEPENDENCIES) 
+	@rm -f netrom_call$(EXEEXT)
+	$(LINK) $(netrom_call_OBJECTS) $(netrom_call_LDADD) $(LIBS)
+rose_call$(EXEEXT): $(rose_call_OBJECTS) $(rose_call_DEPENDENCIES) $(EXTRA_rose_call_DEPENDENCIES) 
+	@rm -f rose_call$(EXEEXT)
+	$(LINK) $(rose_call_OBJECTS) $(rose_call_LDADD) $(LIBS)
+tcp_call$(EXEEXT): $(tcp_call_OBJECTS) $(tcp_call_DEPENDENCIES) $(EXTRA_tcp_call_DEPENDENCIES) 
+	@rm -f tcp_call$(EXEEXT)
+	$(LINK) $(tcp_call_OBJECTS) $(tcp_call_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ax25_call.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netrom_call.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rose_call.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tcp_call.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/user_io.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man8: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man8dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.8[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man8:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man8dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.8[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
+install-docDATA: $(doc_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+	done
+
+uninstall-docDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-docDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-docDATA uninstall-man uninstall-sbinPROGRAMS
+
+uninstall-man: uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-sbinPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-docDATA install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-man8 \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-sbinPROGRAMS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-docDATA uninstall-man uninstall-man8 \
+	uninstall-sbinPROGRAMS
+
+
+installconf:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/user_call/README.user_call b/user_call/README.user_call
new file mode 100644
index 0000000..beee347
--- /dev/null
+++ b/user_call/README.user_call
@@ -0,0 +1,59 @@
+This is the first version of the user_call utilities. They are little
+program,s to allow users of ax25d and the node to initiate outgoing AX.25,
+NET/ROM and Rose connections. They are very powerful program because it can
+pretend to be someone else, so be careful !
+
+My testing has been within the confined of the node, but the comments here
+apply equally well to use via ax25d.
+
+Ax25_call takes at least three parameters:
+
+ax25_call <port> <my callsign> <remote callsign> [<digipeaters> ...]
+
+Netrom_call takes three parameters:
+
+netrom_call <port> <my callsign> <remote address>
+
+Rose_call takes four parameters:
+
+rose_call <port> <my callsign> <remote callsign> <remote Rose address>
+
+The <port> is the name of a local AX.25, NET/ROM or Rose port as defined in
+the axports, nrports or rsports files respectively. <my callsign> is the
+callsign that this connection appears to have come from, ie the local
+*user*. It has nothing to do with your AX.25 port callsign.
+
+Ax25_call must have at least the callsign of the remote user and a set of
+optional digipeaters.
+
+The <remote address> for netrom_call may be of two forms, either the remote
+node callsign, or a combination of the remote node alias and remote node
+callsign seperated by a ':'. Netrom_call only connects to the remote
+callisgn, the full address is sent to the local user for information.
+
+The <remote callsign> for rose_call is the "service" at the remote Rose
+node, ie USERS or any other valid AX.25 callsign, <remote Rose address> is
+the ten-digit Rose address of the remote node.
+
+To start any of these from within the node, you will need to add a line like
+the following to the /etc/ax25/node.conf file, this example uses rose_call:
+
+ExtCmd	BBS 0 root /usr/sbin/rose_call rose_call rose %S k4dpz 3100352392
+
+This assumes that rose_call is installed in /usr/sbin which is the default.
+This will create a new command "BBS" for the node, which when typed will
+connect the user to the callsign K4DPZ at remote Rose node 3100352392. The
+callsign of the local user is where the %S appears in the line, it is
+substituted by node for the users callsign. See node.conf(5) for more
+details of the syntax.
+
+Setting up these programs via ax25d is also quite simple and is similar
+conceptually to the example above.
+
+All of these programs generates errors that are received by the local user,
+so if there are any problems then the local user will be able to quote the
+message to you.
+
+Give them a whirl and let me know how you go.
+
+Jonathan
diff --git a/user_call/ax25_call.8 b/user_call/ax25_call.8
new file mode 100644
index 0000000..81b305f
--- /dev/null
+++ b/user_call/ax25_call.8
@@ -0,0 +1,69 @@
+.TH AX25_CALL 8 "4 July 1999" Linux "Linux Programmer's Manual"
+.SH NAME
+ax25_call, netrom_call, rose_call, tcp_call \- make an AX.25, NET/ROM,
+ROSE or TCP connection
+.SH SYNOPSIS
+.B ax25_call [-c] [-i paclen] [-o paclen] port local_call remote_call [digipeaters ...]
+.sp
+.B netrom_call [-c] [-i paclen] [-o paclen] port local_call remote_netrom_addr
+.sp
+.B rose_call [-c] [-i paclen] [-o paclen] port local_call remote_call remote_rose_addr
+.sp
+.B tcp_call [-c] [-i paclen] [-o paclen] remote_addr remote_port
+.SH DESCRIPTION
+.LP
+.B ax25_call, netrom_call, rose_call and tcp_call
+establish an AX.25, NET/ROM, ROSE or a TCP connection in a manner
+suitable for calling from either the
+.B ax25d
+program directly, or from the
+.B node
+program as an external command. By setting the command line arguments
+appropriately it is possible to set the local callsign from which the call
+will be made. No translation of the end of lines is performed by this
+program.
+.sp
+For
+.B netrom_call
+the  remote_netrom_addr  parameter may either be in the form of a single
+callsign or as a NET/ROM alias  and  callsign  pair separated by
+colon. For example NMCLUS:GB7BPQ. 
+.sp
+For
+.B rose_call
+the remote_rose_addr  parameter  must be in the form of a ten digit
+ROSE address.
+.sp
+For
+.B tcp_call
+the remote_addr parameter must be a dotted-quad IP address or a
+hostname and the remote_port must be a service name (see services(5))
+or a port number.
+.SH OPTIONS
+.TP 12
+.BI \-c
+Enables zlib based compression on the incoming connection. Compression
+algorithm is the same as in LinuxNode (see node(8)).
+.TP 12
+.BI "\-i paclen"
+The maximum frame length to be used on the incoming connection. The
+default is 256 for ax25_call and rose_call, 236 for netrom_call and
+1024 for tcp_call.
+.TP 12
+.BI "\-o paclen"
+The maximum frame length to be used on the outgoing connection. The
+default is 256 for ax25_call and rose_call, 236 for netrom_call and
+1024 for tcp_call.
+.SH FILES
+.br
+/etc/ax25/axports
+.br
+/etc/ax25/nrports
+.br
+/etc/ax25/rsports
+.SH "SEE ALSO"
+.BR ax25(4), netrom(4), rose(4), tcp(4).
+.SH AUTHOR
+Jonathan Naylor G4KLX <g4klx at g4klx.demon.co.uk>
+.br
+Tomi Manninen OH2BNS <oh2bns at sral.fi>
diff --git a/user_call/ax25_call.c b/user_call/ax25_call.c
new file mode 100644
index 0000000..1fafe4f
--- /dev/null
+++ b/user_call/ax25_call.c
@@ -0,0 +1,159 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <signal.h>
+
+#include <config.h>
+
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+
+#include "user_io.h"
+
+void alarm_handler(int sig)
+{
+}
+
+int main(int argc, char **argv)
+{
+	char buffer[256], *addr;
+	int s, addrlen = sizeof(struct full_sockaddr_ax25);
+	struct full_sockaddr_ax25 axbind, axconnect;
+
+	while ((s = getopt(argc, argv, "ci:o:")) != -1) {
+		switch (s) {
+		case 'c':
+			init_compress();
+			compression = 1;
+			break;
+		case 'i':
+			paclen_in = atoi(optarg);
+			break;
+		case 'o':
+			paclen_out = atoi(optarg);
+			break;
+		case ':':
+		case '?':
+			err("ERROR: invalid option usage\r");
+			return 1;
+		}
+	}
+
+	if (paclen_in < 1 || paclen_out < 1) {
+		err("ERROR: invalid paclen\r");
+		return 1;
+	}
+
+	/*
+	 * Arguments should be "ax25_call port mycall remcall [digis ...]"
+	 */
+	if ((argc - optind) < 3) {
+		strcpy(buffer, "ERROR: invalid number of parameters\r");
+		err(buffer);
+	}
+
+	if (ax25_config_load_ports() == 0) {
+		strcpy(buffer, "ERROR: problem with axports file\r");
+		err(buffer);
+	}
+
+	/*
+	 * Parse the passed values for correctness.
+	 */
+	axconnect.fsa_ax25.sax25_family = axbind.fsa_ax25.sax25_family = AF_AX25;
+	axbind.fsa_ax25.sax25_ndigis = 1;
+
+	if ((addr = ax25_config_get_addr(argv[optind])) == NULL) {
+		sprintf(buffer, "ERROR: invalid AX.25 port name - %s\r", argv[optind]);
+		err(buffer);
+	}
+
+	if (ax25_aton_entry(addr, axbind.fsa_digipeater[0].ax25_call) == -1) {
+		sprintf(buffer, "ERROR: invalid AX.25 port callsign - %s\r", argv[optind]);
+		err(buffer);
+	}
+
+	if (ax25_aton_entry(argv[optind + 1], axbind.fsa_ax25.sax25_call.ax25_call) == -1) {
+		sprintf(buffer, "ERROR: invalid callsign - %s\r", argv[optind + 1]);
+		err(buffer);
+	}
+
+	if (ax25_aton_arglist((const char**)(&argv[optind + 2]), &axconnect) == -1) {
+		sprintf(buffer, "ERROR: invalid destination callsign or digipeater\r");
+		err(buffer);
+	}
+
+	/*
+	 * Open the socket into the kernel.
+	 */
+	if ((s = socket(AF_AX25, SOCK_SEQPACKET, 0)) < 0) {
+		sprintf(buffer, "ERROR: cannot open AX.25 socket, %s\r", strerror(errno));
+		err(buffer);
+	}
+
+	/*
+	 * Set our AX.25 callsign and AX.25 port callsign accordingly.
+	 */
+	if (bind(s, (struct sockaddr *)&axbind, addrlen) != 0) {
+		sprintf(buffer, "ERROR: cannot bind AX.25 socket, %s\r", strerror(errno));
+		err(buffer);
+	}
+
+	sprintf(buffer, "Connecting to %s ...\r", argv[optind + 2]);
+	user_write(STDOUT_FILENO, buffer, strlen(buffer));
+
+	/*
+	 * If no response in 30 seconds, go away.
+	 */
+	alarm(30);
+
+	signal(SIGALRM, alarm_handler);
+
+	/*
+	 * Lets try and connect to the far end.
+	 */
+	if (connect(s, (struct sockaddr *)&axconnect, addrlen) != 0) {
+		switch (errno) {
+			case ECONNREFUSED:
+				strcpy(buffer, "*** Connection refused - aborting\r");
+				break;
+			case ENETUNREACH:
+				strcpy(buffer, "*** No known route - aborting\r");
+				break;
+			case EINTR:
+				strcpy(buffer, "*** Connection timed out - aborting\r");
+				break;
+			default:
+				sprintf(buffer, "ERROR: cannot connect to AX.25 callsign, %s\r", strerror(errno));
+				break;
+		}
+
+		err(buffer);
+	}
+
+	/*
+	 * We got there.
+	 */
+	alarm(0);
+
+	strcpy(buffer, "*** Connected\r");
+	user_write(STDOUT_FILENO, buffer, strlen(buffer));
+
+	select_loop(s);
+
+	strcpy(buffer, "\r*** Disconnected\r");
+	user_write(STDOUT_FILENO, buffer, strlen(buffer));
+
+	end_compress();
+
+	return 0;
+}
diff --git a/user_call/netrom_call.8 b/user_call/netrom_call.8
new file mode 100644
index 0000000..41ea354
--- /dev/null
+++ b/user_call/netrom_call.8
@@ -0,0 +1 @@
+.so man8/ax25_call.8
diff --git a/user_call/netrom_call.c b/user_call/netrom_call.c
new file mode 100644
index 0000000..8d7fd85
--- /dev/null
+++ b/user_call/netrom_call.c
@@ -0,0 +1,170 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <signal.h>
+
+#include <config.h>
+
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netax25/ax25.h>
+#include <netrom/netrom.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/nrconfig.h>
+
+#include "user_io.h"
+
+void alarm_handler(int sig)
+{
+}
+
+int main(int argc, char **argv)
+{
+	char buffer[256], *addr;
+	int s, addrlen = sizeof(struct full_sockaddr_ax25);
+	struct full_sockaddr_ax25 nrbind, nrconnect;
+
+	paclen_in = 236;
+	paclen_out = 236;
+
+	while ((s = getopt(argc, argv, "ci:o:")) != -1) {
+		switch (s) {
+		case 'c':
+			init_compress();
+			compression = 1;
+			break;
+		case 'i':
+			paclen_in = atoi(optarg);
+			break;
+		case 'o':
+			paclen_out = atoi(optarg);
+			break;
+		case ':':
+		case '?':
+			err("ERROR: invalid option usage\r");
+			return 1;
+		}
+	}
+
+	if (paclen_in < 1 || paclen_out < 1) {
+		err("ERROR: invalid paclen\r");
+		return 1;
+	}
+
+	/*
+	 * Arguments should be "netrom_call port mycall remaddr"
+	 */
+	if ((argc - optind) != 3) {
+		strcpy(buffer, "ERROR: invalid number of parameters\r");
+		err(buffer);
+	}
+
+	if (nr_config_load_ports() == 0) {
+		strcpy(buffer, "ERROR: problem with nrports file\r");
+		err(buffer);
+	}
+
+	/*
+	 * Parse the passed values for correctness.
+	 */
+	nrconnect.fsa_ax25.sax25_family = nrbind.fsa_ax25.sax25_family = AF_NETROM;
+	nrbind.fsa_ax25.sax25_ndigis    = 1;
+	nrconnect.fsa_ax25.sax25_ndigis = 0;
+
+	if ((addr = nr_config_get_addr(argv[optind])) == NULL) {
+		sprintf(buffer, "ERROR: invalid NET/ROM port name - %s\r", argv[optind]);
+		err(buffer);
+	}
+
+	if (ax25_aton_entry(addr, nrbind.fsa_ax25.sax25_call.ax25_call) == -1) {
+		sprintf(buffer, "ERROR: invalid NET/ROM port callsign - %s\r", argv[optind]);
+		err(buffer);
+	}
+
+	if (ax25_aton_entry(argv[optind + 1], nrbind.fsa_digipeater[0].ax25_call) == -1) {
+		sprintf(buffer, "ERROR: invalid callsign - %s\r", argv[optind + 1]);
+		err(buffer);
+	}
+
+	if ((addr = strchr(argv[optind + 2], ':')) == NULL)
+		addr = argv[optind + 2];
+	else
+		addr++;
+
+	if (ax25_aton_entry(addr, nrconnect.fsa_ax25.sax25_call.ax25_call) == -1) {
+		sprintf(buffer, "ERROR: invalid callsign - %s\r", argv[optind + 2]);
+		err(buffer);
+	}
+
+	/*
+	 * Open the socket into the kernel.
+	 */
+	if ((s = socket(AF_NETROM, SOCK_SEQPACKET, 0)) < 0) {
+		sprintf(buffer, "ERROR: cannot open NET/ROM socket, %s\r", strerror(errno));
+		err(buffer);
+	}
+
+	/*
+	 * Set our AX.25 callsign and NET/ROM callsign accordingly.
+	 */
+	if (bind(s, (struct sockaddr *)&nrbind, addrlen) != 0) {
+		sprintf(buffer, "ERROR: cannot bind NET/ROM socket, %s\r", strerror(errno));
+		err(buffer);
+	}
+
+	sprintf(buffer, "Connecting to %s ...\r", argv[optind + 2]);
+	user_write(STDOUT_FILENO, buffer, strlen(buffer));
+
+	/*
+	 * If no response in 30 seconds, go away.
+	 */
+	alarm(30);
+
+	signal(SIGALRM, alarm_handler);
+
+	/*
+	 * Lets try and connect to the far end.
+	 */
+	if (connect(s, (struct sockaddr *)&nrconnect, addrlen) != 0) {
+		switch (errno) {
+			case ECONNREFUSED:
+				strcpy(buffer, "*** Connection refused - aborting\r");
+				break;
+			case ENETUNREACH:
+				strcpy(buffer, "*** No known route - aborting\r");
+				break;
+			case EINTR:
+				strcpy(buffer, "*** Connection timed out - aborting\r");
+				break;
+			default:
+				sprintf(buffer, "ERROR: cannot connect to NET/ROM node, %s\r", strerror(errno));
+				break;
+		}
+
+		err(buffer);
+	}
+
+	/*
+	 * We got there.
+	 */
+	alarm(0);
+
+	strcpy(buffer, "*** Connected\r");
+	user_write(STDOUT_FILENO, buffer, strlen(buffer));
+
+	select_loop(s);
+
+	strcpy(buffer, "\r*** Disconnected\r");
+	user_write(STDOUT_FILENO, buffer, strlen(buffer));
+
+	end_compress();
+
+	return 0;
+}
diff --git a/user_call/rose_call.8 b/user_call/rose_call.8
new file mode 100644
index 0000000..41ea354
--- /dev/null
+++ b/user_call/rose_call.8
@@ -0,0 +1 @@
+.so man8/ax25_call.8
diff --git a/user_call/rose_call.c b/user_call/rose_call.c
new file mode 100644
index 0000000..43a27ae
--- /dev/null
+++ b/user_call/rose_call.c
@@ -0,0 +1,165 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <signal.h>
+
+#include <config.h>
+
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netax25/ax25.h>
+#include <netrose/rose.h>
+
+#include <netax25/axlib.h>
+#include <netax25/axconfig.h>
+#include <netax25/rsconfig.h>
+
+#include "user_io.h"
+
+void alarm_handler(int sig)
+{
+}
+
+int main(int argc, char **argv)
+{
+	char buffer[256], *addr;
+	int s, addrlen = sizeof(struct sockaddr_rose);
+	struct sockaddr_rose rosebind, roseconnect;
+
+	while ((s = getopt(argc, argv, "ci:o:")) != -1) {
+		switch (s) {
+		case 'c':
+			init_compress();
+			compression = 1;
+			break;
+		case 'i':
+			paclen_in = atoi(optarg);
+			break;
+		case 'o':
+			paclen_out = atoi(optarg);
+			break;
+		case ':':
+		case '?':
+			err("ERROR: invalid option usage\r");
+			return 1;
+		}
+	}
+
+	if (paclen_in < 1 || paclen_out < 1) {
+		err("ERROR: invalid paclen\r");
+		return 1;
+	}
+
+	/*
+	 * Arguments should be "rose_call port mycall remcall remaddr"
+	 */
+	if ((argc - optind) != 4) {
+		strcpy(buffer, "ERROR: invalid number of parameters\r");
+		err(buffer);
+	}
+
+	if (rs_config_load_ports() == 0) {
+		strcpy(buffer, "ERROR: problem with rsports file\r");
+		err(buffer);
+	}
+
+	/*
+	 * Parse the passed values for correctness.
+	 */
+	roseconnect.srose_family = rosebind.srose_family = AF_ROSE;
+	roseconnect.srose_ndigis = rosebind.srose_ndigis = 0;
+
+	if ((addr = rs_config_get_addr(argv[optind])) == NULL) {
+		sprintf(buffer, "ERROR: invalid Rose port name - %s\r", argv[optind]);
+		err(buffer);
+	}
+
+	if (rose_aton(addr, rosebind.srose_addr.rose_addr) == -1) {
+		sprintf(buffer, "ERROR: invalid Rose port address - %s\r", argv[optind]);
+		err(buffer);
+	}
+
+	if (ax25_aton_entry(argv[optind + 1], rosebind.srose_call.ax25_call) == -1) {
+		sprintf(buffer, "ERROR: invalid callsign - %s\r", argv[optind + 1]);
+		err(buffer);
+	}
+
+	if (ax25_aton_entry(argv[optind + 2], roseconnect.srose_call.ax25_call) == -1) {
+		sprintf(buffer, "ERROR: invalid callsign - %s\r", argv[optind + 2]);
+		err(buffer);
+	}
+
+	if (rose_aton(argv[optind + 3], roseconnect.srose_addr.rose_addr) == -1) {
+		sprintf(buffer, "ERROR: invalid Rose address - %s\r", argv[optind + 3]);
+		err(buffer);
+	}
+
+	/*
+	 * Open the socket into the kernel.
+	 */
+	if ((s = socket(AF_ROSE, SOCK_SEQPACKET, 0)) < 0) {
+		sprintf(buffer, "ERROR: cannot open Rose socket, %s\r", strerror(errno));
+		err(buffer);
+	}
+
+	/*
+	 * Set our AX.25 callsign and Rose address accordingly.
+	 */
+	if (bind(s, (struct sockaddr *)&rosebind, addrlen) != 0) {
+		sprintf(buffer, "ERROR: cannot bind Rose socket, %s\r", strerror(errno));
+		err(buffer);
+	}
+
+	sprintf(buffer, "Connecting to %s @ %s ...\r", argv[optind + 2], argv[optind + 3]);
+	user_write(STDOUT_FILENO, buffer, strlen(buffer));
+
+	/*
+	 * If no response in 30 seconds, go away.
+	 */
+	alarm(30);
+
+	signal(SIGALRM, alarm_handler);
+
+	/*
+	 * Lets try and connect to the far end.
+	 */
+	if (connect(s, (struct sockaddr *)&roseconnect, addrlen) != 0) {
+		switch (errno) {
+			case ECONNREFUSED:
+				strcpy(buffer, "*** Connection refused - aborting\r");
+				break;
+			case ENETUNREACH:
+				strcpy(buffer, "*** No known route - aborting\r");
+				break;
+			case EINTR:
+				strcpy(buffer, "*** Connection timed out - aborting\r");
+				break;
+			default:
+				sprintf(buffer, "ERROR: cannot connect to Rose address, %s\r", strerror(errno));
+				break;
+		}
+
+		err(buffer);
+	}
+
+	/*
+	 * We got there.
+	 */
+	alarm(0);
+
+	strcpy(buffer, "*** Connected\r");
+	user_write(STDOUT_FILENO, buffer, strlen(buffer));
+
+	select_loop(s);
+
+	strcpy(buffer, "\r*** Disconnected\r");
+	user_write(STDOUT_FILENO, buffer, strlen(buffer));
+
+	end_compress();
+
+	return 0;
+}
diff --git a/user_call/tcp_call.8 b/user_call/tcp_call.8
new file mode 100644
index 0000000..41ea354
--- /dev/null
+++ b/user_call/tcp_call.8
@@ -0,0 +1 @@
+.so man8/ax25_call.8
diff --git a/user_call/tcp_call.c b/user_call/tcp_call.c
new file mode 100644
index 0000000..c3b5e3c
--- /dev/null
+++ b/user_call/tcp_call.c
@@ -0,0 +1,139 @@
+#include <stdlib.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <signal.h>
+#include <netdb.h>
+
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+
+#include "user_io.h"
+
+void alarm_handler(int sig)
+{
+}
+
+int main(int argc, char **argv)
+{
+	char buffer[256];
+	int s, addrlen = sizeof(struct sockaddr_in);
+	struct sockaddr_in addr;
+	struct hostent *hp;
+	struct servent *sp;
+	int verbose = 1;
+
+	paclen_in = 1024;
+	paclen_out = 1024;
+
+	while ((s = getopt(argc, argv, "ci:o:q")) != -1) {
+		switch (s) {
+		case 'c':
+			init_compress();
+			compression = 1;
+			break;
+		case 'i':
+			paclen_in = atoi(optarg);
+			break;
+		case 'o':
+			paclen_out = atoi(optarg);
+			break;
+		case 'q':
+			verbose = 0;
+			break;
+		case ':':
+		case '?':
+			err("ERROR: invalid option usage\n");
+			return 1;
+		}
+	}
+
+	if (paclen_in < 1 || paclen_out < 1) {
+		err("ERROR: invalid paclen\n");
+		return 1;
+	}
+
+	/*
+	 * Arguments should be "tcp_call remaddr remport"
+	 */
+	if ((argc - optind) != 2) {
+		strcpy(buffer, "ERROR: invalid number of parameters\n");
+		err(buffer);
+	}
+
+	/*
+	 * Open the socket into the kernel.
+	 */
+	if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
+		sprintf(buffer, "ERROR: can't open socket: %s\n", strerror(errno));
+		err(buffer);
+	}
+
+	/*
+	 * Resolve the hostname.
+	 */
+	hp = gethostbyname(argv[optind]);
+	if (hp == NULL) {
+		err("ERROR: Unknown host\n");
+	}
+	addr.sin_family = AF_INET;
+	addr.sin_addr.s_addr = ((struct in_addr *)(hp->h_addr))->s_addr;
+
+	/*
+	 * And the service name.
+	 */
+	if ((sp = getservbyname(argv[optind+1], "tcp")) != NULL)
+		addr.sin_port = sp->s_port;
+	else
+		addr.sin_port = htons(atoi(argv[optind+1]));
+
+	if (addr.sin_port == 0) {
+		err("ERROR: Unknown service\n");
+	}
+
+	if (verbose) {
+		sprintf(buffer, "*** Connecting to %s ...\n", hp->h_name);
+		user_write(STDOUT_FILENO, buffer, strlen(buffer));
+	}
+
+	/*
+	 * If no response in 30 seconds, go away.
+	 */
+	alarm(30);
+
+	signal(SIGALRM, alarm_handler);
+
+	/*
+	 * Lets try and connect to the far end.
+	 */
+	if (connect(s, (struct sockaddr *)&addr, addrlen) != 0) {
+		sprintf(buffer, "ERROR: can't connect: %s\n", strerror(errno));
+		err(buffer);
+	}
+
+	/*
+	 * We got there.
+	 */
+	alarm(0);
+
+	if (verbose) {
+		strcpy(buffer, "*** Connected\n");
+		user_write(STDOUT_FILENO, buffer, strlen(buffer));
+	}
+
+	select_loop(s);
+
+	if (verbose) {
+		strcpy(buffer, "\n*** Disconnected\n");
+		user_write(STDOUT_FILENO, buffer, strlen(buffer));
+	}
+
+	end_compress();
+
+	return 0;
+}
diff --git a/user_call/user_io.c b/user_call/user_io.c
new file mode 100644
index 0000000..c486e46
--- /dev/null
+++ b/user_call/user_io.c
@@ -0,0 +1,219 @@
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#include "config.h"
+#include "user_io.h"
+
+#define BUFLEN	8192
+
+int compression		= 0;
+int paclen_in		= 256;
+int paclen_out		= 256;
+
+/* This is for select_loop() */
+static unsigned char buf[BUFLEN];
+
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+
+/* Error in (de)compression happened? */
+static int compression_error = 0;
+
+/* These are for the (de)compressor */
+static unsigned char input_buffer[BUFLEN];
+static unsigned char output_buffer[BUFLEN];
+
+static z_stream incoming_stream;
+static z_stream outgoing_stream;
+#endif
+
+#define min(a,b)	((a) < (b) ? (a) : (b))
+
+void err(char *message)
+{
+	user_write(STDOUT_FILENO, message, strlen(message));
+	exit(1);
+}
+
+void init_compress(void)
+{
+#ifdef HAVE_ZLIB_H
+	inflateInit(&incoming_stream);
+	deflateInit(&outgoing_stream, 9);
+
+	incoming_stream.next_in = input_buffer;
+#else
+	err("*** Compression support not available!!!\r\n");
+#endif
+}
+
+void end_compress(void)
+{
+#ifdef HAVE_ZLIB_H
+	inflateEnd(&incoming_stream);
+	deflateEnd(&outgoing_stream);
+#endif
+}
+
+static int flush_output(int fd, const void *buf, size_t count)
+{
+	int cnt = count;
+
+	while (cnt > 0) {
+		if (write(fd, buf, min(paclen_out, cnt)) < 0)
+			return -1;
+		buf += paclen_out;
+		cnt -= paclen_out;
+	}
+
+	return count;
+}
+
+int user_write(int fd, const void *buf, size_t count)
+{
+#ifdef HAVE_ZLIB_H
+	int status;
+#endif
+
+	if (count == 0)
+		return 0;
+
+#ifndef HAVE_ZLIB_H
+	return flush_output(fd, buf, count);
+#else
+	/* Only output to stdout can be compressed */
+	if (fd != STDOUT_FILENO || !compression)
+		return flush_output(fd, buf, count);
+
+	if (compression_error) {
+		errno = 0;
+		return -1;
+	}
+
+	/* Input is the contents of the input buffer. */
+	outgoing_stream.next_in = (unsigned char *)buf;
+	outgoing_stream.avail_in = count;
+
+	/* Loop compressing until deflate() returns with avail_out != 0. */
+	do {
+		/* Set up fixed-size output buffer. */
+		outgoing_stream.next_out = output_buffer;
+		outgoing_stream.avail_out = BUFLEN;
+
+		/* Compress as much data into the buffer as possible. */
+		status = deflate(&outgoing_stream, Z_PARTIAL_FLUSH);
+
+		if (status != Z_OK) {
+			compression_error = status;
+			errno = 0;
+			return -1;
+		}
+
+		/* Now send the compressed data */
+		if (flush_output(fd, output_buffer, BUFLEN - outgoing_stream.avail_out) < 0)
+			return -1;
+	} while (outgoing_stream.avail_out == 0);
+
+	return count;
+#endif
+}
+
+int user_read(int fd, void *buf, size_t count)
+{
+#ifdef HAVE_ZLIB_H
+	int status, len;
+#endif
+
+	if (count == 0)
+		return 0;
+
+#ifndef HAVE_ZLIB_H
+	return read(fd, buf, count);
+#else
+	/* Only input from stdin can be compressed */
+	if (fd != STDIN_FILENO || !compression)
+		return read(fd, buf, count);
+
+	if (compression_error) {
+		errno = 0;
+		return -1;
+	}
+
+	incoming_stream.next_out = buf;
+	incoming_stream.avail_out = count;
+
+	for (;;) {
+		status = inflate(&incoming_stream, Z_SYNC_FLUSH);
+
+		if (count - incoming_stream.avail_out > 0)
+			return count - incoming_stream.avail_out;
+
+		if (status != Z_OK && status != Z_BUF_ERROR) {
+			compression_error = status;
+			errno = 0;
+			return -1;
+		}
+
+		incoming_stream.next_in = input_buffer;
+		incoming_stream.avail_in = 0;
+
+		if ((len = read(fd, input_buffer, BUFLEN)) <= 0)
+			return len;
+
+		incoming_stream.avail_in = len;
+	}
+
+	return 0;
+#endif
+}
+
+int select_loop(int s)
+{
+	fd_set read_fd;
+	int n;
+
+	if (fcntl(s, F_SETFL, O_NONBLOCK) < 0) {
+		close(s);
+		return -1;
+	}
+	if (fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK) < 0) {
+		close(s);
+		return -1;
+	}
+
+	/*
+	 * Loop until one end of the connection goes away.
+	 */
+	for (;;) {
+		FD_ZERO(&read_fd);
+		FD_SET(STDIN_FILENO, &read_fd);
+		FD_SET(s, &read_fd);
+		
+		select(s + 1, &read_fd, NULL, NULL, NULL);
+
+		if (FD_ISSET(s, &read_fd)) {
+			while ((n = user_read(s, buf, BUFLEN)) > 0)
+				user_write(STDOUT_FILENO, buf, n);
+			if (n == 0 || (n < 0 && errno != EAGAIN)) {
+				close(s);
+				break;
+			}
+		}
+
+		if (FD_ISSET(STDIN_FILENO, &read_fd)) {
+			while ((n = user_read(STDIN_FILENO, buf, BUFLEN)) > 0)
+				user_write(s, buf, n);
+			if (n == 0 || (n < 0 && errno != EAGAIN)) {
+				close(s);
+				break;
+			}
+		}
+	}
+
+	return 0;
+}
diff --git a/user_call/user_io.h b/user_call/user_io.h
new file mode 100644
index 0000000..98099a5
--- /dev/null
+++ b/user_call/user_io.h
@@ -0,0 +1,12 @@
+extern void err(char *message);
+
+extern int user_write(int fd, const void *buf, size_t count);
+extern int user_read(int fd, void *buf, size_t count);
+extern int select_loop(int s);
+
+extern void init_compress(void);
+extern void end_compress(void);
+
+extern int compression;
+extern int paclen_in;
+extern int paclen_out;
diff --git a/yamdrv/Makefile.am b/yamdrv/Makefile.am
new file mode 100644
index 0000000..1a514f3
--- /dev/null
+++ b/yamdrv/Makefile.am
@@ -0,0 +1,13 @@
+
+sbin_PROGRAMS = yamcfg mcs2h
+
+yamcfg_SOURCES =  yamcfg.c yam.h
+
+mcs2h_SOURCES = mcs2h.c
+
+doc_DATA = README.yamdrv
+
+EXTRA_DIST = $(doc_DATA)
+
+installconf:
+
diff --git a/yamdrv/Makefile.in b/yamdrv/Makefile.in
new file mode 100644
index 0000000..0d8073f
--- /dev/null
+++ b/yamdrv/Makefile.in
@@ -0,0 +1,559 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+sbin_PROGRAMS = yamcfg$(EXEEXT) mcs2h$(EXEEXT)
+subdir = yamdrv
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(docdir)"
+PROGRAMS = $(sbin_PROGRAMS)
+am_mcs2h_OBJECTS = mcs2h.$(OBJEXT)
+mcs2h_OBJECTS = $(am_mcs2h_OBJECTS)
+mcs2h_LDADD = $(LDADD)
+am_yamcfg_OBJECTS = yamcfg.$(OBJEXT)
+yamcfg_OBJECTS = $(am_yamcfg_OBJECTS)
+yamcfg_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(mcs2h_SOURCES) $(yamcfg_SOURCES)
+DIST_SOURCES = $(mcs2h_SOURCES) $(yamcfg_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+DATA = $(doc_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+BASEVERSION = @BASEVERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRAVERSION = @EXTRAVERSION@
+FLTK_LIB = @FLTK_LIB@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NCURSES_LIB = @NCURSES_LIB@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIB = @Z_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+yamcfg_SOURCES = yamcfg.c yam.h
+mcs2h_SOURCES = mcs2h.c
+doc_DATA = README.yamdrv
+EXTRA_DIST = $(doc_DATA)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu yamdrv/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu yamdrv/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+mcs2h$(EXEEXT): $(mcs2h_OBJECTS) $(mcs2h_DEPENDENCIES) $(EXTRA_mcs2h_DEPENDENCIES) 
+	@rm -f mcs2h$(EXEEXT)
+	$(LINK) $(mcs2h_OBJECTS) $(mcs2h_LDADD) $(LIBS)
+yamcfg$(EXEEXT): $(yamcfg_OBJECTS) $(yamcfg_DEPENDENCIES) $(EXTRA_yamcfg_DEPENDENCIES) 
+	@rm -f yamcfg$(EXEEXT)
+	$(LINK) $(yamcfg_OBJECTS) $(yamcfg_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mcs2h.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/yamcfg.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-docDATA: $(doc_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+	done
+
+uninstall-docDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(docdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-docDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-docDATA uninstall-sbinPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-sbinPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-docDATA install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-docDATA \
+	uninstall-sbinPROGRAMS
+
+
+installconf:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/yamdrv/README.yamdrv b/yamdrv/README.yamdrv
new file mode 100644
index 0000000..f76ac10
--- /dev/null
+++ b/yamdrv/README.yamdrv
@@ -0,0 +1,92 @@
+1998/07/29  Version 0.5
+----------
+
+Driver now supports up to 4 yam modems.
+yam0 default to COM1 0x3f8 irq4
+yam1 default to COM2 0x2f8 irq3
+yam2 default to COM3 0x3e8 irq4
+yam3 default to COM4 0x3e8 irq3
+
+1998/09/01  Version 0.6
+----------
+
+Added : bitrate/baudrate configuration.
+Added : mcs file may be loaded from yamcfg. 
+        One mcs file is affected to each bitrate.
+		
+		mcs data for 1200 and 9600 bds are preloaded in the driver
+		but may be changed by yamcfg.
+
+options of yamcfg :
+
+  [iobase <iobase>] 
+  [irq <irq>] 
+  [bitrate <bitrate>] 
+  [baudrate <baudrate>]
+  [duplex <mode>] 
+  [hold <delay>] 
+  [txdelay <txdelay>]
+  [txtail <txtail>] 
+  [slottime <slottime>] 
+  [persist <persistence>]
+  [load <bitrate> <filename.mcs>]
+
+/proc/net/yam gives the current configuration
+
+
+1998/09/12  Version 0.7
+----------
+
+A patch to the kernel tree 2.0.36 has been created.
+To patch the kernel, do the following :
+
+cd /usr/src
+cat PATH_OF_THE_FILE/yam08-2.2.1-patch.diff | patch -p0
+
+cd linux
+run "make menuconfig" (or other) to configure the yam options.
+
+------------
+
+The program yamcfg get or set the parameters of the yam driver
+yamcfg -h gives a minimum help
+
+Example setup of yam0 for 1 serial port (com2) :
+  
+  file /etc/ax25/axports :
+  port0 F1OAT-9 9600 256 2 VHF  (9600 bit/s)  
+
+  commands :
+  setserial /dev/cua0 port 0	# to avoid conflict with yam driver
+  insmod yam
+  yamcfg yam0 io 0x2f8 irq 3
+  ifconfig yam0 hw ax25 f1oat-9 up  
+  
+  
+
+Example setup of yam0,3 for 4 serial port (com1->com4) :
+  
+  file /etc/ax25/axports :
+  port0 F1OAT-9 9600 256 2 VHF  (9600 bit/s)  
+  port1 F1OAT-8 9600 256 2 UHF1 (9600 bit/s)  
+  port2 F1OAT-7 9600 256 2 UHF2 (9600 bit/s)  
+  port3 F1OAT-8 9600 256 2 UHF3 (9600 bit/s)  
+  
+  commands :
+  setserial /dev/cua0 port 0	# to avoid conflict with yam driver
+  setserial /dev/cua1 port 0	# to avoid conflict with yam driver
+  setserial /dev/cua2 port 0	# to avoid conflict with yam driver
+  setserial /dev/cua3 port 0	# to avoid conflict with yam driver
+  insmod yam
+  yamcfg yam2 irq 5
+  yamcfg yam3 irq 7
+  ifconfig yam0 hw ax25 f1oat-9 up  
+  ifconfig yam1 hw ax25 f1oat-8 up  
+  ifconfig yam2 hw ax25 f1oat-7 up  
+  ifconfig yam3 hw ax25 f1oat-6 up  
+  
+
+ 
+Good test !!!
+
+73's Frederic F1OAT and Jean-Paul F6FBB
diff --git a/yamdrv/mcs2h.c b/yamdrv/mcs2h.c
new file mode 100644
index 0000000..6914965
--- /dev/null
+++ b/yamdrv/mcs2h.c
@@ -0,0 +1,106 @@
+#include <stdio.h>
+#include <time.h>
+#include <string.h>
+
+int in2hex(char *ptr)
+{
+	char str[3];
+	int val;
+	
+	memcpy(str, ptr, 2);
+	str[2] = '\0';
+	
+	sscanf(str, "%x", &val);
+	
+	return val;
+}
+
+unsigned char swap(unsigned char c)
+{
+	unsigned char r = 0;
+	int i;
+	
+	for (i = 0 ; i < 8 ; i++)
+	{
+		r <<= 1;
+		if (c & 1)
+			r |= 1;
+		c >>= 1;
+	}
+	return r;
+}
+
+int in4hex(char *ptr)
+{
+	char str[5];
+	int val;
+	
+	memcpy(str, ptr, 4);
+	str[4] = '\0';
+	
+	sscanf(str, "%x", &val);
+	
+	return val;
+}
+
+int main(int ac, char *av[])
+{
+	int nb, add, type, i;
+	int first = 1;
+	time_t temps;
+	FILE *fptr;
+	char buf[256];
+	
+	if (ac != 3)
+	{
+		fprintf(stderr, "format : mcs2h 1200|9600 filename\n");
+		return 1;
+	}
+	
+	fptr = fopen(av[2], "r");
+	if (fptr == NULL)
+	{
+		fprintf(stderr, "file %s not found\n", av[2]);
+		return 1;
+	}
+	
+	time(&temps);
+	
+	printf( "/*\n"
+			" *\n"
+			" * File %s converted to h format by mcs2h\n"
+			" *\n"
+			" * (C) F6FBB 1998\n"
+			" *\n"
+			" * %s"
+			" *\n"
+			" */\n\n",
+			av[2], ctime(&temps));
+
+	printf("static unsigned char bits_%s[]= {\n", av[1]);
+
+	while (fgets(buf, sizeof(buf), fptr))
+	{
+		nb   = in2hex(buf+1);
+		add  = in4hex(buf+3);
+		type = in2hex(buf+7);
+		
+		if (type != 0)
+			continue;
+			
+		if (first)
+			first = 0;
+		else
+			printf(",\n");
+
+		for (i = 0 ; i < nb ; i++)
+		{
+			printf("0x%02x%s", swap(in2hex(buf+9+i*2)), (i < (nb-1)) ? "," : "");
+		}
+	}
+	
+	printf(" };\n");
+	
+	fclose(fptr);
+	return 0;
+}
diff --git a/yamdrv/yam.h b/yamdrv/yam.h
new file mode 100644
index 0000000..694d513
--- /dev/null
+++ b/yamdrv/yam.h
@@ -0,0 +1,82 @@
+/*****************************************************************************/
+
+/*
+ *	yam.h  -- YAM radio modem driver.
+ *
+ *	Copyright (C) 1998 Frederic Rible F1OAT (frible at teaser.fr)
+ *	Adapted from baycom.c driver written by Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *	This program 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 2 of the License, or
+ *	(at your option) any later version.
+ *
+ *	This program 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 this program; if not, write to the Free Software
+ *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ */
+
+/*****************************************************************************/
+
+#define SIOCYAMRESERVED	(0)
+#define SIOCYAMSCFG 	(1)	/* Set configuration */
+#define SIOCYAMGCFG 	(2)	/* Get configuration */
+#define SIOCYAMSMCS 	(3)	/* Set mcs data */
+
+#define YAM_IOBASE   (1 << 0)
+#define YAM_IRQ      (1 << 1)
+#define YAM_BITRATE  (1 << 2) /* Bit rate of radio port ->57600 */
+#define YAM_MODE     (1 << 3) /* 0=simplex 1=duplex 2=duplex+tempo */
+#define YAM_HOLDDLY  (1 << 4) /* duplex tempo (sec) */
+#define YAM_TXDELAY  (1 << 5) /* Tx Delay (ms) */
+#define YAM_TXTAIL   (1 << 6) /* Tx Tail  (ms) */
+#define YAM_PERSIST  (1 << 7) /* Persist  (ms) */
+#define YAM_SLOTTIME (1 << 8) /* Slottime (ms) */
+#define YAM_BAUDRATE (1 << 9) /* Baud rate of rs232 port ->115200 */
+
+#define YAM_MAXBITRATE  57600
+#define YAM_MAXBAUDRATE 115200
+#define YAM_MAXMODE     2
+#define YAM_MAXHOLDDLY  99
+#define YAM_MAXTXDELAY  999
+#define YAM_MAXTXTAIL   999
+#define YAM_MAXPERSIST  255
+#define YAM_MAXSLOTTIME 999
+
+#define YAM_FPGA_SIZE	5302
+
+struct yamcfg {
+	unsigned int mask;		/* Mask of commands */
+	unsigned int iobase;	/* IO Base of COM port */
+	unsigned int irq;		/* IRQ of COM port */
+	unsigned int bitrate;	/* Bit rate of radio port */
+	unsigned int baudrate;	/* Baud rate of the RS232 port */
+	unsigned int txdelay;	/* TxDelay */
+	unsigned int txtail;	/* TxTail */
+	unsigned int persist;	/* Persistence */
+	unsigned int slottime;	/* Slottime */
+	unsigned int mode;		/* mode 0 (simp), 1(Dupl), 2(Dupl+delay) */
+	unsigned int holddly;	/* PTT delay in FullDuplex 2 mode */
+};
+
+struct yamdrv_ioctl_cfg {
+	int cmd;
+	struct yamcfg cfg;
+};
+
+struct yamdrv_ioctl_mcs {
+	int cmd;
+	int bitrate;
+	unsigned char bits[YAM_FPGA_SIZE];
+};
diff --git a/yamdrv/yamcfg.c b/yamdrv/yamcfg.c
new file mode 100644
index 0000000..98a3fa9
--- /dev/null
+++ b/yamdrv/yamcfg.c
@@ -0,0 +1,356 @@
+/*****************************************************************************/
+
+/*
+ *    yaminit.c  -- YAM radio modem driver setup utility.
+ *
+ *  Copyright (C) 1998  Jean-Paul ROUBELAT (jpr at f6fbb.org)
+ *  Adapted from sethdlc.c written by Thomas Sailer (t.sailer at alumni.ethz.ch)
+ *
+ *  This program 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 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Please note that the GPL allows you to use the driver, NOT the radio.
+ *  In order to use the radio, you need a license from the communications
+ *  authority of your country.
+ *
+ *
+ * History:
+ *   0.0  29.07.98  First draft
+ */
+
+/*****************************************************************************/
+
+/* ---------------------------------------------------------------------- */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#ifdef __GLIBC__
+#include <netinet/if_ether.h>
+#else
+#include <linux/if_ether.h>
+#endif
+#include <endian.h>
+#include <netinet/in.h>
+
+#include "yam.h"
+
+static unsigned char bitswap (unsigned char c)
+{
+	unsigned char r = 0;
+	int i;
+
+	for (i = 0; i < 8; i++)
+	{
+		r <<= 1;
+		if (c & 1)
+			r |= 1;
+		c >>= 1;
+	}
+	return r;
+}
+
+static int in2hex (char *ptr)
+{
+	char str[3];
+	int val;
+
+	memcpy (str, ptr, 2);
+	str[2] = '\0';
+
+	sscanf (str, "%x", &val);
+
+	return val;
+}
+
+static int set_mcs (char *name, struct ifreq *ifr, int sock, int bitrate, char *filename)
+{
+	struct yamdrv_ioctl_mcs yammcs;
+	FILE *fptr;
+	int nb, i, type, pos;
+	char buf[256];
+
+	yammcs.bitrate = bitrate;
+
+	fptr = fopen (filename, "r");
+	if (fptr == NULL)
+	{
+		fprintf (stderr, "%s: file %s not found\n", name, filename);
+		return -1;
+	}
+
+	pos = 0;
+
+	while (fgets (buf, sizeof (buf), fptr))
+	{
+		nb = in2hex (buf + 1);
+		type = in2hex (buf + 7);
+
+		if (type != 0)
+			continue;
+
+		for (i = 0; i < nb; i++)
+		{
+			if (pos == YAM_FPGA_SIZE)
+			{
+				fclose (fptr);
+				printf ("fpga bytes are more than %d in %s mcs file\n", YAM_FPGA_SIZE, filename);
+				return -1;
+			}
+			yammcs.bits[pos++] = bitswap (in2hex (buf + 9 + i * 2));
+		}
+	}
+
+	fclose (fptr);
+
+	if (pos != YAM_FPGA_SIZE)
+	{
+		printf ("fpga bytes are not %d in %s mcs file\n", YAM_FPGA_SIZE, filename);
+		return -1;
+	}
+
+	ifr->ifr_data = (caddr_t) & yammcs;
+	yammcs.cmd = SIOCYAMSMCS;
+
+	if (ioctl (sock, SIOCDEVPRIVATE, ifr) == -1)
+	{
+		fprintf (stderr, "%s: Error %s (%i), cannot ioctl SIOCYAMSMCS on %s\n",
+				 name, strerror (errno), errno, ifr->ifr_name);
+		return -1;
+	}
+
+	printf ("mcs file %s loaded for bitrate %d\n\n", filename, yammcs.bitrate);
+
+	return 0;
+}
+
+static int set_params (char *name, struct ifreq *ifr, int sock, int ac, char **av, unsigned *pmask)
+{
+	int len;
+	int bitrate = 0;
+	char *filename = NULL;
+	struct yamdrv_ioctl_cfg yamctl;
+
+	printf ("\n");
+
+	yamctl.cfg.mask = 0;
+
+	while (ac >= 2)
+	{
+		len = strlen (av[0]);
+		if (!strncasecmp (av[0], "iobase", len))
+		{
+			yamctl.cfg.iobase = strtoul (av[1], NULL, 0);
+			yamctl.cfg.mask |= YAM_IOBASE;
+		}
+		else if (!strncasecmp (av[0], "irq", len))
+		{
+			yamctl.cfg.irq = strtoul (av[1], NULL, 0);
+			yamctl.cfg.mask |= YAM_IRQ;
+		}
+		else if (!strncasecmp (av[0], "bitrate", len))
+		{
+			yamctl.cfg.bitrate = strtoul (av[1], NULL, 0);
+			yamctl.cfg.mask |= YAM_BITRATE;
+		}
+		else if (!strncasecmp (av[0], "baudrate", len))
+		{
+			yamctl.cfg.baudrate = strtoul (av[1], NULL, 0);
+			yamctl.cfg.mask |= YAM_BAUDRATE;
+		}
+		else if (!strncasecmp (av[0], "duplex", len))
+		{
+			yamctl.cfg.mode = strtoul (av[1], NULL, 0);
+			yamctl.cfg.mask |= YAM_MODE;
+		}
+		else if (!strncasecmp (av[0], "hold", len))
+		{
+			yamctl.cfg.holddly = strtoul (av[1], NULL, 0);
+			yamctl.cfg.mask |= YAM_HOLDDLY;
+		}
+		else if (!strncasecmp (av[0], "txdelay", len))
+		{
+			yamctl.cfg.txdelay = strtoul (av[1], NULL, 0);
+			yamctl.cfg.mask |= YAM_TXDELAY;
+		}
+		else if (!strncasecmp (av[0], "txtail", len))
+		{
+			yamctl.cfg.txtail = strtoul (av[1], NULL, 0);
+			yamctl.cfg.mask |= YAM_TXTAIL;
+		}
+		else if (!strncasecmp (av[0], "slottime", len))
+		{
+			yamctl.cfg.slottime = strtoul (av[1], NULL, 0);
+			yamctl.cfg.mask |= YAM_SLOTTIME;
+		}
+		else if (!strncasecmp (av[0], "persist", len))
+		{
+			yamctl.cfg.persist = strtoul (av[1], NULL, 0);
+			yamctl.cfg.mask |= YAM_PERSIST;
+		}
+		else if (!strncasecmp (av[0], "load", len))
+		{
+			if (ac < 3)
+				break;
+			bitrate = strtoul (av[1], NULL, 0);
+			filename = av[2];
+			av += 1;
+			ac -= 1;
+		}
+		else
+		{
+			fprintf (stderr, "%s: invalid parameter type '%s'\n",
+					 name, av[0]);
+		}
+		av += 2;
+		ac -= 2;
+	}
+	if (ac > 0)
+		fprintf (stderr, "%s: orphaned parameter type '%s', no data\n",
+				 name, av[0]);
+
+	if (yamctl.cfg.mask)
+	{
+		ifr->ifr_data = (caddr_t) & yamctl;
+		yamctl.cmd = SIOCYAMSCFG;
+		*pmask = yamctl.cfg.mask;
+
+		if (ioctl (sock, SIOCDEVPRIVATE, ifr) == -1)
+		{
+			fprintf (stderr, "%s: Error %s (%i), cannot ioctl SIOCYAMSCFG on %s\n",
+					 name, strerror (errno), errno, ifr->ifr_name);
+			return -1;
+		}
+	}
+
+	if (filename)
+		return set_mcs (name, ifr, sock, bitrate, filename);
+
+	return 0;
+}
+
+#define is_mask(m, n) (m & n) ? '*' : ' '
+static void get_params (char *name, struct ifreq *ifr, int sock, unsigned mask)
+{
+	char *dup;
+	struct yamdrv_ioctl_cfg yamctl;
+
+	ifr->ifr_data = (caddr_t) & yamctl;
+	yamctl.cmd = SIOCYAMGCFG;
+
+	if (ioctl (sock, SIOCDEVPRIVATE, ifr) == -1)
+	{
+		fprintf (stderr, "%s: Error %s (%i), cannot ioctl SIOCYAMGCFG on %s\n",
+				 name, strerror (errno), errno, ifr->ifr_name);
+		return;
+	}
+
+	switch (yamctl.cfg.mode)
+	{
+	case 0:
+		dup = "off";
+		break;
+	case 1:
+		dup = "on";
+		break;
+	case 2:
+		dup = "on+delay";
+		break;
+	default:
+		dup = "";
+		break;
+	}
+
+	printf ("Device    : %s\n", ifr->ifr_name);
+	printf ("iobase    :%c%04x\n", is_mask (mask, YAM_IOBASE), yamctl.cfg.iobase);
+	printf ("bitrate   :%c%u (bps)\n", is_mask (mask, YAM_BITRATE), yamctl.cfg.bitrate);
+	printf ("irq       :%c%u\n", is_mask (mask, YAM_IRQ), yamctl.cfg.irq);
+	printf ("baudrate  :%c%u (bps)\n", is_mask (mask, YAM_BAUDRATE), yamctl.cfg.baudrate);
+	printf ("fulldup   :%c%s\n", is_mask (mask, YAM_MODE), dup);
+	if (yamctl.cfg.mode == 2)
+		printf ("holddelay :%c%-3u (sec)\n", is_mask (mask, YAM_HOLDDLY), yamctl.cfg.holddly);
+	printf ("txdelay   :%c%-3u (ms)\n", is_mask (mask, YAM_TXDELAY), yamctl.cfg.txdelay);
+	printf ("txtail    :%c%-3u (ms)\n", is_mask (mask, YAM_TXTAIL), yamctl.cfg.txtail);
+	printf ("slottime  :%c%-3u (ms)\n", is_mask (mask, YAM_SLOTTIME), yamctl.cfg.slottime);
+	printf ("persist   :%c%u\n", is_mask (mask, YAM_PERSIST), yamctl.cfg.persist);
+	printf ("\n");
+}
+
+static const char *usage_str =
+"[-h] yamif\n"
+"  [iobase <iobase>] [irq <irq>] [bitrate <bitrate>] [baudrate <baudrate>]\n"
+"  [duplex <mode>] [hold <delay>] [txdelay <txdelay>]\n"
+"  [txtail <txtail>] [slottime <slottime>] [persist <persistence>]\n"
+"  [load <bitrate> <filename.mcs>]\n"
+"  yamif: the name of the yam kernel driver interface (yam0)\n"
+"  -h: this help\n\n";
+
+int main (int argc, char *argv[])
+{
+	char name[256] = "yam0";
+	struct ifreq ifr;
+	int sock;
+	unsigned int mask;
+
+	printf ("\n%s: Version 0.1 (C) 1998 by Jean-Paul ROUBELAT - F6FBB\n", *argv);
+
+	if ((argc < 2) || (strcasecmp (argv[1], "-h") == 0))
+	{
+		printf ("usage: %s %s", *argv, usage_str);
+		return 1;
+	}
+
+	strcpy (name, argv[1]);
+
+	if ((sock = socket (PF_INET, SOCK_PACKET, htons (ETH_P_AX25))) < 0)
+	{
+		fprintf (stderr, "%s: Error %s (%i), cannot open %s\n",
+				 argv[0], strerror (errno), errno, name);
+		return 2;
+	}
+
+	strcpy (ifr.ifr_name, name);
+	if (ioctl (sock, SIOCGIFFLAGS, &ifr) < 0)
+	{
+		fprintf (stderr, "%s: Error %s (%i), cannot ioctl %s\n",
+				 argv[0], strerror (errno), errno, name);
+		close (sock);
+		return 3;
+	}
+
+	mask = 0;
+
+	if (set_params (argv[0], &ifr, sock, argc - 2, argv + 2, &mask) == -1)
+	{
+		close (sock);
+		return 4;
+	}
+
+	get_params (argv[0], &ifr, sock, mask);
+
+	close (sock);
+
+	return 0;
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/ax25-tools.git



More information about the pkg-hamradio-commits mailing list