diff --git a/src/header/poll/mod.rs b/src/header/poll/mod.rs index 3d46779d8dade412aec20d4bbb0087693f93c25c..265f30321856b3df2f30f6e66531616614e75372 100644 --- a/src/header/poll/mod.rs +++ b/src/header/poll/mod.rs @@ -6,7 +6,7 @@ use crate::{ fs::File, header::sys_epoll::{ epoll_create1, epoll_ctl, epoll_data, epoll_event, epoll_wait, EPOLLERR, EPOLLHUP, EPOLLIN, - EPOLLNVAL, EPOLLOUT, EPOLLPRI, EPOLL_CLOEXEC, EPOLL_CTL_ADD, + EPOLLNVAL, EPOLLOUT, EPOLLPRI, EPOLLRDBAND, EPOLLRDNORM, EPOLLWRBAND, EPOLLWRNORM, EPOLL_CLOEXEC, EPOLL_CTL_ADD, }, platform::types::*, }; @@ -17,6 +17,10 @@ pub const POLLOUT: c_short = 0x004; pub const POLLERR: c_short = 0x008; pub const POLLHUP: c_short = 0x010; pub const POLLNVAL: c_short = 0x020; +pub const POLLRDNORM: c_short = 0x040; +pub const POLLRDBAND: c_short = 0x080; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; pub type nfds_t = c_ulong; @@ -35,6 +39,10 @@ pub fn poll_epoll(fds: &mut [pollfd], timeout: c_int) -> c_int { (POLLERR, EPOLLERR), (POLLHUP, EPOLLHUP), (POLLNVAL, EPOLLNVAL), + (POLLRDNORM, EPOLLRDNORM), + (POLLWRNORM, EPOLLWRNORM), + (POLLRDBAND, EPOLLRDBAND), + (POLLWRBAND, EPOLLWRBAND), ]; let ep = { diff --git a/src/header/sys_socket/constants.rs b/src/header/sys_socket/constants.rs index 610bf2d5f2c4673b8a4ad6b68ff9dd640e8cbeba..dbff45fb2a509d769bdfbb3463f6e6e0c15f28e8 100644 --- a/src/header/sys_socket/constants.rs +++ b/src/header/sys_socket/constants.rs @@ -6,6 +6,7 @@ pub const SOCK_NONBLOCK: c_int = 0o4_000; pub const SOCK_CLOEXEC: c_int = 0o2_000_000; // Other constants +pub const SOCK_RDM: c_int = 4; pub const SOCK_SEQPACKET: c_int = 5; pub const SOL_SOCKET: c_int = 1;