diff options
author | Mauro Sardara <msardara@cisco.com> | 2023-01-16 20:18:23 +0000 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2023-01-17 17:15:31 +0000 |
commit | 7560918629eb11aa7bdaee5f4856243b38c77f93 (patch) | |
tree | f8dcc9c747acf5dce32f5693090e2067bc2995cf /hicn-plugin/src/faces/face.h | |
parent | f3a58a1ea5f4b99b5e788aec1a5afdcb19c42074 (diff) |
feat: local-remote strategy
Ticket: HICN-824
Change-Id: Iea285cb499b13c943a142fa39328ee36c91ae913
Signed-off-by: Mauro Sardara <msardara@cisco.com>
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__ /* |