blob: fd6b1d2b3df58e2f77c4a60c58ebe29c176b2a11 (
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
51
52
53
|
/*
* ========================================================
*
* hCore
* Copyright XPX Corp, all rights reserved.
*
* ========================================================
*/
#ifndef _INC_NETWORKDEVICE_HPP__
#define _INC_NETWORKDEVICE_HPP__
#include <KernelKit/Device.hpp>
#include <NetworkKit/IP.hpp>
namespace hCore
{
struct NetworkDeviceCommand;
class NetworkDevice final : public IDevice<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__
|