diff -ruN --exclude-from diff-exclude libax25-0.0.5/INSTALL libax25-0.0.5-bns/INSTALL --- libax25-0.0.5/INSTALL Wed Jul 7 03:47:18 1999 +++ libax25-0.0.5-bns/INSTALL Thu Jul 8 23:55:36 1999 @@ -12,7 +12,7 @@ make install If you want to put the files in the "normal" places, type: - ./configure --exec_prefix=/usr --prefix= + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var make make install diff -ruN --exclude-from diff-exclude libax25-0.0.5/acconfig.h libax25-0.0.5-bns/acconfig.h --- libax25-0.0.5/acconfig.h Thu Jan 1 02:00:00 1970 +++ libax25-0.0.5-bns/acconfig.h Thu Jul 8 23:22:00 1999 @@ -0,0 +1,8 @@ +/* Define if you have a proper netax25/ax25.h header file. */ +#undef HAVE_NETAX25_AX25_H + +/* Define if you have a proper netrom/netrom.h header file. */ +#undef HAVE_NETROM_NETROM_H + +/* Define if you have a proper netrose/rose.h header file. */ +#undef HAVE_NETROSE_ROSE_H diff -ruN --exclude-from diff-exclude libax25-0.0.5/configure.in libax25-0.0.5-bns/configure.in --- libax25-0.0.5/configure.in Mon Jul 5 04:12:52 1999 +++ libax25-0.0.5-bns/configure.in Thu Jul 8 23:39:49 1999 @@ -5,11 +5,12 @@ AXLIB_MICRO_VERSION=5 AXLIB_VERSION=$AXLIB_MAJOR_VERSION.$AXLIB_MINOR_VERSION.$AXLIB_MICRO_VERSION -# for automake +dnl For automake VERSION=$AXLIB_VERSION PACKAGE=libax25 AM_INIT_AUTOMAKE($PACKAGE, $VERSION) + AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -27,7 +28,32 @@ dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h unistd.h zlib.h) -AC_CHECK_HEADERS(netax25/ax25.h netrom/netrom.h netrose/rose.h) + +dnl Checks for working glibc 2.1 headers +AC_MSG_CHECKING(for working netax25/ax25.h header file) +AC_HEADER_EGREP(ax25_fwd_struct, netax25/ax25.h, has_ax25=yes, has_ax25=no) +if test "$has_ax25" = "yes" ; then + AC_DEFINE(HAVE_NETAX25_AX25_H) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi +AC_MSG_CHECKING(for working netrom/netrom.h header file) +AC_HEADER_EGREP(unsigned int ndigis, netrom/netrom.h, has_netrom=yes, has_netrom=no) +if test "$has_netrom" = "yes" ; then + AC_DEFINE(HAVE_NETROM_NETROM_H) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi +AC_MSG_CHECKING(for working netrose/rose.h header file) +AC_HEADER_EGREP(rose_facilities_struct, netrose/rose.h, has_rose=yes, has_rose=no) +if test "$has_rose" = "yes" ; then + AC_DEFINE(HAVE_NETROSE_ROSE_H) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST diff -ruN --exclude-from diff-exclude libax25-0.0.5/kernel_ax25.h libax25-0.0.5-bns/kernel_ax25.h --- libax25-0.0.5/kernel_ax25.h Thu Apr 22 02:40:46 1999 +++ libax25-0.0.5-bns/kernel_ax25.h Thu Jul 8 21:36:21 1999 @@ -36,6 +36,7 @@ #define AX25_IDLE 9 #define AX25_PACLEN 10 #define AX25_IPMAXQUEUE 11 +#define AX25_IAMDIGI 12 #define AX25_KILL 99 /* AX.25 socket ioctls: */ @@ -48,6 +49,9 @@ #define SIOCAX25SETPARMS (SIOCPROTOPRIVATE+6) #define SIOCAX25OPTRT (SIOCPROTOPRIVATE+7) #define SIOCAX25CTLCON (SIOCPROTOPRIVATE+8) +#define SIOCAX25GETINFO (SIOCPROTOPRIVATE+9) +#define SIOCAX25ADDFWD (SIOCPROTOPRIVATE+10) +#define SIOCAX25DELFWD (SIOCPROTOPRIVATE+11) /* unknown: */ #define AX25_NOUID_DEFAULT 0 @@ -101,6 +105,25 @@ ax25_address dest_addr; unsigned int cmd; unsigned long arg; + unsigned char digi_count; + ax25_address digi_addr[AX25_MAX_DIGIS]; + }; + +struct ax25_info_struct + { + unsigned int n2, n2count; + unsigned int t1, t1timer; + unsigned int t2, t2timer; + unsigned int t3, t3timer; + unsigned int idle, idletimer; + unsigned int state; + unsigned int rcv_q, snd_q; + }; + +struct ax25_fwd_struct + { + ax25_address port_from; + ax25_address port_to; }; /* AX.25 route structure: */ diff -ruN --exclude-from diff-exclude libax25-0.0.5/kernel_netrom.h libax25-0.0.5-bns/kernel_netrom.h --- libax25-0.0.5/kernel_netrom.h Wed Jul 7 03:15:26 1999 +++ libax25-0.0.5-bns/kernel_netrom.h Thu Jul 8 20:46:43 1999 @@ -1,34 +1,84 @@ -/* - * These are the public elements of the Linux kernel NET/ROM implementation. - * For kernel AX.25 see the file ax25.h. This file requires ax25.h for the - * definition of the ax25_address structure. - */ +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. -#ifndef NETROM_KERNEL_H -#define NETROM_KERNEL_H + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -#define NETROM_MTU 236 + The GNU C Library 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 + Library General Public License for more details. + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _NETROM_NETROM_H +#define _NETROM_NETROM_H 1 + +/*#include */ + +/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx. */ +#define SOL_NETROM 259 + +/* NetRom control values: */ #define NETROM_T1 1 #define NETROM_T2 2 #define NETROM_N2 3 +#define NETROM_PACLEN 5 #define NETROM_T4 6 -#define NETROM_IDLE 7 +#define NETROM_IDLE 7 + +#define NETROM_KILL 99 +/* Type of route: */ +#define NETROM_NEIGH 0 +#define NETROM_NODE 1 + +struct nr_route_struct + { + int type; + ax25_address callsign; + char device[16]; + unsigned int quality; + char mnemonic[7]; + ax25_address neighbour; + unsigned int obs_count; + unsigned int ndigis; + ax25_address digipeaters[AX25_MAX_DIGIS]; + }; + +/* NetRom socket ioctls: */ +#define SIOCNRGETPARMS (SIOCPROTOPRIVATE+0) +#define SIOCNRSETPARMS (SIOCPROTOPRIVATE+1) #define SIOCNRDECOBS (SIOCPROTOPRIVATE+2) +#define SIOCNRRTCTL (SIOCPROTOPRIVATE+3) +#define SIOCNRCTLCON (SIOCPROTOPRIVATE+4) -struct nr_route_struct { -#define NETROM_NEIGH 0 -#define NETROM_NODE 1 - int type; - ax25_address callsign; - char device[16]; - unsigned int quality; - char mnemonic[7]; - ax25_address neighbour; - unsigned int obs_count; - unsigned int ndigis; - ax25_address digipeaters[AX25_MAX_DIGIS]; -}; +/* NetRom parameter structure: */ +struct nr_parms_struct + { + unsigned int quality; + unsigned int obs_count; + unsigned int ttl; + unsigned int timeout; + unsigned int ack_delay; + unsigned int busy_delay; + unsigned int tries; + unsigned int window; + unsigned int paclen; + }; + +/* NetRom control structure: */ +struct nr_ctl_struct + { + unsigned char index; + unsigned char id; + unsigned int cmd; + unsigned long arg; + }; -#endif +#endif /* netrom/netrom.h */ diff -ruN --exclude-from diff-exclude libax25-0.0.5/kernel_rose.h libax25-0.0.5-bns/kernel_rose.h --- libax25-0.0.5/kernel_rose.h Wed Apr 21 08:04:06 1999 +++ libax25-0.0.5-bns/kernel_rose.h Thu Jul 8 20:46:54 1999 @@ -1,5 +1,5 @@ /* Definitions for Rose packet radio address family. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -31,6 +31,8 @@ requires ax25.h for the definition of the ax25_address structure. */ #define ROSE_MTU 251 +#define ROSE_MAX_DIGIS 6 + #define ROSE_DEFER 1 #define ROSE_T1 2 #define ROSE_T2 3 @@ -46,6 +48,7 @@ #define SIOCRSACCEPT (SIOCPROTOPRIVATE + 3) #define SIOCRSCLRRT (SIOCPROTOPRIVATE + 4) #define SIOCRSGL2CALL (SIOCPROTOPRIVATE + 5) +#define SIOCRSGFACILITIES (SIOCPROTOPRIVATE + 6) #define ROSE_DTE_ORIGINATED 0x00 #define ROSE_NUMBER_BUSY 0x01 @@ -73,6 +76,15 @@ ax25_address srose_digi; }; +struct full_sockaddr_rose +{ + sa_family_t srose_family; + rose_address srose_addr; + ax25_address srose_call; + unsigned int srose_ndigis; + ax25_address srose_digis[ROSE_MAX_DIGIS]; +}; + struct rose_route_struct { rose_address address; @@ -87,6 +99,18 @@ { unsigned char cause; unsigned char diagnostic; +}; + +struct rose_facilities_struct +{ + rose_address source_addr, dest_addr; + ax25_address source_call, dest_call; + unsigned char source_ndigis, dest_ndigis; + ax25_address source_digis[ROSE_MAX_DIGIS]; + ax25_address dest_digis[ROSE_MAX_DIGIS]; + unsigned int rand; + rose_address fail_addr; + ax25_address fail_call; }; #endif /* netrose/rose.h */ diff -ruN --exclude-from diff-exclude libax25-0.0.5/pathnames.h libax25-0.0.5-bns/pathnames.h --- libax25-0.0.5/pathnames.h Mon Jul 5 05:31:39 1999 +++ libax25-0.0.5-bns/pathnames.h Thu Jul 8 16:30:08 1999 @@ -6,7 +6,7 @@ * AX25_SYSCONFDIR is defined in the Makefile!! */ #define CONF_AXPORTS_FILE AX25_SYSCONFDIR"axports" -#define CONF_NRPORTS_FILE AX25_SYSCONFDIR"rports" +#define CONF_NRPORTS_FILE AX25_SYSCONFDIR"nrports" #define CONF_RSPORTS_FILE AX25_SYSCONFDIR"rsports" #define PROC_AX25_FILE "/proc/net/ax25"