diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index df86303491..44927f55a8 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -13,10 +13,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -56,6 +56,7 @@ enum ProcFileType { FI_Root_net_adapters, FI_Root_net_tcp, FI_Root_net_udp, + FI_Root_net_local, FI_PID, @@ -328,6 +329,19 @@ Optional procfs$net_udp(InodeIdentifier) return json.serialized(); } +Optional procfs$net_local(InodeIdentifier) +{ + JsonArray json; + LocalSocket::for_each([&json](auto& socket) { + JsonObject obj; + obj.set("path", String(socket.socket_path())); + obj.set("origin_pid", socket.origin_pid()); + obj.set("acceptor_pid", socket.acceptor_pid()); + json.append(obj); + }); + return json.serialized(); +} + Optional procfs$pid_vmo(InodeIdentifier identifier) { auto handle = ProcessInspectionHandle::from_pid(to_pid(identifier)); @@ -563,7 +577,8 @@ Optional procfs$memstat(InodeIdentifier) json.set("super_physical_available", MM.super_physical_pages()); json.set("kmalloc_call_count", g_kmalloc_call_count); json.set("kfree_call_count", g_kfree_call_count); - return json.serialized();; + return json.serialized(); + ; } Optional procfs$all(InodeIdentifier) @@ -937,6 +952,7 @@ bool ProcFSInode::traverse_as_directory(Function