diff -ruN net-tools-1.33.org/Makefile net-tools-1.33/Makefile --- net-tools-1.33.org/Makefile Wed May 21 09:47:32 1997 +++ net-tools-1.33/Makefile Sun Aug 10 12:31:22 1997 @@ -86,7 +86,7 @@ DEF_LANG = en_US.88591 # install national language support for the following languages -# ADD_LANG = fr_FR.88591 de_DE.88591 +ADD_LANG = fr_FR.88591 de_DE.88591 # path to the net-lib support library. Default: lib NET-LIB-PATH = lib @@ -230,7 +230,6 @@ savebin: @for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \ -# ${BASEDIR}/sbin/ipfw \ ${BASEDIR}/bin/netstat \ ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \ ${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \ @@ -250,7 +249,7 @@ install -o root -g root -m 0644 man/${DEF_LANG}/ypdomainname.1 ${BASEDIR}/usr/man/man1 install -o root -g root -m 0644 man/${DEF_LANG}/nisdomainname.1 ${BASEDIR}/usr/man/man1 install -o root -g root -m 0644 man/${DEF_LANG}/domainname.1 ${BASEDIR}/usr/man/man1 -ifneq ($(USE_NLS), "") +ifneq ("$(USE_NLS)", "") if [ "${DEF_LANG}" != "en_US.88591" ]; then \ install -o root -g root -m 0755 -d ${BASEDIR}/usr/lib/locale/${DEF_LANG} ;\ install -o root -g root -m 0644 nls/${DEF_LANG}/nettools.cat ${BASEDIR}/usr/lib/locale/${DEF_LANG} ;\ @@ -262,7 +261,6 @@ install -o root -g root -m 0755 -d ${BASEDIR}/usr/man/$$i/man8 ;\ install -o root -g root -m 0644 man/$$i/arp.8 ${BASEDIR}/usr/man/$$i/man8 ;\ install -o root -g root -m 0644 man/$$i/ifconfig.8 ${BASEDIR}/usr/man/$$i/man8 ;\ -# install -o root -g root -m 0644 man/$$i/ipfw.8 ${BASEDIR}/usr/man/$$i/man8 ;\ install -o root -g root -m 0644 man/$$i/netstat.8 ${BASEDIR}/usr/man/$$i/man8 ;\ install -o root -g root -m 0644 man/$$i/rarp.8 ${BASEDIR}/usr/man/$$i/man8 ;\ install -o root -g root -m 0644 man/$$i/route.8 ${BASEDIR}/usr/man/$$i/man8 ;\ diff -ruN net-tools-1.33.org/arp.c net-tools-1.33/arp.c --- net-tools-1.33.org/arp.c Tue May 20 14:20:57 1997 +++ net-tools-1.33/arp.c Sun Aug 10 11:23:10 1997 @@ -1,4 +1,3 @@ -usage und man page, info text von alexey /* * arp This file contains an implementation of the command * that maintains the kernel's ARP cache. It is derived diff -ruN net-tools-1.33.org/config.in net-tools-1.33/config.in --- net-tools-1.33.org/config.in Tue May 20 12:34:48 1997 +++ net-tools-1.33/config.in Sun Aug 10 12:36:43 1997 @@ -8,7 +8,7 @@ # NET-3 Networking Distribution for the LINUX operating # system. # -# Version: config.in 1.05 (96-08-27) +# Version: config.in 1.06 (97-08-03) # # Author: Fred N. van Kempen, # Copyright 1988-1993 MicroWalt Corporation @@ -21,7 +21,8 @@ #960215 {1.03} Bernd Eckenfels: NET/ROM (Jonathan) #960424 {1.04} Bernd Eckenfels: NLS disabled, FR added #960827 {1.05} Lawrence V. Stefani: HAVE_FDDI -* +#970803 {1.06} Terry Dawson: HAVE_AFROSE +# # 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 @@ -72,6 +73,7 @@ bool 'Appletalk DDP protocol family?' HAVE_AFATALK y bool 'AX25 (Packet Radio) protocol family?' HAVE_AFAX25 y bool 'NET/ROM (Packet Radio) protocol family ?' HAVE_AFNETROM y +bool 'Rose (Packet Radio) protocol family ?' HAVE_AFROSE y * * (Protocol Families supported by 2.1.x Kernels) * @@ -83,18 +85,19 @@ * * (Hardware types supported by 1.2.x Kernels) * -bool 'Ethernet (generic) support' HAVE_HWETHER y bool 'ARCnet support' HAVE_HWARC y -bool 'SLIP (serial line) support' HAVE_HWSLIP y -bool 'PPP (serial line) support' HAVE_HWPPP y +bool 'Ethernet (generic) support' HAVE_HWETHER y bool 'IPIP Tunnel support' HAVE_HWTUNNEL y +bool 'PPP (serial line) support' HAVE_HWPPP y +bool 'SLIP (serial line) support' HAVE_HWSLIP y * * (Hardware types supported by 1.3.x Kernels) * -bool 'Token ring (generic) support' HAVE_HWTR y +bool 'DLCI/FRAD (Frame Relay) support' HAVE_HWFR y bool 'AX25 (Packet Radio) support' HAVE_HWAX25 y bool 'NET/ROM (Packet Radio) support' HAVE_HWNETROM y -bool 'DLCI/FRAD (Frame Relay) support' HAVE_HWFR y +bool 'Rose (Packet Radio) support' HAVE_HWROSE n +bool 'Token ring (generic) support' HAVE_HWTR y * * (Hardware types supported by 2.1.x Kernels) * diff -ruN net-tools-1.33.org/ifconfig.c net-tools-1.33/ifconfig.c --- net-tools-1.33.org/ifconfig.c Tue May 20 10:59:37 1997 +++ net-tools-1.33/ifconfig.c Sun Aug 10 12:38:00 1997 @@ -16,7 +16,7 @@ * [[-]pointopoint [aa.bb.cc.dd]] * [up] [down] ... * - * Version: ifconfig 1.24 (1997-05-19) + * Version: ifconfig 1.26 (1997-05-19) * *970519 {1.23} Philip Gladstone: test for the right hardware address * printing function (for DLCI). @@ -25,6 +25,7 @@ *970519 {1.25} Bernd Eckenfels: support for 2.1.15++ /proc/net/dev * layout with additiona byte count and * support for devices without statistics. + *970803 {1.26} Terry Dawson: support for Rose address family. * * * Author: Fred N. van Kempen, @@ -104,6 +105,7 @@ int has_ipx_e3; int has_ipx_e2; int has_ax25; + int has_rose; int has_ddp; char hwaddr[32]; /* HW address */ struct ifc_statistics stats; /* statistics */ @@ -120,6 +122,7 @@ int skfd = -1; /* generic raw socket desc. */ int ipx_sock = -1; /* IPX socket */ int ax25_sock = -1; /* AX.25 socket */ +int rose_sock = -1; /* Rose socket */ int inet_sock = -1; /* INET socket */ int ddp_sock = -1; /* Appletalk DDP socket */ int addr_family = 0; /* currently selected AF */ @@ -542,7 +545,7 @@ fprintf(stderr, NLS_CATGETS(catfd, ifconfigSet, ifconfig_usage2, " [inet address]\n")); fprintf(stderr, NLS_CATGETS(catfd, ifconfigSet, ifconfig_usage3, - " [hw] [ax25 address]\n")); + " [hw] [ax25|rose address]\n")); fprintf(stderr, " [metric NN] [mtu NN]\n"); fprintf(stderr, " [trailers] [-trailers]\n"); fprintf(stderr, " [arp] [-arp]\n"); @@ -569,6 +572,7 @@ inet_sock=socket(AF_INET, SOCK_DGRAM, 0); ipx_sock=socket(AF_IPX, SOCK_DGRAM, 0); ax25_sock=socket(AF_AX25, SOCK_DGRAM, 0); + rose_sock=socket(AF_ROSE, SOCK_DGRAM, 0); ddp_sock=socket(AF_APPLETALK, SOCK_DGRAM, 0); /* * Now pick any (exisiting) useful socket family for generic queries @@ -577,6 +581,8 @@ return inet_sock; if(ipx_sock!=-1) return ipx_sock; + if(rose_sock!=-1) + return rose_sock; if(ax25_sock!=-1) return ax25_sock; /* diff -ruN net-tools-1.33.org/lib/Makefile net-tools-1.33/lib/Makefile --- net-tools-1.33.org/lib/Makefile Tue May 20 11:54:15 1997 +++ net-tools-1.33/lib/Makefile Sun Aug 10 11:14:45 1997 @@ -31,9 +31,9 @@ # -HWOBJS = hw.o loopback.o slip.o ether.o fddi.o ax25.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o -AFOBJS = unix.o inet.o inet6.o ax25.o ipx.o ddp.o ipx.o netrom.o af.o -AFGROBJS = inet_gr.o inet6_gr.o ipx_gr.o ddp_gr.o netrom_gr.o ax25_gr.o getroute.o +HWOBJS = hw.o loopback.o slip.o ether.o fddi.o ax25.o rose.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o +AFOBJS = unix.o inet.o inet6.o ax25.o rose.o ipx.o ddp.o ipx.o netrom.o af.o +AFGROBJS = inet_gr.o inet6_gr.o ipx_gr.o ddp_gr.o netrom_gr.o ax25_gr.o rose_gr.o getroute.o AFSROBJS = inet_sr.o inet6_sr.o netrom_sr.o ipx_sr.o setroute.o ACTOBJS = slip_ac.o ppp_ac.o activate.o VARIA = getargs.o masq_info.o @@ -66,3 +66,4 @@ rm -f *.a # End of lib/Makefile. + diff -ruN net-tools-1.33.org/lib/af.c net-tools-1.33/lib/af.c --- net-tools-1.33.org/lib/af.c Tue May 20 11:57:01 1997 +++ net-tools-1.33/lib/af.c Sun Aug 10 12:39:35 1997 @@ -2,7 +2,7 @@ * lib/af.c This file contains the top-level part of the protocol * support functions module for the NET-2 base distribution. * - * Version: lib/af.c 1.14 (1997-05-19) + * Version: lib/af.c 1.16 (1997-08-03) * * Author: Fred N. van Kempen, * Copyright 1993 MicroWalt Corporation @@ -15,6 +15,7 @@ * *970519 {1.15} Bernd Eckenfels: fixed test to AFINET instead of AFUNIX. * merged with 1.41 V6 release + *970803 {1.16} Terry Dawson: Added support for Rose protocol family. */ #include #include @@ -34,6 +35,7 @@ int flag_unx = 0; int flag_ipx = 0; int flag_ax25 = 0; +int flag_rose = 0; int flag_ddp = 0; int flag_netrom = 0; int flag_inet = 0; @@ -44,15 +46,16 @@ char *name; int *flag; } aftrans[]={ + {"appletalk", "ddp", &flag_ddp}, {"ax25", "ax25", &flag_ax25}, + {"ddp", "ddp", &flag_ddp}, + {"inet", "inet", &flag_inet}, + {"inet6", "inet6", &flag_inet6}, {"ip", "inet", &flag_inet}, {"ip6", "inet6", &flag_inet6}, {"ipx", "ipx", &flag_ipx}, - {"appletalk", "ddp", &flag_ddp}, {"netrom", "netrom", &flag_netrom}, - {"inet", "inet", &flag_inet}, - {"inet6", "inet6", &flag_inet6}, - {"ddp", "ddp", &flag_ddp}, + {"rose", "rose", &flag_rose}, {"unix", "unix", &flag_unx}, {"tcpip", "inet", &flag_inet}, {0, 0, 0} @@ -65,6 +68,7 @@ extern struct aftype inet_aftype; extern struct aftype inet6_aftype; extern struct aftype ax25_aftype; +extern struct aftype rose_aftype; extern struct aftype netrom_aftype; extern struct aftype ipx_aftype; extern struct aftype ddp_aftype; @@ -84,6 +88,9 @@ #if HAVE_AFAX25 &ax25_aftype, #endif +#if HAVE_AFROSE + &rose_aftype, +#endif #if HAVE_AFNETROM &netrom_aftype, #endif @@ -111,6 +118,9 @@ #endif #if HAVE_AFAX25 ax25_aftype.title = NLS_CATSAVE (catfd, ax25Set, ax25_ax25, "AMPR AX.25"); +#endif +#if HAVE_AFROSE + rose_aftype.title = NLS_CATSAVE (catfd, roseSet, rose_rose, "AMPR ROSE"); #endif #if HAVE_AFNETROM netrom_aftype.title = NLS_CATSAVE (catfd, netromSet, netrom_netrom, "AMPR NET/ROM"); diff -ruN net-tools-1.33.org/lib/ax25.c net-tools-1.33/lib/ax25.c --- net-tools-1.33.org/lib/ax25.c Mon Apr 8 12:35:57 1996 +++ net-tools-1.33/lib/ax25.c Sun Aug 10 11:10:43 1997 @@ -110,7 +110,7 @@ #ifdef DEBUG fprintf(stderr, "ax25_input(%s): %s !\n", AX25_errmsg, orig); #endif - errno = E2BIG; + errno = EINVAL; return(-1); } diff -ruN net-tools-1.33.org/lib/getroute.c net-tools-1.33/lib/getroute.c --- net-tools-1.33.org/lib/getroute.c Tue May 20 12:00:39 1997 +++ net-tools-1.33/lib/getroute.c Sun Aug 10 12:40:53 1997 @@ -7,7 +7,7 @@ * NET-3 Networking Distribution for the LINUX operating * system. (net-tools, net-drivers) * - * Version: lib/getroute.c 1.04 (1997-05-19) + * Version: lib/getroute.c 1.05 (1997-08-03) * * Author: Bernd 'eckes' Eckenfels * Copyright 1999 Bernd Eckenfels, Germany @@ -22,6 +22,7 @@ *960221 {1.02} Bernd Eckenfels: renamed from route_info to getroute.c *960413 {1.03} Bernd Eckenfels: new RTACTION support *970519 {1.04} Frank Strauss: IPV6 Support + *970803 {1.05} Terry Dawson: Rose Support * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -42,6 +43,7 @@ extern struct aftype inet_aftype; extern struct aftype inet6_aftype; extern struct aftype ax25_aftype; +extern struct aftype rose_aftype; extern struct aftype netrom_aftype; extern struct aftype ipx_aftype; extern struct aftype ddp_aftype; @@ -60,6 +62,9 @@ #endif #if HAVE_AFAX25 ax25_aftype.rprint = AX25_rprint; +#endif +#if HAVE_AFROSE + rose_aftype.rprint = ROSE_rprint; #endif #if HAVE_AFIPX ipx_aftype.rprint = IPX_rprint; diff -ruN net-tools-1.33.org/lib/hw.c net-tools-1.33/lib/hw.c --- net-tools-1.33.org/lib/hw.c Tue May 20 12:03:52 1997 +++ net-tools-1.33/lib/hw.c Sun Aug 10 12:42:28 1997 @@ -2,7 +2,7 @@ * lib/hw.c This file contains the top-level part of the hardware * support functions module for the NET-2 base distribution. * - * Version: lib/hw.c 1.15 (1997-05-19) + * Version: lib/hw.c 1.16 (1997-08-06) * * Maintainer: Bernd 'eckes' Eckenfels, * @@ -13,6 +13,7 @@ *960413 {1.13} Mike Mclagan: DLCI/FRAD support *960827 {1.14} Lawrence V. Stefani: FDDI Support *960519 {1.15} Frank Strauss: SIT (ipv6) support + *960803 {1.16} Terry Dawson: Rose support * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -49,6 +50,7 @@ extern struct hwtype tr_hwtype; extern struct hwtype ax25_hwtype; +extern struct hwtype rose_hwtype; extern struct hwtype netrom_hwtype; extern struct hwtype tunnel_hwtype; @@ -84,6 +86,9 @@ #if HAVE_HWAX25 &ax25_hwtype, #endif +#if HAVE_HWROSE + &rose_hwtype, +#endif #if HAVE_HWNETROM &netrom_hwtype, #endif @@ -128,6 +133,9 @@ #endif #if HAVE_HWAX25 ax25_hwtype.title = NLS_CATSAVE (catfd, ax25Set, ax25_hw, "AMPR AX.25"); +#endif +#if HAVE_HWROSE + rose_hwtype.title = NLS_CATSAVE (catfd, roseSet, rose_hw, "AMPR ROSE"); #endif #if HAVE_HWNETROM netrom_hwtype.title = NLS_CATSAVE (catfd, netromSet, netrom_hw, "AMPR NET/ROM"); diff -ruN net-tools-1.33.org/lib/net-features.h net-tools-1.33/lib/net-features.h --- net-tools-1.33.org/lib/net-features.h Tue May 20 12:59:41 1997 +++ net-tools-1.33/lib/net-features.h Sun Aug 10 12:43:44 1997 @@ -2,7 +2,7 @@ * lib/net-features.h This file contains the definitions of all kernel * dependend features. * - * Version: net-features.h 0.05 (1997-05-19) + * Version: net-features.h 0.06 (1997-08-03) * * Author: Bernd Eckenfels * Copyright 1996 Bernd Eckenfels, Germany @@ -14,6 +14,7 @@ *970106 {0.04} Bernd Eckenfels: HAVE_ATF_MAGIC, HAVE_ATF_DONTPUB * (new flags for kernel 2.1.x arp) *970519 {0.05} Bernd Eckenfels: HAVE_RT_NETLINK removed again + *970803 {0.06} Terry Dawson: Rose support * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -234,7 +235,12 @@ #else "-" #endif - "AX25 " +#if HAVE_AFROSE + "+" +#else + "-" +#endif + "ROSE " #if HAVE_AFNETROM "+" #else @@ -295,7 +301,12 @@ #else "-" #endif - "AX25 " +#if HAVE_HWROSE + "+" +#else + "-" +#endif + "ROSE " #if HAVE_HWNETROM "+" diff -ruN net-tools-1.33.org/lib/net-support.h net-tools-1.33/lib/net-support.h --- net-tools-1.33.org/lib/net-support.h Tue May 20 12:27:04 1997 +++ net-tools-1.33/lib/net-support.h Sun Aug 10 11:17:26 1997 @@ -89,19 +89,21 @@ extern int ip_masq_info(int numeric, int ext); +extern int AX25_rprint(int options); +extern int DDP_rprint(int options); extern int INET_rprint(int options); extern int INET6_rprint(int options); -extern int DDP_rprint(int options); extern int IPX_rprint(int options); extern int NETROM_rprint(int options); -extern int AX25_rprint(int options); +extern int ROSE_rprint(int options); +extern int AX25_rinput(int action, int flags, char **argv); +extern int DDP_rinput(int action, int flags, char **argv); extern int INET_rinput(int action, int flags, char **argv); extern int INET6_rinput(int action, int flags, char **argv); -extern int DDP_rinput(int action, int flags, char **argv); extern int IPX_rinput(int action, int flags, char **argv); extern int NETROM_rinput(int action, int flags, char **argv); -extern int AX25_rinput(int action, int flags, char **argv); +extern int ROSE_rinput(int action, int flags, char **argv); int aftrans_opt (const char *arg); void aftrans_def (char *tool, char *argv0, char *dflt); @@ -111,6 +113,7 @@ extern int flag_unx; extern int flag_ipx; extern int flag_ax25; +extern int flag_rose; extern int flag_ddp; extern int flag_netrom; extern int flag_inet; @@ -119,16 +122,17 @@ extern char afname[]; #define AFTRANS_OPTS \ + {"appletalk", 0, 0, 1}, \ {"ax25", 0, 0, 1}, \ + {"ddp", 0, 0, 1}, \ + {"inet", 0, 0, 1}, \ {"ip", 0, 0, 1}, \ {"ipx", 0, 0, 1}, \ - {"appletalk", 0, 0, 1}, \ {"netrom", 0, 0, 1}, \ - {"inet", 0, 0, 1}, \ - {"ddp", 0, 0, 1}, \ - {"unix", 0, 0, 1}, \ - {"tcpip", 0, 0, 1} -#define AFTRANS_CNT 9 + {"rose", 0, 0, 1}, \ + {"tcpip", 0, 0, 1}, \ + {"unix", 0, 0, 1} +#define AFTRANS_CNT 10 #define EINTERN(file, text) fprintf(stderr, \ "%s: Internal Error `%s'.\nContact: %s\n",file,text,Maintainer); diff -ruN net-tools-1.33.org/lib/netrom.c net-tools-1.33/lib/netrom.c --- net-tools-1.33.org/lib/netrom.c Mon Apr 8 12:37:07 1996 +++ net-tools-1.33/lib/netrom.c Sun Aug 10 11:10:43 1997 @@ -109,7 +109,7 @@ #ifdef DEBUG fprintf(stderr, "netrom_input(%s): %s !\n", netrom_errmsg, orig); #endif - errno = E2BIG; + errno = EINVAL; return(-1); } diff -ruN net-tools-1.33.org/lib/pathnames.h net-tools-1.33/lib/pathnames.h --- net-tools-1.33.org/lib/pathnames.h Tue May 20 12:28:13 1997 +++ net-tools-1.33/lib/pathnames.h Sun Aug 10 12:44:46 1997 @@ -4,7 +4,7 @@ * * NET-LIB * - * Version: lib/pathnames.h 1.36 (1996-04-13) + * Version: lib/pathnames.h 1.37 (1997-08-03) * * Maintainer: Bernd 'eckes' Eckenfels, * @@ -17,6 +17,7 @@ *960215 {1.34} Bernd Eckenfels: /proc/net/ax25_route,nr_* *960322 {1.35} Bernd Eckenfels: moved to the lib directory *960413 {1.36} Bernd Eckenfels: /proc/net/rt_cache + *970803 {1.37} Terry Dawson: Rose support * */ @@ -30,11 +31,13 @@ # define _PATH_PROCNET_ROUTE6 "/proc/net/ipv6_route" # define _PATH_PROCNET_RTCACHE "/proc/net/rt_cache" # define _PATH_PROCNET_AX25_ROUTE "/proc/net/ax25_route" +# define _PATH_PROCNET_ROSE_ROUTE "/proc/net/rose_route" # define _PATH_PROCNET_NR "/proc/net/nr" # define _PATH_PROCNET_NR_NEIGH "/proc/net/nr_neigh" # define _PATH_PROCNET_NR_NODES "/proc/net/nr_nodes" # define _PATH_PROCNET_ARP "/proc/net/arp" # define _PATH_PROCNET_AX25 "/proc/net/ax25" +# define _PATH_PROCNET_ROSE "/proc/net/rose" # define _PATH_PROCNET_IPX "/proc/net/ipx" # define _PATH_PROCNET_IPX_ROUTE "/proc/net/ipx_route" # define _PATH_PROCNET_ATALK "/proc/net/appletalk" diff -ruN net-tools-1.33.org/lib/rose.c net-tools-1.33/lib/rose.c --- net-tools-1.33.org/lib/rose.c Thu Jan 1 10:00:00 1970 +++ net-tools-1.33/lib/rose.c Sun Aug 10 12:45:25 1997 @@ -0,0 +1,144 @@ +/* + * lib/rose.c This file contains an implementation of the "ROSE" + * support functions for the NET-2 base distribution. + * + * Version: @(#)rose.c 1.00 03/08/97 + * + * Author: Terry Dawson, VK2KTJ, + * based on ax25.c by: + * Fred N. van Kempen, + * Copyright 1993 MicroWalt Corporation + * + * 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. + */ +#include "config.h" + +#if HAVE_AFROSE || HAVE_HWROSE +#include +#include +#include +#include +#include +#include +#include /* ARPHRD_ROSE */ +#include +#include +#include +#include +#include +#include +#include +#include +#include "net-support.h" +#include "pathnames.h" +#define EXTERN +#include "net-locale.h" + +static char ROSE_errmsg[128]; + +extern struct aftype rose_aftype; + +static char * +ROSE_print(unsigned char *ptr) +{ + static char buff[12]; + + sprintf(buff,"%02x%02x%02x%02x%02x",ptr[0],ptr[1],ptr[2],ptr[3],ptr[4]); + buff[10] = '\0'; + return(buff); +} + +/* Display a ROSE socket address. */ +static char * +ROSE_sprint(struct sockaddr *sap, int numeric) +{ + static char buf[64]; + + if (sap->sa_family == 0xFFFF || sap->sa_family == 0) + return(NLS_CATBUFF (catfd, roseSet, rose_none, "[NONE SET]", buf, 64)); + return(ROSE_print(((struct sockaddr_rose *)sap)->srose_addr.rose_addr)); +} + + +static int +ROSE_input(int type, char *bufp, struct sockaddr *sap) +{ + char *ptr; + int i,o; + + sap->sa_family = rose_aftype.af; + ptr = ((struct sockaddr_rose *)sap)->srose_addr.rose_addr; + + /* Node address the correct length ? */ + if (strlen(bufp)!=10) { + strcpy(ROSE_errmsg, NLS_CATGETS (catfd, roseSet, rose_debug2, "Node address must be ten digits")); +#ifdef DEBUG + fprintf(stderr, "rose_input(%s): %s !\n", ROSE_errmsg, orig); +#endif + errno = EINVAL; + return(-1); + } + + /* Ok, lets set it */ + for (i=0, o=0; i<5; i++) { + o=i*2; + ptr[i]=(((bufp[o]-'0')<<4) | (bufp[o+1]-'0')); + } + + /* All done. */ +#ifdef DEBUG + fprintf(stderr, "rose_input(%s): ", orig); + for (i = 0; i < sizeof(rose_address); i++) + fprintf(stderr, "%02X ", sap->sa_data[i] & 0377); + fprintf(stderr, "\n"); +#endif + + return(0); +} + + +/* Display an error message. */ +static void +ROSE_herror(char *text) +{ + if (text == NULL) fprintf(stderr, "%s\n", ROSE_errmsg); + else fprintf(stderr, "%s: %s\n", text, ROSE_errmsg); +} + + +static char * +ROSE_hprint(struct sockaddr *sap) +{ + static char buf[64]; + + if (sap->sa_family == 0xFFFF || sap->sa_family == 0) + return(NLS_CATBUFF (catfd, roseSet, rose_none, "[NONE SET]", buf, 64)); + return(ROSE_print(((struct sockaddr_rose *)sap)->srose_addr.rose_addr)); +} + + +static int +ROSE_hinput(char *bufp, struct sockaddr *sap) +{ + if (ROSE_input(0, bufp, sap) < 0) return(-1); + sap->sa_family = ARPHRD_ROSE; + return(0); +} + +struct hwtype rose_hwtype = { + "rose", NULL, /*"AMPR ROSE",*/ ARPHRD_ROSE, 10, + ROSE_print, ROSE_hprint, ROSE_hinput, NULL +}; + +struct aftype rose_aftype = { + "rose", NULL, /*"AMPR ROSE",*/ AF_ROSE, 10, + ROSE_print, ROSE_sprint, ROSE_input, ROSE_herror, + NULL +}; + +#endif /* HAVE_xxROSE */ + diff -ruN net-tools-1.33.org/lib/rose_gr.c net-tools-1.33/lib/rose_gr.c --- net-tools-1.33.org/lib/rose_gr.c Thu Jan 1 10:00:00 1970 +++ net-tools-1.33/lib/rose_gr.c Sun Aug 10 12:45:37 1997 @@ -0,0 +1,68 @@ +/* + * lib/rose_gr.c This file contains an implementation of the "ROSE" + * route print support functions. + * + * Version: lib/rose_gr.c 1.00 03/08/97 + * + * Author: Terry Dawson, VK2KTJ, + * based on ax25_gr.c by: + * Bernd Eckenfels, + * Copyright 1999 Bernd Eckenfels, Germany + * base on Code from Jonathan Naylor + * + * 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. + */ +#include "config.h" + +#if HAVE_AFROSE +#if 0 +#include +#include +#include +#include +#include /* ARPHRD_ROSE */ +#include +#include +#include +#include +#include +#endif +#include +#include +#include +#include "net-support.h" +#include "pathnames.h" +#define EXTERN +#include "net-locale.h" + +int ROSE_rprint(int options) +{ + FILE *f=fopen(_PATH_PROCNET_ROSE_ROUTE, "r"); + char buffer[256]; + int use; + + if(f==NULL) + { + printf(NLS_CATGETS(catfd, netstatSet, netstat_norose, "ROSE not configured in this system.\n")); /* xxx */ + return 1; + } + printf(NLS_CATGETS(catfd, netstatSet, netstat_rose, "Kernel ROSE routing table\n")); /* xxx */ + printf(NLS_CATGETS(catfd, netstatSet, netstat_header_rose, "Destination Iface Use\n")); /* xxx */ + fgets(buffer,256,f); + while(fgets(buffer,256,f)) + { + buffer[9]=0; + buffer[14]=0; + use=atoi(buffer+15); + printf("%-9s %-5s %5d\n", + buffer,buffer+10,use); + } + fclose(f); + return 0; +} + +#endif /* HAVE_AFROSE */ diff -ruN net-tools-1.33.org/lib/setroute.c net-tools-1.33/lib/setroute.c --- net-tools-1.33.org/lib/setroute.c Tue May 20 12:29:39 1997 +++ net-tools-1.33/lib/setroute.c Sun Aug 10 12:46:59 1997 @@ -7,7 +7,7 @@ * NET-3 Networking Distribution for the LINUX operating * system. (net-tools, net-drivers) * - * Version: lib/setroute.c 0.02 (1996-04-13) + * Version: lib/setroute.c 0.04 (1997-08-03) * * Author: Bernd 'eckes' Eckenfels * Copyright 1999 Bernd Eckenfels, Germany @@ -17,6 +17,7 @@ *960221 {0.01} Bernd Eckenfels: generated from getroute.c *960413 {0.02} Bernd Eckenfels: new RTACTION support *960809 {0.03} Frank Strauss: INET6 + *970803 {0.04} Terry Dawson: Rose support * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -37,6 +38,7 @@ extern struct aftype inet_aftype; extern struct aftype inet6_aftype; extern struct aftype ax25_aftype; +extern struct aftype rose_aftype; extern struct aftype netrom_aftype; extern struct aftype ipx_aftype; extern struct aftype ddp_aftype; @@ -59,6 +61,9 @@ #if 0 #if HAVE_AFAX25 ax25_aftype.rinput = AX25_rinput; +#endif +#if HAVE_AFROSE + rose_aftype.rinput = ROSE_rinput; #endif #if HAVE_AFATALK ddp_aftype.rinput = DDP_rinput; diff -ruN net-tools-1.33.org/man/en_US.88591/arp.8 net-tools-1.33/man/en_US.88591/arp.8 --- net-tools-1.33.org/man/en_US.88591/arp.8 Sun Jun 23 03:04:39 1996 +++ net-tools-1.33/man/en_US.88591/arp.8 Sun Aug 10 11:10:43 1997 @@ -75,6 +75,8 @@ .RB "PROnet (" pronet ")" , .RB "AX.25 (" ax25 ")" +, +.RB "ROSE (" rose ")" and .RB "NET/ROM (" netrom ")." .TP diff -ruN net-tools-1.33.org/man/en_US.88591/ifconfig.8 net-tools-1.33/man/en_US.88591/ifconfig.8 --- net-tools-1.33.org/man/en_US.88591/ifconfig.8 Sun Feb 18 02:00:30 1996 +++ net-tools-1.33/man/en_US.88591/ifconfig.8 Sun Aug 10 11:10:43 1997 @@ -28,6 +28,8 @@ (TCP/IP, default) .B ax25 (AMPR Packet Radio), +.B rose +(AMPR Packet Radio), .B ddp (Appletalk Phase 2), .B ipx @@ -124,6 +126,8 @@ .B ether (Ethernet), .B ax25 +(AMPR AX.25), +.B rose (AMPR AX.25), .B ARCnet and diff -ruN net-tools-1.33.org/man/en_US.88591/netstat.8 net-tools-1.33/man/en_US.88591/netstat.8 --- net-tools-1.33.org/man/en_US.88591/netstat.8 Tue May 20 14:12:15 1997 +++ net-tools-1.33/man/en_US.88591/netstat.8 Sun Aug 10 11:10:43 1997 @@ -21,6 +21,7 @@ .RB [ \-\-unix | \-u ] .RB [ \-\-inet | \-\-ip ] .RB [ \-\-ax25 ] +.RB [ \-\-rose ] .RB [ \-\-ipx ] .RB [ \-\-netrom ] @@ -33,6 +34,7 @@ .RB [ \-\-netrom ] .RB [ \-\-ddp ] .RB [ \-\-ax25 ] +.RB [ \-\-rose ] .RB { \-\-route | \-r } .PP @@ -150,6 +152,7 @@ .BR unix , .BR ipx , .BR ax25 , +.BR rose , .B netrom and .BR ddp . @@ -158,6 +161,7 @@ .BR \-\-unix , .BR \-\-ipx , .BR \-\-ax25 , +.BR \-\-rose , .B \-\-netrom and .BR \-\-ddp. @@ -400,6 +404,9 @@ .I /proc/net/ax25 -- AX25 socket information +.I /proc/net/rose +-- ROSE socket information + .I /proc/net/appeltalk -- DDP (appeltalk) socket information @@ -411,6 +418,9 @@ .I /proc/net/ax25_route -- Kernel AX25 routing information + +.I /proc/net/rose_route +-- Kernel ROSE routing information .I /proc/net/ipx_route -- Kernel IPX routing information diff -ruN net-tools-1.33.org/man/en_US.88591/rarp.8 net-tools-1.33/man/en_US.88591/rarp.8 --- net-tools-1.33.org/man/en_US.88591/rarp.8 Sun Feb 18 02:00:30 1996 +++ net-tools-1.33/man/en_US.88591/rarp.8 Sun Aug 10 11:10:43 1997 @@ -31,6 +31,8 @@ .B "IEEE 802.3 10Mbps Ethernet." Other values might include network technologies such as .B AX.25 (ax25) +, +.B Rose (rose), and .B NET/ROM (netrom). .TP diff -ruN net-tools-1.33.org/man/fr_FR.88591/arp.8 net-tools-1.33/man/fr_FR.88591/arp.8 --- net-tools-1.33.org/man/fr_FR.88591/arp.8 Mon Feb 5 11:50:38 1996 +++ net-tools-1.33/man/fr_FR.88591/arp.8 Sun Aug 10 11:10:43 1997 @@ -40,6 +40,7 @@ .B ARCnet (arcnet) , .B PROnet (pronet) +.B ROSE (rose). et .B AX.25 (ax25). .TP diff -ruN net-tools-1.33.org/man/fr_FR.88591/ifconfig.8 net-tools-1.33/man/fr_FR.88591/ifconfig.8 --- net-tools-1.33.org/man/fr_FR.88591/ifconfig.8 Fri Jan 26 06:20:43 1996 +++ net-tools-1.33/man/fr_FR.88591/ifconfig.8 Sun Aug 10 11:10:43 1997 @@ -29,6 +29,8 @@ (TCP/IP, default) .B ax25 (AMPR Packet Radio.) +.B rose +(AMPR Packet Radio.) .B ddp (Appletalk Phase 2) and .B ipx @@ -128,7 +130,9 @@ .B ether (Ethernet), .B ax25 -(AMPR AX.25), et +(AMPR AX.25), +.B rose +(AMPR Rose), et .B ARCnet. .TP .B multicast diff -ruN net-tools-1.33.org/man/fr_FR.88591/rarp.8 net-tools-1.33/man/fr_FR.88591/rarp.8 --- net-tools-1.33.org/man/fr_FR.88591/rarp.8 Fri Jan 26 06:20:45 1996 +++ net-tools-1.33/man/fr_FR.88591/rarp.8 Sun Aug 10 11:10:43 1997 @@ -30,7 +30,10 @@ pour .B "IEEE 802.3 10Mbps Ethernet". D'autres valeurs doivent correspondre à des technologies réseaux telles que -.B AX.25 (ax25). +.B AX.25 +(AMPR ax25) et +.B Rose +(AMPR Rose). .TP .B "\-a [hostname]" Montre les entrées concernant l'hôte spécifié. Si le paramètre diff -ruN net-tools-1.33.org/netstat.c net-tools-1.33/netstat.c --- net-tools-1.33.org/netstat.c Tue May 20 14:06:53 1997 +++ net-tools-1.33/netstat.c Sun Aug 10 12:48:21 1997 @@ -6,13 +6,14 @@ * NET-3 Networking Distribution for the LINUX operating * system. * - * Version: netstat 1.23 (1997-05-19) + * Version: netstat 1.24 (1997-08-03) * * Authors: Fred Baumgarten, * Fred N. van Kempen, * Phil Packer, * Johannes Stille, * Bernd Eckenfels, + * Terry Dawson, * * Tuned for NET3 by: * Alan Cox, @@ -44,6 +45,8 @@ *970519 {1.23} Philip Copeland Added snmp reporting support module -s * code provided by Andi Kleen * minor header file misplacement tidy up. + *970803 {1.24} Terry Dawson Added Rose support, minor tidying of + * AX.25 and NetRom. * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -188,7 +191,7 @@ else return(0); } - printf(NLS_CATGETS(catfd, netstatSet, netstat_netrom, "Activate NET/ROM sockets\n")); + printf(NLS_CATGETS(catfd, netstatSet, netstat_netrom, "Active NET/ROM sockets\n")); printf(NLS_CATGETS(catfd, netstatSet, netstat_header_netrom, "User Dest Source Device State Vr/Vs Send-Q Recv-Q\n")); fgets(buffer,256,f); while(fgets(buffer,256,f)) @@ -196,7 +199,7 @@ buffer[9]=0; buffer[19]=0; buffer[29]=0; - sscanf(buffer+30,"%s %*d/%*d %*d/%*d %d %d %d %*d %*d/%*d %*d/%*d %*d/%*d %*d %*d %d %d", + sscanf(buffer+30,"%s %*d/%*d %*d/%*d %d %d %d %*d %*d/%*d %*d/%*d %*d/%*d %*d %d %d", dev,&st,&vs,&vr,&sendq,&recvq); printf("%-9s %-9s %-9s %-6s %-11s %02d/%02d %-6d %-6d\n", buffer,buffer+10,buffer+20, @@ -776,14 +779,14 @@ else return(0); } - printf(NLS_CATGETS(catfd, netstatSet, netstat_ax25, "Activate AX.25 sockets\n")); + printf(NLS_CATGETS(catfd, netstatSet, netstat_ax25, "Active AX.25 sockets\n")); printf(NLS_CATGETS(catfd, netstatSet, netstat_header_ax25, "Dest Source Device State Vr/Vs Send-Q Recv-Q\n")); fgets(buffer,256,f); while(fgets(buffer,256,f)) { buffer[9]=0; buffer[19]=0; - sscanf(buffer+20,"%s %d %d %d %*d %*d/%*d %*d/%*d %*d/%*d %*d/%*d %*d %*d %d %d", + sscanf(buffer+20,"%s %d %d %d %*d %*d/%*d %*d/%*d %*d/%*d %*d/%*d %*d/%*d %*d %*d %*d %d %d", dev,&st,&vs,&vr,&sendq,&recvq); printf("%-9s %-9s %-6s %-11s %02d/%02d %-6d %-6d\n", buffer,buffer+10, @@ -796,6 +799,54 @@ } #endif +#if HAVE_AFROSE +static int rose_info(void) +{ + FILE *f; + char buffer[256],dev[16]; + int st,vs,vr,sendq,recvq; + static char *rose_state[5]= + { + "LISTENING", + "SABM SENT", + "DISC SENT", + "ESTABLISHED", + "RECOVERY" + }; + if(!(f=fopen(_PATH_PROCNET_ROSE, "r"))) + { + if (errno != ENOENT) { + perror(_PATH_PROCNET_ROSE); + return(-1); + } + if (flag_arg || flag_ver) + ESYSNOT("netstat","AF ROSE"); + if (flag_arg) + return(1); + else + return(0); + } + printf(NLS_CATGETS(catfd, netstatSet, netstat_rose, "Active ROSE sockets\n")); + printf(NLS_CATGETS(catfd, netstatSet, netstat_header_rose, "Dest @Node Source @Node Dev State Vr/Vs Send-Q Recv-Q\n")); + fgets(buffer,256,f); + while(fgets(buffer,256,f)) + { + buffer[10]=0; + buffer[20]=0; + buffer[31]=0; + buffer[41]=0; + sscanf(buffer+42,"%s %*d %d %d %d %*d %*d %*d %*d %*d %*d %d %d", + dev,&st,&vs,&vr,&sendq,&recvq); + printf("%9s %10s %9s %10s %-5s %-11s %02d/%02d %-6d %-6d\n", + buffer+11,buffer,buffer+32,buffer+21, + dev, + rose_state[st], + vr,vs,sendq,recvq); + } + fclose(f); + return 0; +} +#endif #if HAVE_AFIPX static int ipx_info(void) @@ -1154,8 +1205,8 @@ fprintf(stderr, NLS_CATGETS(catfd, netstatSet, netstat_usage11, " -c, --continuous continuous listing\n\n")); fprintf(stderr, NLS_CATGETS(catfd, netstatSet, netstat_usage12, " -a, --all, --listening display all\n")); fprintf(stderr, NLS_CATGETS(catfd, netstatSet, netstat_usage13, " -o, --timers display timers\n\n")); - fprintf(stderr, NLS_CATGETS(catfd, netstatSet, netstat_usage14, "={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n")); - fprintf(stderr, NLS_CATGETS(catfd, netstatSet, netstat_usage15, "= -A {inet|ipx|netrom|ddp|ax25},... --inet --ipx --netrom --ddp --ax25\n")); + fprintf(stderr, NLS_CATGETS(catfd, netstatSet, netstat_usage14, "={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --rose --ipx --netrom\n")); + fprintf(stderr, NLS_CATGETS(catfd, netstatSet, netstat_usage15, "= -A {inet|ipx|netrom|ddp|ax25|rose},... --inet --ipx --netrom --ddp --ax25 --rose\n")); NLS_CATCLOSE(catfd) exit(1); } @@ -1297,7 +1348,7 @@ flag_tcp = flag_udp = flag_raw = 1; flag_arg = flag_tcp + flag_udp + flag_raw + flag_unx + flag_ipx - + flag_ax25 + flag_netrom; + + flag_ax25 + flag_rose + flag_netrom; if (flag_mas) { #if HAVE_FW_IPMASQUERADE @@ -1416,6 +1467,16 @@ #else if (flag_arg) { i=1; ENOSUPP("netstat","AF AX25"); } +#endif + } + + if(!flag_arg || flag_rose) { +#if HAVE_AFROSE + i = rose_info(); + if(i) { NLS_CATCLOSE(catfd) return(i); } +#else + if (flag_arg) + { i=1; ENOSUPP("netstat","AF ROSE"); } #endif } diff -ruN net-tools-1.33.org/rarp.c net-tools-1.33/rarp.c --- net-tools-1.33.org/rarp.c Sat May 18 03:17:59 1996 +++ net-tools-1.33/rarp.c Sun Aug 10 11:10:44 1997 @@ -69,6 +69,9 @@ #if HAVE_ARPHRD_AX25 /* XXX */ { "ax25", ARPHRD_AX25, 12, in_ax25 }, #endif +#if HAVE_ARPHRD_ROSE /* XXX */ + { "rose", ARPHRD_ROSE, 12, in_rose }, +#endif { NULL, -1, 0, NULL } }; diff -ruN net-tools-1.33.org/route.c net-tools-1.33/route.c --- net-tools-1.33.org/route.c Tue May 20 13:13:47 1997 +++ net-tools-1.33/route.c Sun Aug 10 12:50:07 1997 @@ -2,7 +2,7 @@ * route This file contains an implementation of the command * that manages the IP routing table in the kernel. * - * Version: route 1.93 (1996-08-23) + * Version: route 1.94 (1997-08-03) * * Maintainer: Bernd 'eckes' Eckenfels, * @@ -31,6 +31,7 @@ *960413 {1.91} Bernd Eckenfels: new RTACTION support+FLAG_CACHE/FIB *960426 {1.92} Bernd Eckenfels: FLAG_SYM/-N support *960823 {1.93} Frank Strauss: INET6 stuff + *970803 {1.94} Terry Dawson: Rose support * */ #include @@ -83,7 +84,7 @@ fprintf(stderr, NLS_CATGETS(catfd, routeSet, route_usage4, " route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.\n\n")); fprintf(stderr, NLS_CATGETS(catfd, routeSet, route_usage5, - " Address_families: inet,inet6,ddp,ipx,netrom,ax25\n")); + " Address_families: inet,inet6,ddp,ipx,ax25,netrom,rose\n")); fprintf(stderr, NLS_CATGETS(catfd, routeSet, route_usage6, " specify AF: -A af1,af2.. or --af1 --af2 or af_route\n")); NLS_CATCLOSE(catfd)