diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2022-09-21 17:11:22 +0200 |
---|---|---|
committer | Jordan Augé <jordan.auge+fdio@cisco.com> | 2022-09-30 09:17:13 +0200 |
commit | 3476dd9ddecc87d9212c3bf56a5be52079e27def (patch) | |
tree | 3c7ea2664e8f99fc4fd4588b9e4493f0dc9bbb93 /lib/src/protocol/new.c | |
parent | 29647f687c8dadc90e2ba4d3a772eee09a1a4f1b (diff) |
feat: support for new packet format in hicn-light
Ref: HICN-792
Change-Id: I3204006bd2dd2be6504c33035c6578ec0292455a
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'lib/src/protocol/new.c')
-rw-r--r-- | lib/src/protocol/new.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/src/protocol/new.c b/lib/src/protocol/new.c index 5308e8c0a..e86ce4753 100644 --- a/lib/src/protocol/new.c +++ b/lib/src/protocol/new.c @@ -24,13 +24,6 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" -DECLARE_get_ttl (new, UNEXPECTED); -DECLARE_set_ttl (new, UNEXPECTED); -DECLARE_get_src_port (new, UNEXPECTED); -DECLARE_set_src_port (new, UNEXPECTED); -DECLARE_get_dst_port (new, UNEXPECTED); -DECLARE_set_dst_port (new, UNEXPECTED); - int new_init_packet_header (hicn_packet_buffer_t *pkbuf, size_t pos) { @@ -45,8 +38,9 @@ new_init_packet_header (hicn_packet_buffer_t *pkbuf, size_t pos) memset (new, 0, sizeof (_new_header_t)); _set_new_header_version (new); - uint8_t ah_flag = - format.as_u8[pos + 1] == IPPROTO_AH ? HICN_NEW_FLAG_SIG : 0; + uint8_t ah_flag = (HICN_PACKET_FORMAT_GET (format, pos + 1) == IPPROTO_AH) ? + HICN_NEW_FLAG_SIG : + 0; new->flags |= ah_flag; return CALL_CHILD (init_packet_header, pkbuf, pos); @@ -128,6 +122,8 @@ new_get_interest_name (const hicn_packet_buffer_t *pkbuf, size_t pos, return HICN_LIB_ERROR_NONE; } +// XXX never called and thus packet is never initialized as interest +// DECLARE_set_interest_name (udp, UNEXPECTED); int new_set_interest_name (const hicn_packet_buffer_t *pkbuf, size_t pos, const hicn_name_t *name) |