--- aprsdigi-2.0.orig/libax25ext.c +++ aprsdigi-2.0/libax25ext.c @@ -5,6 +5,10 @@ */ #ifndef HAVE_LIBAX25_EXTENSIONS + +#include +#include "libax25ext.h" + #define ALEN 6 #define AXLEN 7 #define HDLCAEB 0x01 @@ -17,6 +21,7 @@ * and length next byte of frame. Returns -1 on invalid or non-UI frame, 0 * on valid frame, 1 on valid frame that still has a non-repeated digi. */ + pk_val parse_kiss(unsigned char **frame, int *len, struct ax_calls *calls) --- aprsdigi-2.0.orig/libax25ext.h +++ aprsdigi-2.0/libax25ext.h @@ -5,7 +5,7 @@ */ #ifndef HAVE_LIBAX25_EXTENSIONS - + struct ax_calls { ax25_address ax_to_call; ax25_address ax_from_call; --- aprsdigi-2.0.orig/aprsmon.c +++ aprsdigi-2.0/aprsmon.c @@ -61,11 +61,9 @@ #include #include -#include -#include +#include +#include -#include "axconfig.h" -#include "axutils.h" #ifndef HAVE_LIBAX25_EXTENSIONS #include "libax25ext.h" #endif --- aprsdigi-2.0.orig/aprsshm.c +++ aprsdigi-2.0/aprsshm.c @@ -44,9 +44,9 @@ #include #include -#include +#include -#include "axconfig.h" +#include #include "aprsshm.h" #define MAXPPM 10 --- aprsdigi-2.0.orig/aprsdigi.c +++ aprsdigi-2.0/aprsdigi.c @@ -55,13 +55,18 @@ #include #include #include -#include -#include #include #include -#include "axconfig.h" -#include "axutils.h" +#include +#include + +/* AX25_MTU is defined in , but that + * conflicts with the netax25 files */ + +#define AX25_MTU 256 + #include "mic_e.h" +#include "libax25ext.h" #ifndef PACKAGE #define PACKAGE "aprsdigi" @@ -417,7 +422,7 @@ for (c = calltab; c; c = c->next) { if ((c->flags&C_IS_FLOOD && (*flags = floodcmp(c->callsign,c->floodlen,callsign))) - || (ax25cmp(c->callsign,callsign) == 0)) { + || (ax25_cmp(c->callsign,callsign) == 0)) { *flags |= c->flags; /* add stuff floodcmp doesn't know about */ return c; } @@ -532,7 +537,7 @@ s->out.ax_digi_call[0].ax25_call[ALEN] |= SSID&(ssid<<1); if (Verbose) { fprintf(stderr,"Flooding: setting path to %s\n", - ax2asc(&s->out.ax_digi_call[0])); + ax25_ntoa(&s->out.ax_digi_call[0])); } } else { /* not in a flooding network */ int startat,i; @@ -591,7 +596,7 @@ if (Verbose) { fprintf(stderr,"Got a flooding %s route.\n", - ax2asc(&s->in.ax_digi_call[s->in.ax_next_digi])); + ax25_ntoa(&s->in.ax_digi_call[s->in.ax_next_digi])); } /* flooding algorithm always kills dupes. If kill_dupes @@ -626,7 +631,7 @@ } if (Verbose) { fprintf(stderr,"Rewriting it as %s:\n", - ax2asc(&s->out.ax_digi_call[s->out.ax_next_digi])); + ax25_ntoa(&s->out.ax_digi_call[s->out.ax_next_digi])); } ++s->i->stats.flood; if (xmit(s) < 0) @@ -696,7 +701,7 @@ bzero(calls, sizeof(*calls)); sprintf(buf,"dummy via %s",str); - return convert_call(buf,calls); + return ax25_aton(buf,calls); } static int @@ -711,7 +716,7 @@ bzero(calls,ncalls*sizeof(*calls)); cp = strtok(str," \t\n,"); for (i = 0; cp && i < ncalls; i++) { - if (convert_call_entry(cp,calls[i].ax25_call) < 0) + if (ax25_aton_entry(cp,calls[i].ax25_call) < 0) return -1; cp = strtok(NULL," \t\n,"); } @@ -729,11 +734,11 @@ if (f == NULL) return; - strncpy(asc_to,ax2asc(&calls->ax_to_call),sizeof(asc_to)); - strncpy(asc_from,ax2asc(&calls->ax_from_call),sizeof(asc_from)); + strncpy(asc_to,ax25_ntoa(&calls->ax_to_call),sizeof(asc_to)); + strncpy(asc_from,ax25_ntoa(&calls->ax_from_call),sizeof(asc_from)); fprintf(f,"%s>%s",asc_from,asc_to); for (j = 0; j < calls->ax_n_digis; j++) { - fprintf(f,",%s%s",ax2asc(&calls->ax_digi_call[j]), + fprintf(f,",%s%s",ax25_ntoa(&calls->ax_digi_call[j]), (calls->ax_digi_call[j].ax25_call[ALEN]&REPEATED && (j == calls->ax_next_digi-1))?"*":""); } @@ -767,12 +772,12 @@ vecp[1] = mic2; /* does xmit intf want mic-E translation? */ if (i->i_flags&MICE_XLATE && - fmt_mic_e(ax2asc(&s->out.ax_to_call),s->cp,s->len, + fmt_mic_e(ax25_ntoa(&s->out.ax_to_call),s->cp,s->len, mic1,&vecl[0],mic2,&vecl[1],now)) { s->out.ax_to_call = Aprscall; /* replace compressed lat w/"APRS" */ return (vecl[0]>0)+(vecl[1]>0); } else if (i->i_flags&X1J4_XLATE && /* wantx1j4 translation? */ - fmt_x1j4(ax2asc(&s->out.ax_to_call),s->cp,s->len, + fmt_x1j4(ax25_ntoa(&s->out.ax_to_call),s->cp,s->len, mic1,&vecl[0],mic2,&vecl[1],now)) { return (vecl[0]>0)+(vecl[1]>0); } else { /* no reformat; just pass cp, len thru */ @@ -798,7 +803,7 @@ /* transmit the packet on the interface(s) of the next callsign */ if ((c = calltab_entry(&s->out.ax_digi_call[s->out.ax_next_digi],&thisflags)) == NULL) { fprintf(stderr,"xmit: Assertion failed: call %s not found\n", - ax2asc(&s->out.ax_digi_call[s->out.ax_next_digi])); + ax25_ntoa(&s->out.ax_digi_call[s->out.ax_next_digi])); return -1; } for(l = c->l; l; l = l->next) { /* loop over each tx interface */ @@ -1067,7 +1072,7 @@ int oleft = sizeof(iface->idbuf); bzero(&id,sizeof(id)); - convert_call_entry("ID",id.ax_to_call.ax25_call); + ax25_aton_entry("ID",id.ax_to_call.ax25_call); id.ax_to_call.ax25_call[ALEN] |= C; /* it's a command */ id.ax_from_call = MYCALL(n); id.ax_type = UI; @@ -1077,11 +1082,11 @@ gen_kiss(&op,&oleft,&id); /* generate the kiss header */ *idinfo = '\0'; for (i = 0; i < iface->n_aliases; i++) { - strcat(idinfo,ax2asc(&iface->aliases[i])); + strcat(idinfo,ax25_ntoa(&iface->aliases[i])); strcat(idinfo,"/R "); } for (i = 0; i < N_floods; i++) { - strcat(idinfo,ax2asc(&Floods[i].call)); + strcat(idinfo,ax25_ntoa(&Floods[i].call)); strcat(idinfo,"n-n/R "); } add_text(&op,&oleft,idinfo,strlen(idinfo),0,0); @@ -1213,7 +1218,7 @@ fprintf(stderr,"too many flooding aliases!\n"); exit(1); } - if (convert_call_entry(optarg,Floods[N_floods].call.ax25_call) < 0) { + if (ax25_aton_entry(optarg,Floods[N_floods].call.ax25_call) < 0) { fprintf(stderr,"Don't understand callsign %s\n",optarg); exit(1); } @@ -1347,9 +1352,9 @@ int n; struct interface *i; - convert_call_entry("APRS",Aprscall.ax25_call); - convert_call_entry("WIDE",Widecall.ax25_call); - convert_call_entry("trace",Trace_dummy.ax25_call); + ax25_aton_entry("APRS",Aprscall.ax25_call); + ax25_aton_entry("WIDE",Widecall.ax25_call); + ax25_aton_entry("trace",Trace_dummy.ax25_call); if (ax25_config_load_ports() == 0) fprintf(stderr, "aprsdigi: no AX.25 port data configured\n"); @@ -1467,7 +1472,7 @@ for (i = Intf, n = 0; n < N_intf; i++,n++) { printf("%-9.9s",i->dev); for (j = 0; j < i->n_aliases; j++) { - printf(" %-9.9s",ax2asc(&i->aliases[j])); + printf(" %-9.9s",ax25_ntoa(&i->aliases[j])); } printf("\n"); } @@ -1488,7 +1493,7 @@ struct interface_list *l; char t[10]; - strcpy(t,ax2asc(cl->callsign)); + strcpy(t,ax25_ntoa(cl->callsign)); if (cl->flags&C_IS_FLOOD) strcat(t,"n-n"); /* indicate a WIDEn-n */ printf("%-9.9s",t); @@ -1507,11 +1512,11 @@ } if (intf_of(&Digipath[0]) == NULL) { fprintf(stderr,"ERROR: %s: first callsign in omni route is not one of my callsigns.\n", - ax2asc(&Path[n].fsa_digipeater[0])); + ax25_ntoa(&Path[n].fsa_digipeater[0])); exit(1); } for (j = 0; j < DIGISIZE; j++) { - printf("%-9.9s ",ax2asc(&Digipath[j])); + printf("%-9.9s ",ax25_ntoa(&Digipath[j])); } printf("\n"); } @@ -1520,12 +1525,12 @@ for (n = 0; n < 4; n++) { if (intf_of(&Path[n].fsa_digipeater[0]) == NULL) { fprintf(stderr,"ERROR: %s: first callsign in %c route is not one of my callsigns.\n", - ax2asc(&Path[n].fsa_digipeater[0]),Dirs[n]); + ax25_ntoa(&Path[n].fsa_digipeater[0]),Dirs[n]); exit(1); } printf("\n%c: ",Dirs[n]); for (j = 0; j < Path[n].fsa_ax25.sax25_ndigis; j++) - printf("%-9.9s ",ax2asc(&Path[n].fsa_digipeater[j])); + printf("%-9.9s ",ax25_ntoa(&Path[n].fsa_digipeater[j])); } printf("\n"); } else { --- aprsdigi-2.0.orig/debian/changelog +++ aprsdigi-2.0/debian/changelog @@ -0,0 +1,24 @@ +aprsdigi (2.0-0pre3.4) unstable; urgency=low + + * Updated sources for latest changes to libax25-dev + + -- Hamish Moffatt Wed, 19 Sep 2001 00:22:43 +1000 + +aprsdigi (2.0-0pre3.3) unstable; urgency=low + + * Recompiled with correct version of libax25 (closes: #74183) + + -- Hamish Moffatt Sat, 7 Oct 2000 11:52:27 +1100 + +aprsdigi (2.0-0pre3.2) unstable; urgency=low + + * Updated copyright file to include upstream author information + + -- Hamish Moffatt Sun, 16 Apr 2000 22:27:40 +1000 + +aprsdigi (2.0-0pre3.1) unstable; urgency=low + + * Initial upload + + -- Hamish Moffatt Thu, 13 Apr 2000 21:42:00 +1000 + --- aprsdigi-2.0.orig/debian/postinst.debhelper +++ aprsdigi-2.0/debian/postinst.debhelper @@ -0,0 +1,7 @@ +# Automatically added by dh_installdocs +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/aprsdigi -a -d /usr/share/doc/aprsdigi ]; then + ln -sf ../share/doc/aprsdigi /usr/doc/aprsdigi + fi +fi +# End automatically added section --- aprsdigi-2.0.orig/debian/copyright +++ aprsdigi-2.0/debian/copyright @@ -0,0 +1,13 @@ + +This is the Debian GNU/Linux package of aprsdigi. aprsdigi was written +by Alan Crosswell N2YGK . Original sources were obtained +from + http://www.cloud9.net/~alan/ham/aprs/ + +This package was created by Hamish Moffatt . +Some source changes were made for use with the current version +of the libax25 library. + +aprsdigi is licensed under the GPL (GNU General Public License). +See /usr/share/common-licenses/GPL for the full text of this license. + --- aprsdigi-2.0.orig/debian/prerm.debhelper +++ aprsdigi-2.0/debian/prerm.debhelper @@ -0,0 +1,5 @@ +# Automatically added by dh_installdocs +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/aprsdigi ]; then + rm -f /usr/doc/aprsdigi +fi +# End automatically added section --- aprsdigi-2.0.orig/debian/dirs +++ aprsdigi-2.0/debian/dirs @@ -0,0 +1,2 @@ +usr/sbin +usr/share/doc/aprsdigi --- aprsdigi-2.0.orig/debian/control +++ aprsdigi-2.0/debian/control @@ -0,0 +1,15 @@ +Source: aprsdigi +Section: hamradio +Priority: optional +Maintainer: Hamish Moffatt +Standards-Version: 3.5.0 +Build-Depends: libax25-dev, debhelper + +Package: aprsdigi +Architecture: any +Depends: ${shlibs:Depends} +Suggests: ax25-tools, xastir, aprsd +Description: Digipeater for APRS + aprsdigi is a repeater for the Automatic Position Reporting System, APRS. + It also includes aprsmon, a one-way gateway to APRS on TCP/IP. + --- aprsdigi-2.0.orig/debian/rules +++ aprsdigi-2.0/debian/rules @@ -0,0 +1,60 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +package=aprsdigi + +build: + $(checkdir) + ./configure --prefix=/usr + make + touch build + +clean: + $(checkdir) + -rm -f build + -make distclean + -rm -f `find . -name "*~"` + -rm -rf debian/tmp debian/files* core debian/substvars + +binary-indep: checkroot build + $(checkdir) +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + $(checkdir) + dh_clean + dh_installdirs + make install DESTDIR=`pwd`/debian/tmp/ + mv debian/tmp/usr/man debian/tmp/usr/share + + dh_installdocs README AUTHORS TODO NEWS + dh_installmenu + dh_installmanpages + dh_undocumented + dh_installchangelogs + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_makeshlibs + dh_md5sums + dh_builddeb + +define checkdir + test -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot