Add support for Econet hardware; internationalize Token Ring.
authorPhil Blundell <philb@gnu.org>
Sun, 16 May 1999 16:41:03 +0000 (16:41 +0000)
committerPhil Blundell <philb@gnu.org>
Sun, 16 May 1999 16:41:03 +0000 (16:41 +0000)
config.in
lib/Makefile
lib/ec_hw.c [new file with mode: 0644]
lib/hw.c
lib/tr.c

index 2327d83..117385b 100644 (file)
--- a/config.in
+++ b/config.in
@@ -77,6 +77,7 @@ bool 'HIPPI (generic) support' HAVE_HWHIPPI n
 bool 'Ash hardware support' HAVE_HWASH n
 bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB n
 bool 'IrDA support' HAVE_HWIRDA y
+bool 'Econet hardware support' HAVE_HWEC n
 *
 *
 *           Other Features.
index 0a90610..71daf13 100644 (file)
@@ -16,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 hdlclapb.o irda.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 irda.o ec_hw.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/ec_hw.c b/lib/ec_hw.c
new file mode 100644 (file)
index 0000000..f143186
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * lib/ec_hw.c  This file contains an implementation of the Econet
+ *              hardware support functions.
+ *
+ * Version:     $Id: ec_hw.c,v 1.1 1999/05/16 16:41:11 philip Exp $
+ *
+ * Author:      Philip Blundell <philb@gnu.org>
+ *
+ *              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_HWEC
+
+#include <net/if_arp.h>
+#include "net-support.h"
+
+struct hwtype ec_hwtype =
+{
+    "ec", NULL /* "Econet" */, ARPHRD_ECONET, 0,
+    NULL, NULL, NULL, NULL
+};
+
+#endif
index 4d023e3..875197c 100644 (file)
--- a/lib/hw.c
+++ b/lib/hw.c
@@ -2,7 +2,7 @@
  * lib/hw.c   This file contains the top-level part of the hardware
  *              support functions module.
  *
- * Version:     $Id: hw.c,v 1.13 1999/04/21 09:00:02 philip Exp $
+ * Version:     $Id: hw.c,v 1.14 1999/05/16 16:41:12 philip Exp $
  *
  * Maintainer:  Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
  *
@@ -65,6 +65,8 @@ extern struct hwtype sit_hwtype;
 
 extern struct hwtype irda_hwtype;
 
+extern struct hwtype ec_hwtype;
+
 static struct hwtype *hwtypes[] =
 {
 
@@ -124,6 +126,9 @@ static struct hwtype *hwtypes[] =
 #if HAVE_HWIRDA
     &irda_hwtype,
 #endif
+#if HAVE_HWEC
+    &ec_hwtype,
+#endif
     &unspec_hwtype,
     NULL
 };
@@ -185,6 +190,12 @@ void hwinit()
 #if HAVE_HWIRDA
     irda_hwtype.title = _("IrLAP");
 #endif
+#if HAVE_HWTR
+    tr_hwtype.title = _("16/4 Mbps Token Ring");
+#endif
+#if HAVE_HWEC
+    ec_hwtype.title = _("Econet");
+#endif
     sVhwinit = 1;
 }
 
index ed8ae09..700a7d7 100644 (file)
--- a/lib/tr.c
+++ b/lib/tr.c
@@ -2,7 +2,7 @@
  * lib/tr.c   This file contains an implementation of the "Tokenring"
  *              support functions.
  *
- * Version:     $Id: tr.c,v 1.4 1999/04/18 20:28:43 philip Exp $
+ * Version:     $Id: tr.c,v 1.5 1999/05/16 16:41:14 philip Exp $
  *
  * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  *              Copyright 1993 MicroWalt Corporation
@@ -129,7 +129,7 @@ static int in_tr(char *bufp, struct sockaddr *sap)
 
 struct hwtype tr_hwtype =
 {
-    "tr", "16/4 Mbps Token Ring", ARPHRD_IEEE802, TR_ALEN,
+    "tr", NULL /* "16/4 Mbps Token Ring" */, ARPHRD_IEEE802, TR_ALEN,
     pr_tr, pr_str, in_tr, NULL
 };