wire / wire-format / epoll-event
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).
aka: epoll_event structure
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).
| field | size | meaning |
|---|---|---|
| events | 4 bytes (__u32) | Event bitmask: EPOLLIN (0x001), EPOLLOUT (0x004), EPOLLERR (0x008), EPOLLHUP (0x010), EPOLLRDHUP (0x2000), EPOLLET (0x80000000, edge-triggered), EPOLLONESHOT (0x40000000), EPOLLWAKEUP (0x20000000). |
| data | 8 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
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/epoll-event
or /wire-format/epoll-event.json