forked from Srar/node-tap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (31 loc) · 872 Bytes
/
main.cpp
File metadata and controls
38 lines (31 loc) · 872 Bytes
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
#include <nan.h>
#include <string>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <winsock2.h>
#include <windows.h>
#include <ws2def.h>
#include <ws2ipdef.h>
#include <iphlpapi.h>
#include <netioapi.h>
#include <cstdint>
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "iphlpapi.lib")
using namespace std;
#include "./deviceinfo.hpp"
#include "./devicecontrol.hpp"
#include "./ipforward_entry.hpp"
#include "./create_device_file.hpp"
#include "./rwevent_process.hpp"
NAN_MODULE_INIT(Initialize)
{
NAN_EXPORT(target, N_GetAllDevicesInfo);
NAN_EXPORT(target, N_DeviceControl);
NAN_EXPORT(target, N_CreateDeviceFile);
NAN_EXPORT(target, N_GetIpforwardEntry);
NAN_EXPORT(target, N_CreateIpforwardEntry);
NAN_EXPORT(target, N_DeleteIpforwardEntry);
RwEventProcess::Init(target);
}
NODE_MODULE(addon, Initialize);