A Discrete-Event Network Simulator
API
ns3::TcpTxItem Class Reference

Item that encloses the application packet and some flags for it. More...

#include "tcp-tx-item.h"

+ Collaboration diagram for ns3::TcpTxItem:

Classes

struct  RateInformation
 Various rate-related information, can be accessed by TcpRateOps. More...
 

Public Member Functions

const TimeGetLastSent (void) const
 Get a reference to the time the packet was sent for the last time. More...
 
Ptr< const PacketGetPacket (void) const
 Get the Packet underlying this item. More...
 
Ptr< PacketGetPacketCopy (void) const
 Get a copy of the Packet underlying this item. More...
 
RateInformationGetRateInformation (void)
 Get (to modify) the Rate Information of this item. More...
 
uint32_t GetSeqSize (void) const
 Get the size in the sequence number space. More...
 
bool IsRetrans (void) const
 Is the item retransmitted? More...
 
bool IsSacked (void) const
 Is the item sacked? More...
 
void Print (std::ostream &os, Time::Unit unit=Time::S) const
 Print the time. More...
 

Public Attributes

bool m_retrans {false}
 Indicates if the segment is retransmitted. More...
 

Private Attributes

Time m_lastSent {Time::Max ()}
 Timestamp of the time at which the segment has been sent last time. More...
 
bool m_lost {false}
 Indicates if the segment has been lost (RTO) More...
 
Ptr< Packetm_packet {nullptr}
 Application packet (can be null) More...
 
RateInformation m_rateInfo
 Rate information of the item. More...
 
bool m_sacked {false}
 Indicates if the segment has been SACKed. More...
 
SequenceNumber32 m_startSeq {0}
 Sequence number of the item (if transmitted) More...
 

Friends

class TcpTxBuffer
 

Detailed Description

Item that encloses the application packet and some flags for it.

Definition at line 32 of file tcp-tx-item.h.

Member Function Documentation

◆ GetLastSent()

const Time & ns3::TcpTxItem::GetLastSent ( void  ) const

Get a reference to the time the packet was sent for the last time.

Returns
a reference to the last sent time

Definition at line 92 of file tcp-tx-item.cc.

References m_lastSent.

Referenced by ns3::TcpRateLinux::SkbDelivered().

+ Here is the caller graph for this function:

◆ GetPacket()

Ptr< const Packet > ns3::TcpTxItem::GetPacket ( void  ) const

Get the Packet underlying this item.

Returns
a pointer to a const Packet

Definition at line 86 of file tcp-tx-item.cc.

References m_packet.

◆ GetPacketCopy()

Ptr< Packet > ns3::TcpTxItem::GetPacketCopy ( void  ) const

Get a copy of the Packet underlying this item.

Returns
a copy of the Packet

Definition at line 80 of file tcp-tx-item.cc.

References ns3::Packet::Copy(), and m_packet.

Referenced by ns3::TcpTxBuffer::DiscardUpTo(), and ns3::TcpSocketBase::SendDataPacket().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRateInformation()

TcpTxItem::RateInformation & ns3::TcpTxItem::GetRateInformation ( void  )

Get (to modify) the Rate Information of this item.

Returns
A reference to the rate information.

Definition at line 98 of file tcp-tx-item.cc.

References m_rateInfo.

Referenced by TcpRateLinuxBasicTest::SendSkb(), TcpRateLinuxBasicTest::SkbDelivered(), ns3::TcpRateLinux::SkbDelivered(), and ns3::TcpRateLinux::SkbSent().

+ Here is the caller graph for this function:

◆ GetSeqSize()

uint32_t ns3::TcpTxItem::GetSeqSize ( void  ) const

Get the size in the sequence number space.

Returns
1 if the packet size is 0 or there's no packet, otherwise the size of the packet

Definition at line 62 of file tcp-tx-item.cc.

References ns3::Packet::GetSize(), and m_packet.

Referenced by Print(), TcpRateLinuxBasicTest::SendSkb(), TcpRateLinuxBasicTest::SkbDelivered(), and ns3::TcpRateLinux::SkbDelivered().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsRetrans()

bool ns3::TcpTxItem::IsRetrans ( void  ) const

Is the item retransmitted?

Returns
true if the item have been retransmitted

Definition at line 74 of file tcp-tx-item.cc.

References m_retrans.

Referenced by ns3::TcpSocketBase::SendDataPacket().

+ Here is the caller graph for this function:

◆ IsSacked()

bool ns3::TcpTxItem::IsSacked ( void  ) const

Is the item sacked?

Returns
true if the item is sacked, false otherwise

Definition at line 68 of file tcp-tx-item.cc.

References m_sacked.

◆ Print()

void ns3::TcpTxItem::Print ( std::ostream &  os,
Time::Unit  unit = Time::S 
) const

Print the time.

Parameters
osostream
unitTime::Unit

Definition at line 24 of file tcp-tx-item.cc.

References ns3::Time::As(), GetSeqSize(), m_lastSent, m_lost, m_retrans, m_sacked, and m_startSeq.

Referenced by ns3::operator<<().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ TcpTxBuffer

friend class TcpTxBuffer
friend

Definition at line 107 of file tcp-tx-item.h.

Member Data Documentation

◆ m_lastSent

Time ns3::TcpTxItem::m_lastSent {Time::Max ()}
private

Timestamp of the time at which the segment has been sent last time.

Definition at line 112 of file tcp-tx-item.h.

Referenced by ns3::TcpTxBuffer::CopyFromSequence(), GetLastSent(), ns3::TcpTxBuffer::MergeItems(), Print(), and ns3::TcpTxBuffer::SplitItems().

◆ m_lost

◆ m_packet

◆ m_rateInfo

RateInformation ns3::TcpTxItem::m_rateInfo
private

Rate information of the item.

Definition at line 115 of file tcp-tx-item.h.

Referenced by GetRateInformation().

◆ m_retrans

◆ m_sacked

◆ m_startSeq


The documentation for this class was generated from the following files: