summaryrefslogtreecommitdiff
path: root/Kernel/Net/IPv4Socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Net/IPv4Socket.h')
-rw-r--r--Kernel/Net/IPv4Socket.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Net/IPv4Socket.h b/Kernel/Net/IPv4Socket.h
index 78342a0389..4333e04df8 100644
--- a/Kernel/Net/IPv4Socket.h
+++ b/Kernel/Net/IPv4Socket.h
@@ -70,14 +70,14 @@ protected:
IPv4Socket(int type, int protocol);
virtual const char* class_name() const override { return "IPv4Socket"; }
- int allocate_local_port_if_needed();
+ KResultOr<u16> allocate_local_port_if_needed();
virtual KResult protocol_bind() { return KSuccess; }
virtual KResult protocol_listen() { 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 int protocol_allocate_local_port() { return 0; }
+ virtual KResultOr<u16> protocol_allocate_local_port() { return ENOPROTOOPT; }
virtual bool protocol_is_disconnected() const { return false; }
virtual void shut_down_for_reading() override;