aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/compat.c
diff options
context:
space:
mode:
authorMauro <you@example.com>2021-06-30 07:57:22 +0000
committerMauro Sardara <msardara@cisco.com>2021-07-06 16:16:04 +0000
commit08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch)
tree7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /lib/src/compat.c
parent147ba39bed26887f5eba84757e2463ab8e370a9a (diff)
[HICN-713] Transport Library Major Refactoring 2
Co-authored-by: Luca Muscariello <muscariello@ieee.org> Co-authored-by: Michele Papalini <micpapal@cisco.com> Co-authored-by: Olivier Roques <oroques+fdio@cisco.com> Co-authored-by: Giulio Grassi <gigrassi@cisco.com> Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
Diffstat (limited to 'lib/src/compat.c')
-rw-r--r--lib/src/compat.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/lib/src/compat.c b/lib/src/compat.c
index 779a47315..932c11d9e 100644
--- a/lib/src/compat.c
+++ b/lib/src/compat.c
@@ -392,6 +392,22 @@ hicn_packet_set_signature_size (hicn_format_t format, hicn_header_t *h,
}
int
+hicn_packet_get_signature_gap (hicn_format_t format, const hicn_header_t *h,
+ uint8_t *bytes)
+{
+ hicn_type_t type = hicn_format_to_type (format);
+ return hicn_ops_vft[type.l1]->get_signature_gap (type, &h->protocol, bytes);
+}
+
+int
+hicn_packet_set_signature_gap (hicn_format_t format, hicn_header_t *h,
+ uint8_t bytes)
+{
+ hicn_type_t type = hicn_format_to_type (format);
+ return hicn_ops_vft[type.l1]->set_signature_gap (type, &h->protocol, bytes);
+}
+
+int
hicn_packet_set_signature_timestamp (hicn_format_t format, hicn_header_t *h,
uint64_t signature_timestamp)
{
@@ -1041,8 +1057,8 @@ int
hicn_interest_set_name (hicn_format_t format, hicn_header_t *interest,
const hicn_name_t *name)
{
- int ret_err =
- hicn_packet_reset_ece (format, interest); // interest packet -> ece flag unset
+ int ret_err = hicn_packet_reset_ece (
+ format, interest); // interest packet -> ece flag unset
if (ret_err < 0)
return HICN_LIB_ERROR_UNEXPECTED;
return hicn_packet_set_name (format, interest, name, _INTEREST);
@@ -1134,7 +1150,8 @@ int
hicn_data_set_name (hicn_format_t format, hicn_header_t *data,
const hicn_name_t *name)
{
- int ret_err = hicn_packet_set_ece (format, data); // data packet -> ece flag set
+ int ret_err =
+ hicn_packet_set_ece (format, data); // data packet -> ece flag set
if (ret_err < 0)
return HICN_LIB_ERROR_UNEXPECTED;
return hicn_packet_set_name (format, data, name, _DATA);