summaryrefslogtreecommitdiffhomepage
path: root/Private/NetworkKit/NetworkDevice.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-03-05 16:56:43 +0000
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-03-05 16:56:43 +0000
commite430bfff418489e34b37653b85ce358e0df7fd51 (patch)
treeb7c118158817d310c8418d946f127d93675ed84b /Private/NetworkKit/NetworkDevice.hpp
parent3f898e74b7666acf51da16b03c2866ce379d8eb2 (diff)
parent0ecf818273008e96032ba5013ec55372c6a82e92 (diff)
Merge branch 'Amllx-trunk-patch-989e' into 'trunk'
Kernel: merge new network code into trunk. See merge request mahrouss-logic/micro-kernel!11
Diffstat (limited to 'Private/NetworkKit/NetworkDevice.hpp')
-rw-r--r--Private/NetworkKit/NetworkDevice.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/Private/NetworkKit/NetworkDevice.hpp b/Private/NetworkKit/NetworkDevice.hpp
index 94f17bb9..1550afd1 100644
--- a/Private/NetworkKit/NetworkDevice.hpp
+++ b/Private/NetworkKit/NetworkDevice.hpp
@@ -12,12 +12,16 @@
namespace HCore {
struct NetworkDeviceCommand;
+class NetworkDevice;
+/**
+* \brief Network device interface, establishes a connection to the NIC.
+*/
class NetworkDevice final : public DeviceInterface<NetworkDeviceCommand> {
public:
NetworkDevice(void (*out)(NetworkDeviceCommand),
void (*in)(NetworkDeviceCommand),
- void (*on_cleanup)(void) = nullptr);
+ void (*onCleanup)(void) = nullptr);
~NetworkDevice() override;
@@ -26,13 +30,13 @@ class NetworkDevice final : public DeviceInterface<NetworkDeviceCommand> {
NetworkDevice(const NetworkDevice &) = default;
public:
- const char *Name() const override { return ("NetworkDevice"); }
+ const char *Name() const override { return "NetworkDevice"; }
private:
void (*fCleanup)(void);
};
-struct NetworkDeviceCommand {
+struct PACKED NetworkDeviceCommand final {
UInt32 Command;
UInt32 VLan;
UInt32 DmaLow;
@@ -44,4 +48,6 @@ using UDPNetworkDevice = NetworkDevice;
using PPPNetworkDevice = NetworkDevice;
} // namespace HCore
+#include <NetworkKit/NetworkDevice.inl>
+
#endif // !_INC_NETWORKDEVICE_HPP__