From 416d470d07744592f186b65de7074f94edf39824 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 16 Sep 2020 12:25:06 -0400 Subject: Kernel: Plumb packet receive timestamp from NetworkAdapter to Socket::recvfrom Since the receiving socket isn't yet known at packet receive time, keep timestamps for all packets. This is useful for keeping statistics about in-kernel queue latencies in the future, and it can be used to implement SO_TIMESTAMP. --- Kernel/Net/LocalSocket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Kernel/Net/LocalSocket.h') diff --git a/Kernel/Net/LocalSocket.h b/Kernel/Net/LocalSocket.h index d39e78d20b..30693283a3 100644 --- a/Kernel/Net/LocalSocket.h +++ b/Kernel/Net/LocalSocket.h @@ -61,7 +61,7 @@ public: virtual bool can_read(const FileDescription&, size_t) const override; virtual bool can_write(const FileDescription&, size_t) const override; virtual KResultOr sendto(FileDescription&, const UserOrKernelBuffer&, size_t, int, Userspace, socklen_t) override; - virtual KResultOr recvfrom(FileDescription&, UserOrKernelBuffer&, size_t, int flags, Userspace, Userspace) override; + virtual KResultOr recvfrom(FileDescription&, UserOrKernelBuffer&, size_t, int flags, Userspace, Userspace, timeval&) override; virtual KResult getsockopt(FileDescription&, int level, int option, Userspace, Userspace) override; virtual KResult chown(FileDescription&, uid_t, gid_t) override; virtual KResult chmod(FileDescription&, mode_t) override; -- cgit v1.2.3