From fcccf780db4cdc23858c108c6cde1d08360ee88f Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 3 Feb 2024 14:52:52 +0100 Subject: Kernel: Got stuck at the way I do things, trying another approach see hcore ticket HCR-11 in Jira. Signed-off-by: Amlal El Mahrouss --- Private/NetworkKit/NetworkDevice.hpp | 57 +++++++++++++++++------------------- 1 file changed, 27 insertions(+), 30 deletions(-) (limited to 'Private/NetworkKit/NetworkDevice.hpp') diff --git a/Private/NetworkKit/NetworkDevice.hpp b/Private/NetworkKit/NetworkDevice.hpp index 31a304cf..a9edb09c 100644 --- a/Private/NetworkKit/NetworkDevice.hpp +++ b/Private/NetworkKit/NetworkDevice.hpp @@ -13,41 +13,38 @@ #include #include -namespace HCore -{ - struct NetworkDeviceCommand; +namespace HCore { +struct NetworkDeviceCommand; - class NetworkDevice final : public DeviceInterface - { - public: - NetworkDevice(void(*out)(NetworkDeviceCommand), void(*in)(NetworkDeviceCommand), - void(*on_cleanup)(void) = nullptr); +class NetworkDevice final : public DeviceInterface { + public: + NetworkDevice(void (*out)(NetworkDeviceCommand), + void (*in)(NetworkDeviceCommand), + void (*on_cleanup)(void) = nullptr); - ~NetworkDevice() override; + ~NetworkDevice() override; - public: - NetworkDevice &operator=(const NetworkDevice &) = default; - NetworkDevice(const NetworkDevice &) = default; + public: + NetworkDevice &operator=(const NetworkDevice &) = default; + NetworkDevice(const NetworkDevice &) = default; - public: - const char* Name() const override { return ("NetworkDevice"); } + public: + const char *Name() const override { return ("NetworkDevice"); } - private: - void(*fCleanup)(void); + private: + void (*fCleanup)(void); +}; - }; +struct NetworkDeviceCommand { + UInt32 Command; + UInt32 VLan; + UInt32 DmaLow; + UInt32 DmaHigh; +}; - struct NetworkDeviceCommand - { - UInt32 Command; - UInt32 VLan; - UInt32 DmaLow; - UInt32 DmaHigh; - }; +using TCPNetworkDevice = NetworkDevice; +using UDPNetworkDevice = NetworkDevice; +using PPPNetworkDevice = NetworkDevice; +} // namespace HCore - using TCPNetworkDevice = NetworkDevice; - using UDPNetworkDevice = NetworkDevice; - using PPPNetworkDevice = NetworkDevice; -} // namespace HCore - -#endif // !_INC_NETWORKDEVICE_HPP__ +#endif // !_INC_NETWORKDEVICE_HPP__ -- cgit v1.2.3