Commit 3d25d165 authored by Phil Blundell's avatar Phil Blundell

Remove bogus checks for loopback, use the real ARPHRD value.

Take out special-casing of Ash and ATM for don't-print-null-
hwaddr purposes; make it a flag in struct hwtype.
Add appropriate /proc check for Econet presence.
Call it 1.52.
parent 3bacf06d
......@@ -96,7 +96,7 @@ endif
# -------- end of user definitions --------
MAINTAINER = Philip.Blundell@pobox.com
RELEASE = 1.51
RELEASE = 1.52
.EXPORT_ALL_VARIABLES:
......
......@@ -3,7 +3,7 @@
* that either displays or sets the characteristics of
* one or more of the system's networking interfaces.
*
* Version: $Id: ifconfig.c,v 1.29 1999/03/24 09:49:45 philip Exp $
* Version: $Id: ifconfig.c,v 1.30 1999/04/04 21:37:01 philip Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* and others. Copyright 1993 MicroWalt Corporation
......@@ -148,9 +148,6 @@ void ife_print(struct interface *ptr)
hf = ptr->type;
if (strncmp(ptr->name, "lo", 2) == 0)
hf = 255;
if (hf == ARPHRD_CSLIP || hf == ARPHRD_CSLIP6)
can_compress = 1;
......@@ -159,11 +156,10 @@ void ife_print(struct interface *ptr)
hw = get_hwntype(-1);
printf(_("%-9.9s Link encap:%s "), ptr->name, hw->title);
/* Don't print the hardware address for ATM or Ash if it's null. */
/* FIXME. Make this an option in struct hwtype. */
if (hw->sprint != NULL && ((strncmp(ptr->name, "atm", 3) &&
strncmp(ptr->name, "ash", 3)) ||
(! hw_null_address(hw, ptr->hwaddr))))
/* For some hardware types (eg Ash, ATM) we don't print the
hardware address if it's null. */
if (hw->sprint != NULL && (! (hw_null_address(hw, ptr->hwaddr) &&
hw->suppress_null_addr)))
printf(_("HWaddr %s "), hw->print(ptr->hwaddr));
#ifdef IFF_PORTSEL
if (ptr->flags & IFF_PORTSEL) {
......
/*
* lib/ash.c This file contains an implementation of the Ash
* support functions for the NET-2 base distribution.
* $Id: ash.c,v 1.9 1999/01/05 20:53:20 philip Exp $
* $Id: ash.c,v 1.10 1999/04/04 21:37:02 philip Exp $
*/
#include "config.h"
......@@ -101,7 +101,8 @@ static int in_ash(char *bufp, struct sockaddr *sap)
struct hwtype ash_hwtype =
{
"ash", NULL, ARPHRD_ASH, ASH_ALEN,
pr_ash, pr_sash, in_ash, NULL
pr_ash, pr_sash, in_ash, NULL,
1
};
#endif
......@@ -3,7 +3,7 @@
* support functions for the net-tools.
* (NET-3 base distribution).
*
* Version: $Id: econet.c,v 1.6 1999/01/05 20:53:23 philip Exp $
* Version: $Id: econet.c,v 1.7 1999/04/04 21:37:03 philip Exp $
*
* Author: Philip Blundell <philb@gnu.org>
*
......@@ -82,7 +82,7 @@ struct aftype ec_aftype =
ec_print, ec_sprint, ec_input, NULL,
NULL, NULL, NULL,
-1,
NULL
"/proc/sys/net/econet"
};
#endif /* HAVE_AFECONET */
/*
* lib/loopback.c This file contains the general hardware types.
*
* Version: $Id: loopback.c,v 1.5 1998/11/19 13:02:02 philip Exp $
* Version: $Id: loopback.c,v 1.6 1999/04/04 21:37:04 philip Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
......@@ -66,6 +66,6 @@ struct hwtype unspec_hwtype =
struct hwtype loop_hwtype =
{
"loop", NULL, /*"Local Loopback", */ 255 /*ARPHRD_LOOPBACK */ , 0,
"loop", NULL, /*"Local Loopback", */ ARPHRD_LOOPBACK, 0,
NULL, NULL, NULL, NULL
};
......@@ -64,6 +64,7 @@ struct hwtype {
char *(*sprint) (struct sockaddr *);
int (*input) (char *, struct sockaddr *);
int (*activate) (int fd);
int suppress_null_addr;
};
......
......@@ -53,7 +53,7 @@ int sockets_open(int family)
#endif
af->fd = socket(af->af, type, 0);
if (af->fd >= 0)
sfd = af->fd;
sfd = af->fd;
}
if (sfd < 0)
fprintf(stderr, _("No usable address families found.\n"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment