From 69c04f4f3e0186b70cefe82952a31dadc58406ea Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 22 Apr 2007 21:42:24 +0000 Subject: initial checkin tunDevice.cpp and h --- tunDevice.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tunDevice.cpp (limited to 'tunDevice.cpp') 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); +} -- cgit v1.2.3