around for two releases, it should be safe to do so.
ok bluhm deraadt sthen tb yasuoka
-/* $OpenBSD: pcap-bpf.c,v 1.34 2016/05/08 08:20:50 natano Exp $ */
+/* $OpenBSD: pcap-bpf.c,v 1.35 2017/04/19 05:36:12 natano Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996, 1998
{
int fd;
- fd = open("/dev/bpf0", O_RDWR);
+ fd = open("/dev/bpf", O_RDWR);
if (fd == -1 && errno == EACCES)
- fd = open("/dev/bpf0", O_RDONLY);
+ fd = open("/dev/bpf", O_RDONLY);
if (fd == -1) {
if (errno == EACCES)
-/* $OpenBSD: bpf.c,v 1.49 2017/04/18 13:59:09 krw Exp $ */
+/* $OpenBSD: bpf.c,v 1.50 2017/04/19 05:36:12 natano Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
struct ifreq ifr;
int sock;
- if ((sock = open("/dev/bpf0", O_RDWR | O_CLOEXEC)) == -1)
+ if ((sock = open("/dev/bpf", O_RDWR | O_CLOEXEC)) == -1)
fatal("Can't open bpf");
/* Set the BPF device to point at this interface. */
strlcpy(ifr.ifr_name, ifi->name, IFNAMSIZ);
if (ioctl(sock, BIOCSETIF, &ifr) < 0)
- fatal("Can't attach interface %s to /dev/bpf0", ifi->name);
+ fatal("Can't attach interface %s to /dev/bpf", ifi->name);
return (sock);
}
-/* $OpenBSD: arp.c,v 1.78 2017/04/15 11:50:24 bluhm Exp $ */
+/* $OpenBSD: arp.c,v 1.79 2017/04/19 05:36:12 natano Exp $ */
/* $NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $ */
/*
char *pname = NULL;
int bpf;
- if ((bpf = open("/dev/bpf0", O_RDWR)) == -1)
+ if ((bpf = open("/dev/bpf", O_RDWR)) == -1)
err(1, "Failed to bind to bpf");
if (iface == NULL) {
-/* $OpenBSD: bpf.c,v 1.18 2017/04/18 13:59:09 krw Exp $ */
+/* $OpenBSD: bpf.c,v 1.19 2017/04/19 05:36:12 natano Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
{
int sock;
- if ((sock = open("/dev/bpf0", O_RDWR)) == -1)
+ if ((sock = open("/dev/bpf", O_RDWR)) == -1)
fatal("Can't open bpf device");
/* Set the BPF device to point at this interface. */
-/* $OpenBSD: bpf.c,v 1.18 2017/04/05 14:40:56 reyk Exp $ */
+/* $OpenBSD: bpf.c,v 1.19 2017/04/19 05:36:12 natano Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
int sock;
/* Open the BPF device */
- if ((sock = open("/dev/bpf0", O_RDWR)) == -1)
+ if ((sock = open("/dev/bpf", O_RDWR)) == -1)
fatal("Can't open bpf device");
/* Set the BPF device to point at this interface. */
-/* $OpenBSD: bpf.c,v 1.1 2017/03/17 14:45:16 rzalamena Exp $ */
+/* $OpenBSD: bpf.c,v 1.2 2017/04/19 05:36:13 natano Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
int sock;
/* Open the BPF device */
- if ((sock = open("/dev/bpf0", O_RDWR)) == -1)
+ if ((sock = open("/dev/bpf", O_RDWR)) == -1)
fatal("Can't open bpf device");
/* Set the BPF device to point at this interface. */
-/* $OpenBSD: hostapd.c,v 1.37 2016/05/28 07:00:18 natano Exp $ */
+/* $OpenBSD: hostapd.c,v 1.38 2017/04/19 05:36:13 natano Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@openbsd.org>
int fd = -1;
struct bpf_version bpv;
- if ((fd = open("/dev/bpf0", flags)) == -1) {
+ if ((fd = open("/dev/bpf", flags)) == -1) {
hostapd_fatal("unable to open BPF device: %s\n",
strerror(errno));
}
-/* $OpenBSD: pf.c,v 1.16 2016/05/28 07:00:18 natano Exp $ */
+/* $OpenBSD: pf.c,v 1.17 2017/04/19 05:36:13 natano Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
insns
};
- if ((fd = open("/dev/bpf0", mode)) == -1) {
+ if ((fd = open("/dev/bpf", mode)) == -1) {
syslog(LOG_ERR,"pfInit: open bpf %m");
return (-1);
}
-/* $OpenBSD: privsep.c,v 1.22 2016/05/28 07:00:18 natano Exp $ */
+/* $OpenBSD: privsep.c,v 1.23 2017/04/19 05:36:13 natano Exp $ */
/*
* Copyright (c) 2010 Yasuoka Masahiko <yasuoka@openbsd.org>
int readonly;
} const allow_paths[] = {
{ NPPPD_DIR "/", 1, 1 },
- { "/dev/bpf0", 0, 0 },
+ { "/dev/bpf", 0, 0 },
{ "/etc/resolv.conf", 0, 1 },
{ "/dev/tun", 1, 0 },
{ "/dev/pppx", 1, 0 }
-/* $OpenBSD: pppoed.c,v 1.20 2016/05/28 07:00:18 natano Exp $ */
+/* $OpenBSD: pppoed.c,v 1.21 2017/04/19 05:36:13 natano Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
/**@file
* This file provides the PPPoE(RFC2516) server(access concentrator)
* implementaion.
- * $Id: pppoed.c,v 1.20 2016/05/28 07:00:18 natano Exp $
+ * $Id: pppoed.c,v 1.21 2017/04/19 05:36:13 natano Exp $
*/
#include <sys/param.h> /* ALIGN */
#include <sys/types.h>
goto fail;
}
- if ((_this->bpf = priv_open("/dev/bpf0", O_RDWR)) == -1) {
+ if ((_this->bpf = priv_open("/dev/bpf", O_RDWR)) == -1) {
pppoed_log(_pppoed, log_level, "Cannot open bpf: %m");
goto fail;
}
-/* $OpenBSD: rarpd.c,v 1.71 2017/01/20 06:22:38 krw Exp $ */
+/* $OpenBSD: rarpd.c,v 1.72 2017/04/19 05:36:13 natano Exp $ */
/* $NetBSD: rarpd.c,v 1.25 1998/04/23 02:48:33 mrg Exp $ */
/*
struct ifreq ifr;
u_int dlt;
- if ((fd = open("/dev/bpf0", O_RDWR)) == -1)
- error("/dev/bpf0: %s", strerror(errno));
+ if ((fd = open("/dev/bpf", O_RDWR)) == -1)
+ error("/dev/bpf: %s", strerror(errno));
/* Set immediate mode so packets are processed as they arrive. */
immediate = 1;
-/* $OpenBSD: bpf.c,v 1.25 2016/05/28 07:00:18 natano Exp $ */
+/* $OpenBSD: bpf.c,v 1.26 2017/04/19 05:36:13 natano Exp $ */
/* $NetBSD: bpf.c,v 1.5.2.1 1995/11/14 08:45:42 thorpej Exp $ */
/*
struct ifreq ifr;
int n;
- if ((BpfFd = open("/dev/bpf0", O_RDWR)) == -1) {
+ if ((BpfFd = open("/dev/bpf", O_RDWR)) == -1) {
syslog(LOG_ERR, "bpf: can't open device: %m");
DoExit();
}
-.\" $OpenBSD: rbootd.8,v 1.16 2016/05/28 07:00:18 natano Exp $
+.\" $OpenBSD: rbootd.8,v 1.17 2017/04/19 05:36:13 natano Exp $
.\" $NetBSD: rbootd.8,v 1.3 1995/08/21 17:05:16 thorpej Exp $
.\"
.\" Copyright (c) 1988, 1992 The University of Utah and the Center
.\" Utah Hdr: rbootd.man 3.1 92/07/06
.\" Author: Jeff Forys, University of Utah CSS
.\"
-.Dd $Mdocdate: May 28 2016 $
+.Dd $Mdocdate: April 19 2017 $
.Dt RBOOTD 8
.Os
.Sh NAME
.El
.Sh FILES
.Bl -tag -width /usr/libexec/rbootd -compact
-.It Pa /dev/bpf0
+.It Pa /dev/bpf
packet-filter device
.It Pa /etc/rbootd.conf
configuration file
-/* $OpenBSD: privsep_pcap.c,v 1.21 2016/05/08 08:20:50 natano Exp $ */
+/* $OpenBSD: privsep_pcap.c,v 1.22 2017/04/19 05:36:13 natano Exp $ */
/*
* Copyright (c) 2004 Can Erkin Acar
if (device == NULL || snaplen <= 0)
return (-1);
- if ((fd = open("/dev/bpf0", O_RDONLY)) == -1)
+ if ((fd = open("/dev/bpf", O_RDONLY)) == -1)
return (-1);
v = 32768; /* XXX this should be a user-accessible hook */
-.\" $OpenBSD: tcpdump.8,v 1.91 2016/05/08 08:20:50 natano Exp $
+.\" $OpenBSD: tcpdump.8,v 1.92 2017/04/19 05:36:13 natano Exp $
.\"
.\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996
.\" The Regents of the University of California. All rights reserved.
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.Dd $Mdocdate: May 8 2016 $
+.Dd $Mdocdate: April 19 2017 $
.Dt TCPDUMP 8
.Os
.Sh NAME
prints out the headers of packets on a network interface that match the boolean
.Ar expression .
You must have read access to
-.Pa /dev/bpf0 .
+.Pa /dev/bpf .
.Pp
The options are as follows:
.Bl -tag -width "-c count"