1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

Kernel/Net: Make IPv4Socket::protocol_receive() take a ReadonlyBytes

The overrides of this function don't need to know how the original
packet was stored, so let's just give them a ReadonlyBytes view of
the raw packet data.
This commit is contained in:
Andreas Kling 2020-12-18 16:13:23 +01:00
parent 8e79bde2b7
commit 8cc81c2953
6 changed files with 10 additions and 10 deletions

View file

@ -177,7 +177,7 @@ private:
virtual void shut_down_for_writing() override;
virtual KResultOr<size_t> protocol_receive(const KBuffer&, UserOrKernelBuffer& buffer, size_t buffer_size, int flags) override;
virtual KResultOr<size_t> protocol_receive(ReadonlyBytes raw_ipv4_packet, UserOrKernelBuffer& buffer, size_t buffer_size, int flags) override;
virtual KResultOr<size_t> protocol_send(const UserOrKernelBuffer&, size_t) override;
virtual KResult protocol_connect(FileDescription&, ShouldBlock) override;
virtual int protocol_allocate_local_port() override;