summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-31 15:44:41 -0400
committerIan Moffett <ian@osmora.org>2025-07-31 15:55:21 -0400
commit5ae5b4259d3d4894c3f5acc5f0691869a3bd219f (patch)
treed9148523db395c2e424187fa14fb5c38c8e86aee /sys/include
parent8185d0507429f0c6e2b90c2cc6c8f413ebf49aad (diff)
kernel: socket: Keep track of socket owner
Keep track of the process that created a socket. Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/socket.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/include/sys/socket.h b/sys/include/sys/socket.h
index 5ce1ec6..a69057b 100644
--- a/sys/include/sys/socket.h
+++ b/sys/include/sys/socket.h
@@ -36,6 +36,7 @@
#include <sys/uio.h>
#if defined(_KERNEL)
#include <sys/types.h>
+#include <sys/proc.h>
#include <sys/syscall.h>
#include <sys/mutex.h>
#else
@@ -154,6 +155,7 @@ struct ksocket {
struct sockaddr sockaddr;
struct sockaddr_un un;
};
+ struct proc *owner;
struct cmsg_list cmsg_list;
struct sockbuf buf;
struct mutex *mtx;