summaryrefslogtreecommitdiff
path: root/tunDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tunDevice.cpp')
-rw-r--r--tunDevice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tunDevice.cpp b/tunDevice.cpp
index 81f4cbb..b1ba686 100644
--- a/tunDevice.cpp
+++ b/tunDevice.cpp
@@ -110,7 +110,7 @@ TunDevice::~TunDevice()
close_tun(dev_);
}
-short TunDevice::read(Buffer& buf)
+short TunDevice::read(u_int8_t* buf, u_int32_t len)
{
if(!dev_)
return -1;
@@ -121,15 +121,15 @@ short TunDevice::read(Buffer& buf)
pfd[0].revents = 0;
poll(pfd, 1, -1);
Lock lock(io_mutex_);
- return read_tun(dev_, buf, buf.getLength());
+ return read_tun(dev_, buf, len);
}
-int TunDevice::write(Buffer& buf)
+int TunDevice::write(u_int8_t* buf, u_int32_t len)
{
if(!dev_)
return -1;
Lock lock(io_mutex_);
- return write_tun(dev_, buf, buf.getLength());
+ return write_tun(dev_, buf, len);
}
char* TunDevice::getActualName()