summaryrefslogtreecommitdiffhomepage
path: root/Kernel
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/HALKit/AMD64/HalKernelMain.cxx4
-rw-r--r--Kernel/HALKit/ARM64/HalKernelMain.cxx4
-rw-r--r--Kernel/KernelKit/User.hxx1
-rw-r--r--Kernel/NetworkKit/IPC.hxx (renamed from Kernel/NetworkKit/IPCEP.hxx)25
-rw-r--r--Kernel/NetworkKit/NetworkDevice.hpp2
-rw-r--r--Kernel/Sources/Network/IPC.cxx (renamed from Kernel/Sources/Network/IPCEP.cxx)6
6 files changed, 22 insertions, 20 deletions
diff --git a/Kernel/HALKit/AMD64/HalKernelMain.cxx b/Kernel/HALKit/AMD64/HalKernelMain.cxx
index 1628e5e9..a4067c84 100644
--- a/Kernel/HALKit/AMD64/HalKernelMain.cxx
+++ b/Kernel/HALKit/AMD64/HalKernelMain.cxx
@@ -17,7 +17,7 @@
#include <Modules/CoreCG/Accessibility.hxx>
#include <KernelKit/CodeManager.hpp>
#include <Modules/ACPI/ACPIFactoryInterface.hxx>
-#include <NetworkKit/IPCEP.hxx>
+#include <NetworkKit/IPC.hxx>
#include <CFKit/Property.hpp>
#define mInitKernel(X) \
@@ -141,7 +141,7 @@ EXTERN_C void hal_init_platform(
};
kSyscalls[cLPCSanitizeMsg].Leak().Leak()->fProc = [](Kernel::VoidPtr rdx) -> void {
- Kernel::ipc_sanitize_packet(reinterpret_cast<Kernel::IPCEPMessageHeader*>(rdx));
+ Kernel::ipc_sanitize_packet(reinterpret_cast<Kernel::IPC_MESSAGE_STRUCT*>(rdx));
};
kSyscalls[cNewInterrupt].Leak().Leak()->fProc = [](Kernel::VoidPtr rdx) -> void {
diff --git a/Kernel/HALKit/ARM64/HalKernelMain.cxx b/Kernel/HALKit/ARM64/HalKernelMain.cxx
index a2d215f6..a5285f0f 100644
--- a/Kernel/HALKit/ARM64/HalKernelMain.cxx
+++ b/Kernel/HALKit/ARM64/HalKernelMain.cxx
@@ -17,7 +17,7 @@
#include <Modules/CoreCG/Accessibility.hxx>
#include <KernelKit/CodeManager.hpp>
#include <Modules/ACPI/ACPIFactoryInterface.hxx>
-#include <NetworkKit/IPCEP.hxx>
+#include <NetworkKit/IPC.hxx>
#define KERNEL_INIT(X) \
X; \
@@ -99,7 +99,7 @@ EXTERN_C void hal_init_platform(
};
kSyscalls[cLPCSanitizeMsg].Leak().Leak()->fProc = [](Kernel::VoidPtr rdx) -> void {
- Kernel::ipc_sanitize_packet(reinterpret_cast<Kernel::IPCEPMessageHeader*>(rdx));
+ Kernel::ipc_sanitize_packet(reinterpret_cast<Kernel::IPC_MESSAGE_STRUCT*>(rdx));
};
kSyscalls[cNewInterrupt].Leak().Leak()->fProc = [](Kernel::VoidPtr rdx) -> void {
diff --git a/Kernel/KernelKit/User.hxx b/Kernel/KernelKit/User.hxx
index 861fd17a..c84910c5 100644
--- a/Kernel/KernelKit/User.hxx
+++ b/Kernel/KernelKit/User.hxx
@@ -57,6 +57,7 @@ namespace Kernel
public:
/// @brief Get software ring
const RingKind& Ring() noexcept;
+
/// @brief Get user name
StringView& Name() noexcept;
diff --git a/Kernel/NetworkKit/IPCEP.hxx b/Kernel/NetworkKit/IPC.hxx
index 7a7d8fc9..e53d8f1c 100644
--- a/Kernel/NetworkKit/IPCEP.hxx
+++ b/Kernel/NetworkKit/IPC.hxx
@@ -2,7 +2,7 @@
Copyright ZKA Technologies.
- File: IPCEP.hxx.
+ File: IPC.hxx.
Purpose: IPC protocol.
------------------------------------------- */
@@ -13,7 +13,8 @@
#include <NewKit/Defines.hpp>
#include <NewKit/String.hpp>
-/// @brief IPC Endpoint Protocol (IPCEP for short).
+/// @file IPC.hxx
+/// @brief IPC protocol.
/// IA separator.
#define cRemoteSeparator "."
@@ -26,7 +27,7 @@
namespace Kernel
{
/// @brief 128-bit IPC address.
- struct PACKED IPCEPAddress final
+ struct PACKED IPC_ADDRESS_STRUCT final
{
UInt64 ProcessID;
UInt64 ProcessTeam;
@@ -35,18 +36,18 @@ namespace Kernel
// some operators.
////////////////////////////////////
- bool operator==(const IPCEPAddress& addr) noexcept
+ bool operator==(const IPC_ADDRESS_STRUCT& addr) noexcept
{
return addr.ProcessID == this->ProcessID && addr.ProcessTeam == this->ProcessTeam;
}
- bool operator==(IPCEPAddress& addr) noexcept
+ bool operator==(IPC_ADDRESS_STRUCT& addr) noexcept
{
return addr.ProcessID == this->ProcessID && addr.ProcessTeam == this->ProcessTeam;
}
};
- typedef struct IPCEPAddress IPCEPAddressType;
+ typedef struct IPC_ADDRESS_STRUCT IPCEPAddressKind;
enum
{
@@ -56,24 +57,24 @@ namespace Kernel
constexpr auto cIPCEPMsgSize = 6094U;
- /// @brief IPCEP connection header, message cannot be greater than 6K.
- typedef struct IPCEPMessageHeader final
+ /// @brief IPC connection header, message cannot be greater than 6K.
+ typedef struct IPC_MESSAGE_STRUCT final
{
UInt32 IpcHeaderMagic; // cRemoteHeaderMagic
UInt8 IpcEndianess; // 0 : LE, 1 : BE
SizeT IpcPacketSize;
- IPCEPAddressType IpcFrom;
- IPCEPAddressType IpcTo;
+ IPCEPAddressKind IpcFrom;
+ IPCEPAddressKind IpcTo;
UInt32 IpcCRC32;
UInt32 IpcMsg;
UInt32 IpcMsgSz;
UInt8 IpcData[cIPCEPMsgSize];
- } PACKED IPCEPMessageHeader;
+ } PACKED IPC_MESSAGE_STRUCT;
/// @brief Sanitize packet function
/// @retval true packet is correct.
/// @retval false packet is incorrect and process has crashed.
- Bool ipc_sanitize_packet(IPCEPMessageHeader* pckt);
+ Bool ipc_sanitize_packet(IPC_MESSAGE_STRUCT* pckt);
} // namespace Kernel
#endif // _INC_IPC_ENDPOINT_HXX_
diff --git a/Kernel/NetworkKit/NetworkDevice.hpp b/Kernel/NetworkKit/NetworkDevice.hpp
index 956475aa..eed5f071 100644
--- a/Kernel/NetworkKit/NetworkDevice.hpp
+++ b/Kernel/NetworkKit/NetworkDevice.hpp
@@ -62,7 +62,7 @@ namespace Kernel
/// @brief PPP device.
using PPPNetworkDevice = NetworkDevice;
- /// @brief IPCEP device.
+ /// @brief IPC device.
using IPCEPNetworkDevice = NetworkDevice;
/// @brief GRPS device.
diff --git a/Kernel/Sources/Network/IPCEP.cxx b/Kernel/Sources/Network/IPC.cxx
index 5271be05..12ec6c1a 100644
--- a/Kernel/Sources/Network/IPCEP.cxx
+++ b/Kernel/Sources/Network/IPC.cxx
@@ -4,7 +4,7 @@
------------------------------------------- */
-#include <NetworkKit/IPCEP.hxx>
+#include <NetworkKit/IPC.hxx>
#include <KernelKit/LPC.hxx>
#include <KernelKit/ProcessScheduler.hxx>
@@ -12,7 +12,7 @@ using namespace Kernel;
/// @internal
/// @brief The internal sanitize function.
-Bool ipc_int_sanitize_packet(IPCEPMessageHeader* pckt)
+Bool ipc_int_sanitize_packet(IPC_MESSAGE_STRUCT* pckt)
{
auto endian = DEDUCE_ENDIAN(pckt, ((char*)pckt)[0]);
@@ -54,7 +54,7 @@ namespace Kernel
/// @brief Sanitize packet function
/// @retval true packet is correct.
/// @retval false packet is incorrect and process has crashed.
- Bool ipc_sanitize_packet(IPCEPMessageHeader* pckt)
+ Bool ipc_sanitize_packet(IPC_MESSAGE_STRUCT* pckt)
{
if (!pckt ||
!ipc_int_sanitize_packet(pckt))