30 #ifndef TINS_TCP_IP_ACK_TRACKER_H 31 #define TINS_TCP_IP_ACK_TRACKER_H 33 #include <tins/config.h> 35 #ifdef TINS_HAVE_ACK_TRACKER 38 #include <boost/icl/interval_set.hpp> 39 #include <tins/macros.h> 52 class TINS_API AckedRange {
54 typedef boost::icl::discrete_interval<uint32_t> interval_type;
62 AckedRange(uint32_t first, uint32_t last);
75 bool has_next()
const;
80 uint32_t first()
const;
85 uint32_t last()
const;
94 class TINS_API AckTracker {
99 typedef boost::icl::interval_set<uint32_t> interval_set_type;
112 AckTracker(uint32_t initial_ack,
bool use_sack =
true);
117 void process_packet(
const PDU& packet);
127 uint32_t ack_number()
const;
132 const interval_set_type& acked_intervals()
const;
140 bool is_segment_acked(uint32_t sequence_number, uint32_t length)
const;
142 void process_sack(
const std::vector<uint32_t>& sack);
143 void cleanup_sacked_intervals(uint32_t old_ack, uint32_t new_ack);
145 interval_set_type acked_intervals_;
146 uint32_t ack_number_;
153 #endif // TINS_HAVE_ACK_TRACKER 155 #endif // TINS_TCP_IP_ACK_TRACKER_H The Tins namespace.
Definition: address_range.h:38