summaryrefslogtreecommitdiffstats
path: root/lib/src/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/protocol')
-rw-r--r--lib/src/protocol/ah.c3
-rw-r--r--lib/src/protocol/icmp.c1
-rw-r--r--lib/src/protocol/ipv4.c6
-rw-r--r--lib/src/protocol/ipv6.c6
-rw-r--r--lib/src/protocol/tcp.c7
5 files changed, 22 insertions, 1 deletions
diff --git a/lib/src/protocol/ah.c b/lib/src/protocol/ah.c
index da08d1ee8..6f143238a 100644
--- a/lib/src/protocol/ah.c
+++ b/lib/src/protocol/ah.c
@@ -32,7 +32,8 @@ DECLARE_set_interest_name (ah, UNEXPECTED);
DECLARE_get_interest_name_suffix (ah, UNEXPECTED);
DECLARE_set_interest_name_suffix (ah, UNEXPECTED);
DECLARE_mark_packet_as_interest (ah, UNEXPECTED)
-DECLARE_mark_packet_as_data (ah, UNEXPECTED)
+DECLARE_mark_packet_as_data (ah, UNEXPECTED);
+DECLARE_test_packet_is_interest (ah, UNEXPECTED);
DECLARE_get_data_locator (ah, UNEXPECTED);
DECLARE_set_data_locator (ah, UNEXPECTED);
DECLARE_get_data_name (ah, UNEXPECTED);
diff --git a/lib/src/protocol/icmp.c b/lib/src/protocol/icmp.c
index b24c0f11e..40a93b099 100644
--- a/lib/src/protocol/icmp.c
+++ b/lib/src/protocol/icmp.c
@@ -27,6 +27,7 @@ DECLARE_get_interest_name_suffix (icmp, UNEXPECTED)
DECLARE_set_interest_name_suffix (icmp, UNEXPECTED)
DECLARE_mark_packet_as_interest (icmp, UNEXPECTED)
DECLARE_mark_packet_as_data (icmp, UNEXPECTED)
+DECLARE_test_packet_is_interest (icmp, UNEXPECTED)
DECLARE_get_data_locator (icmp, UNEXPECTED)
DECLARE_set_data_locator (icmp, UNEXPECTED)
DECLARE_get_data_name (icmp, UNEXPECTED)
diff --git a/lib/src/protocol/ipv4.c b/lib/src/protocol/ipv4.c
index 5ad4ddbfa..4bab9980b 100644
--- a/lib/src/protocol/ipv4.c
+++ b/lib/src/protocol/ipv4.c
@@ -117,6 +117,12 @@ ipv4_mark_packet_as_data (hicn_type_t type, hicn_protocol_t * h)
}
int
+ipv4_test_packet_is_interest (hicn_type_t type, hicn_protocol_t * h, u8 *ret)
+{
+ return CHILD_OPS (test_packet_is_interest, type, h, ret);
+}
+
+int
ipv4_reset_interest_for_hash (hicn_type_t type, hicn_protocol_t * h)
{
/* Sets everything to 0 up to IP destination address */
diff --git a/lib/src/protocol/ipv6.c b/lib/src/protocol/ipv6.c
index 9db3e3a17..b0ba3117d 100644
--- a/lib/src/protocol/ipv6.c
+++ b/lib/src/protocol/ipv6.c
@@ -107,6 +107,12 @@ ipv6_mark_packet_as_data (hicn_type_t type, hicn_protocol_t * h)
}
int
+ipv6_test_packet_is_interest (hicn_type_t type, hicn_protocol_t * h, u8 *ret)
+{
+ return CHILD_OPS (test_packet_is_interest, type, h, ret);
+}
+
+int
ipv6_reset_interest_for_hash (hicn_type_t type, hicn_protocol_t * h)
{
/* Sets everything to 0 up to IP destination address */
diff --git a/lib/src/protocol/tcp.c b/lib/src/protocol/tcp.c
index 31c495ff4..ec1eb27dc 100644
--- a/lib/src/protocol/tcp.c
+++ b/lib/src/protocol/tcp.c
@@ -97,6 +97,13 @@ tcp_mark_packet_as_data (hicn_type_t type, hicn_protocol_t * h)
}
int
+tcp_test_packet_is_interest (hicn_type_t type, hicn_protocol_t * h, u8 *ret)
+{
+ *ret = !(h->tcp.flags & HICN_TCP_FLAG_ECE);
+ return HICN_LIB_ERROR_NONE;
+}
+
+int
tcp_reset_interest_for_hash (hicn_type_t type, hicn_protocol_t * h)
{
memset (&(h->tcp), 0, 4);