summaryrefslogtreecommitdiff
path: root/src/libcharon/encoding/payloads/endpoint_notify.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2016-07-16 15:19:53 +0200
committerYves-Alexis Perez <corsac@debian.org>2016-07-16 15:19:53 +0200
commitbf372706c469764d59e9f29c39e3ecbebd72b8d2 (patch)
tree0f0e296e2d50e4a7faf99ae6fa428d2681e81ea1 /src/libcharon/encoding/payloads/endpoint_notify.c
parent518dd33c94e041db0444c7d1f33da363bb8e3faf (diff)
downloadvyos-strongswan-bf372706c469764d59e9f29c39e3ecbebd72b8d2.tar.gz
vyos-strongswan-bf372706c469764d59e9f29c39e3ecbebd72b8d2.zip
Imported Upstream version 5.5.0
Diffstat (limited to 'src/libcharon/encoding/payloads/endpoint_notify.c')
-rw-r--r--src/libcharon/encoding/payloads/endpoint_notify.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/libcharon/encoding/payloads/endpoint_notify.c b/src/libcharon/encoding/payloads/endpoint_notify.c
index ebe5f32f7..afeee72e4 100644
--- a/src/libcharon/encoding/payloads/endpoint_notify.c
+++ b/src/libcharon/encoding/payloads/endpoint_notify.c
@@ -33,7 +33,7 @@ struct private_endpoint_notify_t {
/**
* Priority
*/
- u_int32_t priority;
+ uint32_t priority;
/**
* Family
@@ -83,36 +83,36 @@ static private_endpoint_notify_t *endpoint_notify_create();
/**
* Helper functions to parse integer values
*/
-static status_t parse_uint8(u_int8_t **cur, u_int8_t *top, u_int8_t *val)
+static status_t parse_uint8(uint8_t **cur, uint8_t *top, uint8_t *val)
{
- if (*cur + sizeof(u_int8_t) > top)
+ if (*cur + sizeof(uint8_t) > top)
{
return FAILED;
}
- *val = *(u_int8_t*)*cur;
- *cur += sizeof(u_int8_t);
+ *val = *(uint8_t*)*cur;
+ *cur += sizeof(uint8_t);
return SUCCESS;
}
-static status_t parse_uint16(u_int8_t **cur, u_int8_t *top, u_int16_t *val)
+static status_t parse_uint16(uint8_t **cur, uint8_t *top, uint16_t *val)
{
- if (*cur + sizeof(u_int16_t) > top)
+ if (*cur + sizeof(uint16_t) > top)
{
return FAILED;
}
- *val = ntohs(*(u_int16_t*)*cur);
- *cur += sizeof(u_int16_t);
+ *val = ntohs(*(uint16_t*)*cur);
+ *cur += sizeof(uint16_t);
return SUCCESS;
}
-static status_t parse_uint32(u_int8_t **cur, u_int8_t *top, u_int32_t *val)
+static status_t parse_uint32(uint8_t **cur, uint8_t *top, uint32_t *val)
{
- if (*cur + sizeof(u_int32_t) > top)
+ if (*cur + sizeof(uint32_t) > top)
{
return FAILED;
}
- *val = ntohl(*(u_int32_t*)*cur);
- *cur += sizeof(u_int32_t);
+ *val = ntohl(*(uint32_t*)*cur);
+ *cur += sizeof(uint32_t);
return SUCCESS;
}
@@ -121,11 +121,11 @@ static status_t parse_uint32(u_int8_t **cur, u_int8_t *top, u_int32_t *val)
*/
static status_t parse_notification_data(private_endpoint_notify_t *this, chunk_t data)
{
- u_int8_t family, type, addr_family;
- u_int16_t port;
+ uint8_t family, type, addr_family;
+ uint16_t port;
chunk_t addr;
- u_int8_t *cur = data.ptr;
- u_int8_t *top = data.ptr + data.len;
+ uint8_t *cur = data.ptr;
+ uint8_t *top = data.ptr + data.len;
DBG3(DBG_IKE, "me_endpoint_data %B", &data);
@@ -191,9 +191,9 @@ static chunk_t build_notification_data(private_endpoint_notify_t *this)
{
chunk_t prio_chunk, family_chunk, type_chunk, port_chunk, addr_chunk;
chunk_t data;
- u_int32_t prio;
- u_int16_t port;
- u_int8_t family, type;
+ uint32_t prio;
+ uint16_t port;
+ uint8_t family, type;
prio = htonl(this->priority);
prio_chunk = chunk_from_thing(prio);
@@ -237,14 +237,14 @@ METHOD(endpoint_notify_t, build_notify, notify_payload_t*,
}
-METHOD(endpoint_notify_t, get_priority, u_int32_t,
+METHOD(endpoint_notify_t, get_priority, uint32_t,
private_endpoint_notify_t *this)
{
return this->priority;
}
METHOD(endpoint_notify_t, set_priority, void,
- private_endpoint_notify_t *this, u_int32_t priority)
+ private_endpoint_notify_t *this, uint32_t priority)
{
this->priority = priority;
}