summaryrefslogtreecommitdiff
path: root/src/bsd/tunDevice.cpp
diff options
context:
space:
mode:
authorMarkus Grüneis <gimpf@gimpf.org>2010-02-18 09:15:27 +0000
committerMarkus Grüneis <gimpf@gimpf.org>2010-02-18 09:15:27 +0000
commite191eab68d905bfe14e3590a92fa653f0ae2ebce (patch)
treea5837b067ecab92c645008b537087b0d163ef1ab /src/bsd/tunDevice.cpp
parentwhitespace only change: unified formatting with "astyle --style=k/r --indent=... (diff)
non-functional changes only: use standard writing of stdint.h types; still import from boost (compiler compatibility)
Diffstat (limited to 'src/bsd/tunDevice.cpp')
-rw-r--r--src/bsd/tunDevice.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bsd/tunDevice.cpp b/src/bsd/tunDevice.cpp
index 87f8578..b4b5e29 100644
--- a/src/bsd/tunDevice.cpp
+++ b/src/bsd/tunDevice.cpp
@@ -54,7 +54,7 @@
#define DEVICE_FILE_MAX 255
-TunDevice::TunDevice(std::string dev_name, std::string dev_type, std::string ifcfg_addr, u_int16_t ifcfg_prefix) : conf_(dev_name, dev_type, ifcfg_addr, ifcfg_prefix, 1400),sys_exec_(NULL)
+TunDevice::TunDevice(std::string dev_name, std::string dev_type, std::string ifcfg_addr, uint16_t ifcfg_prefix) : conf_(dev_name, dev_type, ifcfg_addr, ifcfg_prefix, 1400),sys_exec_(NULL)
{
std::string device_file = "/dev/";
bool dynamic = true;
@@ -80,7 +80,7 @@ TunDevice::TunDevice(std::string dev_name, std::string dev_type, std::string ifc
AnytunError::throwErr() << "unable to recognize type of device (tun or tap)";
}
- u_int32_t dev_id=0;
+ uint32_t dev_id=0;
if(dynamic) {
for(; dev_id <= DEVICE_FILE_MAX; ++dev_id) {
std::ostringstream ds;
@@ -211,7 +211,7 @@ int TunDevice::fix_return(int ret, size_t pi_length) const
return (static_cast<size_t>(ret) > pi_length ? (ret - pi_length) : 0);
}
-int TunDevice::read(u_int8_t* buf, u_int32_t len)
+int TunDevice::read(uint8_t* buf, uint32_t len)
{
if(fd_ < 0) {
return -1;
@@ -219,7 +219,7 @@ int TunDevice::read(u_int8_t* buf, u_int32_t len)
if(with_pi_) {
struct iovec iov[2];
- u_int32_t type;
+ uint32_t type;
iov[0].iov_base = &type;
iov[0].iov_len = sizeof(type);
@@ -231,7 +231,7 @@ int TunDevice::read(u_int8_t* buf, u_int32_t len)
}
}
-int TunDevice::write(u_int8_t* buf, u_int32_t len)
+int TunDevice::write(uint8_t* buf, uint32_t len)
{
if(fd_ < 0) {
return -1;
@@ -243,7 +243,7 @@ int TunDevice::write(u_int8_t* buf, u_int32_t len)
if(with_pi_) {
struct iovec iov[2];
- u_int32_t type;
+ uint32_t type;
struct ip* hdr = reinterpret_cast<struct ip*>(buf);
type = 0;