blob: e631e8687c6b86b24753149bb0676de3fa1e6388 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/*
* ========================================================
*
* HCore
* Copyright Mahrouss Logic, all rights reserved.
*
* ========================================================
*/
#ifndef _INC_NETWORKDEVICE_HPP__
#define _INC_NETWORKDEVICE_HPP__
#include <KernelKit/DeviceManager.hpp>
#include <NetworkKit/IP.hpp>
namespace HCore {
struct NetworkDeviceCommand;
class NetworkDevice final : public DeviceInterface<NetworkDeviceCommand> {
public:
NetworkDevice(void (*out)(NetworkDeviceCommand),
void (*in)(NetworkDeviceCommand),
void (*on_cleanup)(void) = nullptr);
~NetworkDevice() override;
public:
NetworkDevice &operator=(const NetworkDevice &) = default;
NetworkDevice(const NetworkDevice &) = default;
public:
const char *Name() const override { return ("NetworkDevice"); }
private:
void (*fCleanup)(void);
};
struct NetworkDeviceCommand {
UInt32 Command;
UInt32 VLan;
UInt32 DmaLow;
UInt32 DmaHigh;
};
using TCPNetworkDevice = NetworkDevice;
using UDPNetworkDevice = NetworkDevice;
using PPPNetworkDevice = NetworkDevice;
} // namespace HCore
#endif // !_INC_NETWORKDEVICE_HPP__
|