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

TCP: Start working on auto-closing connections when we get FIN.

This commit is contained in:
Andreas Kling 2019-03-14 15:23:32 +01:00
parent 4629272135
commit 25e521f510
6 changed files with 35 additions and 6 deletions

View file

@ -37,6 +37,7 @@ public:
bool has_syn() const { return flags() & TCPFlags::SYN; }
bool has_ack() const { return flags() & TCPFlags::ACK; }
bool has_fin() const { return flags() & TCPFlags::FIN; }
byte data_offset() const { return (m_flags_and_data_offset & 0xf000) >> 12; }
void set_data_offset(word data_offset) { m_flags_and_data_offset = (m_flags_and_data_offset & ~0xf000) | data_offset << 12; }