summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/NetworkKit/IP.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-23 19:13:48 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-23 19:15:17 +0100
commita13e1c0911c0627184bc38f18c7fdda64447b3ad (patch)
tree073a62c09bf216e85a3f310376640fa1805147f9 /dev/Kernel/NetworkKit/IP.h
parent149fa096eb306d03686b3b67e813cf1a78e08cd0 (diff)
meta(kernel): Reworked repository's filesystem structure.
Removing useless parts of the project too. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/NetworkKit/IP.h')
-rw-r--r--dev/Kernel/NetworkKit/IP.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/dev/Kernel/NetworkKit/IP.h b/dev/Kernel/NetworkKit/IP.h
deleted file mode 100644
index 4a552d87..00000000
--- a/dev/Kernel/NetworkKit/IP.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <KernelKit/DebugOutput.h>
-#include <NewKit/Defines.h>
-#include <NewKit/Ref.h>
-#include <NewKit/KString.h>
-
-namespace NeOS
-{
- class RawIPAddress6;
- class RawIPAddress;
- class IPFactory;
-
- class RawIPAddress final
- {
- private:
- explicit RawIPAddress(char bytes[4]);
- ~RawIPAddress() = default;
-
- RawIPAddress& operator=(const RawIPAddress&) = delete;
- RawIPAddress(const RawIPAddress&) = default;
-
- public:
- Char* Address();
-
- Char& operator[](const Size& index);
-
- BOOL operator==(const RawIPAddress& ipv6);
- BOOL operator!=(const RawIPAddress& ipv6);
-
- private:
- Char 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(char Bytes[8]);
- ~RawIPAddress6() = default;
-
- RawIPAddress6& operator=(const RawIPAddress6&) = delete;
- RawIPAddress6(const RawIPAddress6&) = default;
-
- public:
- char* Address()
- {
- return fAddr;
- }
-
- char& operator[](const Size& index);
-
- bool operator==(const RawIPAddress6& ipv6);
- bool operator!=(const RawIPAddress6& ipv6);
-
- private:
- char fAddr[8];
-
- friend IPFactory;
- };
-
- /**
- * @brief IP Creation helpers
- */
- class IPFactory final
- {
- public:
- static ErrorOr<KString> ToKString(Ref<RawIPAddress6>& ipv6);
- static ErrorOr<KString> ToKString(Ref<RawIPAddress>& ipv4);
- static bool IpCheckVersion4(const Char* ip);
- };
-} // namespace NeOS