Commit f68f8a8e authored by Martina Ferrari's avatar Martina Ferrari

Merge tag 'upstream/1.60+git20081202.2750e60c' into upstream

parents 09172226 2750e60c
...@@ -83,7 +83,7 @@ bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB y ...@@ -83,7 +83,7 @@ bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB y
bool 'IrDA support' HAVE_HWIRDA y bool 'IrDA support' HAVE_HWIRDA y
bool 'Econet hardware support' HAVE_HWEC y bool 'Econet hardware support' HAVE_HWEC y
bool 'Generic EUI-64 hardware support' HAVE_HWEUI64 y bool 'Generic EUI-64 hardware support' HAVE_HWEUI64 y
bool 'InfiniBand hardware support' HAVE_HWIB y
* *
* *
* Other Features. * Other Features.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* that either displays or sets the characteristics of * that either displays or sets the characteristics of
* one or more of the system's networking interfaces. * one or more of the system's networking interfaces.
* *
* Version: $Id: ifconfig.c,v 1.57 2002/12/10 00:56:41 ecki Exp $ * Version: $Id: ifconfig.c,v 1.58 2008/10/02 23:31:04 ecki Exp $
* *
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* and others. Copyright 1993 MicroWalt Corporation * and others. Copyright 1993 MicroWalt Corporation
...@@ -112,6 +112,9 @@ static int if_print(char *ifname) ...@@ -112,6 +112,9 @@ static int if_print(char *ifname)
struct interface *ife; struct interface *ife;
ife = lookup_interface(ifname); ife = lookup_interface(ifname);
if (!ife) {
return -1;
}
res = do_if_fetch(ife); res = do_if_fetch(ife);
if (res >= 0) if (res >= 0)
ife_print(ife); ife_print(ife);
......
...@@ -16,7 +16,7 @@ ...@@ -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 strip.o irda.o ec_hw.o x25.o eui64.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 strip.o irda.o ec_hw.o x25.o eui64.o ib.o
AFOBJS = unix.o inet.o inet6.o ax25.o ipx.o ddp.o ipx.o netrom.o af.o rose.o econet.o x25.o AFOBJS = unix.o inet.o inet6.o ax25.o ipx.o ddp.o ipx.o netrom.o af.o rose.o econet.o x25.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 x25_gr.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 x25_gr.o
AFSROBJS = inet_sr.o inet6_sr.o netrom_sr.o ipx_sr.o setroute.o x25_sr.o AFSROBJS = inet_sr.o inet6_sr.o netrom_sr.o ipx_sr.o setroute.o x25_sr.o
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* lib/hw.c This file contains the top-level part of the hardware * lib/hw.c This file contains the top-level part of the hardware
* support functions module. * support functions module.
* *
* Version: $Id: hw.c,v 1.18 2001/11/12 02:12:05 ecki 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> * Maintainer: Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
* *
...@@ -73,6 +73,8 @@ extern struct hwtype irda_hwtype; ...@@ -73,6 +73,8 @@ extern struct hwtype irda_hwtype;
extern struct hwtype ec_hwtype; extern struct hwtype ec_hwtype;
extern struct hwtype ib_hwtype;
extern struct hwtype eui64_hwtype; extern struct hwtype eui64_hwtype;
static struct hwtype *hwtypes[] = static struct hwtype *hwtypes[] =
...@@ -146,6 +148,9 @@ static struct hwtype *hwtypes[] = ...@@ -146,6 +148,9 @@ static struct hwtype *hwtypes[] =
#if HAVE_HWX25 #if HAVE_HWX25
&x25_hwtype, &x25_hwtype,
#endif #endif
#if HAVE_HWIB
&ib_hwtype,
#endif
#if HAVE_HWEUI64 #if HAVE_HWEUI64
&eui64_hwtype, &eui64_hwtype,
#endif #endif
...@@ -222,6 +227,9 @@ void hwinit() ...@@ -222,6 +227,9 @@ void hwinit()
#if HAVE_HWEC #if HAVE_HWEC
ec_hwtype.title = _("Econet"); ec_hwtype.title = _("Econet");
#endif #endif
#if HAVE_HWIB
ib_hwtype.title = _("InfiniBand");
#endif
#if HAVE_HWEUI64 #if HAVE_HWEUI64
eui64_hwtype.title = _("Generic EUI-64"); eui64_hwtype.title = _("Generic EUI-64");
#endif #endif
......
/*
* lib/ib.c This file contains an implementation of the "Infiniband"
* support functions.
*
* Version: $Id: ib.c,v 1.1 2008/10/03 01:52:03 ecki Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
* Tom Duffy <tduffy@sun.com>
*
* 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_HWIB
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if_arp.h>
#include <linux/if_infiniband.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#include "intl.h"
#include "util.h"
extern struct hwtype ib_hwtype;
/* Display an InfiniBand address in readable format. */
static char *pr_ib(unsigned char *ptr)
{
static char buff[128];
char *pos;
unsigned int i;
pos = buff;
for (i = 0; i < INFINIBAND_ALEN; i++) {
pos += sprintf(pos, "%02X:", (*ptr++ & 0377));
}
buff[strlen(buff) - 1] = '\0';
/* snprintf(buff, sizeof(buff), "%02X:%02X:%02X:%02X:%02X:%02X",
(ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377),
(ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377)
);
*/
return (buff);
}
/* Input an Infiniband address and convert to binary. */
static int in_ib(char *bufp, struct sockaddr *sap)
{
unsigned char *ptr;
char c, *orig;
int i;
unsigned val;
sap->sa_family = ib_hwtype.type;
ptr = sap->sa_data;
i = 0;
orig = bufp;
while ((*bufp != '\0') && (i < INFINIBAND_ALEN)) {
val = 0;
c = *bufp++;
if (isdigit(c))
val = c - '0';
else if (c >= 'a' && c <= 'f')
val = c - 'a' + 10;
else if (c >= 'A' && c <= 'F')
val = c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, _("in_ib(%s): invalid infiniband address!\n"), orig);
#endif
errno = EINVAL;
return (-1);
}
val <<= 4;
c = *bufp;
if (isdigit(c))
val |= c - '0';
else if (c >= 'a' && c <= 'f')
val |= c - 'a' + 10;
else if (c >= 'A' && c <= 'F')
val |= c - 'A' + 10;
else if (c == ':' || c == 0)
val >>= 4;
else {
#ifdef DEBUG
fprintf(stderr, _("in_ib(%s): invalid infiniband address!\n"), orig);
#endif
errno = EINVAL;
return (-1);
}
if (c != 0)
bufp++;
*ptr++ = (unsigned char) (val & 0377);
i++;
/* We might get a semicolon here - not required. */
if (*bufp == ':') {
if (i == INFINIBAND_ALEN) {
#ifdef DEBUG
fprintf(stderr, _("in_ib(%s): trailing : ignored!\n"),
orig)
#endif
; /* nothing */
}
bufp++;
}
}
/* That's it. Any trailing junk? */
if ((i == INFINIBAND_ALEN) && (*bufp != '\0')) {
#ifdef DEBUG
fprintf(stderr, _("in_ib(%s): trailing junk!\n"), orig);
errno = EINVAL;
return (-1);
#endif
}
#ifdef DEBUG
fprintf(stderr, "in_ib(%s): %s\n", orig, pr_ib(sap->sa_data));
#endif
return (0);
}
struct hwtype ib_hwtype =
{
"infiniband", NULL, ARPHRD_INFINIBAND, INFINIBAND_ALEN,
pr_ib, in_ib, NULL
};
#endif /* HAVE_HWIB */
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#define _PATH_PROCNET_TCP6 "/proc/net/tcp6" #define _PATH_PROCNET_TCP6 "/proc/net/tcp6"
#define _PATH_PROCNET_UDP "/proc/net/udp" #define _PATH_PROCNET_UDP "/proc/net/udp"
#define _PATH_PROCNET_UDP6 "/proc/net/udp6" #define _PATH_PROCNET_UDP6 "/proc/net/udp6"
#define _PATH_PROCNET_UDPLITE "/proc/net/udplite"
#define _PATH_PROCNET_UDPLITE6 "/proc/net/udplite6"
#define _PATH_PROCNET_RAW "/proc/net/raw" #define _PATH_PROCNET_RAW "/proc/net/raw"
#define _PATH_PROCNET_RAW6 "/proc/net/raw6" #define _PATH_PROCNET_RAW6 "/proc/net/raw6"
#define _PATH_PROCNET_UNIX "/proc/net/unix" #define _PATH_PROCNET_UNIX "/proc/net/unix"
......
.TH ARP 8 "2007-12-01" "net-tools" "Linux Programmer's Manual" .TH ARP 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual"
.SH NAME .SH NAME
arp \- manipulate the system ARP cache arp \- manipulate the system ARP cache
.SH SYNOPSIS .SH SYNOPSIS
...@@ -115,7 +115,7 @@ Tell the user what is going on by being verbose. ...@@ -115,7 +115,7 @@ Tell the user what is going on by being verbose.
shows numerical addresses instead of trying to determine symbolic host, port shows numerical addresses instead of trying to determine symbolic host, port
or user names. or user names.
.TP .TP
.B "\-H type, \-\-hw-type type" .B "\-H type, \-\-hw\-type type"
When setting or reading the ARP cache, this optional parameter tells When setting or reading the ARP cache, this optional parameter tells
.B arp .B arp
which class of entries it should check for. The default value of which class of entries it should check for. The default value of
...@@ -196,7 +196,7 @@ flag. Permanent entries are marked with ...@@ -196,7 +196,7 @@ flag. Permanent entries are marked with
and published entries have the and published entries have the
.B P .B P
flag. flag.
.SH EXSAMPLES .SH EXAMPLES
.B /usr/sbin/arp -i eth0 -Ds 10.0.0.2 eth1 pub .B /usr/sbin/arp -i eth0 -Ds 10.0.0.2 eth1 pub
This will answer ARP requests for 10.0.0.2 on eth0 with the MAC address for This will answer ARP requests for 10.0.0.2 on eth0 with the MAC address for
...@@ -217,4 +217,4 @@ published proxy ARP entries and permanent entries. ...@@ -217,4 +217,4 @@ published proxy ARP entries and permanent entries.
.SH SEE ALSO .SH SEE ALSO
rarp(8), route(8), ifconfig(8), netstat(8) rarp(8), route(8), ifconfig(8), netstat(8)
.SH AUTHORS .SH AUTHORS
Fred N. van Kempen <waltje@uwalt.nl.mugnet.org>, Bernd Eckenfels <net-tools@lina.inka.de>. Fred N. van Kempen <waltje@uwalt.nl.mugnet.org>, Bernd Eckenfels <net\-tools@lina.inka.de>.
.TH ETHERS 5 "May 15th, 2005" "" "File formats" .TH ETHERS 5 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual"
.SH NAME \"{{{roff}}}\"{{{ .SH NAME \"{{{roff}}}\"{{{
ethers \- Ethernet address to IP number database ethers \- Ethernet address to IP number database
.\"}}} .\"}}}
...@@ -7,17 +7,17 @@ ethers \- Ethernet address to IP number database ...@@ -7,17 +7,17 @@ ethers \- Ethernet address to IP number database
IP numbers, one line for each IP number: IP numbers, one line for each IP number:
.sp .sp
.RS .RS
\fIEthernet-address\fP \fIIP-number\fP \fIEthernet\-address\fP \fIIP\-number\fP
.RE .RE
.sp .sp
The two items are separated by any number of SPACE and/or TAB characters. The two items are separated by any number of SPACE and/or TAB characters.
A \fB#\fP at the beginning of a line starts a comment A \fB#\fP at the beginning of a line starts a comment
which extends to the end of the line. The \fIEthernet-address\fP is which extends to the end of the line. The \fIEthernet\-address\fP is
written as written as
.IR x : x : x : x : x : x , .IR x : x : x : x : x : x ,
where \fIx\fP is a hexadecimal number between \fB0\fP and \fBff\fP where \fIx\fP is a hexadecimal number between \fB0\fP and \fBff\fP
which represents one byte of the address, which is in network byte which represents one byte of the address, which is in network byte
order (big-endian). The \fIIP-number\fP may be a hostname which order (big-endian). The \fIIP\-number\fP may be a hostname which
can be resolved by DNS or a dot separated number. can be resolved by DNS or a dot separated number.
.\"}}} .\"}}}
.SH EXAMPLES \"{{{ .SH EXAMPLES \"{{{
......
.TH HOSTNAME 1 "28 Jan 1996" "net-tools" "Linux Programmer's Manual" .TH HOSTNAME 1 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual"
.SH NAME .SH NAME
hostname \- show or set the system's host name hostname \- show or set the system's host name
...@@ -23,7 +23,7 @@ nodename \- show or set the system's DECnet node name ...@@ -23,7 +23,7 @@ nodename \- show or set the system's DECnet node name
.RB [ \-f ] .RB [ \-f ]
.RB [ \-\-fqdn ] .RB [ \-\-fqdn ]
.RB [ \-i ] .RB [ \-i ]
.RB [ \-\-ip-address ] .RB [ \-\-ip\-address ]
.RB [ \-\-long ] .RB [ \-\-long ]
.RB [ \-s ] .RB [ \-s ]
.RB [ \-\-short ] .RB [ \-\-short ]
...@@ -181,7 +181,7 @@ part of the FQDN) in the \fI/etc/hosts\fR file. ...@@ -181,7 +181,7 @@ part of the FQDN) in the \fI/etc/hosts\fR file.
.I "\-h, \-\-help" .I "\-h, \-\-help"
Print a usage message and exit. Print a usage message and exit.
.TP .TP
.I "\-i, \-\-ip-address" .I "\-i, \-\-ip\-address"
Display the IP address(es) of the host. Display the IP address(es) of the host.
.TP .TP
.I "\-n, \-\-node" .I "\-n, \-\-node"
...@@ -205,9 +205,9 @@ Display the NIS domain name. If a parameter is given (or ...@@ -205,9 +205,9 @@ Display the NIS domain name. If a parameter is given (or
.SH FILES .SH FILES
.B /etc/hosts .B /etc/hosts
.SH AUTHOR .SH AUTHOR
Peter Tobias, <tobias@et-inf.fho-emden.de> Peter Tobias, <tobias@et\-inf.fho\-emden.de>
.br .br
Bernd Eckenfels, <net-tools@lina.inka.de> (NIS and manpage). Bernd Eckenfels, <net\-tools@lina.inka.de> (NIS and manpage).
.br .br
Steve Whitehouse, <SteveW@ACM.org> (DECnet support and manpage). Steve Whitehouse, <SteveW@ACM.org> (DECnet support and manpage).
.TH IFCONFIG 8 "2007-11-07" "net-tools" "Linux Programmer's Manual" .TH IFCONFIG 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual"
.SH NAME .SH NAME
ifconfig \- configure a network interface ifconfig \- configure a network interface
.SH SYNOPSIS .SH SYNOPSIS
...@@ -18,7 +18,7 @@ a single ...@@ -18,7 +18,7 @@ a single
.B interface .B interface
argument is given, it displays the status of the given interface argument is given, it displays the status of the given interface
only; if a single only; if a single
.B -a .B \-a
argument is given, it displays the status of all interfaces, even argument is given, it displays the status of all interfaces, even
those that are down. Otherwise, it configures an interface. those that are down. Otherwise, it configures an interface.
...@@ -138,13 +138,13 @@ are ...@@ -138,13 +138,13 @@ are
can be used to tell the driver to auto-sense the media. Again, not can be used to tell the driver to auto-sense the media. Again, not
all drivers can do this. all drivers can do this.
.TP .TP
.B "[-]broadcast [addr]" .B "[\-]broadcast [addr]"
If the address argument is given, set the protocol broadcast If the address argument is given, set the protocol broadcast
address for this interface. Otherwise, set (or clear) the address for this interface. Otherwise, set (or clear) the
.B IFF_BROADCAST .B IFF_BROADCAST
flag for the interface. flag for the interface.
.TP .TP
.B "[-]pointopoint [addr]" .B "[\-]pointopoint [addr]"
This keyword enables the This keyword enables the
.B point-to-point .B point-to-point
mode of an interface, meaning that it is a direct link between two mode of an interface, meaning that it is a direct link between two
...@@ -194,7 +194,7 @@ or ...@@ -194,7 +194,7 @@ or
.BR iptables (8) .BR iptables (8)
command. command.
.LP .LP
Since net-tools 1.61 ifconfig is printing byte counters and human readable Since net\-tools 1.60\-4 ifconfig is printing byte counters and human readable
counters with IEC 60027-2 units. So 1 KiB are 2^10 byte. Note, the numbers counters with IEC 60027-2 units. So 1 KiB are 2^10 byte. Note, the numbers
are truncated to one decimal (which can by quite a large error if you are truncated to one decimal (which can by quite a large error if you
consider 0.1 PiB is 112.589.990.684.262 bytes :) consider 0.1 PiB is 112.589.990.684.262 bytes :)
...@@ -202,7 +202,7 @@ consider 0.1 PiB is 112.589.990.684.262 bytes :) ...@@ -202,7 +202,7 @@ consider 0.1 PiB is 112.589.990.684.262 bytes :)
Interrupt problems with Ethernet device drivers fail with EAGAIN Interrupt problems with Ethernet device drivers fail with EAGAIN
.I (SIOCSIIFLAGS: Resource temporarily unavailable) .I (SIOCSIIFLAGS: Resource temporarily unavailable)
it is most likely a interrupt conflict. See it is most likely a interrupt conflict. See
.I http://www.scyld.com/expert/irq-conflict.html .I http://www.scyld.com/expert/irq\-conflict.html
for more information. for more information.
.SH FILES .SH FILES
.I /proc/net/socket .I /proc/net/socket
...@@ -214,7 +214,7 @@ for more information. ...@@ -214,7 +214,7 @@ for more information.
While appletalk DDP and IPX addresses will be displayed they cannot be While appletalk DDP and IPX addresses will be displayed they cannot be
altered by this command. altered by this command.
.SH SEE ALSO .SH SEE ALSO
route(8), netstat(8), arp(8), rarp(8), ipchains(8), iptables(8) route(8), netstat(8), arp(8), rarp(8), ipchains(8), iptables(8), ifup(8), interfaces(5).
.br .br
http://physics.nist.gov/cuu/Units/binary.html - Prefixes for binary multiples http://physics.nist.gov/cuu/Units/binary.html - Prefixes for binary multiples
.SH AUTHORS .SH AUTHORS
...@@ -226,4 +226,4 @@ Phil Blundell, <Philip.Blundell@pobox.com> ...@@ -226,4 +226,4 @@ Phil Blundell, <Philip.Blundell@pobox.com>
.br .br
Andi Kleen Andi Kleen
.br .br
Bernd Eckenfels, <net-tools@lina.inka.de> Bernd Eckenfels, <net\-tools@lina.inka.de>
.\" Copyright (C) 2000 David A. Hinds -- dhinds@pcmcia.sourceforge.org .\" Copyright (C) 2000 David A. Hinds -- dhinds@pcmcia.sourceforge.org
.\" mii-tool.8 1.5 2000/04/25 22:58:19 .\" mii-tool.8 1.5 2000/04/25 22:58:19
.\" .\"
.TH MII-TOOL 8 "2004/03/28 23:30:00" "net-tools" .TH MII\-TOOL 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual"
.SH NAME .SH NAME
mii-tool \- view, manipulate media-independent interface status mii\-tool \- view, manipulate media-independent interface status
.SH SYNOPSIS .SH SYNOPSIS
.B mii-tool .B mii\-tool
[\fB\-v\fR, \fB\-\-verbose\fR] [\fB\-v\fR, \fB\-\-verbose\fR]
[\fB\-V\fR, \fB\-\-version\fR] [\fB\-V\fR, \fB\-\-version\fR]
[\fB\-R\fR, \fB\-\-reset\fR] [\fB\-R\fR, \fB\-\-reset\fR]
...@@ -32,12 +32,12 @@ single-speed hubs, are unable to autonegotiate. To handle such ...@@ -32,12 +32,12 @@ single-speed hubs, are unable to autonegotiate. To handle such
devices, the MII protocol also allows for establishing a link by devices, the MII protocol also allows for establishing a link by
simply detecting either a 10baseT or 100baseT link beat. The \fB\-F\fR simply detecting either a 10baseT or 100baseT link beat. The \fB\-F\fR
or \fB\-\-force\fR options can be used to force the MII to operate in or \fB\-\-force\fR options can be used to force the MII to operate in
one mode, instead of autonegotiating. The \fB\-A\fR and \fB-F\fR one mode, instead of autonegotiating. The \fB\-A\fR and \fB\-F\fR
options are mutually exclusive. options are mutually exclusive.
.PP .PP
The default short output reports the negotiated link speed and link The default short output reports the negotiated link speed and link
status for each interface. If an interface or interfaces are not status for each interface. If an interface or interfaces are not
specified on the command line, then \fBmii-tool\fR will check any specified on the command line, then \fBmii\-tool\fR will check any
available interfaces from \fBeth0\fR through \fBeth7\fR. available interfaces from \fBeth0\fR through \fBeth7\fR.
.SH OPTIONS .SH OPTIONS
.TP .TP
...@@ -59,7 +59,7 @@ Watch interface(s) and report changes in link status. The MII ...@@ -59,7 +59,7 @@ Watch interface(s) and report changes in link status. The MII
interfaces are polled at one second intervals. interfaces are polled at one second intervals.
.TP .TP
\fB\-l\fR, \fB\-\-log\fR \fB\-l\fR, \fB\-\-log\fR
Used with \fB-w\fR, records link status changes in the system log Used with \fB\-w\fR, records link status changes in the system log
instead of printing on standard output. instead of printing on standard output.
.TP .TP
\fB\-F\fI media\fR, \fB\-\-force=\fImedia\fR \fB\-F\fI media\fR, \fB\-\-force=\fImedia\fR
......
.TH NAMEIF 8 "18 Oct 2000" "net-tools" "Linux's Administrator's Manual" .TH NAMEIF 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual"
.SH NAME .SH NAME
nameif \- name network interfaces based on MAC addresses nameif \- name network interfaces based on MAC addresses
.SH SYNOPSIS .SH SYNOPSIS
.B "nameif [-c configfile] [-s]" .B "nameif [\-c configfile] [\-s]"
.br .br
.B "nameif [-c configfile] [-s] {interface macaddress}" .B "nameif [\-c configfile] [\-s] {interface macaddress}"
.SH DESCRIPTION .SH DESCRIPTION
.B nameif .B nameif
renames network interfaces based on mac addresses. When no arguments are renames network interfaces based on mac addresses. When no arguments are
...@@ -18,11 +18,11 @@ looks for the interface with the given MAC address and renames it to the ...@@ -18,11 +18,11 @@ looks for the interface with the given MAC address and renames it to the
name given. name given.
When the When the
.I -s .I \-s
argument is given all error messages go to the syslog. argument is given all error messages go to the syslog.
When the When the
.I -c .I \-c
argument is given with a file name that file is read instead of /etc/mactab. argument is given with a file name that file is read instead of /etc/mactab.
.SH NOTES .SH NOTES
......
...@@ -6,9 +6,10 @@ ...@@ -6,9 +6,10 @@
.\" Modified: Bernd.Eckenfels@inka.de .\" Modified: Bernd.Eckenfels@inka.de
.\" Modified: Andi Kleen ak@muc.de .\" Modified: Andi Kleen ak@muc.de
.\" Modified: Tuan Hoang tqhoang@bigfoot.com .\" Modified: Tuan Hoang tqhoang@bigfoot.com
.\" Modified: Brian Micek bmicek@gmail.com
.\" .\"
.\" .\"
.TH NETSTAT 8 "2007-12-02" "net-tools" "Linux Programmer's Manual" .TH NETSTAT 8 "2008\-12\-02" "net\-tools" "Linux System Administrator's Manual"
.SH NAME .SH NAME
netstat \- Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships netstat \- Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
...@@ -19,17 +20,19 @@ netstat \- Print network connections, routing tables, interface statistics, masq ...@@ -19,17 +20,19 @@ netstat \- Print network connections, routing tables, interface statistics, masq
.RI [ address_family_options ] .RI [ address_family_options ]
.RB [ \-\-tcp | \-t ] .RB [ \-\-tcp | \-t ]
.RB [ \-\-udp | \-u ] .RB [ \-\-udp | \-u ]
.RB [ \-\-udplite | \-U ]
.RB [ \-\-raw | \-w ] .RB [ \-\-raw | \-w ]
.RB [ \-\-listening | \-l ] .RB [ \-\-listening | \-l ]
.RB [ \-\-all | \-a ] .RB [ \-\-all | \-a ]
.RB [ \-\-numeric | \-n ] .RB [ \-\-numeric | \-n ]
.RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] .RB [ \-\-numeric\-hosts "] [" \-\-numeric\-ports "] [" \-\-numeric\-users ]
.RB [ \-\-symbolic | \-N ] .RB [ \-\-symbolic | \-N ]
.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-extend | \-e [ \-\-extend | \-e] ]
.RB [ \-\-timers | \-o ] .RB [ \-\-timers | \-o ]
.RB [ \-\-program | \-p ] .RB [ \-\-program | \-p ]
.RB [ \-\-verbose | \-v ] .RB [ \-\-verbose | \-v ]
.RB [ \-\-continuous | \-c] .RB [ \-\-continuous | \-c]
.RB [ \-\-wide | \-W]
.P .P
.B netstat .B netstat
.RB { \-\-route | \-r } .RB { \-\-route | \-r }
...@@ -37,7 +40,7 @@ netstat \- Print network connections, routing tables, interface statistics, masq ...@@ -37,7 +40,7 @@ netstat \- Print network connections, routing tables, interface statistics, masq
.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-extend | \-e [ \-\-extend | \-e] ]
.RB [ \-\-verbose | \-v ] .RB [ \-\-verbose | \-v ]
.RB [ \-\-numeric | \-n ] .RB [ \-\-numeric | \-n ]
.RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] .RB [ \-\-numeric\-hosts "] [" \-\-numeric\-ports "] [" \-\-numeric\-users ]
.RB [ \-\-continuous | \-c] .RB [ \-\-continuous | \-c]
.P .P
.B netstat .B netstat
...@@ -53,20 +56,21 @@ netstat \- Print network connections, routing tables, interface statistics, masq ...@@ -53,20 +56,21 @@ netstat \- Print network connections, routing tables, interface statistics, masq
.B netstat .B netstat
.RB { \-\-groups | \-g } .RB { \-\-groups | \-g }
.RB [ \-\-numeric | \-n ] .RB [ \-\-numeric | \-n ]
.RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] .RB [ \-\-numeric\-hosts "] [" \-\-numeric\-ports "] [" \-\-numeric\-users ]
.RB [ \-\-continuous | \-c] .RB [ \-\-continuous | \-c]
.P .P
.B netstat .B netstat
.RB { \-\-masquerade | \-M } .RB { \-\-masquerade | \-M }
.RB [ \-\-extend | \-e ] .RB [ \-\-extend | \-e ]
.RB [ \-\-numeric | \-n ] .RB [ \-\-numeric | \-n ]
.RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] .RB [ \-\-numeric\-hosts "] [" \-\-numeric\-ports "] [" \-\-numeric\-users ]
.RB [ \-\-continuous | \-c] .RB [ \-\-continuous | \-c]
.P .P
.B netstat .B netstat
.RB { \-\-statistics | -s } .RB { \-\-statistics | -s }
.RB [ \-\-tcp | \-t ] .RB [ \-\-tcp | \-t ]
.RB [ \-\-udp | \-u ] .RB [ \-\-udp | \-u ]
.RB [ \-\-udplite | \-U ]
.RB [ \-\-raw | \-w ] .RB [ \-\-raw | \-w ]
.P .P
.B netstat .B netstat
...@@ -118,16 +122,19 @@ Display summary statistics for each protocol. ...@@ -118,16 +122,19 @@ Display summary statistics for each protocol.
.SS "\-\-verbose , \-v" .SS "\-\-verbose , \-v"
Tell the user what is going on by being verbose. Especially print some Tell the user what is going on by being verbose. Especially print some
useful information about unconfigured address families. useful information about unconfigured address families.
.SS "\-\-wide , \-W"
Do not truncate IP addresses by using output as wide as needed. This is
optional for now to not break existing scripts.
.SS "\-\-numeric , \-n" .SS "\-\-numeric , \-n"
Show numerical addresses instead of trying to determine symbolic host, port Show numerical addresses instead of trying to determine symbolic host, port
or user names. or user names.
.SS "\-\-numeric-hosts" .SS "\-\-numeric\-hosts"
shows numerical host addresses but does not affect the resolution of shows numerical host addresses but does not affect the resolution of
port or user names. port or user names.
.SS "\-\-numeric-ports" .SS "\-\-numeric\-ports"
shows numerical port numbers but does not affect the resolution of shows numerical port numbers but does not affect the resolution of
host or user names. host or user names.
.SS "\-\-numeric-users" .SS "\-\-numeric\-users"
shows numerical user IDs but does not affect the resolution of host or shows numerical user IDs but does not affect the resolution of host or
port names. port names.
...@@ -155,7 +162,7 @@ options. ...@@ -155,7 +162,7 @@ options.
.P .P
The address family The address family
.B inet .B inet
includes raw, udp and tcp protocol sockets. includes raw, udp, udplite and tcp protocol sockets.
.SS "\-c, \-\-continuous" .SS "\-c, \-\-continuous"
This will cause This will cause
.B netstat .B netstat
...@@ -170,7 +177,7 @@ Show the PID and name of the program to which each socket belongs. ...@@ -170,7 +177,7 @@ Show the PID and name of the program to which each socket belongs.
Show only listening sockets. (These are omitted by default.) Show only listening sockets. (These are omitted by default.)
.SS "\-a, \-\-all" .SS "\-a, \-\-all"
Show both listening and non-listening sockets. With the Show both listening and non-listening sockets. With the
.B --interfaces .B \-\-interfaces
option, show interfaces that are not up option, show interfaces that are not up
.SS "\-F" .SS "\-F"
Print routing information from the FIB. (This is the default.) Print routing information from the FIB. (This is the default.)
...@@ -179,13 +186,15 @@ Print routing information from the route cache. ...@@ -179,13 +186,15 @@ Print routing information from the route cache.
.P .P
.SH OUTPUT .SH OUTPUT
.P .P
.SS Active Internet connections \fR(TCP, UDP, raw)\fR .SS Active Internet connections \fR(TCP, UDP, UDPLite, raw)\fR
.SS "Proto" .SS "Proto"
The protocol (tcp, udp, raw) used by the socket. The protocol (tcp, udp, udpl, raw) used by the socket.
.SS "Recv-Q" .SS "Recv\-Q"
The count of bytes not copied by the user program connected to this socket. Established: The count of bytes not copied by the user program connected to this socket.
.SS "Send-Q" Listening: Since Kernel 2.6.18 this column contains the current syn backlog.
The count of bytes not acknowledged by the remote host. .SS "Send\-Q"
Established: The count of bytes not acknowledged by the remote host.
Listening: Since Kernel 2.6.18 this column contains the maximum size of the syn backlog.
.SS "Local Address" .SS "Local Address"
Address and port number of the local end of the socket. Unless the Address and port number of the local end of the socket. Unless the
.BR \-\-numeric " (" \-n ) .BR \-\-numeric " (" \-n )
...@@ -197,7 +206,7 @@ Address and port number of the remote end of the socket. ...@@ -197,7 +206,7 @@ Address and port number of the remote end of the socket.
Analogous to "Local Address." Analogous to "Local Address."
.SS "State" .SS "State"
The state of the socket. Since there are no states in raw mode and usually no The state of the socket. Since there are no states in raw mode and usually no