diff options
author | wollman <wollman@FreeBSD.org> | 1996-02-13 17:30:37 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1996-02-13 17:30:37 +0000 |
commit | 379b9b388fc8788659993af038bb322bfbcea8b2 (patch) | |
tree | 0853393f80e81ab72567bd7838b4c2b218a67558 /sbin | |
parent | 45f8e7f5c1b5de36c0bce4e71f98e7bb5fa9236f (diff) | |
download | FreeBSD-src-379b9b388fc8788659993af038bb322bfbcea8b2.zip FreeBSD-src-379b9b388fc8788659993af038bb322bfbcea8b2.tar.gz |
XNS sort-of-support is no more.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifconfig.8 | 61 | ||||
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 14 | ||||
-rw-r--r-- | sbin/route/route.c | 28 |
3 files changed, 73 insertions, 30 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)) diff --git a/sbin/route/route.c b/sbin/route/route.c index 536cd8b..5b285f9 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -43,7 +43,7 @@ static const char copyright[] = static char sccsid[] = "@(#)route.c 8.3 (Berkeley) 3/19/94"; */ static const char rcsid[] = - "$Id: route.c,v 1.4 1996/01/20 12:56:57 mpp Exp $"; + "$Id: route.c,v 1.5 1996/02/06 20:36:10 wollman Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -57,7 +57,9 @@ static const char rcsid[] = #include <net/route.h> #include <net/if_dl.h> #include <netinet/in.h> +#ifdef NS #include <netns/ns.h> +#endif #ifdef ISO #include <netiso/iso.h> #endif @@ -89,7 +91,9 @@ struct ortentry route; union sockunion { struct sockaddr sa; struct sockaddr_in sin; +#ifdef NS struct sockaddr_ns sns; +#endif #ifdef ISO struct sockaddr_iso siso; #endif @@ -229,9 +233,11 @@ flushroutes(argc, argv) case K_INET: af = AF_INET; break; +#ifdef NS case K_XNS: af = AF_NS; break; +#endif case K_LINK: af = AF_LINK; break; @@ -313,7 +319,9 @@ routename(sa) struct hostent *hp; static char domain[MAXHOSTNAMELEN + 1]; static int first = 1; +#ifdef NS char *ns_print(); +#endif if (first) { first = 0; @@ -357,8 +365,10 @@ routename(sa) break; } +#ifdef NS case AF_NS: return (ns_print((struct sockaddr_ns *)sa)); +#endif case AF_LINK: return (link_ntoa((struct sockaddr_dl *)sa)); @@ -396,7 +406,9 @@ netname(sa) u_long net, mask; register u_long i; int subnetshift; +#ifdef NS char *ns_print(); +#endif switch (sa->sa_family) { @@ -450,9 +462,11 @@ netname(sa) break; } +#ifdef NS case AF_NS: return (ns_print((struct sockaddr_ns *)sa)); break; +#endif case AF_LINK: return (link_ntoa((struct sockaddr_dl *)sa)); @@ -548,10 +562,12 @@ newroute(argc, argv) af = PF_ROUTE; aflen = sizeof(union sockunion); break; +#ifdef NS case K_XNS: af = AF_NS; aflen = sizeof(struct sockaddr_ns); break; +#endif case K_IFACE: case K_INTERFACE: iflag++; @@ -768,7 +784,9 @@ getaddr(which, s, hpp) struct hostent **hpp; { register sup su; +#ifdef NS struct ns_addr ns_addr(); +#endif #ifdef ISO struct iso_addr *iso_addr(); #endif @@ -822,6 +840,7 @@ getaddr(which, s, hpp) return (0); } switch (af) { +#ifdef NS case AF_NS: if (which == RTA_DST) { extern short ns_bh[3]; @@ -834,6 +853,7 @@ getaddr(which, s, hpp) } su->sns.sns_addr = ns_addr(s); return (!ns_nullhost(su->sns.sns_addr)); +#endif #ifdef ISO case AF_OSI: @@ -914,6 +934,7 @@ x25_makemask() } #endif +#ifdef NS short ns_nullh[] = {0,0,0}; short ns_bh[] = {-1,-1,-1}; @@ -961,6 +982,7 @@ ns_print(sns) host, cport); return (mybuf); } +#endif void interfaces() @@ -1095,7 +1117,9 @@ mask_addr() if ((rtm_addrs & RTA_DST) == 0) return; switch (so_dst.sa.sa_family) { +#ifdef NS case AF_NS: +#endif case AF_INET: #ifdef CCITT case AF_CCITT: @@ -1381,10 +1405,12 @@ sodump(su, which) (void) printf("%s: inet %s; ", which, inet_ntoa(su->sin.sin_addr)); break; +#ifdef NS case AF_NS: (void) printf("%s: xns %s; ", which, ns_ntoa(su->sns.sns_addr)); break; +#endif } (void) fflush(stdout); } |