aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/protocol/ah.c
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-07-08 16:10:13 +0000
committerMauro Sardara <msardara@cisco.com>2022-08-10 11:57:10 +0200
commit8f0a8bf572b9b8123121338a31462440bad65857 (patch)
treeecac67f0ad005b2eb0a1bd25c8f242497ffddea1 /lib/src/protocol/ah.c
parent8d27045832427a0ea345f48bfb2c42f46a357af1 (diff)
feat: add interest manifest serialization/deserialization
Also: add helpers for interest manifest Ref: HICN-738 Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: Ia531605148e00ccbe446da0f4f2d8caae2b098be Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'lib/src/protocol/ah.c')
-rw-r--r--lib/src/protocol/ah.c4
1 files changed, 2 insertions, 2 deletions
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;
}