From 3476dd9ddecc87d9212c3bf56a5be52079e27def Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Wed, 21 Sep 2022 17:11:22 +0200 Subject: feat: support for new packet format in hicn-light MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ref: HICN-792 Change-Id: I3204006bd2dd2be6504c33035c6578ec0292455a Signed-off-by: Jordan Augé --- lib/src/test/test_name.cc | 3 +++ lib/src/test/test_udp_header.cc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/src/test') diff --git a/lib/src/test/test_name.cc b/lib/src/test/test_name.cc index cd9ff2d4d..0cf160f70 100644 --- a/lib/src/test/test_name.cc +++ b/lib/src/test/test_name.cc @@ -395,4 +395,7 @@ TEST_F (PrefixTest, PrefixLPM) HICN_PREFIX (b009, "b009::/64"); EXPECT_EQ (hicn_prefix_lpm (&b007, &b009), (uint32_t) 12); + + HICN_PREFIX (pfx, "1122:3344:5566:7788:9900:aabb:ccdd:eeff/128"); + EXPECT_EQ (hicn_prefix_lpm (&pfx, &pfx), (uint32_t) 128); } diff --git a/lib/src/test/test_udp_header.cc b/lib/src/test/test_udp_header.cc index 2853ee31b..2856c8ebf 100644 --- a/lib/src/test/test_udp_header.cc +++ b/lib/src/test/test_udp_header.cc @@ -125,7 +125,7 @@ protected: TEST_F (UdpHeaderTest, GetFormat) { hicn_packet_format_t format = hicn_packet_get_format (&pkbuf_); - EXPECT_EQ (format.as_u32, HICN_PACKET_FORMAT_IPV6_UDP.as_u32); + EXPECT_EQ (format, HICN_PACKET_FORMAT_IPV6_UDP); } TEST_F (UdpHeaderAHTest, GetFormat) @@ -134,7 +134,7 @@ TEST_F (UdpHeaderAHTest, GetFormat) hicn_packet_format_t format = hicn_packet_get_format (&pkbuf_); // Check it corresponds to the new header format - EXPECT_EQ (format.as_u32, HICN_PACKET_FORMAT_IPV6_UDP_AH.as_u32); + EXPECT_EQ (format, HICN_PACKET_FORMAT_IPV6_UDP_AH); } #if 0 -- cgit 1.2.3-korg