aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/encoding/payloads/ike_header.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/encoding/payloads/ike_header.c')
-rw-r--r--src/libcharon/encoding/payloads/ike_header.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcharon/encoding/payloads/ike_header.c b/src/libcharon/encoding/payloads/ike_header.c
index 8f379442b..97c6d8c26 100644
--- a/src/libcharon/encoding/payloads/ike_header.c
+++ b/src/libcharon/encoding/payloads/ike_header.c
@@ -146,7 +146,7 @@ ENUM_END(exchange_type_names, EXCHANGE_TYPE_UNDEFINED);
* The defined offsets are the positions in a object of type
* ike_header_t.
*/
-encoding_rule_t ike_header_encodings[] = {
+static encoding_rule_t encodings[] = {
/* 8 Byte SPI, stored in the field initiator_spi */
{ IKE_SPI, offsetof(private_ike_header_t, initiator_spi) },
/* 8 Byte SPI, stored in the field responder_spi */
@@ -244,11 +244,11 @@ METHOD(payload_t, verify, status_t,
return SUCCESS;
}
-METHOD(payload_t, get_encoding_rules, void,
- private_ike_header_t *this, encoding_rule_t **rules, size_t *rule_count)
+METHOD(payload_t, get_encoding_rules, int,
+ private_ike_header_t *this, encoding_rule_t **rules)
{
- *rules = ike_header_encodings;
- *rule_count = sizeof(ike_header_encodings) / sizeof(encoding_rule_t);
+ *rules = encodings;
+ return countof(encodings);
}
METHOD(payload_t, get_type, payload_type_t,