Age | Commit message (Collapse) | Author |
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit implements the POSIX setsockopt syscall so that user
programs may be able to configure sockets they have created.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit implements proper timeout handling for recv(). Previously,
the recv() syscall would yield the current process forver until data is
available to be read. Obviously, that is not the most ideal as it is not
uncommon for programs to try seeing if any data exists on the socket
before deferring to perform some other task until data arrives.
The basics of how this work is that we try reading data off of some
specified socket. However, if no data is present, we must wait for the
given timeout value before attempting to read again.
While this is pretty effective and works perfectly fine as of now, it
might be worth optimizing this later to allow that timeout period to be
somehow "interrupted" by data arriving at a socket so that the program
does not have to defer execution for the full wait-period.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces the kernel-side implementation of setsockopt()
for setting options on a socket file descriptor. See POSIX
setsockopt() for more information.
https://pubs.opengroup.org/onlinepubs/9690949499/functions/setsockopt.html
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Zero new control buffer before usage
- Block if the control message queue is empty
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit adds logic to socket() that creates a temp file that
represents it.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Keep track of the process that created a socket.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Update the signature of 'fd_get()', 'fd_alloc()' and 'fd_dup()' to
include a pointer to the process to target. This improves the
flexibility of the file descriptor API.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Ensure that the file descriptor represented by 'socket' is of type
AF_UNIX before performing the rest of recvmsg()
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce initial implementation for out-of-band socket control messages
and an SCM_RIGHTS stub.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce the following syscalls:
- SYS_socket
- SYS_bind
- SYS_recv
- SYS_send
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce initial support for POSIX sockets. This commit currently
implements the AF_UNIX family for IPC.
Signed-off-by: Ian Moffett <ian@osmora.org>
|