summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2011-07-09 00:45:41 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2011-07-09 00:45:41 +0000
commit5c3064772c2b01d274fcc287cca19c3be8a440a1 (patch)
treed0e3b78bdc1970c46e4ec18f069bd0107c7a3be2
parentb00ea6a7c4e24838c1ed7edd326dda78630ef0fd (diff)
rmove rotten netatalk bits
-rw-r--r--sbin/ifconfig/ifconfig.841
-rw-r--r--sbin/ifconfig/ifconfig.c136
-rw-r--r--sbin/route/show.c5
-rw-r--r--usr.bin/fstat/fstat.c8
-rw-r--r--usr.bin/netstat/Makefile4
-rw-r--r--usr.bin/netstat/atalk.c290
-rw-r--r--usr.bin/netstat/if.c6
-rw-r--r--usr.bin/netstat/main.c14
-rw-r--r--usr.bin/netstat/netstat.h6
9 files changed, 12 insertions, 498 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;
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index f87ae1d0e71..1e4be93d0ef 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fstat.c,v 1.70 2009/10/27 23:59:38 deraadt Exp $ */
+/* $OpenBSD: fstat.c,v 1.71 2011/07/09 00:45:40 henning Exp $ */
/*
* Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -696,12 +696,6 @@ socktrans(struct kinfo_file2 *kf)
printf(" %d %p", kf->so_protocol,
(void *)(uintptr_t)kf->f_data);
break;
- case AF_APPLETALK:
- /* print protocol number and socket address */
- printf("* appletalk %s", stype);
- printf(" %d %p", kf->so_protocol,
- (void *)(uintptr_t)kf->f_data);
- break;
default:
/* print protocol number and socket address */
printf("* %d %s", kf->so_family, stype);
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile
index cb1f81d8324..a6ebfb924f0 100644
--- a/usr.bin/netstat/Makefile
+++ b/usr.bin/netstat/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.19 2007/12/14 18:35:46 deraadt Exp $
+# $OpenBSD: Makefile,v 1.20 2011/07/09 00:45:40 henning Exp $
PROG= netstat
SRCS= if.c inet.c inet6.c main.c mbuf.c mroute.c route.c \
- unix.c atalk.c mroute6.c net80211.c show.c
+ unix.c mroute6.c net80211.c show.c
BINGRP= kmem
BINMODE=2555
LDADD= -lkvm
diff --git a/usr.bin/netstat/atalk.c b/usr.bin/netstat/atalk.c
deleted file mode 100644
index 73126f4b1ff..00000000000
--- a/usr.bin/netstat/atalk.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/* $OpenBSD: atalk.c,v 1.20 2010/10/30 23:06:05 bluhm Exp $ */
-/* $NetBSD: atalk.c,v 1.2 1997/05/22 17:21:26 christos Exp $ */
-
-/*
- * Copyright (c) 1983, 1988, 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.
- * 3. 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.
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/sysctl.h>
-#include <netdb.h>
-
-#include <net/route.h>
-#include <net/if.h>
-
-/* #include <netinet/tcp_fsm.h> */
-
-#include <netatalk/at.h>
-#include <netatalk/ddp_var.h>
-
-#include <err.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include "netstat.h"
-
-struct ddpcb ddpcb;
-struct socket sockb;
-
-static int first = 1;
-
-static char *at_pr_net(struct sockaddr_at *, int);
-static char *at_pr_host(struct sockaddr_at *, int);
-static char *at_pr_range(struct sockaddr_at *);
-static char *at_pr_port(struct sockaddr_at *);
-
-/*
- * Print a summary of connections related to a Network Systems
- * protocol. For XXX, also give state of connection.
- * Listening processes (aflag) are suppressed unless the
- * -a (all) flag is specified.
- */
-
-static char *
-at_pr_net(struct sockaddr_at *sat, int numeric)
-{
- static char mybuf[50];
-
- if (!numeric) {
- switch (sat->sat_addr.s_net) {
- case 0xffff:
- return "????";
- case ATADDR_ANYNET:
- return ("*");
- }
- }
- (void) snprintf(mybuf, sizeof(mybuf), "%hu",
- ntohs(sat->sat_addr.s_net));
- return mybuf;
-}
-
-static char *
-at_pr_host(struct sockaddr_at *sat, int numeric)
-{
- static char mybuf[50];
-
- if (!numeric) {
- switch (sat->sat_addr.s_node) {
- case ATADDR_BCAST:
- return "bcast";
- case ATADDR_ANYNODE:
- return ("*");
- }
- }
- (void) snprintf(mybuf, sizeof(mybuf), "%d",
- (unsigned int) sat->sat_addr.s_node);
- return mybuf;
-}
-
-static char *
-at_pr_port(struct sockaddr_at *sat)
-{
- static char mybuf[50];
- struct servent *serv;
-
- switch (sat->sat_port) {
- case ATADDR_ANYPORT:
- return ("*");
- case 0xff:
- return "????";
- default:
- if (nflag)
- (void) snprintf(mybuf, sizeof(mybuf), "%d",
- (unsigned int) sat->sat_port);
- else {
- serv = getservbyport(sat->sat_port, "ddp");
- if (serv == NULL)
- (void) snprintf(mybuf, sizeof(mybuf), "%d",
- (unsigned int) sat->sat_port);
- else
- (void) snprintf(mybuf, sizeof(mybuf), "%s",
- serv->s_name);
- }
-
- return mybuf;
- }
-}
-
-static char *
-at_pr_range(struct sockaddr_at *sat)
-{
- static char mybuf[50];
-
- if (sat->sat_range.r_netrange.nr_firstnet !=
- sat->sat_range.r_netrange.nr_lastnet) {
- (void) snprintf(mybuf, sizeof(mybuf), "%d-%d",
- ntohs(sat->sat_range.r_netrange.nr_firstnet),
- ntohs(sat->sat_range.r_netrange.nr_lastnet));
- } else {
- (void) snprintf(mybuf, sizeof(mybuf), "%d",
- ntohs(sat->sat_range.r_netrange.nr_firstnet));
- }
- return mybuf;
-}
-
-
-/* what == 0 for addr only == 3
- * 1 for net
- * 2 for host
- * 4 for port
- * 8 for numeric only
- */
-char *
-atalk_print(const struct sockaddr *sa, int what)
-{
- struct sockaddr_at *sat = (struct sockaddr_at *) sa;
- static char mybuf[50];
- int numeric = (what & 0x08);
-
- mybuf[0] = 0;
- switch (what & 0x13) {
- case 0:
- mybuf[0] = 0;
- break;
- case 1:
- (void) snprintf(mybuf, sizeof(mybuf), "%s",
- at_pr_net(sat, numeric));
- break;
- case 2:
- (void) snprintf(mybuf, sizeof(mybuf), "%s",
- at_pr_host(sat, numeric));
- break;
- case 3:
- (void) snprintf(mybuf, sizeof(mybuf), "%s.%s",
- at_pr_net(sat, numeric),
- at_pr_host(sat, numeric));
- break;
- case 0x10:
- (void) snprintf(mybuf, sizeof(mybuf), "%s", at_pr_range(sat));
- }
- if (what & 4) {
- (void) snprintf(mybuf + strlen(mybuf),
- sizeof(mybuf) - strlen(mybuf), ".%s",
- at_pr_port(sat));
- }
- return mybuf;
-}
-
-void
-atalkprotopr(u_long off, char *name, int af, u_long pcbaddr)
-{
- struct ddpcb cb;
- struct ddpcb *prev, *next;
- struct ddpcb *initial;
-
- if (off == 0)
- return;
- if (kread(off, &initial, sizeof(struct ddpcb *)) < 0)
- return;
- ddpcb = cb;
- prev = (struct ddpcb *) off;
- for (next = initial; next != NULL; prev = next) {
- u_long ppcb = (u_long) next;
-
- if (kread((u_long) next, &ddpcb, sizeof(ddpcb)) < 0)
- return;
- next = ddpcb.ddp_next;
- if (Pflag) {
- if (pcbaddr == ppcb)
- socket_dump((u_long)ddpcb.ddp_socket);
- continue;
- }
-#if 0
- if (!aflag && atalk_nullhost(ddpcb.ddp_lsat)) {
- continue;
- }
-#endif
- if (kread((u_long) ddpcb.ddp_socket, &sockb,
- sizeof(sockb)) < 0)
- return;
- if (first) {
- printf("Active ATALK connections");
- if (aflag)
- printf(" (including servers)");
- putchar('\n');
- if (Aflag)
- printf("%-8.8s ", "PCB");
- printf(Aflag ?
- "%-5.5s %-6.6s %-6.6s %-18.18s %-18.18s %s\n" :
- "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s %s\n",
- "Proto", "Recv-Q", "Send-Q",
- "Local Address", "Foreign Address", "(state)");
- first = 0;
- }
- if (Aflag)
- printf("%8lx ", ppcb);
- printf("%-5.5s %6ld %6ld ", name, sockb.so_rcv.sb_cc,
- sockb.so_snd.sb_cc);
- printf(Aflag ? " %-18.18s" : " %-22.22s", atalk_print(
- (struct sockaddr *) & ddpcb.ddp_lsat, 7));
- printf(Aflag ? " %-18.18s" : " %-22.22s", atalk_print(
- (struct sockaddr *) & ddpcb.ddp_fsat, 7));
- putchar('\n');
- }
-}
-
-#define p(f, m) if (ddpstat.f || sflag <= 1) \
- printf(m, ddpstat.f, plural(ddpstat.f))
-#define p2(f1, f2, m) if (ddpstat.f1 || ddpstat.f2 || sflag <= 1) \
- printf(m, ddpstat.f1, plural(ddpstat.f1), ddpstat.f2, plural(ddpstat.f2))
-#define p3(f, m) if (ddpstat.f || sflag <= 1) \
- printf(m, ddpstat.f, plurales(ddpstat.f))
-
-/*
- * Dump DDP statistics structure.
- */
-void
-ddp_stats(char *name)
-{
- struct ddpstat ddpstat;
- int mib[] = { CTL_NET, AF_APPLETALK, ATPROTO_DDP, DDPCTL_STATS };
- size_t len = sizeof(ddpstat);
-
- if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
- &ddpstat, &len, NULL, 0) == -1) {
- if (errno != ENOPROTOOPT)
- warn(name);
- return;
- }
-
- printf("%s:\n", name);
- p(ddps_short, "\t%ld packet%s with short headers\n");
- p(ddps_long, "\t%ld packet%s with long headers\n");
- p(ddps_nosum, "\t%ld packet%s with no checksum\n");
- p(ddps_tooshort, "\t%ld packet%s were too short\n");
- p(ddps_badsum, "\t%ld packet%s with bad checksum\n");
- p(ddps_toosmall, "\t%ld packet%s with not enough data\n");
- p(ddps_forward, "\t%ld packet%s forwarded\n");
- p(ddps_cantforward, "\t%ld packet%s rcvd for unreachable dest\n");
- p(ddps_nosockspace, "\t%ld packet%s dropped due to no socket space\n");
-}
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index 2be6189abc9..ad565bb7002 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.63 2011/01/09 19:12:19 tedu Exp $ */
+/* $OpenBSD: if.c,v 1.64 2011/07/09 00:45:40 henning Exp $ */
/* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */
/*
@@ -281,10 +281,6 @@ print_addr(struct sockaddr *sa, struct sockaddr **rtinfo, struct if_data *ifd)
}
#endif
break;
- case AF_APPLETALK:
- printf("atlk:%-12s",atalk_print(sa,0x10) );
- printf("%-12s ",atalk_print(sa,0x0b) );
- break;
case AF_LINK:
sdl = (struct sockaddr_dl *)sa;
m = printf("%-11.11s ", "<Link>");
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index c1e65e4988a..a0c3be357df 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.88 2011/03/15 13:10:31 jsing Exp $ */
+/* $OpenBSD: main.c,v 1.89 2011/07/09 00:45:40 henning Exp $ */
/* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */
/*
@@ -132,13 +132,8 @@ struct protox ip6protox[] = {
{ -1, NULL, NULL, NULL }
};
-struct protox atalkprotox[] = {
- { N_DDPCB, atalkprotopr, ddp_stats, "ddp" },
- { -1, NULL, NULL, NULL }
-};
-
struct protox *protoprotox[] = {
- protox, ip6protox, atalkprotox, NULL
+ protox, ip6protox, NULL
};
static void printproto(struct protox *, char *, int, u_long);
@@ -204,8 +199,6 @@ main(int argc, char *argv[])
af = AF_UNIX;
else if (strcmp(optarg, "encap") == 0)
af = PF_KEY;
- else if (strcmp(optarg, "atalk") == 0)
- af = AF_APPLETALK;
else if (strcmp(optarg, "mpls") == 0)
af = AF_MPLS;
else if (strcmp(optarg, "pflow") == 0)
@@ -429,9 +422,6 @@ main(int argc, char *argv[])
printproto(tp, tp->pr_name, AF_INET6, pcbaddr);
if ((af == AF_UNIX || af == AF_UNSPEC) && !sflag)
unixpr(nl[N_UNIXSW].n_value, pcbaddr);
- if (af == AF_APPLETALK || af == AF_UNSPEC)
- for (tp = atalkprotox; tp->pr_name; tp++)
- printproto(tp, tp->pr_name, af, pcbaddr);
exit(0);
}
diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h
index 80ebf53e5b3..4a412270674 100644
--- a/usr.bin/netstat/netstat.h
+++ b/usr.bin/netstat/netstat.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: netstat.h,v 1.59 2011/03/15 13:10:31 jsing Exp $ */
+/* $OpenBSD: netstat.h,v 1.60 2011/07/09 00:45:40 henning Exp $ */
/* $NetBSD: netstat.h,v 1.6 1996/05/07 02:55:05 thorpej Exp $ */
/*
@@ -136,7 +136,3 @@ void unixpr(u_long, u_long);
void mroutepr(u_long, u_long, u_long);
void mrt_stats(void);
-
-void atalkprotopr(u_long, char *, int, u_long);
-void ddp_stats(char *);
-char *atalk_print(const struct sockaddr *, int);