summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-10-30 10:07:44 +0000
committermpi <mpi@openbsd.org>2017-10-30 10:07:44 +0000
commit6f5114b2814defb2b51c0c5ccd27782cc4aadafc (patch)
tree96427403c0fe0437a62a60bd587c1ff56c09f22f
parentExit printing an error message if SIOCSIFMEDIA fails. (diff)
downloadwireguard-openbsd-6f5114b2814defb2b51c0c5ccd27782cc4aadafc.tar.xz
wireguard-openbsd-6f5114b2814defb2b51c0c5ccd27782cc4aadafc.zip
Kill <net/slip.h>.
The ioctl(2) it defines is not supported since a long time and most of its defines are already present in tcpdump(8). ok jca@
-rw-r--r--sys/net/slip.h55
-rw-r--r--usr.sbin/tcpdump/Makefile4
-rw-r--r--usr.sbin/tcpdump/print-sl.c49
3 files changed, 16 insertions, 92 deletions
diff --git a/sys/net/slip.h b/sys/net/slip.h
deleted file mode 100644
index 14d8675aff1..00000000000
--- a/sys/net/slip.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* $OpenBSD: slip.h,v 1.5 2013/10/24 18:50:16 deraadt Exp $ */
-/* $NetBSD: slip.h,v 1.6 1994/06/29 06:36:53 cgd Exp $ */
-
-/*-
- * Copyright (c) 1994
- * 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.
- *
- * @(#)slip.h 8.1 (Berkeley) 2/12/94
- */
-
-#ifndef _NET_SLIP_H_
-#define _NET_SLIP_H_
-
-/* Ioctls operating on SLIP ttys. */
-#define SLIOCGUNIT _IOR('t', 88, int) /* get slip unit number */
-
-/*
- * Definitions of the pseudo-link-level header attached to slip
- * packets grabbed by the packet filter (bpf) traffic monitor.
- */
-#define SLIP_HDRLEN 16 /* BPF SLIP header length */
-
-/* Offsets into BPF SLIP header. */
-#define SLX_DIR 0 /* direction; see below */
-#define SLX_CHDR 1 /* compressed header data */
-#define CHDR_LEN 15 /* length of compressed header data */
-
-#define SLIPDIR_IN 0 /* incoming */
-#define SLIPDIR_OUT 1 /* outgoing */
-
-#endif /* _NET_SLIP_H_ */
diff --git a/usr.sbin/tcpdump/Makefile b/usr.sbin/tcpdump/Makefile
index 4c0392cff6b..116ac823204 100644
--- a/usr.sbin/tcpdump/Makefile
+++ b/usr.sbin/tcpdump/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.61 2016/11/18 17:37:03 reyk Exp $
+# $OpenBSD: Makefile,v 1.62 2017/10/30 10:07:44 mpi Exp $
#
# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994
# The Regents of the University of California. All rights reserved.
@@ -28,7 +28,7 @@ CFLAGS+=-Wall -I${.CURDIR}/../../sbin/pfctl -I${.CURDIR}/../hostapd
# for pcap-int.h
CFLAGS+=-I${.CURDIR}/../../lib/libpcap
-CFLAGS+=-DCSLIP -DPPP -DHAVE_FDDI -DETHER_SERVICE -DHAVE_NET_SLIP_H -DHAVE_ETHER_NTOHOST -DINET6
+CFLAGS+=-DCSLIP -DPPP -DHAVE_FDDI -DETHER_SERVICE -DHAVE_ETHER_NTOHOST -DINET6
LDADD+= -lpcap -ll -lcrypto
DPADD+= ${LIBL} ${LIBPCAP} ${LIBCRYPTO}
diff --git a/usr.sbin/tcpdump/print-sl.c b/usr.sbin/tcpdump/print-sl.c
index 366ede2336e..9a49b03e8fb 100644
--- a/usr.sbin/tcpdump/print-sl.c
+++ b/usr.sbin/tcpdump/print-sl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-sl.c,v 1.19 2015/11/16 00:16:39 mmcc Exp $ */
+/* $OpenBSD: print-sl.c,v 1.20 2017/10/30 10:07:44 mpi Exp $ */
/*
* Copyright (c) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997
@@ -21,7 +21,6 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#ifdef HAVE_NET_SLIP_H
#include <sys/time.h>
#include <sys/file.h>
#include <sys/ioctl.h>
@@ -37,7 +36,6 @@ struct rtentry;
#include <netinet/tcp.h>
#include <net/slcompress.h>
-#include <net/slip.h>
#include <ctype.h>
#include <netdb.h>
@@ -55,13 +53,19 @@ static u_int lastconn = 255;
static void sliplink_print(const u_char *, const struct ip *, u_int);
static void compressed_sl_print(const u_char *, const struct ip *, u_int, int);
-/* XXX BSD/OS 2.1 compatibility */
-#if !defined(SLIP_HDRLEN) && defined(SLC_BPFHDR)
-#define SLIP_HDRLEN SLC_BPFHDR
-#define SLX_DIR 0
-#define SLX_CHDR (SLC_BPFHDRLEN - 1)
-#define CHDR_LEN (SLC_BPFHDR - SLC_BPFHDRLEN)
-#endif
+/*
+ * Definitions of the pseudo-link-level header attached to slip
+ * packets grabbed by the packet filter (bpf) traffic monitor.
+ */
+#define SLIP_HDRLEN 16 /* BPF SLIP header length */
+
+/* Offsets into BPF SLIP header. */
+#define SLX_DIR 0 /* direction; see below */
+#define SLX_CHDR 1 /* compressed header data */
+#define CHDR_LEN 15 /* length of compressed header data */
+
+#define SLIPDIR_IN 0 /* incoming */
+#define SLIPDIR_OUT 1 /* outgoing */
/* XXX needs more hacking to work right */
@@ -278,28 +282,3 @@ compressed_sl_print(const u_char *chdr, const struct ip *ip,
lastlen[dir][lastconn] = length - (hlen << 2);
printf(" %d (%d)", lastlen[dir][lastconn], (int)(cp - chdr));
}
-#else
-#include <sys/types.h>
-#include <sys/time.h>
-
-#include <pcap.h>
-#include <stdio.h>
-
-#include "interface.h"
-
-void
-sl_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
-{
-
- error("not configured for slip");
- /* NOTREACHED */
-}
-
-void
-sl_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
-{
-
- error("not configured for slip");
- /* NOTREACHED */
-}
-#endif