21 #ifndef TCP_TX_BUFFER_H
22 #define TCP_TX_BUFFER_H
25 #include "ns3/traced-value.h"
26 #include "ns3/trace-source-accessor.h"
27 #include "ns3/object.h"
28 #include "ns3/sequence-number.h"
73 uint32_t
Size (
void)
const;
uint32_t Size(void) const
Returns total number of bytes in this Tx buffer.
void DiscardUpTo(const SequenceNumber32 &seq)
Discard data up to but not including this sequence number.
uint32_t SizeFromSequence(const SequenceNumber32 &seq) const
Returns the number of bytes from the buffer in the range [seq, tailSequence)
SequenceNumber32 HeadSequence(void) const
Returns the first byte's sequence number.
uint32_t MaxBufferSize(void) const
Returns the Tx window size.
TracedValue< SequenceNumber32 > m_firstByteSeq
Sequence number of the first byte in data (SND.UNA)
uint32_t m_size
Number of data bytes.
class for keeping the data sent by the application to the TCP socket, i.e.
void SetMaxBufferSize(uint32_t n)
Set the Tx window size.
uint32_t Available(void) const
Returns the available capacity in this Tx window.
Generic "sequence number" class.
bool Add(Ptr< Packet > p)
Append a data packet to the end of the buffer.
static TypeId GetTypeId(void)
Get the type ID.
uint32_t m_maxBuffer
Max number of data bytes in buffer (SND.WND)
a base class which provides memory management and object aggregation
TcpTxBuffer(uint32_t n=0)
Constructor.
virtual ~TcpTxBuffer(void)
a unique identifier for an interface.
std::list< Ptr< Packet > >::iterator BufIterator
container for data stored in the buffer
SequenceNumber32 TailSequence(void) const
Returns the last byte's sequence number + 1.
std::list< Ptr< Packet > > m_data
Corresponding data (may be null)
void SetHeadSequence(const SequenceNumber32 &seq)
Set the m_firstByteSeq to seq.
Ptr< Packet > CopyFromSequence(uint32_t numBytes, const SequenceNumber32 &seq)
Copy data of size numBytes into a packet, data from the range [seq, seq+numBytes) ...