summaryrefslogtreecommitdiff
path: root/tunDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tunDevice.cpp')
-rw-r--r--tunDevice.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/tunDevice.cpp b/tunDevice.cpp
new file mode 100644
index 0000000..66cf395
--- /dev/null
+++ b/tunDevice.cpp
@@ -0,0 +1,25 @@
+
+#include "openvpn/tun.h"
+#include "tunDevice.h"
+
+
+TunDevice::TunDevice(string dev_name)
+{
+// dev = init_tun(dev_name.c_str(), ... );
+
+}
+
+TunDevice::~TunDevice()
+{
+ close_tun(dev);
+}
+
+int TunDevice::read(uint8_t *buf, int len)
+{
+ return read_tun(dev, buf, len);
+}
+
+int TunDevice::write(uint8_t *buf, int len)
+{
+ return write_tun(dev, buf, len);
+}