summaryrefslogtreecommitdiffstats
path: root/ax25rtd
diff options
context:
space:
mode:
Diffstat (limited to 'ax25rtd')
-rw-r--r--ax25rtd/Makefile.am5
-rw-r--r--ax25rtd/Makefile.in2
-rw-r--r--ax25rtd/README.ax25rtd2
-rw-r--r--ax25rtd/ax25rtctl.c4
-rw-r--r--ax25rtd/ax25rtd.c22
-rw-r--r--ax25rtd/ax25rtd.h2
-rw-r--r--ax25rtd/cache_ctl.c8
-rw-r--r--ax25rtd/cache_dump.c12
-rw-r--r--ax25rtd/config.c46
-rw-r--r--ax25rtd/listener.c23
10 files changed, 86 insertions, 40 deletions
diff --git a/ax25rtd/Makefile.am b/ax25rtd/Makefile.am
index a4db33c..8d24c09 100644
--- a/ax25rtd/Makefile.am
+++ b/ax25rtd/Makefile.am
@@ -28,6 +28,5 @@ ax25rtd_SOURCES = \
AX25_SYSCONFDIR=$(sysconfdir)/ax25/
AX25_LOCALSTATEDIR=$(localstatedir)/ax25/
-INCLUDES = -DAX25_SYSCONFDIR=\""$(ax25_sysconfdir)"\" \
- -DAX25_LOCALSTATEDIR=\""$(localstatedir)/ax25/"\"
-
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+ -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\"
diff --git a/ax25rtd/Makefile.in b/ax25rtd/Makefile.in
index 02b28b3..c6f4aef 100644
--- a/ax25rtd/Makefile.in
+++ b/ax25rtd/Makefile.in
@@ -92,7 +92,7 @@ ax25rtd_SOURCES = ax25rtd.c ax25rtd.h cache_ctl.c cache_dump.c config.c l
AX25_SYSCONFDIR = $(sysconfdir)/ax25/
AX25_LOCALSTATEDIR = $(localstatedir)/ax25/
-INCLUDES = -DAX25_SYSCONFDIR=\""$(ax25_sysconfdir)"\" -DAX25_LOCALSTATEDIR=\""$(localstatedir)/ax25/"\"
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\"
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
diff --git a/ax25rtd/README.ax25rtd b/ax25rtd/README.ax25rtd
index a7bf2c4..229138e 100644
--- a/ax25rtd/README.ax25rtd
+++ b/ax25rtd/README.ax25rtd
@@ -1,6 +1,6 @@
*****************************************************************
* Please send all comments and suggestions regarding ax25rtd to *
-* Klaus Kudielka (oe1kib@oe1xtu.ampr.org). *
+* Klaus Kudielka (klaus.kudielka@ieee.org). *
*****************************************************************
Just a quick small README...
diff --git a/ax25rtd/ax25rtctl.c b/ax25rtd/ax25rtctl.c
index 6f40423..f9a3647 100644
--- a/ax25rtd/ax25rtctl.c
+++ b/ax25rtd/ax25rtctl.c
@@ -1,4 +1,4 @@
-/* $Id: ax25rtctl.c,v 1.7 1997/06/05 18:52:55 oe1kib Exp oe1kib $
+/* $Id: ax25rtctl.c,v 1.8 1998/08/20 01:43:28 kudielka Exp $
*
* Copyright (c) 1996 Jörg Reuter (jreuter@poboxes.com)
*
@@ -262,7 +262,7 @@ static void Version(void)
int sock;
char buf[256];
- printf("ax25rtctl $Revision: 1.7 $\n");
+ printf("ax25rtctl $Revision: 1.8 $\n");
sock = open_socket();
wsock(sock, "version\n");
read(sock, buf, sizeof(buf));
diff --git a/ax25rtd/ax25rtd.c b/ax25rtd/ax25rtd.c
index 0fdbb39..22ffeb9 100644
--- a/ax25rtd/ax25rtd.c
+++ b/ax25rtd/ax25rtd.c
@@ -1,4 +1,4 @@
-/* $Id: ax25rtd.c,v 1.6 1996/10/23 18:27:43 jreuter Exp jreuter $
+/* $Id: ax25rtd.c,v 1.7 1996/10/23 18:27:43 jreuter Exp jreuter $
*
* Copyright (c) 1996 Jörg Reuter (jreuter@poboxes.com)
*
@@ -35,19 +35,33 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
-#include <sys/socket.h>
+#ifdef __GLIBC__
#include <net/ethernet.h>
+#else
+#include <linux/if_ether.h>
+#endif
+
+#include <config.h>
+#ifdef HAVE_NETAX25_AX25_H
#include <netax25/ax25.h>
-#include <netax25/axconfig.h>
+#else
+#include <netax25/kernel_ax25.h>
+#endif
+#ifdef HAVE_NETROSE_ROSE_H
#include <netrose/rose.h>
+#else
+#include <netax25/kernel_rose.h>
+#endif
+#include <netax25/axconfig.h>
#include <netax25/axlib.h>
#include "../pathnames.h"
#include "ax25rtd.h"
-const char *Version = "ax25rtd $Revision: 1.6 $";
+const char *Version = "ax25rtd $Revision: 1.7 $";
config *Config = NULL;
int reload = 0;
diff --git a/ax25rtd/ax25rtd.h b/ax25rtd/ax25rtd.h
index b45771f..01f7ef7 100644
--- a/ax25rtd/ax25rtd.h
+++ b/ax25rtd/ax25rtd.h
@@ -1,4 +1,4 @@
-/* $Id: ax25rtd.h,v 1.5 1997/06/05 18:54:57 oe1kib Exp oe1kib $
+/* $Id: ax25rtd.h,v 1.6 1997/06/05 18:54:57 oe1kib Exp oe1kib $
*
* Copyright (c) 1996 Jörg Reuter (jreuter@poboxes.com)
*
diff --git a/ax25rtd/cache_ctl.c b/ax25rtd/cache_ctl.c
index 0d892ad..6988c96 100644
--- a/ax25rtd/cache_ctl.c
+++ b/ax25rtd/cache_ctl.c
@@ -1,4 +1,4 @@
-/* $Id: cache_ctl.c,v 1.4 1996/10/23 18:27:43 jreuter Exp jreuter $
+/* $Id: cache_ctl.c,v 1.5 1996/10/23 18:27:43 jreuter Exp jreuter $
*
* Copyright (c) 1996 Jörg Reuter (jreuter@poboxes.com)
*
@@ -22,7 +22,13 @@
#include <string.h>
#include <time.h>
#include <sys/socket.h>
+
+#include <config.h>
+#ifdef HAVE_NETAX25_AX25_H
#include <netax25/ax25.h>
+#else
+#include <netax25/kernel_ax25.h>
+#endif
#include "ax25rtd.h"
diff --git a/ax25rtd/cache_dump.c b/ax25rtd/cache_dump.c
index 93b211e..9888583 100644
--- a/ax25rtd/cache_dump.c
+++ b/ax25rtd/cache_dump.c
@@ -1,4 +1,4 @@
-/* $Id: cache_dump.c,v 1.5 1996/10/23 18:27:43 jreuter Exp jreuter $
+/* $Id: cache_dump.c,v 1.6 1998/08/20 01:43:38 kudielka Exp $
*
* Copyright (c) 1996 Jörg Reuter (jreuter@poboxes.com)
*
@@ -25,8 +25,18 @@
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
+
+#include <config.h>
+#ifdef HAVE_NETAX25_AX25_H
#include <netax25/ax25.h>
+#else
+#include <netax25/kernel_ax25.h>
+#endif
+#ifdef HAVE_NETROSE_ROSE_H
#include <netrose/rose.h>
+#else
+#include <netax25/kernel_rose.h>
+#endif
#include <netax25/axlib.h>
#include "ax25rtd.h"
diff --git a/ax25rtd/config.c b/ax25rtd/config.c
index 1306d2a..76384e0 100644
--- a/ax25rtd/config.c
+++ b/ax25rtd/config.c
@@ -1,4 +1,4 @@
-/* $Id: config.c,v 1.7 1997/06/05 18:55:51 oe1kib Exp oe1kib $
+/* $Id: config.c,v 1.8 1998/08/20 01:43:39 kudielka Exp kudielka $
*
* Copyright (c) 1996 Jörg Reuter (jreuter@poboxes.com)
*
@@ -30,10 +30,24 @@
#include <arpa/inet.h>
#include <netinet/in.h>
#include <net/if.h>
+#ifdef __GLIBC__
#include <net/ethernet.h>
+#else
+#include <linux/if_ether.h>
+#endif
#include <net/if_arp.h>
+
+#include <config.h>
+#ifdef HAVE_NETAX25_AX25_H
#include <netax25/ax25.h>
+#else
+#include <netax25/kernel_ax25.h>
+#endif
+#ifdef HAVE_NETROSE_ROSE_H
#include <netrose/rose.h>
+#else
+#include <netax25/kernel_rose.h>
+#endif
#include <netax25/axlib.h>
#include <netax25/axconfig.h>
@@ -409,7 +423,7 @@ void load_config()
if (arg)
{
int k = atoi(arg);
-
+
if (k == 0)
{
invalid_arg(cmd, arg);
@@ -426,7 +440,7 @@ void load_config()
if (arg)
{
int k = atoi(arg);
-
+
if (k == 0)
{
invalid_arg(cmd, arg);
@@ -437,19 +451,19 @@ void load_config()
} else
missing_arg(cmd);
} else
- if (config && !strcmp(cmd, "vc-mtu"))
+ if (config && !strcmp(cmd, "vc-mtu"))
+ {
+ /* vc-mtu <mtu>: MTU for virtual connect mode routes (unused) */
+ if (arg)
{
- /* vc-mtu <mtu>: MTU for virtual connect mode routes (unused) */
- if (arg)
+ int k = atoi(arg);
+
+ if (k == 0)
{
- int k = atoi(arg);
-
- if (k == 0)
- {
- invalid_arg(cmd, arg);
- continue;
- } else {
- config->vc_mtu = k;
+ invalid_arg(cmd, arg);
+ continue;
+ } else {
+ config->vc_mtu = k;
}
} else
missing_arg(cmd);
@@ -709,16 +723,16 @@ void load_cache(void)
{
while(fgets(buf, sizeof(buf), fp) != NULL)
interpret_command(2, buf);
+ fclose(fp);
}
- fclose(fp);
fp = fopen(DATA_AX25ROUTED_IPRT_FILE, "r");
if (fp != NULL)
{
while(fgets(buf, sizeof(buf), fp) != NULL)
interpret_command(2, buf);
+ fclose(fp);
}
- fclose(fp);
}
void save_cache(void)
diff --git a/ax25rtd/listener.c b/ax25rtd/listener.c
index 27b8622..a687f89 100644
--- a/ax25rtd/listener.c
+++ b/ax25rtd/listener.c
@@ -1,4 +1,4 @@
-/* $Id: listener.c,v 1.9 1997/06/05 18:56:08 oe1kib Exp oe1kib $
+/* $Id: listener.c,v 1.9 1997/06/05 18:56:08 oe1kib Exp kudielka $
*
* Copyright (c) 1996 Jörg Reuter (jreuter@poboxes.com)
*
@@ -32,7 +32,13 @@
#include <net/route.h>
#include <net/if.h>
#include <net/if_arp.h>
+
+#include <config.h>
+#ifdef HAVE_NETAX25_AX25_H
#include <netax25/ax25.h>
+#else
+#include <netax25/kernel_ax25.h>
+#endif
#include "../pathnames.h"
#include "ax25rtd.h"
@@ -109,14 +115,11 @@ static inline void invert_digipeater_path(ax25_address *digipeater, int ndigi)
if (ndigi == 0)
return;
- ndigi--;
-
- memcpy(&fdigi, &digipeater[0], AXLEN);
-
- for (m = 0,k = ndigi; k > 0; k--, m++)
+ for (m = 0,k = ndigi-1; k > m; k--, m++) {
+ memcpy(&fdigi, &digipeater[m], AXLEN);
memcpy(&digipeater[m], &digipeater[k], AXLEN);
-
- memcpy(&digipeater[ndigi], &fdigi, AXLEN);
+ memcpy(&digipeater[k], &fdigi, AXLEN);
+ }
}
int set_arp(config *config, long ip, ax25_address *call)
@@ -329,7 +332,7 @@ int set_ipmode(config *config, ax25_address *call, int ipmode)
ax25_opt.port_addr = config->mycalls[0];
ax25_opt.dest_addr = *call;
ax25_opt.cmd = AX25_SET_RT_IPMODE;
- ax25_opt.arg = ipmode? 'V':'C';
+ ax25_opt.arg = ipmode? 'V':'D';
fds = socket(AF_AX25, SOCK_SEQPACKET, 0);
@@ -384,7 +387,7 @@ void ax25_receive(int sock)
* KISS data?
*/
- if (*data != 0)
+ if ((*data & 0x0f) != 0)
return;
SKIP(1);