Commit 71f02d51 authored by Dave Hibberd's avatar Dave Hibberd

Import Upstream version 2.08.svn593+dfsg

parents
This diff is collapsed.
INSTALL of APRX 2.08
Pre-made binary package building system exists for Debian and
Redhat/Fedora systems. See details at the end of this file.
A rough-cut version of the installation instructions
0) Prerequisites:
Does not need anything beside standard libc!
(In particular the Linux version does not need
libax25 / libax25-dev !)
1) Start with ./configure --parameters
For a small memory system without writable /tmp
you have to use --with-embedded option.
2) Cleanliness is good start:
$ make clean
3) Compile the thing:
$ make
4) There is automatic "install" as:
# make install
with several presumptions about directories fixed
into the Makefile (possibly some adjustments are
required, depending upon your environment.)
5) Edit the configuration file to match your system:
# emacs /etc/aprx.conf
See the aprx(8) man-page for more info (man 8 aprx)
6) Program startup scripts ("init-scripts") exist for
couple system environments, others may need manual
adapting.
For Debian users wanting to compile themselves instead of using
precompiled binaries:
$ make make-deb
# dpkg -i aprx_2.07-....deb
For RedHat/Fedora users:
$ make make-rpm
# rpm -Uvh aprx-2.07.svn###-1.i386.rpm
Copyright (c) 2007-2014, Matti Aarnio
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Matti Aarnio nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# APRX -- 2nd generation receive-only APRS-i-gate with
# minimal requirement of esoteric facilities or
# libraries of any kind beyond UNIX system libc.
#
# Note: This makefile uses features from GNU make
# -------------------------------------------------------------------- #
# target paths
VARRUN= /var/run # directory for aprx.state and pid-file
VARLOG= /var/log/aprx # directory for direct logfiles
CFGFILE= /etc/aprx.conf # default configuration file
SBINDIR= /usr/sbin # installation path for programs
MANDIR= /usr/share/man # installation path for manual pages
# -------------------------------------------------------------------- #
srcdir = .
PROF= # used by 'make profile'
# Compiler and flags
CC= gcc
CFLAGS= -Wall -g -O2 -pthread
# Linker and flags
LD= gcc
LDFLAGS= -Wall -g -O2 -z noexecstack $(PROF)
datarootdir= ${prefix}/share
INSTALL= $(srcdir)/install-sh
INSTALL_PROGRAM=$(INSTALL) -m 755
INSTALL_DATA= $(INSTALL) -m 644
# -------------------------------------------------------------------- #
# no user serviceable parts below
# -------------------------------------------------------------------- #
# strip extra whitespace from paths
VARRUN:=$(strip $(VARRUN))
VARLOG:=$(strip $(VARLOG))
CFGFILE:=$(strip $(CFGFILE))
SBINDIR:=$(strip $(SBINDIR))
MANDIR:=$(strip $(MANDIR))
# generate version strings
VERSION = 2.08
SVNVERSION = $(shell cat SVNVERSION)
versionupdate := $(shell if [ "$(PKG_REV)-$(PKG_RELEASE)" != "-" ]; then echo "$(PKG_REV)-$(PKG_RELEASE)" > SVNVERSION; fi)
# VERSION:=$(shell cat VERSION)
# SVNVERSION_CMD:=$(shell which svnversion)
# SVNVERSION:=$(shell if ${SVNVERSION_CMD} > /dev/null 2>&1 \&\& test -x ${SVNVERSION_CMD} -a \( -d .svn -o -d ../.svn -o -d ../../.svn \) ; then ${SVNVERSION_CMD} | tee SVNVERSION ; else cat SVNVERSION; fi)
DATE:=$(shell date +"%Y %B %d")
RFCDATE:=$(shell date +"%a, %d %b %Y %H:%M:%S %z")
DEFS= -DAPRXVERSION="\"2.08r$(SVNVERSION)\"" \
-DVARRUN="\"$(VARRUN)\"" -DVARLOG="\"$(VARLOG)\"" \
-DCFGFILE="\"$(CFGFILE)\""
# program names
PROGAPRX= aprx
PROGSTAT= $(PROGAPRX)-stat
LIBS= -lrt -lutil -lm -pthread -lrt
OBJSAPRX= aprx.o ttyreader.o ax25.o aprsis.o beacon.o config.o \
netax25.o erlang.o aprxpolls.o telemetry.o igate.o \
cellmalloc.o historydb.o keyhash.o parse_aprs.o \
dupecheck.o kiss.o interface.o pbuf.o digipeater.o \
valgrind.o filter.o dprsgw.o crc.o agwpesocket.o \
netresolver.o timercmp.o #ssl.o
OBJSSTAT= erlang.o aprx-stat.o aprxpolls.o valgrind.o timercmp.o
# man page sources, will be installed as $(PROGAPRX).8 / $(PROGSTAT).8
MANAPRX := aprx.8
MANSTAT := aprx-stat.8
OBJS= $(OBJSAPRX) $(OBJSSTAT)
MAN= $(MANAPRX) $(MANSTAT)
# -------------------------------------------------------------------- #
.PHONY: all
all: $(PROGAPRX) $(PROGSTAT) man aprx.conf aprx-complex.conf
valgrind:
@echo "Did you do 'make clean' before 'make valgrind' ?"
make all CFLAGS="${CFLAGS} -D_FOR_VALGRIND_"
profile:
@echo "Did you do 'make clean' before 'make profile' ?"
make all PROF="-pg"
$(PROGAPRX): $(OBJSAPRX) VERSION Makefile
$(LD) $(LDFLAGS) -o $@ $(OBJSAPRX) $(LIBS)
$(PROGSTAT): $(OBJSSTAT) VERSION Makefile
$(LD) $(LDFLAGS) -o $@ $(OBJSSTAT) $(LIBS)
.PHONY: man
man: $(MAN)
.PHONY: doc html pdf
doc: html pdf
pdf: $(MAN:=.pdf)
html: $(MAN:=.html)
# -------------------------------------------------------------------- #
.PHONY: install install-deb
install: all
$(INSTALL_PROGRAM) $(PROGAPRX) $(DESTDIR)$(SBINDIR)/$(PROGAPRX)
$(INSTALL_PROGRAM) $(PROGSTAT) $(DESTDIR)$(SBINDIR)/$(PROGSTAT)
$(INSTALL_DATA) $(MANAPRX) $(DESTDIR)$(MANDIR)/man8/$(PROGAPRX).8
$(INSTALL_DATA) $(MANSTAT) $(DESTDIR)$(MANDIR)/man8/$(PROGSTAT).8
if [ ! -f $(DESTDIR)$(CFGFILE) ] ; then \
$(INSTALL_DATA) aprx.conf $(DESTDIR)$(CFGFILE) ; \
else true ; fi
.PHONY: clean
clean:
rm -f $(PROGAPRX) $(PROGSTAT)
rm -f $(MAN) $(MAN:=.html) $(MAN:=.ps) $(MAN:=.pdf) \
rm -f aprx.conf logrotate.aprx
rm -f *~ *.o *.d
.PHONY: distclean
distclean: clean
rm -f config.log config.status config.h
rm -rf autom4te.cache *.log* doc/.~*#
# -------------------------------------------------------------------- #
%.o: %.c VERSION Makefile
$(CC) $(CFLAGS) $(PROF) $(DEFS) -c $<
@$(CC) -MM $(CFLAGS) $(PROF) $(DEFS) $< > $(@:.o=.d)
$(MAN:=.html): %.html : %
sh man-to-html.sh $< > $@
$(MAN:=.ps): %.ps : %
groff -man $< > $@
$(MAN:=.pdf): %.pdf : %.ps
ps2pdf $<
logrotate.aprx $(MAN) aprx-complex.conf aprx.conf: % : %.in VERSION Makefile
perl -ne "s{\@DATEVERSION\@}{$(VERSION) - $(DATE)}g; \
s{\@VARRUN\@}{$(VARRUN)}g; \
s{\@VARLOG\@}{$(VARLOG)}g; \
s{\@CFGFILE\@}{$(CFGFILE)}g; \
print;" \
< $< > $@
# -------------------------------------------------------------------- #
#
# Following is for the original author only...
#
DISTVERSION:=aprx-$(VERSION).svn$(SVNVERSION)
DISTTARGET:=../$(DISTVERSION)
RPMVERSION:=$(shell echo "${DISTVERSION}" | sed -e 's/aprx-//')
.PHONY: dist svnversion-test
svnversion-test:
# Special for the source maintainer only..
@sh svnversion-test.sh $(SVNVERSION)
dist: svnversion-test
if [ ! -d $(DISTTARGET) ] ; then \
mkdir $(DISTTARGET) ; \
fi
tar cf - --exclude-backups --exclude-vcs --exclude=windows --exclude=*.log* --exclude=*.conf . | (cd $(DISTTARGET) ; tar xf -)
echo "$(DISTVERSION)" > $(DISTTARGET)/VERSION
perl -ne "\$$ver = '$(DISTVERSION)'; \
\$$ver =~ tr/0-9.//cd; \
\$$ver .= '-1'; \
s{\@VERSION\@}{\$$ver}g; \
s{\@RFCDATE\@}{$(RFCDATE)}g; \
print;" \
< $(DISTTARGET)/debian/changelog.release \
> $(DISTTARGET)/debian/changelog
rm -f $(DISTTARGET)/debian/changelog.release
rm -f $(DISTTARGET)/aprx.spec
perl -ne "s{\@VERSION\@}{$(RPMVERSION)}g; \
s{\@DATE0\@}{$(DATE0)}g; \
print;" \
< $(DISTTARGET)/rpm/aprx.spec.in \
> $(DISTTARGET)/aprx.spec
rm -f $(DISTTARGET)/rpm/aprx.spec.in
make -C $(DISTTARGET) distclean
cd .. && \
tar czvf $(DISTVERSION).tar.gz $(DISTVERSION)
# -------------------------------------------------------------------- #
.PHONY: make-deb make-rpm
make-deb:
if [ -f debian/changelog.release ] ; then \
perl -ne "\$$ver = '$(DISTVERSION)'; \
\$$ver =~ tr/0-9.//cd; \
\$$ver .= '-1'; \
s{\@VERSION\@}{\$$ver}g; \
s{\@RFCDATE\@}{$(RFCDATE)}g; \
print;" \
< debian/changelog.release \
> debian/changelog ; \
fi
dpkg-buildpackage -b -us -uc -rfakeroot
make-rpm: # actually just a reminder of how to do it..
rpmbuild --target i386 -ta ../$(DISTVERSION).tar.gz
# -------------------------------------------------------------------- #
# include object depencies if available
-include $(OBJS:.o=.d)
#
# APRX -- 2nd generation receive-only APRS-i-gate with
# minimal requirement of esoteric facilities or
# libraries of any kind beyond UNIX system libc.
#
# Note: This makefile uses features from GNU make
# -------------------------------------------------------------------- #
# target paths
VARRUN= /var/run # directory for aprx.state and pid-file
VARLOG= /var/log/aprx # directory for direct logfiles
CFGFILE= @sysconfdir@/aprx.conf # default configuration file
SBINDIR= @sbindir@ # installation path for programs
MANDIR= @mandir@ # installation path for manual pages
# -------------------------------------------------------------------- #
srcdir = @srcdir@
VPATH = @srcdir@
@SET_MAKE@
PROF= # used by 'make profile'
# Compiler and flags
CC= @CC@
CFLAGS= @CFLAGS@ @CCPTHREAD@
# Linker and flags
LD= @CC@
LDFLAGS= @LDFLAGS@ $(PROF)
datarootdir= @datarootdir@
INSTALL= $(srcdir)/install-sh
INSTALL_PROGRAM=$(INSTALL) -m 755
INSTALL_DATA= $(INSTALL) -m 644
# -------------------------------------------------------------------- #
# no user serviceable parts below
# -------------------------------------------------------------------- #
# strip extra whitespace from paths
VARRUN:=$(strip $(VARRUN))
VARLOG:=$(strip $(VARLOG))
CFGFILE:=$(strip $(CFGFILE))
SBINDIR:=$(strip $(SBINDIR))
MANDIR:=$(strip $(MANDIR))
# generate version strings
VERSION = @VERSION_STRING@
SVNVERSION = $(shell cat SVNVERSION)
versionupdate := $(shell if [ "$(PKG_REV)-$(PKG_RELEASE)" != "-" ]; then echo "$(PKG_REV)-$(PKG_RELEASE)" > SVNVERSION; fi)
# VERSION:=$(shell cat VERSION)
# SVNVERSION_CMD:=$(shell which svnversion)
# SVNVERSION:=$(shell if ${SVNVERSION_CMD} > /dev/null 2>&1 \&\& test -x ${SVNVERSION_CMD} -a \( -d .svn -o -d ../.svn -o -d ../../.svn \) ; then ${SVNVERSION_CMD} | tee SVNVERSION ; else cat SVNVERSION; fi)
DATE:=$(shell date +"%Y %B %d")
RFCDATE:=$(shell date +"%a, %d %b %Y %H:%M:%S %z")
DEFS= -DAPRXVERSION="\"@VERSION_STRING@r$(SVNVERSION)\"" \
-DVARRUN="\"$(VARRUN)\"" -DVARLOG="\"$(VARLOG)\"" \
-DCFGFILE="\"$(CFGFILE)\""
# program names
PROGAPRX= aprx
PROGSTAT= $(PROGAPRX)-stat
LIBS= @LIBS@ @LIBRESOLV@ @LIBSOCKET@ @LIBM@ @LIBPTHREAD@ @LIBGETADDRINFO@ @LIBRT@
OBJSAPRX= aprx.o ttyreader.o ax25.o aprsis.o beacon.o config.o \
netax25.o erlang.o aprxpolls.o telemetry.o igate.o \
cellmalloc.o historydb.o keyhash.o parse_aprs.o \
dupecheck.o kiss.o interface.o pbuf.o digipeater.o \
valgrind.o filter.o dprsgw.o crc.o agwpesocket.o \
netresolver.o timercmp.o #ssl.o
OBJSSTAT= erlang.o aprx-stat.o aprxpolls.o valgrind.o timercmp.o
# man page sources, will be installed as $(PROGAPRX).8 / $(PROGSTAT).8
MANAPRX := aprx.8
MANSTAT := aprx-stat.8
OBJS= $(OBJSAPRX) $(OBJSSTAT)
MAN= $(MANAPRX) $(MANSTAT)
# -------------------------------------------------------------------- #
.PHONY: all
all: $(PROGAPRX) $(PROGSTAT) man aprx.conf aprx-complex.conf
valgrind:
@echo "Did you do 'make clean' before 'make valgrind' ?"
make all CFLAGS="${CFLAGS} -D_FOR_VALGRIND_"
profile:
@echo "Did you do 'make clean' before 'make profile' ?"
make all PROF="-pg"
$(PROGAPRX): $(OBJSAPRX) VERSION Makefile
$(LD) $(LDFLAGS) -o $@ $(OBJSAPRX) $(LIBS)
$(PROGSTAT): $(OBJSSTAT) VERSION Makefile
$(LD) $(LDFLAGS) -o $@ $(OBJSSTAT) $(LIBS)
.PHONY: man
man: $(MAN)
.PHONY: doc html pdf
doc: html pdf
pdf: $(MAN:=.pdf)
html: $(MAN:=.html)
# -------------------------------------------------------------------- #
.PHONY: install install-deb
install: all
$(INSTALL_PROGRAM) $(PROGAPRX) $(DESTDIR)$(SBINDIR)/$(PROGAPRX)
$(INSTALL_PROGRAM) $(PROGSTAT) $(DESTDIR)$(SBINDIR)/$(PROGSTAT)
$(INSTALL_DATA) $(MANAPRX) $(DESTDIR)$(MANDIR)/man8/$(PROGAPRX).8
$(INSTALL_DATA) $(MANSTAT) $(DESTDIR)$(MANDIR)/man8/$(PROGSTAT).8
if [ ! -f $(DESTDIR)$(CFGFILE) ] ; then \
$(INSTALL_DATA) aprx.conf $(DESTDIR)$(CFGFILE) ; \
else true ; fi
.PHONY: clean
clean:
rm -f $(PROGAPRX) $(PROGSTAT)
rm -f $(MAN) $(MAN:=.html) $(MAN:=.ps) $(MAN:=.pdf) \
rm -f aprx.conf logrotate.aprx
rm -f *~ *.o *.d
.PHONY: distclean
distclean: clean
rm -f config.log config.status config.h
rm -rf autom4te.cache *.log* doc/.~*#
# -------------------------------------------------------------------- #
%.o: %.c VERSION Makefile
$(CC) $(CFLAGS) $(PROF) $(DEFS) -c $<
@$(CC) -MM $(CFLAGS) $(PROF) $(DEFS) $< > $(@:.o=.d)
$(MAN:=.html): %.html : %
sh man-to-html.sh $< > $@
$(MAN:=.ps): %.ps : %
groff -man $< > $@
$(MAN:=.pdf): %.pdf : %.ps
ps2pdf $<
logrotate.aprx $(MAN) aprx-complex.conf aprx.conf: % : %.in VERSION Makefile
perl -ne "s{\@DATEVERSION\@}{$(VERSION) - $(DATE)}g; \
s{\@VARRUN\@}{$(VARRUN)}g; \
s{\@VARLOG\@}{$(VARLOG)}g; \
s{\@CFGFILE\@}{$(CFGFILE)}g; \
print;" \
< $< > $@
# -------------------------------------------------------------------- #
#
# Following is for the original author only...
#
DISTVERSION:=aprx-$(VERSION).svn$(SVNVERSION)
DISTTARGET:=../$(DISTVERSION)
RPMVERSION:=$(shell echo "${DISTVERSION}" | sed -e 's/aprx-//')
.PHONY: dist svnversion-test
svnversion-test:
# Special for the source maintainer only..
@sh svnversion-test.sh $(SVNVERSION)
dist: svnversion-test
if [ ! -d $(DISTTARGET) ] ; then \
mkdir $(DISTTARGET) ; \
fi
tar cf - --exclude-backups --exclude-vcs --exclude=windows --exclude=*.log* --exclude=*.conf . | (cd $(DISTTARGET) ; tar xf -)
echo "$(DISTVERSION)" > $(DISTTARGET)/VERSION
perl -ne "\$$ver = '$(DISTVERSION)'; \
\$$ver =~ tr/0-9.//cd; \
\$$ver .= '-1'; \
s{\@VERSION\@}{\$$ver}g; \
s{\@RFCDATE\@}{$(RFCDATE)}g; \
print;" \
< $(DISTTARGET)/debian/changelog.release \
> $(DISTTARGET)/debian/changelog
rm -f $(DISTTARGET)/debian/changelog.release
rm -f $(DISTTARGET)/aprx.spec
perl -ne "s{\@VERSION\@}{$(RPMVERSION)}g; \
s{\@DATE0\@}{$(DATE0)}g; \
print;" \
< $(DISTTARGET)/rpm/aprx.spec.in \
> $(DISTTARGET)/aprx.spec
rm -f $(DISTTARGET)/rpm/aprx.spec.in
make -C $(DISTTARGET) distclean
cd .. && \
tar czvf $(DISTVERSION).tar.gz $(DISTVERSION)
# -------------------------------------------------------------------- #
.PHONY: make-deb make-rpm
make-deb:
if [ -f debian/changelog.release ] ; then \
perl -ne "\$$ver = '$(DISTVERSION)'; \
\$$ver =~ tr/0-9.//cd; \
\$$ver .= '-1'; \
s{\@VERSION\@}{\$$ver}g; \
s{\@RFCDATE\@}{$(RFCDATE)}g; \
print;" \
< debian/changelog.release \
> debian/changelog ; \
fi
dpkg-buildpackage -b -us -uc -rfakeroot
make-rpm: # actually just a reminder of how to do it..
rpmbuild --target i386 -ta ../$(DISTVERSION).tar.gz
# -------------------------------------------------------------------- #
# include object depencies if available
-include $(OBJS:.o=.d)
Protocols spoken by APRX
There are a few protocols spoken by the APRX:
1) APRS-IS interchange
2) Proprietary monitoring via shared memory segment
3) APRX-APRXC linkage
APRS-IS interchange
This protocol is fairly simple.
http://wiki.ham.fi/IGate_properties
APRS iGate Common Properties
Communication is over TCP streams of text lines terminating
at CR+LF pair. No CR or LF is permitted inside the text
line, however.
APRS-IS user authentication:
user USERID pass PASSCODE vers VERS STRINGS \
filter FILTER STRINGS
where 'USERID' is uppercase callsign plus possible "-SSID" tail.
The 'PASSCODE' is calculated with semi-secret algorithm out of
the uppercase callsign characters without '-' and SSID tail.
The 'VERS STRINGS' are free to be anything, except string 'filter',
and the 'FILTER STRINGS' are explained in document:
http://www.aprs-is.net/ServerCmds.htm
http://www.aprs-is.net/javAPRSSrvr/javaprsfilter.htm
Messages:
Lines beginning with '#' character are line noise (usually
something that the server replies..)
After successfull login, communication carries "TNC2" format
APRS messages. Namely text encoding of AX.25 UI frames in
what became known as "TNC2 monitor style":
SOURCE>DESTIN:payload
SOURCE>DESTIN,VIA,VIA:payload
The SOURCE, DESTIN, and VIA fields are AX.25 address fields,
and have "-SSID" value annexed if the SSID is not zero.
Also in VIA-fields, if the "HAS BEEN DIGIPEATED" bit is set
(AX.25 v2 protocol feature) a star ('*') character is appended.
VIA-fields are separated by comma (',') from DESTIN, and each
other.
A double-colon (':') separates address data from payload.
The payload is passed _AS_IS_ without altering any message
content bytes, however ending at first CR or LF character
encountered in the packet.
APRS-RX iGate Basic Rules
Packets with source addresses: NOCALL*, N0CALL*, WIDE*, TRACE*,
TCP*, are dropped and not relayed to APRS-IS.
Packets with VIA addresses: RFONLY, NOGATE, TCPIP, TCPXX are not
to be relayed to APRS-IS. Sometimes the VIA fields have '*' on
their tails.
Packets with payload beginning with character '?' are not to be
relayed to APRS-IS.
Packets with payload beginning with character '}' are so called
3rd-party frames, and they are to be re-processed starting from
character following the '}' character.
When packet is sent to APRS-IS, the address gets appended
either a "q-construct", or equivalent:
,qAR,gatecallsign
,gatecallsign,I
The "qAR" et.al. are explained at: http://www.aprs-is.net/q.aspx
APRS-TX iGate has additional rules:
All rules:
http://www.aprs-is.net/IGateDetails.aspx
Specifically forbidden to relay to RF is "qAX", maybe some others too.
(See: http://www.aprs-is.net/q.aspx)
If the packet VIA-path received from APRS-IS contains TCPXX,
NOGATE, RFONLY, then the packet is to be dropped, and not relayed
to radio network. (Note: TCPIP is permitted.)
Packets relayed from APRS-IS to radio must use so called 3rd-party
format. Signature is '}' character.
Rules on re-sending recently heard packets are a bit more complex,
and are covered adequately in above referenced document.
Proprietary monitoring mechanism
There is a tool for monitoring channel activity.
See aprx-stat(8)
APRX-APRXC linkage
(For a feature in planning...)
With introduction of APRX-Cluster (APRXC) mode, multiple APRX
instances are used as remote attachments to TNCs, and one central
system runs more complicated business logic deciding which messages
to pass where, what beacons to send, etc. The central business-logic
server runs also connection with APRS-IS, and all things that it
implies.
Actually the APRX-Cluster-Server is APRX program version with
embedded Perl for business logic. Some very flexibly configurable
APRS digi software has practical limitations of what the config
can do.
Environmental pre-requisite: APRXC and APRX nodes are in NTP sync!
The Protocol:
Communication is of text lines over TCP stream, they are canonic
Internet format ending with CRLF pairs. However no embedded CR,
nor LF is permitted.
(detail under study: UDP frames, or SCTP SEQPACKET ?)
The protocol is bidirectional, and is intended to be connected from
edge systems to cluster server. Upon receiving a connection the
server sends a greeting containing time-varying string. This will
be used by the connecting party to do authentication in APOP-style.
The timestamps in this protocol are "U" format:
sprintf(timestamp, "U%ld", (long)time(NULL));
which is to say, integer presentation of UNIX internal time in whole
seconds.
In following ">>" mean data sent by central system and received by
the edge, whereas "<<" means data sent by edge system to central
system.
<< (connection formation from edge to the server)
>> <timestamp> Hello <++counter> some greeting string
<< <timestamp> LOGIN <userid> <authenticator>
>> <timestamp> OK
<< <timestamp> SERVICE <ifname> <speed> { RX | TX <areaspecifiers> }
>> <timestamp> OK
The <authenticator> is formed by hex (lower case) encoding of 16 byte
MD5() checksum over the whole greeting string (sans CRLF), plus userid,
plus shared plaintext password.
Replies can also be "FAIL", if "LOGIN" or "SERVICE" is somehow bad.