diff options
author | Mauro Sardara <msardara@cisco.com> | 2019-06-06 17:34:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-06-06 17:34:47 +0000 |
commit | 2d555daf9034459ec5ef20f7d63cccd25c6c4b0c (patch) | |
tree | 243fa1779ac9d3ac64733fda847e1ccff66ad1f4 /hicn-plugin/src/hicn.h | |
parent | b1933e1c8e2988975ad8a5d9bddad300f3df485f (diff) | |
parent | 8400addd9e21b9ba5a7e210f2cd27842dbf8cd38 (diff) |
Merge "[HICN-212] Fixed bug on ipv6 test in udp faces. Uniformed test with a single function."
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__ */ |