wire / wire-format / epoll-event

epoll_event structure

An epoll_event is the structure used with epoll_ctl(2) and epoll_wait(2). It contains an events bitmask (EPOLLIN, EPOLLOUT, EPOLLERR, EPOLLHUP, EPOLLET, EPOLLONESHOT, ...) and a 64-bit user data field (usually a pointer or fd).

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: epoll_event structure

wire format

spec: Linux kernel (epoll)

An epoll_event is the structure used with epoll_ctl(2) and epoll_wait(2). It contains an events bitmask (EPOLLIN, EPOLLOUT, EPOLLERR, EPOLLHUP, EPOLLET, EPOLLONESHOT, ...) and a 64-bit user data field (usually a pointer or fd).

fieldsizemeaning
events4 bytes (__u32)Event bitmask: EPOLLIN (0x001), EPOLLOUT (0x004), EPOLLERR (0x008), EPOLLHUP (0x010), EPOLLRDHUP (0x2000), EPOLLET (0x80000000, edge-triggered), EPOLLONESHOT (0x40000000), EPOLLWAKEUP (0x20000000).
data8 bytes (epoll_data union)User data: pointer, fd, u32, or u64. Echoed back in epoll_wait results.

example:

01 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00

epoll_event: events=EPOLLIN, data.fd=3


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/epoll-event or /wire-format/epoll-event.json