aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/encoding/payloads/notify_payload.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-10-29 10:09:39 +0100
committerMartin Willi <martin@revosec.ch>2014-06-04 15:53:03 +0200
commit3ecfc83c6be2e96d01bf8ee805737e9e14262a01 (patch)
tree30dc063d27f594158ae6b1773b24bb32f44374a8 /src/libcharon/encoding/payloads/notify_payload.c
parent396baeaea257608655f91a824ddfcbb3fa01e7a5 (diff)
downloadstrongswan-3ecfc83c6be2e96d01bf8ee805737e9e14262a01.tar.bz2
strongswan-3ecfc83c6be2e96d01bf8ee805737e9e14262a01.tar.xz
payload: Use common prefixes for all payload type identifiers
The old identifiers did not use a proper namespace and often clashed with other defines.
Diffstat (limited to 'src/libcharon/encoding/payloads/notify_payload.c')
-rw-r--r--src/libcharon/encoding/payloads/notify_payload.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcharon/encoding/payloads/notify_payload.c b/src/libcharon/encoding/payloads/notify_payload.c
index 889ad6358..dd92e429a 100644
--- a/src/libcharon/encoding/payloads/notify_payload.c
+++ b/src/libcharon/encoding/payloads/notify_payload.c
@@ -302,7 +302,7 @@ struct private_notify_payload_t {
chunk_t notify_data;
/**
- * Type of payload, NOTIFY or NOTIFY_V1
+ * Type of payload, PLV2_NOTIFY or PLV1_NOTIFY
*/
payload_type_t type;
};
@@ -427,7 +427,7 @@ METHOD(payload_t, verify, status_t,
{
case INVALID_KE_PAYLOAD:
{
- if (this->type == NOTIFY && this->notify_data.len != 2)
+ if (this->type == PLV2_NOTIFY && this->notify_data.len != 2)
{
bad_length = TRUE;
}
@@ -447,7 +447,7 @@ METHOD(payload_t, verify, status_t,
case INVALID_MAJOR_VERSION:
case NO_PROPOSAL_CHOSEN:
{
- if (this->type == NOTIFY && this->notify_data.len != 0)
+ if (this->type == PLV2_NOTIFY && this->notify_data.len != 0)
{
bad_length = TRUE;
}
@@ -531,7 +531,7 @@ METHOD(payload_t, verify, status_t,
METHOD(payload_t, get_encoding_rules, int,
private_notify_payload_t *this, encoding_rule_t **rules)
{
- if (this->type == NOTIFY)
+ if (this->type == PLV2_NOTIFY)
{
*rules = encodings_v2;
return countof(encodings_v2);
@@ -543,7 +543,7 @@ METHOD(payload_t, get_encoding_rules, int,
METHOD(payload_t, get_header_length, int,
private_notify_payload_t *this)
{
- if (this->type == NOTIFY)
+ if (this->type == PLV2_NOTIFY)
{
return 8 + this->spi_size;
}
@@ -726,7 +726,7 @@ notify_payload_t *notify_payload_create(payload_type_t type)
.destroy = _destroy,
},
.doi = IKEV1_DOI_IPSEC,
- .next_payload = NO_PAYLOAD,
+ .next_payload = PL_NONE,
.type = type,
);
compute_length(this);