From e191eab68d905bfe14e3590a92fa653f0ae2ebce Mon Sep 17 00:00:00 2001 From: Markus Grüneis Date: Thu, 18 Feb 2010 09:15:27 +0000 Subject: non-functional changes only: use standard writing of stdint.h types; still import from boost (compiler compatibility) --- src/bsd/tunDevice.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/bsd') 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(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(buf); type = 0; -- cgit v1.2.3