summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-03-14 06:29:43 +0000
committerglebius <glebius@FreeBSD.org>2014-03-14 06:29:43 +0000
commit80e85e32a582ff3a03a87cb98dd996b7929f824b (patch)
treeb6714370b79bb13837321dcbc195eadc7047b2b2 /sbin/ifconfig
parentfc1b773c21c561cbe8c09b09d48f80aada9bc2f9 (diff)
downloadFreeBSD-src-80e85e32a582ff3a03a87cb98dd996b7929f824b.zip
FreeBSD-src-80e85e32a582ff3a03a87cb98dd996b7929f824b.tar.gz
Remove AppleTalk support.
AppleTalk was a network transport protocol for Apple Macintosh devices in 80s and then 90s. Starting with Mac OS X in 2000 the AppleTalk was a legacy protocol and primary networking protocol is TCP/IP. The last Mac OS X release to support AppleTalk happened in 2009. The same year routing equipment vendors (namely Cisco) end their support. Thus, AppleTalk won't be supported in FreeBSD 11.0-RELEASE.
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/Makefile1
-rw-r--r--sbin/ifconfig/af_atalk.c182
-rw-r--r--sbin/ifconfig/ifconfig.841
3 files changed, 0 insertions, 224 deletions
diff --git a/sbin/ifconfig/Makefile b/sbin/ifconfig/Makefile
index 7393da4..d7c6452 100644
--- a/sbin/ifconfig/Makefile
+++ b/sbin/ifconfig/Makefile
@@ -21,7 +21,6 @@ SRCS+= af_inet.c # IPv4 support
.if ${MK_INET6_SUPPORT} != "no"
SRCS+= af_inet6.c # IPv6 support
.endif
-SRCS+= af_atalk.c # AppleTalk support
.if ${MK_INET6_SUPPORT} != "no"
SRCS+= af_nd6.c # ND6 support
.endif
diff --git a/sbin/ifconfig/af_atalk.c b/sbin/ifconfig/af_atalk.c
deleted file mode 100644
index c50e0fd1..0000000
--- a/sbin/ifconfig/af_atalk.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <netatalk/at.h>
-
-#include <err.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ifaddrs.h>
-
-#include <arpa/inet.h>
-
-#include "ifconfig.h"
-
-static struct netrange at_nr; /* AppleTalk net range */
-static struct ifaliasreq at_addreq;
-
-/* XXX FIXME -- should use strtoul for better parsing. */
-static void
-setatrange(const char *range, int dummy __unused, int s,
- const struct afswtch *afp)
-{
- 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);
-}
-
-static void
-setatphase(const char *phase, int dummy __unused, int s,
- const struct afswtch *afp)
-{
- 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);
-}
-
-static void
-at_status(int s __unused, const struct ifaddrs *ifa)
-{
- struct sockaddr_at *sat, null_sat;
- struct netrange *nr;
-
- memset(&null_sat, 0, sizeof(null_sat));
-
- sat = (struct sockaddr_at *)ifa->ifa_addr;
- if (sat == NULL)
- return;
- nr = &sat->sat_range.r_netrange;
- printf("\tatalk %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 (ifa->ifa_flags & IFF_POINTOPOINT) {
- sat = (struct sockaddr_at *)ifa->ifa_dstaddr;
- if (sat == NULL)
- sat = &null_sat;
- printf("--> %d.%d",
- ntohs(sat->sat_addr.s_net), sat->sat_addr.s_node);
- }
- if (ifa->ifa_flags & IFF_BROADCAST) {
- sat = (struct sockaddr_at *)ifa->ifa_broadaddr;
- if (sat != NULL)
- printf(" broadcast %d.%d",
- ntohs(sat->sat_addr.s_net),
- sat->sat_addr.s_node);
- }
-
- putchar('\n');
-}
-
-static void
-at_getaddr(const char *addr, int which)
-{
- struct sockaddr_at *sat = (struct sockaddr_at *) &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 > 0xffff || node > 0xfe)
- errx(1, "%s: illegal address", addr);
- sat->sat_addr.s_net = htons(net);
- sat->sat_addr.s_node = node;
-}
-
-static void
-at_postproc(int s, const struct afswtch *afp)
-{
- struct sockaddr_at *sat = (struct sockaddr_at *) &at_addreq.ifra_addr;
-
- if (at_nr.nr_phase == 0)
- at_nr.nr_phase = 2; /* Default phase 2 */
- if (at_nr.nr_firstnet == 0)
- at_nr.nr_firstnet = /* Default range of one */
- 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");
- sat->sat_range.r_netrange = at_nr;
-}
-
-static struct cmd atalk_cmds[] = {
- DEF_CMD_ARG("range", setatrange),
- DEF_CMD_ARG("phase", setatphase),
-};
-
-static struct afswtch af_atalk = {
- .af_name = "atalk",
- .af_af = AF_APPLETALK,
- .af_status = at_status,
- .af_getaddr = at_getaddr,
- .af_postproc = at_postproc,
- .af_difaddr = SIOCDIFADDR,
- .af_aifaddr = SIOCAIFADDR,
- .af_ridreq = &at_addreq,
- .af_addreq = &at_addreq,
-};
-
-static __constructor void
-atalk_ctor(void)
-{
-#define N(a) (sizeof(a) / sizeof(a[0]))
- size_t i;
-
- for (i = 0; i < N(atalk_cmds); i++)
- cmd_register(&atalk_cmds[i]);
- af_register(&af_atalk);
-#undef N
-}
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index 0bf92d7..8116cb7 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -158,7 +158,6 @@ The address or protocol families currently
supported are
.Dq inet ,
.Dq inet6 ,
-.Dq atalk ,
and
.Dq link .
The default if available is
@@ -562,42 +561,6 @@ The prefix can also be specified using the slash notation after the address.
See the
.Ar address
option above for more information.
-.\" see
-.\" Xr eon 5 .
-.\" .It Cm nsellength Ar n
-.\" .Pf ( Tn ISO
-.\" only)
-.\" This specifies a trailing number of bytes for a received
-.\" .Tn NSAP
-.\" used for local identification, the remaining leading part of which is
-.\" taken to be the
-.\" .Tn NET
-.\" (Network Entity Title).
-.\" The default value is 1, which is conformant to US
-.\" .Tn GOSIP .
-.\" When an ISO address is set in an ifconfig command,
-.\" it is really the
-.\" .Tn NSAP
-.\" which is being specified.
-.\" For example, in
-.\" .Tn US GOSIP ,
-.\" 20 hex digits should be
-.\" specified in the
-.\" .Tn ISO NSAP
-.\" to be assigned to the interface.
-.\" There is some evidence that a number different from 1 may be useful
-.\" for
-.\" .Tn AFI
-.\" 37 type addresses.
-.It Cm range Ar netrange
-Under appletalk, set the interface to respond to a
-.Ar netrange
-of the form
-.Ar startnet Ns - Ns Ar endnet .
-Appletalk uses this scheme instead of
-netmasks though
-.Fx
-implements it internally as a set of netmasks.
.It Cm remove
Another name for the
.Fl alias
@@ -605,10 +568,6 @@ parameter.
Introduced for compatibility
with
.Bsx .
-.It Cm phase
-The argument following this specifies the version (phase) of the
-Appletalk network attached to the interface.
-Values of 1 or 2 are permitted.
.Sm off
.It Cm link Op Cm 0 No - Cm 2
.Sm on
OpenPOWER on IntegriCloud