From 83d870e58457a1d335a1d9b9966a6a1887cc297b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 24 Nov 2025 03:02:43 +0100 Subject: feat! breaking changes on kernel sources. Signed-off-by: Amlal El Mahrouss --- dev/kernel/NetworkKit/IP.h | 76 ---------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 dev/kernel/NetworkKit/IP.h (limited to 'dev/kernel/NetworkKit/IP.h') diff --git a/dev/kernel/NetworkKit/IP.h b/dev/kernel/NetworkKit/IP.h deleted file mode 100644 index b19d132f..00000000 --- a/dev/kernel/NetworkKit/IP.h +++ /dev/null @@ -1,76 +0,0 @@ -/* ======================================== - - Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. - -======================================== */ - -#pragma once - -#include -#include -#include -#include - -namespace Kernel { -class RawIPAddress6; -class RawIPAddress; -class IPFactory; - -class RawIPAddress final { - private: - explicit RawIPAddress(UInt8 bytes[4]); - ~RawIPAddress() = default; - - RawIPAddress& operator=(const RawIPAddress&) = delete; - RawIPAddress(const RawIPAddress&) = default; - - public: - UInt8* Address(); - - UInt8& operator[](const Size& index); - - BOOL operator==(const RawIPAddress& ipv6); - BOOL operator!=(const RawIPAddress& ipv6); - - private: - UInt8 fAddr[4]; - - friend IPFactory; // it is the one creating these addresses, thus this - // is why the constructors are private. -}; - -/** - * @brief IPv6 address. - */ -class RawIPAddress6 final { - private: - explicit RawIPAddress6(UInt8 Bytes[16]); - ~RawIPAddress6() = default; - - RawIPAddress6& operator=(const RawIPAddress6&) = delete; - RawIPAddress6(const RawIPAddress6&) = default; - - public: - UInt8* Address() { return fAddr; } - - UInt8& operator[](const Size& index); - - bool operator==(const RawIPAddress6& ipv6); - bool operator!=(const RawIPAddress6& ipv6); - - private: - UInt8 fAddr[16]; - - friend IPFactory; -}; - -/** - * @brief IP Creation helpers - */ -class IPFactory final { - public: - static ErrorOr ToKString(Ref& ipv6); - static ErrorOr ToKString(Ref& ipv4); - static bool IpCheckVersion4(const Char* ip); -}; -} // namespace Kernel -- cgit v1.2.3