enable -fno-strict-aliasing until the code base gets a hefty clean up to fix all...
[platform/upstream/net-tools.git] / lib / hw.c
index 875197c..e9ba0be 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.14 1999/05/16 16:41:12 philip Exp $
+ * Version:     $Id: hw.c,v 1.19 2008/10/03 01:52:04 ecki Exp $
  *
  * Maintainer:  Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
  *
@@ -19,6 +19,7 @@
  */
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <net/if_arp.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
@@ -38,15 +39,20 @@ extern struct hwtype cslip_hwtype;
 extern struct hwtype slip6_hwtype;
 extern struct hwtype cslip6_hwtype;
 extern struct hwtype adaptive_hwtype;
+extern struct hwtype strip_hwtype;
 
 extern struct hwtype ether_hwtype;
 extern struct hwtype fddi_hwtype;
 extern struct hwtype hippi_hwtype;
 extern struct hwtype tr_hwtype;
+#ifdef ARPHRD_IEEE802_TR
+extern struct hwtype tr_hwtype1;
+#endif
 
 extern struct hwtype ax25_hwtype;
 extern struct hwtype rose_hwtype;
 extern struct hwtype netrom_hwtype;
+extern struct hwtype x25_hwtype;
 extern struct hwtype tunnel_hwtype;
 
 extern struct hwtype ash_hwtype;
@@ -67,6 +73,10 @@ extern struct hwtype irda_hwtype;
 
 extern struct hwtype ec_hwtype;
 
+extern struct hwtype ib_hwtype;
+
+extern struct hwtype eui64_hwtype;
+
 static struct hwtype *hwtypes[] =
 {
 
@@ -79,6 +89,9 @@ static struct hwtype *hwtypes[] =
     &cslip6_hwtype,
     &adaptive_hwtype,
 #endif
+#if HAVE_HWSTRIP
+    &strip_hwtype,
+#endif
 #if HAVE_HWASH
     &ash_hwtype,
 #endif
@@ -87,6 +100,9 @@ static struct hwtype *hwtypes[] =
 #endif
 #if HAVE_HWTR
     &tr_hwtype,
+#ifdef ARPHRD_IEEE802_TR
+    &tr_hwtype1, 
+#endif
 #endif
 #if HAVE_HWAX25
     &ax25_hwtype,
@@ -129,6 +145,15 @@ static struct hwtype *hwtypes[] =
 #if HAVE_HWEC
     &ec_hwtype,
 #endif
+#if HAVE_HWX25
+    &x25_hwtype,
+#endif
+#if HAVE_HWIB
+    &ib_hwtype,
+#endif
+#if HAVE_HWEUI64
+    &eui64_hwtype,
+#endif
     &unspec_hwtype,
     NULL
 };
@@ -167,6 +192,9 @@ void hwinit()
 #if HAVE_HWNETROM
     netrom_hwtype.title = _("AMPR NET/ROM");
 #endif
+#if HAVE_HWX25
+    x25_hwtype.title = _("generic X.25");
+#endif
 #if HAVE_HWTUNNEL
     tunnel_hwtype.title = _("IPIP Tunnel");
 #endif
@@ -192,10 +220,19 @@ void hwinit()
 #endif
 #if HAVE_HWTR
     tr_hwtype.title = _("16/4 Mbps Token Ring");
+#ifdef ARPHRD_IEEE802_TR
+    tr_hwtype1.title = _("16/4 Mbps Token Ring (New)") ; 
+#endif
 #endif
 #if HAVE_HWEC
     ec_hwtype.title = _("Econet");
 #endif
+#if HAVE_HWIB
+    ib_hwtype.title = _("InfiniBand");
+#endif
+#if HAVE_HWEUI64
+    eui64_hwtype.title = _("Generic EUI-64");
+#endif
     sVhwinit = 1;
 }