diff options
Diffstat (limited to 'sys_util/src/sock_ctrl_msg.rs')
-rw-r--r-- | sys_util/src/sock_ctrl_msg.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys_util/src/sock_ctrl_msg.rs b/sys_util/src/sock_ctrl_msg.rs index 13b9b0c..d4b953b 100644 --- a/sys_util/src/sock_ctrl_msg.rs +++ b/sys_util/src/sock_ctrl_msg.rs @@ -213,6 +213,9 @@ fn raw_recvmsg(fd: RawFd, in_data: &mut [u8], in_fds: &mut [RawFd]) -> Result<(u Ok((total_read as usize, in_fds_count)) } +/// The maximum number of FDs that can be sent in a single send. +pub const SCM_SOCKET_MAX_FD_COUNT: usize = 253; + /// Trait for file descriptors can send and receive socket control messages via `sendmsg` and /// `recvmsg`. pub trait ScmSocket { @@ -292,6 +295,7 @@ impl ScmSocket for UnixStream { self.as_raw_fd() } } + impl ScmSocket for UnixSeqpacket { fn socket_fd(&self) -> RawFd { self.as_raw_fd() |