From 8f0a8bf572b9b8123121338a31462440bad65857 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Fri, 8 Jul 2022 16:10:13 +0000 Subject: feat: add interest manifest serialization/deserialization Also: add helpers for interest manifest Ref: HICN-738 Signed-off-by: Mauro Sardara Change-Id: Ia531605148e00ccbe446da0f4f2d8caae2b098be Signed-off-by: Mauro Sardara --- lib/src/protocol/ah.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/src/protocol') diff --git a/lib/src/protocol/ah.c b/lib/src/protocol/ah.c index 9cc747ac8..645b0482b 100644 --- a/lib/src/protocol/ah.c +++ b/lib/src/protocol/ah.c @@ -192,7 +192,7 @@ ah_set_signature_timestamp (const hicn_packet_buffer_t *pkbuf, size_t pos, { _ah_header_t *ah = pkbuf_get_ah (pkbuf); - uint64_t netwok_order_timestamp = htonll (signature_timestamp); + uint64_t netwok_order_timestamp = hicn_net_to_host_64 (signature_timestamp); memcpy (ah->timestamp_as_u8, &netwok_order_timestamp, sizeof (uint64_t)); return HICN_LIB_ERROR_NONE; } @@ -204,7 +204,7 @@ ah_get_signature_timestamp (const hicn_packet_buffer_t *pkbuf, size_t pos, _ah_header_t *ah = pkbuf_get_ah (pkbuf); memcpy (signature_timestamp, ah->timestamp_as_u8, sizeof (uint64_t)); - *signature_timestamp = ntohll (*signature_timestamp); + *signature_timestamp = hicn_host_to_net_64 (*signature_timestamp); return HICN_LIB_ERROR_NONE; } -- cgit 1.2.3-korg