summaryrefslogtreecommitdiff
path: root/src/libstrongswan/networking/tun_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/networking/tun_device.c')
-rw-r--r--src/libstrongswan/networking/tun_device.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstrongswan/networking/tun_device.c b/src/libstrongswan/networking/tun_device.c
index 81d215677..de925553f 100644
--- a/src/libstrongswan/networking/tun_device.c
+++ b/src/libstrongswan/networking/tun_device.c
@@ -96,7 +96,7 @@ struct private_tun_device_t {
/**
* Netmask for address
*/
- u_int8_t netmask;
+ uint8_t netmask;
};
/**
@@ -105,7 +105,7 @@ struct private_tun_device_t {
#if __FreeBSD__ >= 10
static bool set_address_and_mask(struct in_aliasreq *ifra, host_t *addr,
- u_int8_t netmask)
+ uint8_t netmask)
{
host_t *mask;
@@ -132,7 +132,7 @@ static bool set_address_and_mask(struct in_aliasreq *ifra, host_t *addr,
* on FreeBSD 10 an newer.
*/
static bool set_address_impl(private_tun_device_t *this, host_t *addr,
- u_int8_t netmask)
+ uint8_t netmask)
{
struct in_aliasreq ifra;
@@ -171,7 +171,7 @@ static bool set_address_impl(private_tun_device_t *this, host_t *addr,
* Set the address using the classic SIOCSIFADDR etc. commands on other systems.
*/
static bool set_address_impl(private_tun_device_t *this, host_t *addr,
- u_int8_t netmask)
+ uint8_t netmask)
{
struct ifreq ifr;
host_t *mask;
@@ -218,7 +218,7 @@ static bool set_address_impl(private_tun_device_t *this, host_t *addr,
#endif /* __FreeBSD__ */
METHOD(tun_device_t, set_address, bool,
- private_tun_device_t *this, host_t *addr, u_int8_t netmask)
+ private_tun_device_t *this, host_t *addr, uint8_t netmask)
{
if (!set_address_impl(this, addr, netmask))
{
@@ -231,7 +231,7 @@ METHOD(tun_device_t, set_address, bool,
}
METHOD(tun_device_t, get_address, host_t*,
- private_tun_device_t *this, u_int8_t *netmask)
+ private_tun_device_t *this, uint8_t *netmask)
{
if (netmask && this->address)
{
@@ -326,7 +326,7 @@ METHOD(tun_device_t, write_packet, bool,
#ifdef __APPLE__
/* UTUN's expect the packets to be prepended by a 32-bit protocol number
* instead of parsing the packet again, we assume IPv4 for now */
- u_int32_t proto = htonl(AF_INET);
+ uint32_t proto = htonl(AF_INET);
packet = chunk_cata("cc", chunk_from_thing(proto), packet);
#endif
s = write(this->tunfd, packet.ptr, packet.len);
@@ -364,7 +364,7 @@ METHOD(tun_device_t, read_packet, bool,
data.len = len;
#ifdef __APPLE__
/* UTUN's prepend packets with a 32-bit protocol number */
- data = chunk_skip(data, sizeof(u_int32_t));
+ data = chunk_skip(data, sizeof(uint32_t));
#endif
*packet = chunk_clone(data);
return TRUE;