aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / vendor / libc / src / new / bionic_libc / sys / socket.rs
| 1 | //! Header: `sys/socket.h` |
| 2 | |
| 3 | use crate::prelude::*; |
| 4 | |
| 5 | s! { |
| 6 | pub struct msghdr { |
| 7 | pub msg_name: *mut c_void, |
| 8 | pub msg_namelen: crate::socklen_t, |
| 9 | pub msg_iov: *mut crate::iovec, |
| 10 | pub msg_iovlen: size_t, |
| 11 | pub msg_control: *mut c_void, |
| 12 | pub msg_controllen: size_t, |
| 13 | pub msg_flags: c_int, |
| 14 | } |
| 15 | |
| 16 | pub struct cmsghdr { |
| 17 | pub cmsg_len: size_t, |
| 18 | pub cmsg_level: c_int, |
| 19 | pub cmsg_type: c_int, |
| 20 | } |
| 21 | |
| 22 | pub struct ucred { |
| 23 | pub pid: crate::pid_t, |
| 24 | pub uid: crate::uid_t, |
| 25 | pub gid: crate::gid_t, |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | extern "C" { |
| 30 | pub fn recvmmsg( |
| 31 | sockfd: c_int, |
| 32 | msgvec: *mut crate::mmsghdr, |
| 33 | vlen: c_uint, |
| 34 | flags: c_int, |
| 35 | timeout: *const crate::timespec, |
| 36 | ) -> c_int; |
| 37 | pub fn sendmmsg( |
| 38 | sockfd: c_int, |
| 39 | msgvec: *const crate::mmsghdr, |
| 40 | vlen: c_uint, |
| 41 | flags: c_int, |
| 42 | ) -> c_int; |
| 43 | pub fn recvfrom( |
| 44 | socket: c_int, |
| 45 | buf: *mut c_void, |
| 46 | len: size_t, |
| 47 | flags: c_int, |
| 48 | addr: *mut crate::sockaddr, |
| 49 | addrlen: *mut crate::socklen_t, |
| 50 | ) -> ssize_t; |
| 51 | } |