1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

Kernel+LibC+UserspaceEmulator: Mostly add recvmsg(), sendmsg()

The implementation only supports a single iovec for now.
Some might say having more than one iovec is the main point of
recvmsg() and sendmsg(), but I'm interested in the control message
bits.
This commit is contained in:
Nico Weber 2020-09-16 11:45:00 -04:00 committed by Andreas Kling
parent 19f2203b53
commit b36a2d6686
9 changed files with 158 additions and 79 deletions

View file

@ -457,6 +457,7 @@ struct pollfd {
#define SHUT_WR 2
#define SHUT_RDWR 3
#define MSG_TRUNC 0x1
#define MSG_DONTWAIT 0x40
#define SOL_SOCKET 1
@ -552,6 +553,16 @@ struct iovec {
size_t iov_len;
};
struct msghdr {
void* msg_name;
socklen_t msg_namelen;
struct iovec* msg_iov;
int msg_iovlen;
void* msg_control;
socklen_t msg_controllen;
int msg_flags;
};
struct sched_param {
int sched_priority;
};