diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-05-19 19:13:03 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-05-19 19:13:03 +0200 |
| commit | aad2c069563a3e7318b575216db6deb313445f2c (patch) | |
| tree | 2ba42b767473bebdca9d2538d120f0b4d82194e4 /Kernel/NetworkKit | |
| parent | c0428f8e5feba9573e572a1a1b3c66cfa1f29108 (diff) | |
MHR-23: Fix run_format.sh, inl files needs to be formated as well.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Kernel/NetworkKit')
| -rw-r--r-- | Kernel/NetworkKit/IP.hpp | 10 | ||||
| -rw-r--r-- | Kernel/NetworkKit/IPCEP.hxx | 21 | ||||
| -rw-r--r-- | Kernel/NetworkKit/MAC.hxx | 2 | ||||
| -rw-r--r-- | Kernel/NetworkKit/NetworkDevice.hpp | 10 | ||||
| -rw-r--r-- | Kernel/NetworkKit/NetworkDevice.inl | 34 |
5 files changed, 41 insertions, 36 deletions
diff --git a/Kernel/NetworkKit/IP.hpp b/Kernel/NetworkKit/IP.hpp index 94d0d3be..0598c1de 100644 --- a/Kernel/NetworkKit/IP.hpp +++ b/Kernel/NetworkKit/IP.hpp @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright SoftwareLabs + Copyright SoftwareLabs ------------------------------------------- */ @@ -42,8 +42,8 @@ namespace NewOS }; /** - * @brief IPv6 address. - */ + * @brief IPv6 address. + */ class RawIPAddress6 final { private: @@ -71,8 +71,8 @@ namespace NewOS }; /** - * @brief IP Creation helpers - */ + * @brief IP Creation helpers + */ class IPFactory final { public: diff --git a/Kernel/NetworkKit/IPCEP.hxx b/Kernel/NetworkKit/IPCEP.hxx index 5c34d47e..6b30ec04 100644 --- a/Kernel/NetworkKit/IPCEP.hxx +++ b/Kernel/NetworkKit/IPCEP.hxx @@ -1,8 +1,9 @@ /* ------------------------------------------- - Copyright SoftwareLabs. + Copyright SoftwareLabs. - File: IPCEP.hxx, Purpose: Common IPC protocol. + File: IPCEP.hxx. + Purpose: IPC protocol. ------------------------------------------- */ @@ -12,16 +13,16 @@ #include <NewKit/Defines.hpp> #include <NewKit/String.hpp> -/// @brief Common IPC Endpoint Protocol (Common IPC for short). +/// @brief IPC Endpoint Protocol (IPCEP for short). /// IA separator. -#define kRemoteSeparator "." +#define cRemoteSeparator "." /// Interchange address, consists of domain:namespace. -#define kRemoteInvalid "00.00.00.00:0000" -#define kRemoteBitWidth 96 /* 96-bit address space. */ +#define cRemoteInvalid "00.00.00.00:0000" +#define cRemoteBitWidth (96) /* 96-bit address space. */ -#define kRemoteHeaderMagic 0xFEEDFACE +#define cRemoteHeaderMagic (0x4950434550) namespace NewOS { @@ -36,14 +37,14 @@ namespace NewOS enum { - kIPCEPLittleEndian = 0, - kIPCEPBigEndian = 1 + eIPCEPLittleEndian = 0, + eIPCEPBigEndian = 1 }; /// @brief IPCEP connection header typedef struct IPCEPConnectionHeader { - UInt32 IpcHeader; // kRemoteHeaderMagic + UInt32 IpcHeader; // cRemoteHeaderMagic UInt8 IpcEndianess; // 0 : LE, 1 : BE SizeT IpcPacketSize; IPCEPAddressType IpcFrom; diff --git a/Kernel/NetworkKit/MAC.hxx b/Kernel/NetworkKit/MAC.hxx index 30a865ac..cc76022a 100644 --- a/Kernel/NetworkKit/MAC.hxx +++ b/Kernel/NetworkKit/MAC.hxx @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright SoftwareLabs + Copyright SoftwareLabs ------------------------------------------- */ diff --git a/Kernel/NetworkKit/NetworkDevice.hpp b/Kernel/NetworkKit/NetworkDevice.hpp index b00ce7a6..ecbc80b7 100644 --- a/Kernel/NetworkKit/NetworkDevice.hpp +++ b/Kernel/NetworkKit/NetworkDevice.hpp @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright SoftwareLabs + Copyright SoftwareLabs ------------------------------------------- */ @@ -16,8 +16,8 @@ namespace NewOS class NetworkDevice; /** -* \brief Network device interface, establishes a connection to the NIC. -*/ + * \brief Network device interface, establishes a connection to the NIC. + */ class NetworkDevice final : public DeviceInterface<NetworkDeviceCommand> { public: @@ -56,8 +56,8 @@ namespace NewOS /// @brief PPP device. using PPPNetworkDevice = NetworkDevice; - /// @brief HPC device. - using HPCNetworkDevice = NetworkDevice; + /// @brief IPCEP device. + using IPCEPNetworkDevice = NetworkDevice; } // namespace NewOS #include <NetworkKit/NetworkDevice.inl> diff --git a/Kernel/NetworkKit/NetworkDevice.inl b/Kernel/NetworkKit/NetworkDevice.inl index 0b927d0e..614ccadf 100644 --- a/Kernel/NetworkKit/NetworkDevice.inl +++ b/Kernel/NetworkKit/NetworkDevice.inl @@ -1,27 +1,31 @@ /* ------------------------------------------- - Copyright SoftwareLabs + Copyright SoftwareLabs ------------------------------------------- */ /*** - Dtor and ctors. + Dtor and ctors. */ -namespace NewOS { -NetworkDevice::NetworkDevice(void (*out)(NetworkDeviceCommand), - void (*in)(NetworkDeviceCommand), - void (*on_cleanup)(void)) - : DeviceInterface<NetworkDeviceCommand>(out, in), fCleanup(on_cleanup) { - kcout << "NK: NetworkDevice initialize.\r"; +namespace NewOS +{ + NetworkDevice::NetworkDevice(void (*out)(NetworkDeviceCommand), + void (*in)(NetworkDeviceCommand), + void (*on_cleanup)(void)) + : DeviceInterface<NetworkDeviceCommand>(out, in), fCleanup(on_cleanup) + { + kcout << "New OS: NetworkDevice initialized.\r"; - MUST_PASS(out && in && on_cleanup); -} + MUST_PASS(out && in && on_cleanup); + } -NetworkDevice::~NetworkDevice() { - MUST_PASS(fCleanup); + NetworkDevice::~NetworkDevice() + { + MUST_PASS(fCleanup); - kcout << "NK: NetworkDevice cleanup.\r"; - if (fCleanup) fCleanup(); -} + kcout << "New OS: NetworkDevice cleanup.\r"; + if (fCleanup) + fCleanup(); + } } // namespace NewOS |
