1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

Kernel+LibC: Add support for the IPv4 TOS field via the IP_TOS sockopt

This commit is contained in:
Idan Horowitz 2021-10-27 23:20:24 +03:00 committed by Andreas Kling
parent 20c7fcfedf
commit adc9939a7b
9 changed files with 37 additions and 8 deletions

View file

@ -32,6 +32,9 @@ public:
u8 version() const { return (m_version_and_ihl >> 4) & 0xf; }
void set_version(u8 version) { m_version_and_ihl = (m_version_and_ihl & 0x0f) | (version << 4); }
u8 dscp_and_ecn() const { return m_dscp_and_ecn; }
void set_dscp_and_ecn(u8 dscp_and_ecn) { m_dscp_and_ecn = dscp_and_ecn; }
u8 internet_header_length() const { return m_version_and_ihl & 0xf; }
void set_internet_header_length(u8 ihl) { m_version_and_ihl = (m_version_and_ihl & 0xf0) | (ihl & 0x0f); }