Kernel: Make better abstractions for networking

This commit is contained in:
2024-02-06 12:30:01 +02:00
parent f804e87f7d
commit 5da59c9151
19 changed files with 566 additions and 264 deletions

View File

@@ -0,0 +1,24 @@
#pragma once
#include <BAN/Endianness.h>
#include <stdint.h>
namespace Kernel
{
struct ICMPHeader
{
uint8_t type;
uint8_t code;
BAN::NetworkEndian<uint16_t> checksum;
BAN::NetworkEndian<uint32_t> rest;
};
static_assert(sizeof(ICMPHeader) == 8);
enum ICMPType : uint8_t
{
EchoReply = 0x00,
EchoRequest = 0x08,
};
}