summaryrefslogtreecommitdiff
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-06-08 19:03:56 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-06-08 19:03:56 +0000
commitae20fc2ce3fc8721a0c9ec91e3ee79bd6a4deea2 (patch)
treeef9cee223a9b4e7678ac4449ea456b0f6f46703b /sbin/ifconfig
parentc2e8ae47be14c527770caf78bd3646b40245bcf3 (diff)
netns crap i missed earlier... damn unreliable tools
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.812
-rw-r--r--sbin/ifconfig/ifconfig.c82
2 files changed, 6 insertions, 88 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index aee521c0693..c7e9f7de23b 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ifconfig.8,v 1.107 2005/06/07 23:12:17 henning Exp $
+.\" $OpenBSD: ifconfig.8,v 1.108 2005/06/08 19:03:55 henning Exp $
.\" $NetBSD: ifconfig.8,v 1.11 1996/01/04 21:27:29 pk Exp $
.\" $FreeBSD: ifconfig.8,v 1.16 1998/02/01 07:03:29 steve Exp $
.\"
@@ -228,9 +228,8 @@ supported are
.Dq inet ,
.Dq inet6 ,
.Dq atalk ,
-.Dq ipx ,
and
-.Dq ns .
+.Dq ipx .
.It Ar interface
The
.Ar interface
@@ -361,9 +360,6 @@ Disable driver-dependent debugging code.
Remove the network address specified.
This would be used if you incorrectly specified an alias, or it
was no longer needed.
-If you have incorrectly set an NS address having the side effect
-of specifying the host portion, removing all NS addresses will
-allow you to respecify the host portion.
.It Cm deletetunnel
Removes the source and destination tunnel addresses,
configured onto a tunnel interface.
@@ -416,9 +412,9 @@ by the network interface driver as the driver may take care of this
automatically; see the driver's manual page for more information.
.It Cm ipdst Ar addr
This is used to specify an Internet host which is willing to receive
-IP packets encapsulating NS packets bound for a remote network.
+IP packets encapsulating IPX or AppleTalk 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
+the address specified will be taken as the address and network
of the destination.
IP encapsulation of Connectionless Network Protocol
(``CLNP'')
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 425f0886e54..e0bdd84e8ec 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.143 2005/05/31 20:54:38 jmc Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.144 2005/06/08 19:03:55 henning Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -93,10 +93,6 @@
#include <netinet/ip_carp.h>
-#define NSIP
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-
#define IPXIP
#include <netipx/ipx.h>
#include <netipx/ipx_if.h>
@@ -379,10 +375,7 @@ void process_media_commands(void);
void init_current_media(void);
unsigned long get_ts_map(int, int, int);
-/*
- * XNS support liberally adapted from code written at the University of
- * Maryland principally by James O'Toole and Chris Torek.
- */
+
void in_status(int);
void in_getaddr(const char *, int);
void in_getprefix(const char *, int);
@@ -395,8 +388,6 @@ void in6_getprefix(const char *, int);
#endif /* INET6 */
void at_status(int);
void at_getaddr(const char *, int);
-void xns_status(int);
-void xns_getaddr(const char *, int);
void ipx_status(int);
void ipx_getaddr(const char *, int);
void ieee80211_status(void);
@@ -425,8 +416,6 @@ const struct afswtch {
#ifndef SMALL
{ "atalk", AF_APPLETALK, at_status, at_getaddr, NULL,
SIOCDIFADDR, SIOCAIFADDR, C(addreq), C(addreq) },
- { "ns", AF_NS, xns_status, xns_getaddr, NULL,
- SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(addreq) },
{ "ipx", AF_IPX, ipx_status, ipx_getaddr, NULL,
SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(addreq) },
#endif
@@ -586,18 +575,6 @@ main(int argc, char *argv[])
#ifndef SMALL
switch (af) {
- case AF_NS:
- if (setipdst) {
- struct nsip_req rq;
- int size = sizeof(rq);
-
- rq.rq_ns = addreq.ifra_addr;
- rq.rq_ip = addreq.ifra_dstaddr;
-
- if (setsockopt(s, 0, SO_NSIP_ROUTE, &rq, size) < 0)
- warn("encapsulation routing");
- }
- break;
case AF_IPX:
if (setipdst) {
struct ipxip_req rq;
@@ -2540,44 +2517,6 @@ at_status(int force)
putchar('\n');
}
-void
-xns_status(int force)
-{
- struct sockaddr_ns *sns;
-
- getsock(AF_NS);
- if (s < 0) {
- if (errno == EPROTONOSUPPORT)
- return;
- err(1, "socket");
- }
- memset(&ifr, 0, sizeof(ifr));
- (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
- if (ioctl(s, SIOCGIFADDR, (caddr_t)&ifr) < 0) {
- if (errno == EADDRNOTAVAIL || errno == EAFNOSUPPORT) {
- if (!force)
- return;
- memset(&ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));
- } else
- warn("SIOCGIFADDR");
- }
- (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
- sns = (struct sockaddr_ns *)&ifr.ifr_addr;
- printf("\tns %s ", ns_ntoa(sns->sns_addr));
- if (flags & IFF_POINTOPOINT) { /* by W. Nesheim@Cornell */
- if (ioctl(s, SIOCGIFDSTADDR, (caddr_t)&ifr) < 0) {
- if (errno == EADDRNOTAVAIL)
- memset(&ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));
- else
- warn("SIOCGIFDSTADDR");
- }
- (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
- sns = (struct sockaddr_ns *)&ifr.ifr_dstaddr;
- printf("--> %s ", ns_ntoa(sns->sns_addr));
- }
- putchar('\n');
-}
-
/* ARGSUSED */
void
setipxframetype(const char *vname, int type)
@@ -2712,23 +2651,6 @@ checkatrange(struct sockaddr_at *sat)
*((struct netrange *) &sat->sat_zero) = at_nr;
}
-#define SNS(x) ((struct sockaddr_ns *) &(x))
-struct sockaddr_ns *snstab[] = {
-SNS(ridreq.ifr_addr), SNS(addreq.ifra_addr),
-SNS(addreq.ifra_mask), SNS(addreq.ifra_broadaddr)};
-
-void
-xns_getaddr(const char *addr, int which)
-{
- struct sockaddr_ns *sns = snstab[which];
-
- sns->sns_family = AF_NS;
- sns->sns_len = sizeof(*sns);
- sns->sns_addr = ns_addr(addr);
- if (which == MASK)
- printf("Attempt to set XNS netmask will be ineffectual\n");
-}
-
#define SIPX(x) ((struct sockaddr_ipx *) &(x))
struct sockaddr_ipx *sipxtab[] = {
SIPX(ridreq.ifr_addr), SIPX(addreq.ifra_addr),