diff options
author | Christian Pointner <equinox@anytun.org> | 2007-04-22 21:42:24 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2007-04-22 21:42:24 +0000 |
commit | 69c04f4f3e0186b70cefe82952a31dadc58406ea (patch) | |
tree | 78893c2a2b0e98bf2631d42522f2bf616bb4c43b /tunDevice.cpp | |
parent | enc (diff) |
initial checkin tunDevice.cpp and h
Diffstat (limited to 'tunDevice.cpp')
-rw-r--r-- | tunDevice.cpp | 25 |
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); +} |