summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-02-13 17:30:37 +0000
committerwollman <wollman@FreeBSD.org>1996-02-13 17:30:37 +0000
commit379b9b388fc8788659993af038bb322bfbcea8b2 (patch)
tree0853393f80e81ab72567bd7838b4c2b218a67558 /sbin/ifconfig
parent45f8e7f5c1b5de36c0bce4e71f98e7bb5fa9236f (diff)
downloadFreeBSD-src-379b9b388fc8788659993af038bb322bfbcea8b2.zip
FreeBSD-src-379b9b388fc8788659993af038bb322bfbcea8b2.tar.gz
XNS sort-of-support is no more.
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.861
-rw-r--r--sbin/ifconfig/ifconfig.c14
2 files changed, 46 insertions, 29 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index e2e4ce2..2bdaa23 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -30,9 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
-.\" $Id$
+.\" $Id: ifconfig.8,v 1.6 1996/02/06 20:35:51 wollman Exp $
.\"
-.Dd February 6, 1996
+.Dd February 13, 1996
.Dt IFCONFIG 8
.Os BSD 4.2
.Sh NAME
@@ -80,20 +80,20 @@ or a
.Tn DARPA
Internet address expressed in the Internet standard
.Dq dot notation .
-For the Xerox Network Systems(tm) family,
-addresses are
-.Ar net:a.b.c.d.e.f ,
-where
-.Ar net
-is the assigned network number (in decimal),
-and each of the six bytes of the host number,
-.Ar a
-through
-.Ar f ,
-are specified in hexadecimal.
-The host number may be omitted on 10Mb/s Ethernet interfaces,
-which use the hardware physical address,
-and on interfaces other than the first.
+.\" For the Xerox Network Systems(tm) family,
+.\" addresses are
+.\" .Ar net:a.b.c.d.e.f ,
+.\" where
+.\" .Ar net
+.\" is the assigned network number (in decimal),
+.\" and each of the six bytes of the host number,
+.\" .Ar a
+.\" through
+.\" .Ar f ,
+.\" are specified in hexadecimal.
+.\" The host number may be omitted on 10Mb/s Ethernet interfaces,
+.\" which use the hardware physical address,
+.\" and on interfaces other than the first.
.\" For the
.\" .Tn ISO
.\" family, addresses are specified as a long hexadecimal string,
@@ -108,11 +108,12 @@ Since an interface can receive transmissions in differing protocols
with different naming schemes, specifying the address family is recommended.
The address or protocol families currently
supported are
-.Dq inet ,
+.Dq inet
.\" .Dq iso ,
-.Dq ipx ,
and
-.Dq ns .
+.Dq ipx .
+.\" and
+.\" .Dq ns .
.It Ar Interface
The
.Ar interface
@@ -164,15 +165,15 @@ marked ``down'', the system will not attempt to
transmit messages through that interface.
If possible, the interface will be reset to disable reception as well.
This action does not automatically disable routes using the interface.
-.It Cm ipdst
-This is used to specify an Internet host who is willing to receive
-ip packets encapsulating NS packets bound for a remote network.
-An apparent point to point link is constructed, and
-the address specified will be taken as the NS address and network
-of the destination.
-IP encapsulation of
-.Tn CLNP
-packets is done differently.
+.\" .It Cm ipdst
+.\" This is used to specify an Internet host who is willing to receive
+.\" ip packets encapsulating NS packets bound for a remote network.
+.\" An apparent point to point link is constructed, and
+.\" the address specified will be taken as the NS address and network
+.\" of the destination.
+.\" IP encapsulation of
+.\" .Tn CLNP
+.\" packets is done differently.
.It Cm metric Ar n
Set the routing metric of the interface to
.Ar n ,
@@ -250,8 +251,10 @@ the hardware will be re-initialized.
.El
.Pp
.Pp
-.Nm Ifconfig
+The
+.Nm ifconfig
.Fl a
+command
displays information on all interfaces. When followed by a configuration
parameter, it will also set the configuration on all interfaces.
.Pp
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 480a803..c578c6a 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -68,9 +68,11 @@ static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#include <netipx/ipx.h>
#include <netipx/ipx_if.h>
+#ifdef NS
#define NSIP
#include <netns/ns.h>
#include <netns/ns_if.h>
+#endif
#ifdef ISO
#define EON
@@ -102,7 +104,9 @@ char name[32];
int flags;
int metric;
int mtu;
+#ifdef ISO
int nsellength = 1;
+#endif
int setaddr;
int setipdst;
int doalias;
@@ -171,7 +175,9 @@ struct cmd {
*/
int in_status(), in_getaddr();
int ipx_status(), ipx_getaddr();
+#ifdef NS
int xns_status(), xns_getaddr();
+#endif
#ifdef ISO
int iso_status(), iso_getaddr();
#endif
@@ -193,8 +199,10 @@ struct afswtch {
SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(addreq) },
{ "ipx", AF_IPX, ipx_status, ipx_getaddr,
SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(addreq) },
+#ifdef NS
{ "ns", AF_NS, xns_status, xns_getaddr,
SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(addreq) },
+#endif
#ifdef ISO
{ "iso", AF_ISO, iso_status, iso_getaddr,
SIOCDIFADDR_ISO, SIOCAIFADDR_ISO, C(iso_ridreq), C(iso_addreq) },
@@ -436,6 +444,7 @@ ifconfig(argc,argv,af,rafp)
if (setsockopt(s, 0, SO_IPXIP_ROUTE, &rq, size) < 0)
Perror("Encapsulation Routing");
}
+#ifdef NS
if (setipdst && af==AF_NS) {
struct nsip_req rq;
int size = sizeof(rq);
@@ -446,6 +455,7 @@ ifconfig(argc,argv,af,rafp)
if (setsockopt(s, 0, SO_NSIP_ROUTE, &rq, size) < 0)
Perror("Encapsulation Routing");
}
+#endif
if (clearaddr) {
if (rafp->af_ridreq == NULL || rafp->af_difaddr == 0) {
warnx("interface %s cannot change %s addresses!",
@@ -748,6 +758,7 @@ ipx_status(force)
}
+#ifdef NS
xns_status(force)
int force;
{
@@ -781,6 +792,7 @@ xns_status(force)
putchar('\n');
}
+#endif
#ifdef ISO
iso_status(force)
@@ -941,6 +953,7 @@ char *addr;
printf("Attempt to set IPX netmask will be ineffectual\n");
}
+#ifdef NS
#define SNS(x) ((struct sockaddr_ns *) &(x))
struct sockaddr_ns *snstab[] = {
SNS(ridreq.ifr_addr), SNS(addreq.ifra_addr),
@@ -958,6 +971,7 @@ char *addr;
if (which == MASK)
printf("Attempt to set XNS netmask will be ineffectual\n");
}
+#endif
#ifdef ISO
#define SISO(x) ((struct sockaddr_iso *) &(x))
OpenPOWER on IntegriCloud