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:
parent
5bd9844dd6
commit
75e0ddd46a
3 changed files with 13 additions and 18 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue