aboutsummaryrefslogtreecommitdiffstats
path: root/lib/includes
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2020-03-24 17:34:14 +0000
committerMauro Sardara <msardara@cisco.com>2020-09-14 17:31:15 +0000
commit88509fe353767cbde707c3e3b1f29392957819f3 (patch)
treecccd51bac7966cd3138c525e8075d90341184a66 /lib/includes
parentd875ae92a7fa1eaab3bc2616aeeedfc64a81fea4 (diff)
[HICN-574] Host stack plugin for VPP.
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I8d8fdffef31a7013265d6529c5f52f3d5ec70d18 Signed-off-by: Mauro Sardara <msardara@cisco.com> Signed-off-by: Mauro <you@example.com> Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'lib/includes')
-rw-r--r--lib/includes/hicn/ops.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/includes/hicn/ops.h b/lib/includes/hicn/ops.h
index e8feff92d..bcb73171e 100644
--- a/lib/includes/hicn/ops.h
+++ b/lib/includes/hicn/ops.h
@@ -122,6 +122,16 @@ typedef struct hicn_ops_s
int (*mark_packet_as_data) (hicn_type_t type, hicn_protocol_t * h);
/**
+ * @brief Check if currentpacket is interest
+ * @param [in] type - hICN packet type
+ * @param [in,out] h - Buffer holding the Interest packet
+ * @param [out] ret - Return 1 if interest
+ * @return hICN error code
+ */
+ int (*test_packet_is_interest) (hicn_type_t type, hicn_protocol_t * h,
+ u8 *ret);
+
+ /**
* @brief Clear the necessary Interest fields in order to hash it
* @param [in] type - hICN packet type
* @param [in,out] h - Buffer holding the Interest packet
@@ -456,6 +466,7 @@ typedef struct hicn_ops_s
ATTR_INIT(set_interest_name_suffix, protocol ## _set_interest_name_suffix), \
ATTR_INIT(mark_packet_as_interest, protocol ## _mark_packet_as_interest), \
ATTR_INIT(mark_packet_as_data, protocol ## _mark_packet_as_data), \
+ ATTR_INIT(test_packet_is_interest, protocol ## _test_packet_is_interest), \
ATTR_INIT(reset_interest_for_hash, protocol ## _reset_interest_for_hash), \
ATTR_INIT(get_data_locator, protocol ## _get_data_locator), \
ATTR_INIT(set_data_locator, protocol ## _set_data_locator), \
@@ -561,6 +572,9 @@ PAYLOAD (hicn_type_t type, const hicn_protocol_t * h)
#define DECLARE_mark_packet_as_data(protocol, error) \
int protocol ## _mark_packet_as_data(hicn_type_t type, hicn_protocol_t * h) { return HICN_LIB_ERROR_ ## error ; }
+#define DECLARE_test_packet_is_interest(protocol, error) \
+ int protocol ## _test_packet_is_interest(hicn_type_t type, hicn_protocol_t * h, u8 *ret) { return HICN_LIB_ERROR_ ## error ; }
+
#define DECLARE_reset_interest_for_hash(protocol, error) \
int protocol ## _reset_interest_for_hash(hicn_type_t type, hicn_protocol_t * h) { return HICN_LIB_ERROR_ ## error ; }