summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2007-06-04 12:23:45 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2007-06-04 12:23:45 +0000
commit814068458c7d8de0edbdddf63a7d99799c292fab (patch)
tree62b1b89e6ba65708ae03453eb8d5469bd10b1ad0
parentdcce4f9ac9ec6cdd0dc3c914fe7dd39b1e659ade (diff)
remove IPX, agreed by many
libc and kernel side awaiting a libc major bump to piggyback to
-rw-r--r--sbin/route/keywords.h4
-rw-r--r--sbin/route/keywords.sh3
-rw-r--r--sbin/route/route.86
-rw-r--r--sbin/route/route.c31
-rw-r--r--sbin/route/show.c64
5 files changed, 6 insertions, 102 deletions
diff --git a/sbin/route/keywords.h b/sbin/route/keywords.h
index 2455cce86bc..012bacad320 100644
--- a/sbin/route/keywords.h
+++ b/sbin/route/keywords.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: keywords.h,v 1.19 2006/03/30 12:11:37 claudio Exp $ */
+/* $OpenBSD: keywords.h,v 1.20 2007/06/04 12:23:43 henning Exp $ */
/* WARNING! This file was generated by keywords.sh */
@@ -29,7 +29,6 @@ enum {
K_IFP,
K_INET,
K_INET6,
- K_IPX,
K_JUMBO,
K_LABEL,
K_LINK,
@@ -79,7 +78,6 @@ struct keytab keywords[] = {
{ "ifp", K_IFP },
{ "inet", K_INET },
{ "inet6", K_INET6 },
- { "ipx", K_IPX },
{ "jumbo", K_JUMBO },
{ "label", K_LABEL },
{ "link", K_LINK },
diff --git a/sbin/route/keywords.sh b/sbin/route/keywords.sh
index d28951e0d4b..7ed093a9501 100644
--- a/sbin/route/keywords.sh
+++ b/sbin/route/keywords.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: keywords.sh,v 1.18 2006/03/30 12:11:37 claudio Exp $
+# $OpenBSD: keywords.sh,v 1.19 2007/06/04 12:23:43 henning Exp $
# $NetBSD: keywords.sh,v 1.2 1996/11/15 18:57:21 gwr Exp $
# @(#)keywords 8.2 (Berkeley) 3/19/94
#
@@ -29,7 +29,6 @@ ifa
ifp
inet
inet6
-ipx
jumbo
label
link
diff --git a/sbin/route/route.8 b/sbin/route/route.8
index d3acb131b49..ae5090899e8 100644
--- a/sbin/route/route.8
+++ b/sbin/route/route.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: route.8,v 1.54 2007/05/31 19:19:47 jmc Exp $
+.\" $OpenBSD: route.8,v 1.55 2007/06/04 12:23:43 henning Exp $
.\" $NetBSD: route.8,v 1.6 1995/03/18 15:00:13 cgd Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)route.8 8.3 (Berkeley) 3/19/94
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: June 4 2007 $
.Dt ROUTE 8
.Os
.Sh NAME
@@ -274,8 +274,6 @@ Internet Protocol version 6 (IPv6) addresses
IPsec
(see
.Xr ipsec 4 )
-.It Fl ipx
-Novell's Internet Packet Exchange (IPX) addresses
.It Fl link
Hardware (link-level) addresses
.It Fl sa
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 616e7711413..2cfdbb05bbb 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.109 2007/05/30 01:08:41 mcbride Exp $ */
+/* $OpenBSD: route.c,v 1.110 2007/06/04 12:23:43 henning Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -41,7 +41,6 @@
#include <net/if_types.h>
#include <net/route.h>
#include <netinet/in.h>
-#include <netipx/ipx.h>
#include <arpa/inet.h>
#include <netdb.h>
@@ -68,7 +67,6 @@ union sockunion {
struct sockaddr sa;
struct sockaddr_in sin;
struct sockaddr_in6 sin6;
- struct sockaddr_ipx sipx;
struct sockaddr_dl sdl;
struct sockaddr_rtlabel rtlabel;
} so_dst, so_gate, so_mask, so_genmask, so_ifa, so_ifp, so_label;
@@ -226,9 +224,6 @@ flushroutes(int argc, char **argv)
case K_INET6:
af = AF_INET6;
break;
- case K_IPX:
- af = AF_IPX;
- break;
case K_LINK:
af = AF_LINK;
break;
@@ -370,10 +365,6 @@ newroute(int argc, char **argv)
af = PF_ROUTE;
aflen = sizeof(union sockunion);
break;
- case K_IPX:
- af = AF_IPX;
- aflen = sizeof(struct sockaddr_ipx);
- break;
case K_IFACE:
case K_INTERFACE:
iflag++;
@@ -588,9 +579,6 @@ show(int argc, char *argv[])
case K_INET6:
af = AF_INET6;
break;
- case K_IPX:
- af = AF_IPX;
- break;
case K_LINK:
af = AF_LINK;
break;
@@ -778,19 +766,6 @@ getaddr(int which, char *s, struct hostent **hpp)
return (1);
}
- case AF_IPX:
- if (which == RTA_DST) {
- extern short ipx_bh[3];
- struct sockaddr_ipx *sms = &(so_mask.sipx);
- memset(sms, 0, sizeof(*sms));
- sms->sipx_family = 0;
- sms->sipx_len = 6;
- sms->sipx_addr.ipx_net = *(union ipx_net *)ipx_bh;
- rtm_addrs |= RTA_NETMASK;
- }
- su->sipx.sipx_addr = ipx_addr(s);
- return (!ipx_nullhost(su->sipx.sipx_addr));
-
case AF_LINK:
link_addr(s, &su->sdl);
return (1);
@@ -1033,7 +1008,6 @@ mask_addr(union sockunion *addr, union sockunion *mask, int which)
if ((rtm_addrs & which) == 0)
return;
switch (addr->sa.sa_family) {
- case AF_IPX:
case AF_INET:
case AF_INET6:
case 0:
@@ -1390,9 +1364,6 @@ sodump(sup su, char *which)
ntop_buf, sizeof(ntop_buf)));
break;
}
- case AF_IPX:
- printf("%s: ipx %s; ", which, ipx_ntoa(su->sipx.sipx_addr));
- break;
}
fflush(stdout);
}
diff --git a/sbin/route/show.c b/sbin/route/show.c
index 25cb2edf034..9b78ce764a7 100644
--- a/sbin/route/show.c
+++ b/sbin/route/show.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: show.c,v 1.57 2007/03/23 16:02:26 pyr Exp $ */
+/* $OpenBSD: show.c,v 1.58 2007/06/04 12:23:44 henning Exp $ */
/* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */
/*
@@ -42,7 +42,6 @@
#include <net/pfkeyv2.h>
#include <net/route.h>
#include <netinet/in.h>
-#include <netipx/ipx.h>
#include <netinet/if_ether.h>
#include <netinet/ip_ipsp.h>
#include <arpa/inet.h>
@@ -59,7 +58,6 @@
#include "show.h"
char *any_ntoa(const struct sockaddr *);
-char *ipx_print(struct sockaddr *);
char *link_print(struct sockaddr *);
extern int nflag;
@@ -343,9 +341,6 @@ pr_family(int af)
case AF_INET6:
afname = "Internet6";
break;
- case AF_IPX:
- afname = "IPX";
- break;
case PF_KEY:
afname = "Encap";
break;
@@ -562,9 +557,6 @@ routename(struct sockaddr *sa)
return (routename6(&sin6));
}
- case AF_IPX:
- return (ipx_print(sa));
-
case AF_LINK:
return (link_print(sa));
@@ -775,9 +767,6 @@ netname(struct sockaddr *sa, struct sockaddr *mask)
return netname6((struct sockaddr_in6 *)sa,
(struct sockaddr_in6 *)mask);
- case AF_IPX:
- return (ipx_print(sa));
-
case AF_LINK:
return (link_print(sa));
@@ -809,57 +798,6 @@ any_ntoa(const struct sockaddr *sa)
return (obuf);
}
-short ipx_nullh[] = {0,0,0};
-short ipx_bh[] = {-1,-1,-1};
-
-char *
-ipx_print(struct sockaddr *sa)
-{
- struct sockaddr_ipx *sipx = (struct sockaddr_ipx *)sa;
- struct ipx_addr work;
- union {
- union ipx_net net_e;
- u_int32_t long_e;
- } net;
- u_short port;
- static char mybuf[50+MAXHOSTNAMELEN], cport[10], chost[25];
- char *host = "";
- char *p;
- u_char *q;
-
- work = sipx->sipx_addr;
- port = ntohs(work.ipx_port);
- work.ipx_port = 0;
- net.net_e = work.ipx_net;
- if (ipx_nullhost(work) && net.long_e == 0) {
- if (!port)
- return ("*.*");
- snprintf(mybuf, sizeof(mybuf), "*.0x%XH", port);
- return (mybuf);
- }
-
- if (memcmp(ipx_bh, work.ipx_host.c_host, 6) == 0)
- host = "any";
- else if (memcmp(ipx_nullh, work.ipx_host.c_host, 6) == 0)
- host = "*";
- else {
- q = work.ipx_host.c_host;
- snprintf(chost, sizeof(chost), "%02X%02X%02X%02X%02X%02XH",
- q[0], q[1], q[2], q[3], q[4], q[5]);
- for (p = chost; *p == '0' && p < chost + 12; p++)
- /* void */;
- host = p;
- }
- if (port)
- snprintf(cport, sizeof(cport), ".%XH", htons(port));
- else
- *cport = '\0';
-
- snprintf(mybuf, sizeof(mybuf), "%XH.%s%s",
- ntohl(net.long_e), host, cport);
- return (mybuf);
-}
-
char *
link_print(struct sockaddr *sa)
{