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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Kernel/Net/IPv4Socket.h b/Kernel/Net/IPv4Socket.h
index 6c9c5f2121..4184e4f7ce 100644
--- a/Kernel/Net/IPv4Socket.h
+++ b/Kernel/Net/IPv4Socket.h
@@ -53,6 +53,12 @@ public:
u8 ttl() const { return m_ttl; }
+ enum class BufferMode {
+ Packets,
+ Bytes,
+ };
+ BufferMode buffer_mode() const { return m_buffer_mode; }
+
protected:
IPv4Socket(int type, int protocol);
virtual const char* class_name() const override { return "IPv4Socket"; }
@@ -84,6 +90,8 @@ private:
SinglyLinkedList<ReceivedPacket> m_receive_queue;
+ DoubleBuffer m_receive_buffer;
+
u16 m_local_port { 0 };
u16 m_peer_port { 0 };
@@ -92,4 +100,8 @@ private:
u8 m_ttl { 64 };
bool m_can_read { false };
+
+ BufferMode m_buffer_mode { BufferMode::Packets };
+
+ Optional<KBuffer> m_scratch_buffer;
};