diff --git a/include/tulips/stack/TCPv4.h b/include/tulips/stack/TCPv4.h index b62ca86..108b6d0 100644 --- a/include/tulips/stack/TCPv4.h +++ b/include/tulips/stack/TCPv4.h @@ -64,8 +64,8 @@ static constexpr size_t USED HEADER_LEN = sizeof(Header); static constexpr uint16_t USED HEADER_OVERHEAD = ipv4::HEADER_LEN + HEADER_LEN; static constexpr uint16_t USED ATO = 40; -static constexpr uint8_t USED RTO = 3; static constexpr uint16_t USED KTO = 5; +static constexpr uint8_t USED RTO = 3; } diff --git a/include/tulips/stack/tcpv4/Processor.h b/include/tulips/stack/tcpv4/Processor.h index fd8189b..de151b4 100644 --- a/include/tulips/stack/tcpv4/Processor.h +++ b/include/tulips/stack/tcpv4/Processor.h @@ -253,22 +253,6 @@ class Processor : public transport::Processor */ Status sendAck(Connection& e, const bool k); - /** - * Send a keep-alive probe. - * - * @param e the connection to keep-alive. - * @param s the segment to use. - * - * @return the status of the operation. - */ - inline Status sendKeepAlive(Connection& e, Segment& s) - { - uint8_t* outdata = s.m_dat; - OUTTCP->flags = Flag::ACK; - OUTTCP->offset = 5; - return send(e, HEADER_LEN, s); - } - /** * Respond to a connection request. * diff --git a/src/stack/tcpv4/Processor.cpp b/src/stack/tcpv4/Processor.cpp index 90c2ba3..c6ffade 100644 --- a/src/stack/tcpv4/Processor.cpp +++ b/src/stack/tcpv4/Processor.cpp @@ -437,12 +437,10 @@ Processor::onSlowTimer() * Handle keep-alive. */ if (e.m_state == Connection::ESTABLISHED && HAS_KEEP_ALIVE(e)) { - m_log.debug("TCP4", "<", e.id(), "> check keep-alive"); /* * Reset the live flag. */ if (e.m_live) { - m_log.debug("TCP4", "<", e.id(), "> reset the live flag"); e.m_live = false; e.m_ktm = KTO + 1; continue; diff --git a/tests/tcp/keepalive.cpp b/tests/tcp/keepalive.cpp index b6ffc58..13ac3ae 100644 --- a/tests/tcp/keepalive.cpp +++ b/tests/tcp/keepalive.cpp @@ -1,9 +1,9 @@ -#include "tulips/stack/TCPv4.h" -#include "tulips/stack/tcpv4/Connection.h" +#include #include #include #include #include +#include #include #include #include