-/* $OpenBSD: bpf.c,v 1.202 2021/01/17 02:27:29 dlg Exp $ */
+/* $OpenBSD: bpf.c,v 1.203 2021/01/21 12:33:14 dlg Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
sigio_init(&bd->bd_sigio);
bd->bd_rtout = 0; /* no timeout by default */
- bd->bd_rnonblock = ISSET(flag, FNONBLOCK);
bpf_get(bd);
LIST_INSERT_HEAD(&bpf_d_list, bd, bd_list);
ROTATE_BUFFERS(d);
break;
}
- if (d->bd_rnonblock) {
+ if (ISSET(ioflag, IO_NDELAY)) {
/* User requested non-blocking I/O */
error = EWOULDBLOCK;
} else if (d->bd_rtout == 0) {
break;
case FIONBIO: /* Non-blocking I/O */
- if (*(int *)addr)
- d->bd_rnonblock = 1;
- else
- d->bd_rnonblock = 0;
+ /* let vfs to keep track of this */
break;
case FIOASYNC: /* Send signal on receive packets */
-/* $OpenBSD: bpfdesc.h,v 1.44 2021/01/02 02:46:06 cheloha Exp $ */
+/* $OpenBSD: bpfdesc.h,v 1.45 2021/01/21 12:33:14 dlg Exp $ */
/* $NetBSD: bpfdesc.h,v 1.11 1995/09/27 18:30:42 thorpej Exp $ */
/*
struct bpf_if *bd_bif; /* interface descriptor */
uint64_t bd_rtout; /* [m] Read timeout in nanoseconds */
u_long bd_nreaders; /* [m] # threads asleep in bpfread() */
- int bd_rnonblock; /* true if nonblocking reads are set */
struct bpf_program_smr
*bd_rfilter; /* read filter code */
struct bpf_program_smr