mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
Kernel: Return the correct result for FIONREAD on datagram sockets
Before this commit, we only checked the receive buffer on the socket, which is unused on datagram streams. Now we return the actual size of the datagram without the protocol headers, which required the protocol to tell us what the size of the payload is.
This commit is contained in:
parent
e4a1bc1542
commit
3da0c072f4
6 changed files with 26 additions and 1 deletions
|
@ -84,6 +84,7 @@ protected:
|
|||
virtual ErrorOr<size_t> protocol_send(const UserOrKernelBuffer&, size_t) { return ENOTIMPL; }
|
||||
virtual ErrorOr<void> protocol_connect(OpenFileDescription&, ShouldBlock) { return {}; }
|
||||
virtual ErrorOr<u16> protocol_allocate_local_port() { return ENOPROTOOPT; }
|
||||
virtual ErrorOr<size_t> protocol_size(ReadonlyBytes /* raw_ipv4_packet */) { return ENOTIMPL; }
|
||||
virtual bool protocol_is_disconnected() const { return false; }
|
||||
|
||||
virtual void shut_down_for_reading() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue