diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-06-06 11:03:13 +0200 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2019-06-06 12:32:46 +0000 |
commit | 8400addd9e21b9ba5a7e210f2cd27842dbf8cd38 (patch) | |
tree | 79f4ff9a75af0bfe99f5ee6f07cf9eccae3fd584 /hicn-plugin/src/hicn.h | |
parent | 8129b8ce13febec6730fa48abbe6d3fcae3bc27f (diff) |
[HICN-212] Fixed bug on ipv6 test in udp faces. Uniformed test with a single function.
Change-Id: I79cd1c0233c841d5eb111ba6247f46c7510a09bb
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/hicn.h')
-rw-r--r-- | hicn-plugin/src/hicn.h | 6 |
1 files changed, 6 insertions, 0 deletions
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__ */ |