summaryrefslogtreecommitdiffstats
path: root/lib/src/protocol/tcp.c
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2020-04-17 13:41:08 +0200
committerMauro Sardara <msardara@cisco.com>2020-04-17 15:06:05 +0200
commit43acd37f52812a152e4ebda9e30598fa226c1d09 (patch)
treebd4dd2a500d4b679224983641515c3ba87c3767b /lib/src/protocol/tcp.c
parent512aa3a8c6f6a370e1b3968af26077e0cd5210e9 (diff)
[HICN-597] Add API to mark packet as interest/data.
Change-Id: I1106211d3cac63d0817d4908bd03d6a0ccd2b8e0 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'lib/src/protocol/tcp.c')
-rw-r--r--lib/src/protocol/tcp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/src/protocol/tcp.c b/lib/src/protocol/tcp.c
index 0e3155020..14e07b091 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 &= ~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 |= 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);