summaryrefslogtreecommitdiff
path: root/Kernel/Net/IPv4Socket.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-07 13:39:11 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-07 13:53:14 +0200
commit4a9c18afb9b9c7fde698e93700e661d66e3ed34d (patch)
treebe50cd7629139e1c3d6c7df5bcffa7a0d5a1e898 /Kernel/Net/IPv4Socket.h
parentdbd639a2d8d288691e6cffd29e4ff2ec0bae6982 (diff)
downloadserenity-4a9c18afb9b9c7fde698e93700e661d66e3ed34d.zip
Kernel: Rename FileDescription => OpenFileDescription
Dr. POSIX really calls these "open file description", not just "file description", so let's call them exactly that. :^)
Diffstat (limited to 'Kernel/Net/IPv4Socket.h')
-rw-r--r--Kernel/Net/IPv4Socket.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/Kernel/Net/IPv4Socket.h b/Kernel/Net/IPv4Socket.h
index 0a52e5a181..4d6cbcc35b 100644
--- a/Kernel/Net/IPv4Socket.h
+++ b/Kernel/Net/IPv4Socket.h
@@ -33,18 +33,18 @@ public:
virtual KResult close() override;
virtual KResult bind(Userspace<const sockaddr*>, socklen_t) override;
- virtual KResult connect(FileDescription&, Userspace<const sockaddr*>, socklen_t, ShouldBlock = ShouldBlock::Yes) override;
+ virtual KResult connect(OpenFileDescription&, Userspace<const sockaddr*>, socklen_t, ShouldBlock = ShouldBlock::Yes) override;
virtual KResult listen(size_t) override;
virtual void get_local_address(sockaddr*, socklen_t*) override;
virtual void get_peer_address(sockaddr*, socklen_t*) override;
- virtual bool can_read(const FileDescription&, size_t) const override;
- virtual bool can_write(const FileDescription&, size_t) const override;
- virtual KResultOr<size_t> sendto(FileDescription&, const UserOrKernelBuffer&, size_t, int, Userspace<const sockaddr*>, socklen_t) override;
- virtual KResultOr<size_t> recvfrom(FileDescription&, UserOrKernelBuffer&, size_t, int flags, Userspace<sockaddr*>, Userspace<socklen_t*>, Time&) override;
+ virtual bool can_read(const OpenFileDescription&, size_t) const override;
+ virtual bool can_write(const OpenFileDescription&, size_t) const override;
+ virtual KResultOr<size_t> sendto(OpenFileDescription&, const UserOrKernelBuffer&, size_t, int, Userspace<const sockaddr*>, socklen_t) override;
+ virtual KResultOr<size_t> recvfrom(OpenFileDescription&, UserOrKernelBuffer&, size_t, int flags, Userspace<sockaddr*>, Userspace<socklen_t*>, Time&) override;
virtual KResult setsockopt(int level, int option, Userspace<const void*>, socklen_t) override;
- virtual KResult getsockopt(FileDescription&, int level, int option, Userspace<void*>, Userspace<socklen_t*>) override;
+ virtual KResult getsockopt(OpenFileDescription&, int level, int option, Userspace<void*>, Userspace<socklen_t*>) override;
- virtual KResult ioctl(FileDescription&, unsigned request, Userspace<void*> arg) override;
+ virtual KResult ioctl(OpenFileDescription&, unsigned request, Userspace<void*> arg) override;
bool did_receive(const IPv4Address& peer_address, u16 peer_port, ReadonlyBytes, const Time&);
@@ -61,7 +61,7 @@ public:
IPv4SocketTuple tuple() const { return IPv4SocketTuple(m_local_address, m_local_port, m_peer_address, m_peer_port); }
- String absolute_path(const FileDescription& description) const override;
+ String absolute_path(const OpenFileDescription& description) const override;
u8 ttl() const { return m_ttl; }
@@ -81,7 +81,7 @@ protected:
virtual KResult protocol_listen([[maybe_unused]] bool did_allocate_port) { return KSuccess; }
virtual KResultOr<size_t> protocol_receive(ReadonlyBytes /* raw_ipv4_packet */, UserOrKernelBuffer&, size_t, int) { return ENOTIMPL; }
virtual KResultOr<size_t> protocol_send(const UserOrKernelBuffer&, size_t) { return ENOTIMPL; }
- virtual KResult protocol_connect(FileDescription&, ShouldBlock) { return KSuccess; }
+ virtual KResult protocol_connect(OpenFileDescription&, ShouldBlock) { return KSuccess; }
virtual KResultOr<u16> protocol_allocate_local_port() { return ENOPROTOOPT; }
virtual bool protocol_is_disconnected() const { return false; }
@@ -95,8 +95,8 @@ protected:
private:
virtual bool is_ipv4() const override { return true; }
- KResultOr<size_t> receive_byte_buffered(FileDescription&, UserOrKernelBuffer& buffer, size_t buffer_length, int flags, Userspace<sockaddr*>, Userspace<socklen_t*>);
- KResultOr<size_t> receive_packet_buffered(FileDescription&, UserOrKernelBuffer& buffer, size_t buffer_length, int flags, Userspace<sockaddr*>, Userspace<socklen_t*>, Time&);
+ KResultOr<size_t> receive_byte_buffered(OpenFileDescription&, UserOrKernelBuffer& buffer, size_t buffer_length, int flags, Userspace<sockaddr*>, Userspace<socklen_t*>);
+ KResultOr<size_t> receive_packet_buffered(OpenFileDescription&, UserOrKernelBuffer& buffer, size_t buffer_length, int flags, Userspace<sockaddr*>, Userspace<socklen_t*>, Time&);
void set_can_read(bool);