diff options
Diffstat (limited to 'libexec/rbootd/bpf.c')
-rw-r--r-- | libexec/rbootd/bpf.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/libexec/rbootd/bpf.c b/libexec/rbootd/bpf.c index 7ecd419..2ccf7da 100644 --- a/libexec/rbootd/bpf.c +++ b/libexec/rbootd/bpf.c @@ -1,3 +1,5 @@ +/* $NetBSD: bpf.c,v 1.7 1997/01/27 22:51:50 thorpej Exp $ */ + /* * Copyright (c) 1988, 1992 The University of Utah and the Center * for Software Science (CSS). @@ -38,14 +40,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 + * from: @(#)bpf.c 8.1 (Berkeley) 6/4/93 * - * 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 char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93";*/ +static char rcsid[] = "$NetBSD: bpf.c,v 1.7 1997/01/27 22:51:50 thorpej Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -68,7 +71,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. @@ -145,14 +148,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); } /* @@ -163,7 +161,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)", @@ -312,7 +310,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; /* |