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

Merge more changes from my private tree, mostly ifconfig tidyups.

parent 1d873f2e
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
......
......@@ -8,7 +8,7 @@
* NET-3 Networking Distribution for the LINUX operating
* system.
*
* Version: arp 1.82 (1997-09-25)
* Version: arp 1.83 (1998-02-13)
*
* Maintainer: Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
*
......@@ -39,6 +39,7 @@
* Typo fix (Debian Bug#5728 Giuliano Procida)
*970803 {1.81} Bernd Eckenfels : removed junk comment line 1
*970925 {1.82} Bernd Eckenfels : include fix for libc6
+980213 (1.83) Phil Blundell: set ATF_COM on new entries
*
*
* This program is free software; you can redistribute it
......@@ -76,7 +77,7 @@
char *Release = RELEASE,
*Version = "arp 1.82 (1997-09-25)";
*Version = "arp 1.83 (1998-02-13)";
int opt_n = 0; /* do not resolve addresses */
int opt_N = 0; /* use symbolic names */
......@@ -331,7 +332,7 @@ arp_set(char **args)
}
/* Check out any modifiers. */
flags = ATF_PERM;
flags = ATF_PERM | ATF_COM;
while (*args != NULL) {
if (! strcmp(*args, "temp")) {
flags &= ~ATF_PERM;
......
......@@ -3,7 +3,7 @@
* that either displays or sets the characteristics of
* one or more of the system's networking interfaces.
*
* Version: ifconfig 1.31 (1998-01-25)
* Version: ifconfig 1.32 (1998-02-09)
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* and others. Copyright 1993 MicroWalt Corporation
......@@ -155,7 +155,7 @@ static const char *if_port_text[][4] = {
#include "net-locale.h"
char *Release = RELEASE,
*Version = "ifconfig 1.30 ($Id)";
*Version = "ifconfig 1.32 (1998-02-09)";
int opt_a = 0; /* show all interfaces */
int opt_i = 0; /* show the statistics */
......@@ -226,8 +226,9 @@ ife_print(struct interface *ptr)
printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_link,
"%-8.8s Link encap:%s "), ptr->name, hw->title);
/* Don't print the hardware address for ATM if it's null. */
if (hw->sprint != NULL && (strncmp(ptr->name, "atm", 3) ||
/* Don't print the hardware address for ATM or Ash if it's null. */
if (hw->sprint != NULL && ((strncmp(ptr->name, "atm", 3) &&
strncmp(ptr->name, "ash", 3)) ||
(ptr->hwaddr[0] || ptr->hwaddr[1] || ptr->hwaddr[2] || ptr->hwaddr[3] ||
ptr->hwaddr[4] || ptr->hwaddr[5])))
printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_hw, "HWaddr %s ")
......@@ -242,16 +243,17 @@ ife_print(struct interface *ptr)
if (ap->af != AF_INET6) {
#endif
printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_adr,
" %s addr:%s"), ap->name,
" %s addr:%s "), ap->name,
ap->sprint(&ptr->addr, 1));
if (ptr->flags & IFF_POINTOPOINT) {
printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_pap, " P-t-P:%s "),
printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_pap, " P-t-P:%s "),
ap->sprint(&ptr->dstaddr, 1));
} else {
printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_bcast, " Bcast:%s "),
}
if (ptr->flags & IFF_BROADCAST) {
printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_bcast, " Bcast:%s "),
ap->sprint(&ptr->broadaddr, 1));
}
printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_mask, "Mask:%s\n"),
printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_mask, " Mask:%s\n"),
ap->sprint(&ptr->netmask, 1));
#if HAVE_AFINET6
}
......@@ -347,12 +349,13 @@ ife_print(struct interface *ptr)
printf(" ");
printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_tx,
"TX packets:%lu errors:%lu dropped:%lu %s:%lu carrier:%lu coll:%lu\n"),
"TX packets:%lu errors:%lu dropped:%lu %s:%lu carrier:%lu\n"),
ptr->stats.tx_packets, ptr->stats.tx_errors,
ptr->stats.tx_dropped, dispname, ptr->stats.tx_fifo_errors,
ptr->stats.tx_carrier_errors, ptr->stats.collisions);
ptr->stats.tx_carrier_errors);
printf(" collisions:%lu\n", ptr->stats.collisions);
if (hf<255 && (ptr->map.irq || ptr->map.mem_start || ptr->map.dma ||
if ((ptr->map.irq || ptr->map.mem_start || ptr->map.dma ||
ptr->map.base_addr)) {
printf(" ");
if (ptr->map.irq)
......@@ -584,8 +587,7 @@ if_print(char *ifname)
struct ifreq *ifr;
ifc.ifc_buf = NULL;
ifc.ifc_len = 0;
if (ioctl(skfd, SIOCGIFCONF, &ifc) < 0) {
/* Can this ever happen? */
if (ioctl(skfd, SIOCGIFCONF, &ifc) < 0 || ifc.ifc_len == 0) {
int n = 2, s;
ifc.ifc_buf = NULL;
do {
......
......@@ -24,7 +24,11 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#if __GLIBC__ == 2
#include <netax25/ax25.h>
#else
#include <linux/ax25.h>
#endif
#include <net/if_arp.h>
#include <stdlib.h>
#include <stdio.h>
......
......@@ -6,7 +6,7 @@
* NET-3 Networking Distribution for the LINUX operating
* system.
*
* Version: netstat 1.24 (1997-09-21)
* Version: netstat 1.25 (1998-02-09)
*
* Authors: Fred Baumgarten, <dc6iq@insu1.etec.uni-karlsruhe.de>
* Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
......@@ -54,6 +54,7 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <ctype.h>
......@@ -96,7 +97,7 @@ typedef enum {
#include "lib/net-features.h"
char *Release = RELEASE,
*Version = "netstat 1.24 (1997-09-21)",
*Version = "netstat 1.25 (1998-02-13)",
*Signature = "Fred Baumgarten <dc6iq@insu1.etec.uni-karlsruhe.de> and Alan Cox.";
......
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