30 #ifndef TINS_TCP_IP_DATA_TRACKER_H 31 #define TINS_TCP_IP_DATA_TRACKER_H 36 #include <tins/config.h> 37 #include <tins/macros.h> 39 #ifdef TINS_HAVE_TCPIP 50 class TINS_API DataTracker {
55 typedef std::vector<uint8_t> payload_type;
60 typedef std::map<uint32_t, payload_type> buffered_payload_type;
72 DataTracker(uint32_t seq_number);
88 bool process_payload(uint32_t seq, payload_type payload);
111 void advance_sequence(uint32_t seq);
116 uint32_t sequence_number()
const;
121 void sequence_number(uint32_t seq);
126 const payload_type& payload()
const;
131 payload_type& payload();
136 const buffered_payload_type& buffered_payload()
const;
141 buffered_payload_type& buffered_payload();
146 uint32_t total_buffered_bytes()
const;
148 void store_payload(uint32_t seq, payload_type payload);
149 buffered_payload_type::iterator erase_iterator(buffered_payload_type::iterator iter);
151 payload_type payload_;
152 buffered_payload_type buffered_payload_;
153 uint32_t seq_number_;
154 uint32_t total_buffered_bytes_;
160 #endif // TINS_HAVE_TCPIP 162 #endif // TINS_TCP_IP_DATA_TRACKER_H The Tins namespace.
Definition: address_range.h:38