summaryrefslogtreecommitdiff
path: root/tunDevice.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2007-04-22 21:42:24 +0000
committerChristian Pointner <equinox@anytun.org>2007-04-22 21:42:24 +0000
commit69c04f4f3e0186b70cefe82952a31dadc58406ea (patch)
tree78893c2a2b0e98bf2631d42522f2bf616bb4c43b /tunDevice.cpp
parentenc (diff)
initial checkin tunDevice.cpp and h
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);
+}