A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
tcp-tx-item.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2018 Natale Patriciello <natale.patriciello@gmail.com>
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
*/
19
#ifndef TCP_TX_ITEM_H
20
#define TCP_TX_ITEM_H
21
22
#include "ns3/packet.h"
23
#include "ns3/nstime.h"
24
#include "ns3/sequence-number.h"
25
26
namespace
ns3
{
32
class
TcpTxItem
33
{
34
public
:
35
// Default constructor, copy-constructor, destructor
36
42
void
Print
(std::ostream &os,
Time::Unit
unit =
Time::S
)
const
;
43
49
uint32_t
GetSeqSize
(
void
)
const
;
50
55
bool
IsSacked
(
void
)
const
;
56
61
bool
IsRetrans
(
void
)
const
;
62
67
Ptr<Packet>
GetPacketCopy
(
void
)
const
;
68
73
Ptr<const Packet>
GetPacket
(
void
)
const
;
74
79
const
Time
&
GetLastSent
(
void
)
const
;
80
87
struct
RateInformation
88
{
89
uint64_t
m_delivered
{0};
90
Time
m_deliveredTime
{
Time::Max
()};
91
Time
m_firstSent
{
Time::Max
()};
92
bool
m_isAppLimited
{
false
};
93
};
94
100
RateInformation &
GetRateInformation
(
void
);
101
102
bool
m_retrans
{
false
};
103
104
private
:
105
// Only TcpTxBuffer is allowed to touch this part of the TcpTxItem, to manage
106
// its internal lists and counters
107
friend
class
TcpTxBuffer
;
108
109
SequenceNumber32
m_startSeq
{0};
110
Ptr<Packet>
m_packet
{
nullptr
};
111
bool
m_lost
{
false
};
112
Time
m_lastSent
{
Time::Max
()};
113
bool
m_sacked
{
false
};
114
115
RateInformation
m_rateInfo
;
116
};
117
118
}
//namespace ns3
119
120
#endif
/* TCP_TX_ITEM_H */
ns3::TcpTxItem::m_rateInfo
RateInformation m_rateInfo
Rate information of the item.
Definition:
tcp-tx-item.h:115
ns3::TcpTxItem::GetSeqSize
uint32_t GetSeqSize(void) const
Get the size in the sequence number space.
Definition:
tcp-tx-item.cc:62
ns3::TcpTxItem::Print
void Print(std::ostream &os, Time::Unit unit=Time::S) const
Print the time.
Definition:
tcp-tx-item.cc:24
ns3::TcpTxItem::GetRateInformation
RateInformation & GetRateInformation(void)
Get (to modify) the Rate Information of this item.
Definition:
tcp-tx-item.cc:98
ns3::TcpTxItem::GetLastSent
const Time & GetLastSent(void) const
Get a reference to the time the packet was sent for the last time.
Definition:
tcp-tx-item.cc:92
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TcpTxItem::IsRetrans
bool IsRetrans(void) const
Is the item retransmitted?
Definition:
tcp-tx-item.cc:74
ns3::TcpTxItem::m_retrans
bool m_retrans
Indicates if the segment is retransmitted.
Definition:
tcp-tx-item.h:102
ns3::TcpTxItem::m_startSeq
SequenceNumber32 m_startSeq
Sequence number of the item (if transmitted)
Definition:
tcp-tx-item.h:109
ns3::TcpTxBuffer
Tcp sender buffer.
Definition:
tcp-tx-buffer.h:123
ns3::TcpTxItem::RateInformation::m_delivered
uint64_t m_delivered
Connection's delivered data at the time the packet was sent.
Definition:
tcp-tx-item.h:89
ns3::TcpTxItem::IsSacked
bool IsSacked(void) const
Is the item sacked?
Definition:
tcp-tx-item.cc:68
ns3::Ptr< Packet >
ns3::TcpTxItem::m_lastSent
Time m_lastSent
Timestamp of the time at which the segment has been sent last time.
Definition:
tcp-tx-item.h:112
ns3::TcpTxItem::RateInformation::m_isAppLimited
bool m_isAppLimited
Connection's app limited at the time the packet was sent.
Definition:
tcp-tx-item.h:92
ns3::TcpTxItem::GetPacket
Ptr< const Packet > GetPacket(void) const
Get the Packet underlying this item.
Definition:
tcp-tx-item.cc:86
ns3::Time::Max
static Time Max()
Maximum representable Time Not to be confused with Max(Time,Time).
Definition:
nstime.h:283
ns3::TcpTxItem::RateInformation::m_firstSent
Time m_firstSent
Connection's first sent time at the time the packet was sent.
Definition:
tcp-tx-item.h:91
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:104
ns3::TcpTxItem::m_packet
Ptr< Packet > m_packet
Application packet (can be null)
Definition:
tcp-tx-item.h:110
ns3::TcpTxItem
Item that encloses the application packet and some flags for it.
Definition:
tcp-tx-item.h:33
ns3::TcpTxItem::RateInformation::m_deliveredTime
Time m_deliveredTime
Connection's delivered time at the time the packet was sent.
Definition:
tcp-tx-item.h:90
ns3::Time::S
@ S
second
Definition:
nstime.h:115
ns3::TcpTxItem::m_sacked
bool m_sacked
Indicates if the segment has been SACKed.
Definition:
tcp-tx-item.h:113
ns3::TcpTxItem::GetPacketCopy
Ptr< Packet > GetPacketCopy(void) const
Get a copy of the Packet underlying this item.
Definition:
tcp-tx-item.cc:80
ns3::SequenceNumber< uint32_t, int32_t >
ns3::TcpTxItem::RateInformation
Various rate-related information, can be accessed by TcpRateOps.
Definition:
tcp-tx-item.h:88
ns3::Time::Unit
Unit
The unit to use to interpret a number representing time.
Definition:
nstime.h:110
ns3::TcpTxItem::m_lost
bool m_lost
Indicates if the segment has been lost (RTO)
Definition:
tcp-tx-item.h:111
src
internet
model
tcp-tx-item.h
Generated on Fri Oct 1 2021 17:03:10 for ns-3 by
1.8.20