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.

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

+ Here is the caller graph for this function:

◆ 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 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 ( )

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.

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

+ Here is the caller graph for this function:

◆ 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 ns3::Packet::GetSize(), and m_packet.

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

+ Here is the call graph for this function:
+ 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(), 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 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 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 107 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: