aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/protocol')
-rw-r--r--lib/src/protocol/ah.c2
-rw-r--r--lib/src/protocol/icmp.c2
-rw-r--r--lib/src/protocol/ipv4.c12
-rw-r--r--lib/src/protocol/ipv6.c12
-rw-r--r--lib/src/protocol/tcp.c14
5 files changed, 42 insertions, 0 deletions
diff --git a/lib/src/protocol/ah.c b/lib/src/protocol/ah.c
index c2f3f552a..da08d1ee8 100644
--- a/lib/src/protocol/ah.c
+++ b/lib/src/protocol/ah.c
@@ -31,6 +31,8 @@ DECLARE_get_interest_name (ah, UNEXPECTED);
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_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 85605a2c3..b24c0f11e 100644
--- a/lib/src/protocol/icmp.c
+++ b/lib/src/protocol/icmp.c
@@ -25,6 +25,8 @@ DECLARE_get_interest_name (icmp, UNEXPECTED)
DECLARE_set_interest_name (icmp, UNEXPECTED)
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_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 d8d958350..781907231 100644
--- a/lib/src/protocol/ipv4.c
+++ b/lib/src/protocol/ipv4.c
@@ -109,6 +109,18 @@ ipv4_set_interest_name_suffix (hicn_type_t type, hicn_protocol_t * h,
}
int
+ipv4_mark_packet_as_interest (hicn_type_t type, hicn_protocol_t * h)
+{
+ return CHILD_OPS (mark_packet_as_interest, type, h);
+}
+
+int
+ipv4_mark_packet_as_data (hicn_type_t type, hicn_protocol_t * h)
+{
+ return CHILD_OPS (mark_packet_as_data, type, h);
+}
+
+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 622355294..f23b01cd8 100644
--- a/lib/src/protocol/ipv6.c
+++ b/lib/src/protocol/ipv6.c
@@ -99,6 +99,18 @@ ipv6_set_interest_name_suffix (hicn_type_t type, hicn_protocol_t * h,
}
int
+ipv6_mark_packet_as_interest (hicn_type_t type, hicn_protocol_t * h)
+{
+ return CHILD_OPS (mark_packet_as_interest, type, h);
+}
+
+int
+ipv6_mark_packet_as_data (hicn_type_t type, hicn_protocol_t * h)
+{
+ return CHILD_OPS (mark_packet_as_data, type, h);
+}
+
+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 0e3155020..31c495ff4 100644
--- a/lib/src/protocol/tcp.c
+++ b/lib/src/protocol/tcp.c
@@ -83,6 +83,20 @@ tcp_set_interest_name_suffix (hicn_type_t type, hicn_protocol_t * h,
}
int
+tcp_mark_packet_as_interest (hicn_type_t type, hicn_protocol_t * h)
+{
+ h->tcp.flags &= ~HICN_TCP_FLAG_ECE;
+ return HICN_LIB_ERROR_NONE;
+}
+
+int
+tcp_mark_packet_as_data (hicn_type_t type, hicn_protocol_t * h)
+{
+ 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);