Added HDLC/LAPB support (from Szemethy Tivadar <tiv@itc.hu>)
authorPhil Blundell <philb@gnu.org>
Wed, 13 May 1998 16:48:11 +0000 (16:48 +0000)
committerPhil Blundell <philb@gnu.org>
Wed, 13 May 1998 16:48:11 +0000 (16:48 +0000)
ChangeLog [deleted file]
config.in
lib/Makefile
lib/hdlclapb.c [new file with mode: 0644]
lib/hw.c

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644 (file)
index 31ba807..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,151 +0,0 @@
-1998-04-15  Phil Blundell  <philb@gnu.org>
-
-       * lib/ash.c (pr_ash): Fix typo.
-       (in_ash): Hamming-encode the hops.
-
-Fri Apr 10 22:26:48 1998  Philip Blundell  <Philip.Blundell@pobox.com>
-
-       * ifconfig.c (ife_print): Bracket Appletalk stuff in #if
-       HAVE_AFIPX.  Add Econet support.
-       (ife_print): Print `collisions' left aligned with everything
-       else to make it neater.
-       (main): Make interface address setting work for Econet.
-
-       * interface.h: Add Econet support.
-
-       * lib/pathnames.h (_PATH_PROCNET_ROSE_ROUTE): Added.
-
-       * netstat.c: Fix `-i' to work with unified interface code.  Tidy
-       up.
-
-       * ifconfig.c (if_print): Fix printing of aliased interfaces when
-       lots are present (patch from Todd R. Eigenschink).
-       (main): Bracket media stuff with #ifdef IFF_PORTSEL.
-
-       * lib/econet.c: New file.
-       * config.in, lib/Makefile: support Econet.
-       * sockets.c: Likewise.
-
-Mon Mar  2 20:45:29 1998  Philip Blundell  <Philip.Blundell@pobox.com>
-
-       * interface.c: New file, contains code shared between ifconfig and
-       netstat.
-       * sockets.c: Likewise.
-       
-       * ifconfig.c (ife_print): Add support for latest /proc/net/dev
-       format.
-       
-       * ifconfig.c (ipx_getaddr): Reformat.
-
-       * lib/inet6_gr.c: Don't #include <netinet/ip6.h>
-
-Fri Feb 27 20:43:34 1998  Philip Blundell  <philb@gnu.org>
-
-       * ifconfig.c (if_print): When displaying all interfaces, get list
-       from /proc/net/dev rather than using obsolete SIOCGIFCONF.
-       (main): Protect portsel code with #ifdef.
-
-       * lib/ash.c: Tidy up.
-       (pr_ash): Print the address in canonical Ash notation, and accept
-       FF termination.
-
-Fri Feb 13 18:47:09 1998  Philip Blundell  <philb@gnu.org>
-
-       * ifconfig.c (ife_print): Only print the broadcast addreess if the
-       interface is broadcast capable.
-       (ife_print): Don't print null hardware address for Ash either.
-       (Version): Remove spurious "$Id" and insert correct date.
-
-Tue Feb 10 11:45:38 1998  Philip Blundell  <pb@nexus.co.uk>
-
-       * arp.c (arp_set): Add ATF_COM to flags.
-
-       * ifconfig.c (ife_print): Print collisions on a separate line to
-       avoid wrapping with busy interfaces.
-
-Mon Feb  9 10:30:35 1998  Philip Blundell  <pb@nexus.co.uk>
-
-       * ifconfig.c (ife_print): Display hardware info even for ARPHRD >
-       255.
-       (if_print): Fix bug with 2.0 kernels.
-
-       * netstat.c: Include <string.h> to avoid warnings.
-       * lib/ax25.c: Include <netax25/ax25.h> not <linux/ax25.h> under glibc2.
-
-Sun Feb  8 18:33:00 1998  Philip Blundell  <philb@gnu.org>
-
-       * ifconfig.c: Tidy up txqueuelen support, and other functionality
-       not supported by all kernels/glibcs.
-
-       * arp.c: Update from Bernd's latest.
-
-1998-02-05  Phil Blundell  <philb@gnu.org>
-
-       * lib/ash.c: Don't redefine ARPHRD constant.  Change it from
-       ARPHRD_ASH64 to just ARPHRD_ASH, since the encap is the same for
-       16Mbps.
-       * lib/hw.c: Print just `Ash', not `64Mbps Ash'.
-
-1998-01-31  Phil Blundell  <philb@gnu.org>
-
-       * lib/inet6_gr.c (rprint_fib6): Reinstate the "U" flag, although it
-       is always printed.
-       * lib/inet_gr.c (rprint_fib): Likewise. 
-
-Sun Jan 25 13:00:00 1998  Philip Blundell  <Philip.Blundell@pobox.com>
-
-       * lib/net-string.c (str_in_buff): Avoid compiler warning.  Remove
-       BSD-isms.  Tidy up.
-
-       * lib/inet6_gr.c, lib/inet_gr.c: Don't display inactive routes
-       (ie those without RTF_UP).
-
-       * lib/Makefile: Add support for Rose, FDDI and Ash.
-
-       * rarp.c: Add support for /etc/ethers.  Patch from haardt@gmd.de
-       (Michael Haardt).
-       * lib/pathnames.h: Likewise.
-
-       * config.in, lib/hw.c: Tidy up.  Add support for Rose and FDDI.
-       * lib/fddi.c, lib/rose.c, lib/rose_gr.c: New files, copied from
-       Bernd's net-tools-pre-1.34.
-
-       * ifconfig.c: Try to use AF_ROSE sockets.
-
-       * ifconfig.c: Don't use SIOCGIFCOUNT to work out how many
-       interfaces to display; use SIOCGIFCONF with a null buffer
-       instead.
-
-       * ifconfig.c: Don't assume ifr_qlen is defined if SIOCSIFTXQLEN
-       is.
-
-       * lib/fddi.c: Use <netinet/if_fddi.h> not <linux/if_fddi.h> for
-       glibc.
-       * lib/rose.c: Include <netrose/rose.h> for glibc.
-       
-Tue Sep 23 20:58:27 1997  Philip Blundell  <Philip.Blundell@pobox.com>
-
-       * ifconfig.c (if_getstats): use _PATH_PROCNET_DEV rather than
-       hardcoding.
-       * lib/pathnames.h (_PATH_PROCNET_DEV): define.
-
-       * ifconfig.c (set_flag): tidy up.
-       (clr_flag): likewise.
-
-Sun Sep 21 18:26:24 1997  Philip Blundell  <Philip.Blundell@pobox.com>
-
-       * Makefile (RELEASE): set to 1.432
-       * version.h (RELEASE): likewise.
-
-       * TODO: updated.
-       * README: likewise.
-
-       * ifconfig.c (set_flag): print error message if no such interface.
-       (clr_flag): likewise.
-
-       * lib/net-features.h: remove ipfw stuff, add INET6
-       
-       * netstat.c: include <net/route.h> for net-features.  Patch by
-       Roderich Schupp <rsch@ExperTeam.de> 
-       * route.c: likewise.
-       
index 0f7730c..212f189 100644 (file)
--- a/config.in
+++ b/config.in
@@ -80,3 +80,4 @@ bool 'SIT (IPv6-in-IPv4) support' HAVE_HWSIT n
 bool 'FDDI (generic) support' HAVE_HWFDDI n
 bool 'HIPPI (generic) support' HAVE_HWHIPPI n
 bool 'Ash hardware support' HAVE_HWASH n
+bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB n
index ebfabe5..a8c0f93 100644 (file)
@@ -5,22 +5,9 @@
 #              NET-2 Networking Distribution for the LINUX operating
 #              system.  (net-tools, net-drivers)
 #
-# Version:     lib/Makefile 1.27 (1996-04-13)
-#
 # Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
 #              Copyright 1993 MicroWalt Corporation
 #
-# Modification:
-#960125        {1.21}  Bernd Eckenfels:        reformated, layout
-#960203 {1.22} Bernd Eckenfels:        afrt.o will include all the 
-#                                      routing support into the binaries.
-#960206 {1.23} Bernd Eckenfels:        better solution wit route_init
-#960215 {1.24} Bernd Eckenfels:        ax25_rt.o added
-#960221 {1.25} Bernd Eckenfels:        getroute/setroute.o
-#960322 {1.26} Bernd Eckenfels:        ACTOBJS support
-#960413 {1.27} Bernd Eckenfels:        Mike McLagan FRAD Support (frame.c)
-#960809 {1.xx} Frank Strauss:          inet6.c inet6_gr.c
-#
 #              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
@@ -29,7 +16,7 @@
 #
 
 
-HWOBJS  = hw.o loopback.o slip.o ether.o ax25.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o rose.o ash.o fddi.o hippi.o
+HWOBJS  = hw.o loopback.o slip.o ether.o ax25.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o rose.o ash.o fddi.o hippi.o hdlclapb.o
 AFOBJS  = unix.o inet.o inet6.o ax25.o ipx.o ddp.o ipx.o netrom.o af.o rose.o econet.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
diff --git a/lib/hdlclapb.c b/lib/hdlclapb.c
new file mode 100644 (file)
index 0000000..ddf5b3e
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * lib/hdlclapb.c 
+ *             This file contains the HDLC/LAPB support for the NET-2 base
+ *             distribution.
+ *
+ * Version:    @(#)hdlclapb.c  0.10    22/04/1998
+ *
+ * Original Author:    
+ *             Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *             Copyright 1993 MicroWalt Corporation
+ *
+ *             Modified by Alan Cox, May 94 to cover NET-3
+ *
+ *             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_HWHDLCLAPB
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#define  EXTERN
+#include "net-locale.h"
+
+
+struct hwtype hdlc_hwtype = {
+  "hdlc",      NULL, /*"(Cisco) HDLC",*/       ARPHRD_HDLC,    0,
+  NULL,                NULL,           NULL,           NULL,
+};
+struct hwtype lapb_hwtype = {
+  "lapb",      NULL, /*"LAPB",*/               ARPHRD_LAPB,    0,
+  NULL,                NULL,           NULL,           NULL,
+};
+
+#endif /* HAVE_HWHDLCLAPB */
index d9e9ec6..51df864 100644 (file)
--- a/lib/hw.c
+++ b/lib/hw.c
@@ -58,6 +58,9 @@ extern        struct hwtype   arcnet_hwtype;
 extern struct hwtype   dlci_hwtype;
 extern struct hwtype   frad_hwtype;
 
+extern struct hwtype   hdlc_hwtype;
+extern struct hwtype   lapb_hwtype;
+
 extern struct hwtype   sit_hwtype;
 
 static struct hwtype *hwtypes[] = {
@@ -92,6 +95,10 @@ static struct hwtype *hwtypes[] = {
 #if HAVE_HWPPP
   &ppp_hwtype,
 #endif  
+#if HAVE_HWHDLCLAPB
+  &hdlc_hwtype,
+  &lapb_hwtype,
+#endif
 #if HAVE_HWARC
   &arcnet_hwtype,
 #endif  
@@ -155,6 +162,10 @@ void hwinit ()
 #if HAVE_HWPPP
   ppp_hwtype.title = NLS_CATSAVE (catfd, pppSet, ppp_ppp, "Point-to-Point Protocol");
 #endif  
+#if HAVE_HWHDLCLAPB
+  hdlc_hwtype.title = NLS_CATSAVE (catfd, hdlcSet, hdlc_hw, "(Cisco)-HDLC");
+  lapb_hwtype.title = NLS_CATSAVE (catfd, lapbSet, lapb_hw, "LAPB");
+#endif
 #if HAVE_HWARC
   arcnet_hwtype.title = NLS_CATSAVE (catfd, arcnetSet, arcnet_arcnet, "1.5Mbps ARCnet");
 #endif