A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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 () const
 Get a reference to the time the packet was sent for the last time.
 
Ptr< const PacketGetPacket () const
 Get the Packet underlying this item.
 
Ptr< PacketGetPacketCopy () const
 Get a copy of the Packet underlying this item.
 
RateInformationGetRateInformation ()
 Get (to modify) the Rate Information of this item.
 
uint32_t GetSeqSize () const
 Get the size in the sequence number space.
 
bool IsRetrans () const
 Is the item retransmitted?
 
bool IsSacked () const
 Is the item sacked?
 
void Print (std::ostream &os, Time::Unit unit=Time::S) const
 Print the time.
 

Public Attributes

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

Private Attributes

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

Friends

class TcpTxBuffer
 

Detailed Description

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

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

Member Function Documentation

◆ GetLastSent()

const Time & ns3::TcpTxItem::GetLastSent ( ) 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 80 of file tcp-tx-item.cc.

References m_lastSent.

◆ GetPacket()

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

Get the Packet underlying this item.

Returns
a pointer to a const Packet

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

References m_packet.

◆ GetPacketCopy()

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

Get a copy of the Packet underlying this item.

Returns
a copy of the Packet

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

References m_packet.

Referenced by ns3::TcpTxBuffer::DiscardUpTo().

+ Here is the caller graph for this function:

◆ GetRateInformation()

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

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

Returns
A reference to the rate information.

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

References m_rateInfo.

◆ GetSeqSize()

uint32_t ns3::TcpTxItem::GetSeqSize ( ) 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 50 of file tcp-tx-item.cc.

References m_packet.

Referenced by Print().

+ Here is the caller graph for this function:

◆ IsRetrans()

bool ns3::TcpTxItem::IsRetrans ( ) const

Is the item retransmitted?

Returns
true if the item have been retransmitted

Definition at line 62 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 ( ) const

Is the item sacked?

Returns
true if the item is sacked, false otherwise

Definition at line 56 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 13 of file tcp-tx-item.cc.

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

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ TcpTxBuffer

friend class TcpTxBuffer
friend

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

Member Data Documentation

◆ m_lastSent

Time ns3::TcpTxItem::m_lastSent
private
Initial value:
{
static Time Max()
Maximum representable Time Not to be confused with Max(Time,Time).
Definition nstime.h:286

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

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

Referenced by GetLastSent(), and Print().

◆ m_lost

bool ns3::TcpTxItem::m_lost {false}
private

Indicates if the segment has been lost (RTO)

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

Referenced by Print(), and ns3::TcpTxBuffer::UpdateLostCount().

◆ m_packet

Ptr<Packet> ns3::TcpTxItem::m_packet {nullptr}
private

Application packet (can be null)

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

Referenced by GetPacket(), GetPacketCopy(), and GetSeqSize().

◆ m_rateInfo

RateInformation ns3::TcpTxItem::m_rateInfo
private

Rate information of the item.

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

Referenced by GetRateInformation().

◆ m_retrans

bool ns3::TcpTxItem::m_retrans {false}

Indicates if the segment is retransmitted.

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

Referenced by IsRetrans(), Print(), and ns3::TcpTxBuffer::ResetSentList().

◆ m_sacked

bool ns3::TcpTxItem::m_sacked {false}
private

Indicates if the segment has been SACKed.

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

Referenced by IsSacked(), and Print().

◆ m_startSeq

SequenceNumber32 ns3::TcpTxItem::m_startSeq {0}
private

Sequence number of the item (if transmitted)

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

Referenced by Print().


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