summaryrefslogtreecommitdiffstats
path: root/sys/sys/event.h
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2020-06-22 13:14:32 +0000
committermpi <mpi@openbsd.org>2020-06-22 13:14:32 +0000
commit7ab02df9ba969938f0d288bc81680642c429c9c4 (patch)
treec8acd59001aa58d4ef33443e29ffa4622b51de89 /sys/sys/event.h
parentChange tsc_get_timecount return from uint to u_int per sys/timetc.h. (diff)
downloadwireguard-openbsd-7ab02df9ba969938f0d288bc81680642c429c9c4.tar.xz
wireguard-openbsd-7ab02df9ba969938f0d288bc81680642c429c9c4.zip
Extend kqueue interface with EVFILT_EXCEPT filter.
This filter, already implemented in macOS and Dragonfly BSD, returns exceptional conditions like the reception of out-of-band data. The functionnality is similar to poll(2)'s POLLPRI & POLLRDBAND and it can be used by the kqfilter-based poll & select implementation. ok millert@ on a previous version, ok visa@
Diffstat (limited to 'sys/sys/event.h')
-rw-r--r--sys/sys/event.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/sys/event.h b/sys/sys/event.h
index 93a8a904d90..4a46d97af72 100644
--- a/sys/sys/event.h
+++ b/sys/sys/event.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: event.h,v 1.43 2020/06/15 15:42:11 mpi Exp $ */
+/* $OpenBSD: event.h,v 1.44 2020/06/22 13:14:32 mpi Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
@@ -39,6 +39,7 @@
#define EVFILT_SIGNAL (-6) /* attached to struct process */
#define EVFILT_TIMER (-7) /* timers */
#define EVFILT_DEVICE (-8) /* devices */
+#define EVFILT_EXCEPT (-9) /* exceptional conditions */
#define EVFILT_SYSCOUNT 8
@@ -87,6 +88,12 @@ struct kevent {
#define NOTE_EOF 0x0002 /* return on EOF */
/*
+ * data/hint flags for EVFILT_EXCEPT, shared with userspace and with
+ * EVFILT_{READ|WRITE}
+ */
+#define NOTE_OOB 0x0004 /* OOB data on a socket */
+
+/*
* data/hint flags for EVFILT_VNODE, shared with userspace
*/
#define NOTE_DELETE 0x0001 /* vnode was removed */