From 8400addd9e21b9ba5a7e210f2cd27842dbf8cd38 Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Thu, 6 Jun 2019 11:03:13 +0200 Subject: [HICN-212] Fixed bug on ipv6 test in udp faces. Uniformed test with a single function. Change-Id: I79cd1c0233c841d5eb111ba6247f46c7510a09bb Signed-off-by: Alberto Compagno --- hicn-plugin/src/hicn.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hicn-plugin/src/hicn.h') diff --git a/hicn-plugin/src/hicn.h b/hicn-plugin/src/hicn.h index c0de65de4..87628ba53 100644 --- a/hicn-plugin/src/hicn.h +++ b/hicn-plugin/src/hicn.h @@ -81,6 +81,12 @@ hicn_get_buffer (vlib_buffer_t * b0) return (hicn_buffer_t *) & (b0->opaque2[0]); } +always_inline u8 +hicn_is_v6 (hicn_header_t * pkt_hdr) +{ + return ((pkt_hdr->v4.ip.version_ihl >> 4) != 4); +} + #endif /* __HICN_H__ */ -- cgit 1.2.3-korg