1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

Kernel: More work on ICMP support.

We can now kinda sorta respond to ICMP::EchoRequest although there's
still something not entirely right with the packets.
This commit is contained in:
Andreas Kling 2019-03-12 04:39:50 +01:00
parent 5bd9844dd6
commit 75e0ddd46a
3 changed files with 13 additions and 18 deletions

View file

@ -38,8 +38,8 @@ public:
const IPv4Address& destination() const { return m_destination; }
void set_destination(const IPv4Address& address) { m_destination = address; }
void* payload() { return m_payload; }
const void* payload() const { return m_payload; }
void* payload() { return this + 1; }
const void* payload() const { return this + 1; }
private:
byte m_version_and_ihl;
@ -52,7 +52,6 @@ private:
word m_checksum;
IPv4Address m_source;
IPv4Address m_destination;
byte m_payload[0];
};
static_assert(sizeof(IPv4Packet) == 20);