diff options
author | 2023-01-16 20:18:23 +0000 | |
---|---|---|
committer | 2023-01-18 09:08:39 +0000 | |
commit | f904218765e58ab1cdf05b6dfd14912369cd9fe7 (patch) | |
tree | adb40251384a395a5ee791c246e4ed3b4acda4ee /hicn-plugin/src/faces/face.h | |
parent | 4d2e8310cbeacf1c20ec0adb3dc6cf06abcdcbb8 (diff) |
feat: local-remote strategy
Ticket: HICN-824
Change-Id: Iea285cb499b13c943a142fa39328ee36c91ae913
Signed-off-by: Mauro Sardara <msardara@cisco.com>
(cherry picked from commit 7560918629eb11aa7bdaee5f4856243b38c77f93)
Diffstat (limited to 'hicn-plugin/src/faces/face.h')
-rw-r--r-- | hicn-plugin/src/faces/face.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hicn-plugin/src/faces/face.h b/hicn-plugin/src/faces/face.h index e4b759bec..5ebec216c 100644 --- a/hicn-plugin/src/faces/face.h +++ b/hicn-plugin/src/faces/face.h @@ -692,6 +692,23 @@ hicn_face_ip6_add_and_lock (hicn_face_id_t *index, u8 *hicnb_flags, return ret; } +/** + * @brief Check if a face is an application face + * + * @param face_id: The id of the face + * @return 1 if application face, 0 otherwise + */ +always_inline int +hicn_face_is_local (hicn_face_id_t face_id) +{ + hicn_face_t *face; + face = hicn_dpoi_get_from_idx (face_id); + ASSERT (face != NULL); + + return face->flags & HICN_FACE_FLAGS_APPFACE_PROD || + face->flags & HICN_FACE_FLAGS_APPFACE_CONS; +} + #endif // __HICN_FACE_H__ /* |