summaryrefslogtreecommitdiff
path: root/Kernel/Net/IPv4.h
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Net/IPv4.h')
-rw-r--r--Kernel/Net/IPv4.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/Kernel/Net/IPv4.h b/Kernel/Net/IPv4.h
index c5e22c4a46..621ee71c48 100644
--- a/Kernel/Net/IPv4.h
+++ b/Kernel/Net/IPv4.h
@@ -24,7 +24,7 @@ enum class IPv4PacketFlags : u16 {
MoreFragments = 0x2000,
};
-NetworkOrdered<u16> internet_checksum(const void*, size_t);
+NetworkOrdered<u16> internet_checksum(void const*, size_t);
class [[gnu::packed]] IPv4Packet {
public:
@@ -52,14 +52,14 @@ public:
u16 checksum() const { return m_checksum; }
void set_checksum(u16 checksum) { m_checksum = checksum; }
- const IPv4Address& source() const { return m_source; }
- void set_source(const IPv4Address& address) { m_source = address; }
+ IPv4Address const& source() const { return m_source; }
+ void set_source(IPv4Address const& address) { m_source = address; }
- const IPv4Address& destination() const { return m_destination; }
- void set_destination(const IPv4Address& address) { m_destination = address; }
+ IPv4Address const& destination() const { return m_destination; }
+ void set_destination(IPv4Address const& address) { m_destination = address; }
void* payload() { return this + 1; }
- const void* payload() const { return this + 1; }
+ void const* payload() const { return this + 1; }
u16 flags_and_fragment() const { return m_flags_and_fragment; }
u16 fragment_offset() const { return ((u16)m_flags_and_fragment & 0x1fff); }
@@ -106,10 +106,10 @@ private:
static_assert(AssertSize<IPv4Packet, 20>());
-inline NetworkOrdered<u16> internet_checksum(const void* ptr, size_t count)
+inline NetworkOrdered<u16> internet_checksum(void const* ptr, size_t count)
{
u32 checksum = 0;
- auto* w = (const u16*)ptr;
+ auto* w = (u16 const*)ptr;
while (count > 1) {
checksum += AK::convert_between_host_and_network_endian(*w++);
if (checksum & 0x80000000)