summaryrefslogtreecommitdiffstats
path: root/libexec/rbootd/bpf.c
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1997-06-29 19:00:29 +0000
committersteve <steve@FreeBSD.org>1997-06-29 19:00:29 +0000
commit0d992ff3138ae20de7a6f94dd7a46d15618900ad (patch)
treeb7f9efb7b5727705d2c745d83fd97780dc95e4c9 /libexec/rbootd/bpf.c
parent8d3c561e32236d0061cc1de5ec7a4224d7ec85f4 (diff)
downloadFreeBSD-src-0d992ff3138ae20de7a6f94dd7a46d15618900ad.zip
FreeBSD-src-0d992ff3138ae20de7a6f94dd7a46d15618900ad.tar.gz
Merge conflicts and make this compile -Wall clean.
Diffstat (limited to 'libexec/rbootd/bpf.c')
-rw-r--r--libexec/rbootd/bpf.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/libexec/rbootd/bpf.c b/libexec/rbootd/bpf.c
index 41ec1f7..6633b48 100644
--- a/libexec/rbootd/bpf.c
+++ b/libexec/rbootd/bpf.c
@@ -38,15 +38,15 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)bpf.c 8.1 (Berkeley) 6/4/93
- * $Id$
+ * from: @(#)bpf.c 8.1 (Berkeley) 6/4/93
+ * $Id: bpf.c,v 1.6 1997/02/22 14:21:57 peter Exp $
*
- * Utah $Hdr: bpf.c 3.1 92/07/06$
+ * From: Utah Hdr: bpf.c 3.1 92/07/06
* Author: Jeff Forys, University of Utah CSS
*/
#ifndef lint
-static char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93";
+static const char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93";
#endif /* not lint */
#include <sys/param.h>
@@ -70,7 +70,7 @@ static char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93";
static int BpfFd = -1;
static unsigned BpfLen = 0;
-static u_char *BpfPkt = NULL;
+static u_int8_t *BpfPkt = NULL;
/*
** BpfOpen -- Open and initialize a BPF device.
@@ -147,14 +147,9 @@ BpfOpen()
#endif
ifr.ifr_addr.sa_family = AF_UNSPEC;
bcopy(&RmpMcastAddr[0], (char *)&ifr.ifr_addr.sa_data[0], RMP_ADDRLEN);
- if (ioctl(BpfFd, SIOCADDMULTI, (caddr_t)&ifr) < 0) {
- syslog(LOG_WARNING,
- "bpf: can't add mcast addr (%m), setting promiscuous mode");
-
- if (ioctl(BpfFd, BIOCPROMISC, (caddr_t)0) < 0) {
- syslog(LOG_ERR, "bpf: can't set promiscuous mode: %m");
- Exit(0);
- }
+ if (ioctl(BpfFd, BIOCPROMISC, (caddr_t)0) < 0) {
+ syslog(LOG_ERR, "bpf: can't set promiscuous mode: %m");
+ Exit(0);
}
/*
@@ -165,7 +160,7 @@ BpfOpen()
Exit(0);
}
if (BpfPkt == NULL)
- BpfPkt = (u_char *)malloc(BpfLen);
+ BpfPkt = (u_int8_t *)malloc(BpfLen);
if (BpfPkt == NULL) {
syslog(LOG_ERR, "bpf: out of memory (%u bytes for bpfpkt)",
@@ -314,7 +309,7 @@ BpfRead(rconn, doread)
int doread;
{
register int datlen, caplen, hdrlen;
- static u_char *bp = NULL, *ep = NULL;
+ static u_int8_t *bp = NULL, *ep = NULL;
int cc;
/*
OpenPOWER on IntegriCloud