diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2011-07-09 00:45:41 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2011-07-09 00:45:41 +0000 |
commit | 5c3064772c2b01d274fcc287cca19c3be8a440a1 (patch) | |
tree | d0e3b78bdc1970c46e4ec18f069bd0107c7a3be2 /sbin | |
parent | b00ea6a7c4e24838c1ed7edd326dda78630ef0fd (diff) |
rmove rotten netatalk bits
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifconfig.8 | 41 | ||||
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 136 | ||||
-rw-r--r-- | sbin/route/show.c | 5 |
3 files changed, 5 insertions, 177 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 3105a4701a2..97cedf5f1bd 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ifconfig.8,v 1.217 2011/06/27 12:55:21 camield Exp $ +.\" $OpenBSD: ifconfig.8,v 1.218 2011/07/09 00:45:40 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 $ .\" @@ -31,7 +31,7 @@ .\" .\" @(#)ifconfig.8 8.4 (Berkeley) 6/1/94 .\" -.Dd $Mdocdate: June 27 2011 $ +.Dd $Mdocdate: July 9 2011 $ .Dt IFCONFIG 8 .Os .Sh NAME @@ -113,9 +113,8 @@ with different naming schemes, specifying the address family is recommended. The address or protocol families currently supported are .Dq inet , -.Dq inet6 , and -.Dq atalk . +.Dq inet6 . .It Ar address Internet version 4 and 6 addresses take the form of @@ -125,16 +124,6 @@ a host name present in the host name database, notation (IPv4); colon separated (IPv6); or CIDR notation. -.Pp -AppleTalk (LLAP) addresses are specified as -.Dq nn.na -.Pq Dq Network Number.Node Address . -Node addresses are divided into two classes: User Node IDs and Server Node IDs. -1\(en127($01\(en$7F) are for User Node IDs while 128\(en254($80\(en$FE) -are used for Server Node IDs. -Node 0($00) is not allowed (unknown) -while Node 255($FF) is reserved for the AppleTalk broadcast hardware -address (broadcast ID). .It Ar dest_address Specify the address of the correspondent on the other end of a point-to-point link. @@ -271,15 +260,6 @@ This is useful for devices which have multiple physical layer interfaces Setting the instance on such devices may not be strictly required 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 AppleTalk packets bound for a remote network. -An apparent point-to-point link is constructed, and -the address specified will be taken as the address and network -of the destination. -IP encapsulation of Connectionless Network Protocol -(``CLNP'') -packets is done differently. .It Cm link[0-2] Enable special processing of the link level of the interface. These three options are interface specific in actual effect; however, @@ -378,12 +358,6 @@ and the subnet field should be contiguous with the network portion. .\" see .\" Xr eon 5 . -.It Cm phase Ar n -The argument -.Ar n -specifies the version (phase) of the -AppleTalk network attached to the interface. -Values of 1 or 2 are permitted. .It Cm prefixlen Ar n (inet and inet6 only) Effect is similar to @@ -396,15 +370,6 @@ This will influence the default routing priority of new static routes added to the kernel. .Ar n is in the range of 0 to 16 with smaller numbers being better. -.It Cm range Ar netrange -Under AppleTalk, set the interface to respond to a -.Ar netrange -of the form -.Dq startnet-endnet . -AppleTalk uses this scheme instead of -netmasks though -.Ox -implements it internally as a set of netmasks. .It Cm rdomain Ar route-id Attach the interface to the routing table with the specified .Ar route-id . diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index b8e1e8fa362..f3333de55ef 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.247 2011/05/26 13:10:11 sthen Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.248 2011/07/09 00:45:40 henning Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -85,8 +85,6 @@ #include <net/if_sppp.h> #include <net/ppp_defs.h> -#include <netatalk/at.h> - #include <netinet/ip_carp.h> #include <netdb.h> @@ -118,7 +116,6 @@ struct sockaddr_in netmask; #ifndef SMALL struct ifaliasreq addreq; -struct netrange at_nr; /* AppleTalk net range */ #endif /* SMALL */ char name[IFNAMSIZ]; @@ -162,8 +159,6 @@ void setifnwflag(const char *, int); void unsetifnwflag(const char *, int); void setifnetmask(const char *, int); void setifprefixlen(const char *, int); -void setatrange(const char *, int); -void setatphase(const char *, int); void settunnel(const char *, const char *); void deletetunnel(const char *, int); void settunnelinst(const char *, int); @@ -176,7 +171,6 @@ void setia6eui64(const char *, int); void setkeepalive(const char *, const char *); void unsetkeepalive(const char *, int); #endif /* INET6 */ -void checkatrange(struct sockaddr_at *); void setmedia(const char *, int); void setmediaopt(const char *, int); void setmediamode(const char *, int); @@ -354,8 +348,6 @@ const struct cmd { { "rtlabel", NEXTARG, 0, setifrtlabel }, { "-rtlabel", -1, 0, setifrtlabel }, { "rdomain", NEXTARG, 0, setinstance }, - { "range", NEXTARG, 0, setatrange }, - { "phase", NEXTARG, 0, setatphase }, { "mpls", IFXF_MPLS, 0, setifxflags }, { "-mpls", -IFXF_MPLS, 0, setifxflags }, { "mplslabel", NEXTARG, 0, setmpelabel }, @@ -563,10 +555,6 @@ const struct afswtch { { "inet6", AF_INET6, in6_status, in6_getaddr, in6_getprefix, SIOCDIFADDR_IN6, SIOCAIFADDR_IN6, C(in6_ridreq), C(in6_addreq) }, #endif /* INET6 */ -#ifndef SMALL - { "atalk", AF_APPLETALK, at_status, at_getaddr, NULL, - SIOCDIFADDR, SIOCAIFADDR, C(addreq), C(addreq) }, -#endif { 0, 0, 0, 0 } }; @@ -762,11 +750,6 @@ nextarg: /* in6_getprefix("64", MASK) if MASK is available here... */ } -#ifndef SMALL - if (af == AF_APPLETALK) - checkatrange((struct sockaddr_at *) &addreq.ifra_addr); -#endif /* SMALL */ - if (clearaddr) { (void) strlcpy(rafp->af_ridreq, name, sizeof(ifr.ifr_name)); if (ioctl(s, rafp->af_difaddr, rafp->af_ridreq) < 0) { @@ -3211,123 +3194,6 @@ settunnelinst(const char *id, int param) } void -at_status(int force) -{ - struct sockaddr_at *sat, null_sat; - struct netrange *nr; - - getsock(AF_APPLETALK); - if (s < 0) { - if (errno == EPROTONOSUPPORT) - return; - err(1, "socket"); - } - (void) 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; - (void) memset(&ifr.ifr_addr, 0, sizeof(ifr.ifr_addr)); - } else - warn("SIOCGIFADDR"); - } - (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); - sat = (struct sockaddr_at *)&ifr.ifr_addr; - - (void) memset(&null_sat, 0, sizeof(null_sat)); - - nr = (struct netrange *) &sat->sat_zero; - printf("\tAppleTalk %d.%d range %d-%d phase %d", - ntohs(sat->sat_addr.s_net), sat->sat_addr.s_node, - ntohs(nr->nr_firstnet), ntohs(nr->nr_lastnet), nr->nr_phase); - if (flags & IFF_POINTOPOINT) { - if (ioctl(s, SIOCGIFDSTADDR, (caddr_t)&ifr) < 0) { - if (errno == EADDRNOTAVAIL) - (void) memset(&ifr.ifr_addr, 0, - sizeof(ifr.ifr_addr)); - else - warn("SIOCGIFDSTADDR"); - } - (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); - sat = (struct sockaddr_at *)&ifr.ifr_dstaddr; - if (!sat) - sat = &null_sat; - printf("--> %d.%d", - ntohs(sat->sat_addr.s_net), sat->sat_addr.s_node); - } - if (flags & IFF_BROADCAST) { - /* note RTAX_BRD overlap with IFF_POINTOPOINT */ - sat = (struct sockaddr_at *)&ifr.ifr_broadaddr; - if (sat) - printf(" broadcast %d.%d", ntohs(sat->sat_addr.s_net), - sat->sat_addr.s_node); - } - putchar('\n'); -} - -void -at_getaddr(const char *addr, int which) -{ - struct sockaddr_at *sat = (struct sockaddr_at *) &addreq.ifra_addr; - u_int net, node; - - sat->sat_family = AF_APPLETALK; - sat->sat_len = sizeof(*sat); - if (which == MASK) - errx(1, "AppleTalk does not use netmasks"); - if (sscanf(addr, "%u.%u", &net, &node) != 2 || - net == 0 || net > 0xffff || node == 0 || node > 0xfe) - errx(1, "%s: illegal address", addr); - sat->sat_addr.s_net = htons(net); - sat->sat_addr.s_node = node; -} - -/* ARGSUSED */ -void -setatrange(const char *range, int d) -{ - u_int first = 123, last = 123; - - if (sscanf(range, "%u-%u", &first, &last) != 2 || - first == 0 || first > 0xffff || - last == 0 || last > 0xffff || first > last) - errx(1, "%s: illegal net range: %u-%u", range, first, last); - at_nr.nr_firstnet = htons(first); - at_nr.nr_lastnet = htons(last); -} - -/* ARGSUSED */ -void -setatphase(const char *phase, int d) -{ - if (!strcmp(phase, "1")) - at_nr.nr_phase = 1; - else if (!strcmp(phase, "2")) - at_nr.nr_phase = 2; - else - errx(1, "%s: illegal phase", phase); -} - -void -checkatrange(struct sockaddr_at *sat) -{ - if (at_nr.nr_phase == 0) - at_nr.nr_phase = 2; /* Default phase 2 */ - if (at_nr.nr_firstnet == 0) /* Default range of one */ - at_nr.nr_firstnet = at_nr.nr_lastnet = sat->sat_addr.s_net; - printf("\tatalk %d.%d range %d-%d phase %d\n", - ntohs(sat->sat_addr.s_net), sat->sat_addr.s_node, - ntohs(at_nr.nr_firstnet), ntohs(at_nr.nr_lastnet), at_nr.nr_phase); - if ((u_short) ntohs(at_nr.nr_firstnet) > - (u_short) ntohs(sat->sat_addr.s_net) || - (u_short) ntohs(at_nr.nr_lastnet) < - (u_short) ntohs(sat->sat_addr.s_net)) - errx(1, "AppleTalk address is not in range"); - *((struct netrange *) &sat->sat_zero) = at_nr; -} - -void mpe_status(void) { struct shim_hdr shim; diff --git a/sbin/route/show.c b/sbin/route/show.c index 3cd8c1eb039..e1c0d4ff802 100644 --- a/sbin/route/show.c +++ b/sbin/route/show.c @@ -1,4 +1,4 @@ -/* $OpenBSD: show.c,v 1.89 2010/10/11 11:45:00 claudio Exp $ */ +/* $OpenBSD: show.c,v 1.90 2011/07/09 00:45:40 henning Exp $ */ /* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */ /* @@ -411,9 +411,6 @@ pr_family(int af) case AF_MPLS: afname = "MPLS"; break; - case AF_APPLETALK: - afname = "AppleTalk"; - break; default: afname = NULL; break; |