From 43acd37f52812a152e4ebda9e30598fa226c1d09 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Fri, 17 Apr 2020 13:41:08 +0200 Subject: [HICN-597] Add API to mark packet as interest/data. Change-Id: I1106211d3cac63d0817d4908bd03d6a0ccd2b8e0 Signed-off-by: Mauro Sardara --- lib/src/protocol/tcp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/src/protocol/tcp.c') 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 @@ -82,6 +82,20 @@ tcp_set_interest_name_suffix (hicn_type_t type, hicn_protocol_t * h, return HICN_LIB_ERROR_NONE; } +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) { -- cgit 1.2.3-korg