Skip to content

Commit 25cccd7

Browse files
author
Federico Chiariotti
committed
Style fixes
1 parent 396ba21 commit 25cccd7

12 files changed

+121
-137
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ Then, clone the quic module:
3535
git clone https://github.com/signetlabdei/quic quic
3636
```
3737

38-
Thirdly, copy the QUIC applications and helpers to the application module
38+
Thirdly, copy the QUIC applications and helpers to the applications module
3939

4040
```bash
4141
cp src/quic/quic-applications/model/* src/applications/model/
4242
cp src/quic/quic-applications/helper/* src/applications/helper/
4343
```
4444

45-
Finally, edit the `wscript` file of the internet module and add
45+
Finally, edit the `wscript` file of the applications module and add
4646

4747
```python
4848
'model/quic-echo-client.h',

model/.directory

-4
This file was deleted.

model/quic-bbr.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
/*
3-
* Copyright (c) 2018 NITK Surathkal, 2020 SIGNET Lab, Department of Information
4-
* Engineering, University of Padova
3+
* Copyright (c) 2018 NITK Surathkal,
4+
* 2020 SIGNET Lab, Department of Information Engineering, University of Padova
55
*
66
* This program is free software; you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License version 2 as

model/quic-congestion-ops.cc

+5-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ NS_OBJECT_ENSURE_REGISTERED (QuicCongestionOps);
4444
TypeId
4545
QuicCongestionOps::GetTypeId (void)
4646
{
47-
static TypeId tid = TypeId ("ns3::QuicCongestionControl").SetParent<
48-
TcpNewReno> ().SetGroupName ("Internet").AddConstructor<
49-
QuicCongestionOps> ();
47+
static TypeId tid = TypeId ("ns3::QuicCongestionControl")
48+
.SetParent<TcpNewReno> ()
49+
.SetGroupName ("Internet")
50+
.AddConstructor<QuicCongestionOps> ()
51+
;
5052
return tid;
5153
}
5254

model/quic-l5-protocol.cc

+9-7
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,15 @@ TypeId
6060
QuicL5Protocol::GetTypeId (void)
6161
{
6262
static TypeId tid =
63-
TypeId ("ns3::QuicL5Protocol").SetParent<QuicSocketBase> ().SetGroupName (
64-
"Internet").AddConstructor<QuicL5Protocol> ()
65-
.AddAttribute (
66-
"StreamList", "The list of streams associated to this protocol.",
67-
ObjectVectorValue (),
68-
MakeObjectVectorAccessor (&QuicL5Protocol::m_streams),
69-
MakeObjectVectorChecker<QuicStreamBase> ());
63+
TypeId ("ns3::QuicL5Protocol")
64+
.SetParent<QuicSocketBase> ()
65+
.SetGroupName ("Internet")
66+
.AddConstructor<QuicL5Protocol> ()
67+
.AddAttribute ("StreamList", "The list of streams associated to this protocol.",
68+
ObjectVectorValue (),
69+
MakeObjectVectorAccessor (&QuicL5Protocol::m_streams),
70+
MakeObjectVectorChecker<QuicStreamBase> ())
71+
;
7072
return tid;
7173
}
7274

model/quic-socket-base.cc

+70-95
Original file line numberDiff line numberDiff line change
@@ -116,51 +116,41 @@ QuicSocketBase::GetTypeId (void)
116116
UintegerValue (2), // according to the QUIC RFC this value should default to 0, and be increased by the client/server
117117
MakeUintegerAccessor (&QuicSocketBase::m_initial_max_stream_id_bidi),
118118
MakeUintegerChecker<uint32_t> ())
119-
.AddAttribute (
120-
"MaxStreamIdUni", "Maximum StreamId for Unidirectional Streams",
121-
UintegerValue (2), // according to the QUIC RFC this value should default to 0, and be increased by the client/server
122-
MakeUintegerAccessor (&QuicSocketBase::m_initial_max_stream_id_uni),
123-
MakeUintegerChecker<uint32_t> ())
124-
.AddAttribute (
125-
"MaxTrackedGaps", "Maximum number of gaps in an ACK",
126-
UintegerValue (20),
127-
MakeUintegerAccessor (&QuicSocketBase::m_maxTrackedGaps),
128-
MakeUintegerChecker<uint32_t> ())
129-
.AddAttribute (
130-
"OmitConnectionId",
131-
"Omit ConnectionId field in Short QuicHeader format",
132-
BooleanValue (false),
133-
MakeBooleanAccessor (&QuicSocketBase::m_omit_connection_id),
134-
MakeBooleanChecker ())
135-
.AddAttribute (
136-
"MaxPacketSize",
137-
"Maximum Packet Size",
138-
UintegerValue (1460),
139-
MakeUintegerAccessor (&QuicSocketBase::GetSegSize,
140-
&QuicSocketBase::SetSegSize),
141-
MakeUintegerChecker<uint16_t> ())
142-
.AddAttribute (
143-
"SocketSndBufSize",
144-
"QuicSocketBase maximum transmit buffer size (bytes)",
145-
UintegerValue (131072), // 128k
146-
MakeUintegerAccessor (&QuicSocketBase::GetSocketSndBufSize,
147-
&QuicSocketBase::SetSocketSndBufSize),
148-
MakeUintegerChecker<uint32_t> ())
149-
.AddAttribute (
150-
"SocketRcvBufSize",
151-
"QuicSocketBase maximum receive buffer size (bytes)",
152-
UintegerValue (131072), // 128k
153-
MakeUintegerAccessor (&QuicSocketBase::GetSocketRcvBufSize,
154-
&QuicSocketBase::SetSocketRcvBufSize),
155-
MakeUintegerChecker<uint32_t> ())
119+
.AddAttribute ("MaxStreamIdUni", "Maximum StreamId for Unidirectional Streams",
120+
UintegerValue (2), // according to the QUIC RFC this value should default to 0, and be increased by the client/server
121+
MakeUintegerAccessor (&QuicSocketBase::m_initial_max_stream_id_uni),
122+
MakeUintegerChecker<uint32_t> ())
123+
.AddAttribute ("MaxTrackedGaps", "Maximum number of gaps in an ACK",
124+
UintegerValue (20),
125+
MakeUintegerAccessor (&QuicSocketBase::m_maxTrackedGaps),
126+
MakeUintegerChecker<uint32_t> ())
127+
.AddAttribute ("OmitConnectionId", "Omit ConnectionId field in Short QuicHeader format",
128+
BooleanValue (false),
129+
MakeBooleanAccessor (&QuicSocketBase::m_omit_connection_id),
130+
MakeBooleanChecker ())
131+
.AddAttribute ("MaxPacketSize", "Maximum Packet Size",
132+
UintegerValue (1460),
133+
MakeUintegerAccessor (&QuicSocketBase::GetSegSize,
134+
&QuicSocketBase::SetSegSize),
135+
MakeUintegerChecker<uint16_t> ())
136+
.AddAttribute ("SocketSndBufSize", "QuicSocketBase maximum transmit buffer size (bytes)",
137+
UintegerValue (131072), // 128k
138+
MakeUintegerAccessor (&QuicSocketBase::GetSocketSndBufSize,
139+
&QuicSocketBase::SetSocketSndBufSize),
140+
MakeUintegerChecker<uint32_t> ())
141+
.AddAttribute ("SocketRcvBufSize", "QuicSocketBase maximum receive buffer size (bytes)",
142+
UintegerValue (131072), // 128k
143+
MakeUintegerAccessor (&QuicSocketBase::GetSocketRcvBufSize,
144+
&QuicSocketBase::SetSocketRcvBufSize),
145+
MakeUintegerChecker<uint32_t> ())
156146
// .AddAttribute ("StatelessResetToken, "Stateless Reset Token",
157147
// UintegerValue (0),
158148
// MakeUintegerAccessor (&QuicSocketBase::m_stateless_reset_token),
159149
// MakeUintegerChecker<uint128_t> ())
160-
.AddAttribute (
161-
"AckDelayExponent", "Ack Delay Exponent", UintegerValue (3),
162-
MakeUintegerAccessor (&QuicSocketBase::m_ack_delay_exponent),
163-
MakeUintegerChecker<uint8_t> ())
150+
.AddAttribute ("AckDelayExponent", "Ack Delay Exponent",
151+
UintegerValue (3),
152+
MakeUintegerAccessor (&QuicSocketBase::m_ack_delay_exponent),
153+
MakeUintegerChecker<uint8_t> ())
164154
.AddAttribute ("FlushOnClose", "Determines the connection close behavior",
165155
BooleanValue (true),
166156
MakeBooleanAccessor (&QuicSocketBase::m_flushOnClose),
@@ -170,46 +160,34 @@ QuicSocketBase::GetTypeId (void)
170160
UintegerValue (2),
171161
MakeUintegerAccessor (&QuicSocketState::m_kMaxTLPs),
172162
MakeUintegerChecker<uint32_t> ())
173-
.AddAttribute (
174-
"kReorderingThreshold",
175-
"Maximum reordering in packet number space before FACK style loss detection considers a packet lost",
176-
UintegerValue (3),
177-
MakeUintegerAccessor (&QuicSocketState::m_kReorderingThreshold),
178-
MakeUintegerChecker<uint32_t> ())
179-
.AddAttribute (
180-
"kTimeReorderingFraction",
181-
"Maximum reordering in time space before time based loss detection considers a packet lost",
182-
DoubleValue (9 / 8),
183-
MakeDoubleAccessor (&QuicSocketState::m_kTimeReorderingFraction),
184-
MakeDoubleChecker<double> (0))
185-
.AddAttribute (
186-
"kUsingTimeLossDetection",
187-
"Whether time based loss detection is in use", BooleanValue (false),
188-
MakeBooleanAccessor (&QuicSocketState::m_kUsingTimeLossDetection),
189-
MakeBooleanChecker ())
190-
.AddAttribute (
191-
"kMinTLPTimeout",
192-
"Minimum time in the future a tail loss probe alarm may be set for",
193-
TimeValue (MilliSeconds (10)),
194-
MakeTimeAccessor (&QuicSocketState::m_kMinTLPTimeout),
195-
MakeTimeChecker ())
196-
.AddAttribute (
197-
"kMinRTOTimeout",
198-
"Minimum time in the future an RTO alarm may be set for",
199-
TimeValue (MilliSeconds (200)),
200-
MakeTimeAccessor (&QuicSocketState::m_kMinRTOTimeout),
201-
MakeTimeChecker ())
202-
.AddAttribute (
203-
"kDelayedAckTimeout", "The length of the peer's delayed ACK timer",
204-
TimeValue (MilliSeconds (25)),
205-
MakeTimeAccessor (&QuicSocketState::m_kDelayedAckTimeout),
206-
MakeTimeChecker ())
207-
.AddAttribute (
208-
"kDefaultInitialRtt",
209-
"The default RTT used before an RTT sample is taken",
210-
TimeValue (MilliSeconds (100)),
211-
MakeTimeAccessor (&QuicSocketState::m_kDefaultInitialRtt),
212-
MakeTimeChecker ())
163+
.AddAttribute ("kReorderingThreshold", "Maximum reordering in packet number space before FACK style loss detection considers a packet lost",
164+
UintegerValue (3),
165+
MakeUintegerAccessor (&QuicSocketState::m_kReorderingThreshold),
166+
MakeUintegerChecker<uint32_t> ())
167+
.AddAttribute ("kTimeReorderingFraction", "Maximum reordering in time space before time based loss detection considers a packet lost",
168+
DoubleValue (9 / 8),
169+
MakeDoubleAccessor (&QuicSocketState::m_kTimeReorderingFraction),
170+
MakeDoubleChecker<double> (0))
171+
.AddAttribute ("kUsingTimeLossDetection", "Whether time based loss detection is in use",
172+
BooleanValue (false),
173+
MakeBooleanAccessor (&QuicSocketState::m_kUsingTimeLossDetection),
174+
MakeBooleanChecker ())
175+
.AddAttribute ("kMinTLPTimeout", "Minimum time in the future a tail loss probe alarm may be set for",
176+
TimeValue (MilliSeconds (10)),
177+
MakeTimeAccessor (&QuicSocketState::m_kMinTLPTimeout),
178+
MakeTimeChecker ())
179+
.AddAttribute ("kMinRTOTimeout", "Minimum time in the future an RTO alarm may be set for",
180+
TimeValue (MilliSeconds (200)),
181+
MakeTimeAccessor (&QuicSocketState::m_kMinRTOTimeout),
182+
MakeTimeChecker ())
183+
.AddAttribute ("kDelayedAckTimeout", "The length of the peer's delayed ACK timer",
184+
TimeValue (MilliSeconds (25)),
185+
MakeTimeAccessor (&QuicSocketState::m_kDelayedAckTimeout),
186+
MakeTimeChecker ())
187+
.AddAttribute ("kDefaultInitialRtt", "The default RTT used before an RTT sample is taken",
188+
TimeValue (MilliSeconds (100)),
189+
MakeTimeAccessor (&QuicSocketState::m_kDefaultInitialRtt),
190+
MakeTimeChecker ())
213191
.AddAttribute ("InitialSlowStartThreshold",
214192
"QUIC initial slow start threshold (bytes)",
215193
UintegerValue (INT32_MAX),
@@ -233,12 +211,15 @@ QuicSocketBase::GetTypeId (void)
233211
TimeValue (MilliSeconds (100)),
234212
MakeTimeAccessor (&QuicSocketBase::m_defaultLatency),
235213
MakeTimeChecker ())
236-
.AddAttribute (
237-
"LegacyCongestionControl",
238-
"When true, use TCP implementations for the congestion control",
239-
BooleanValue (false),
240-
MakeBooleanAccessor (&QuicSocketBase::m_quicCongestionControlLegacy),
241-
MakeBooleanChecker ())
214+
.AddAttribute ("LegacyCongestionControl", "When true, use TCP implementations for the congestion control",
215+
BooleanValue (false),
216+
MakeBooleanAccessor (&QuicSocketBase::m_quicCongestionControlLegacy),
217+
MakeBooleanChecker ())
218+
.AddAttribute ("TCB",
219+
"The connection's QuicSocketState",
220+
PointerValue (),
221+
MakePointerAccessor (&QuicSocketBase::m_tcb),
222+
MakePointerChecker<QuicSocketState> ())
242223
// .AddTraceSource ("RTO", "Retransmission timeout",
243224
// MakeTraceSourceAccessor (&QuicSocketBase::m_rto),
244225
// "ns3::Time::TracedValueCallback").AddTraceSource (
@@ -308,11 +289,6 @@ QuicSocketBase::GetTypeId (void)
308289
"Receive QUIC packet from UDP protocol",
309290
MakeTraceSourceAccessor (&QuicSocketBase::m_rxTrace),
310291
"ns3::QuicSocketBase::QuicTxRxTracedCallback")
311-
.AddAttribute ("TCB",
312-
"The connection's QuicSocketState",
313-
PointerValue (),
314-
MakePointerAccessor (&QuicSocketBase::m_tcb),
315-
MakePointerChecker<QuicSocketState> ())
316292
;
317293
return tid;
318294
}
@@ -591,14 +567,13 @@ QuicSocketBase::QuicSocketBase (const QuicSocketBase& sock) // Copy constructo
591567
m_quicCongestionControlLegacy (sock.m_quicCongestionControlLegacy),
592568
m_queue_ack (sock.m_queue_ack),
593569
m_numPacketsReceivedSinceLastAckSent (sock.m_numPacketsReceivedSinceLastAckSent),
570+
m_lastMaxData(0),
571+
m_maxDataInterval(10),
594572
m_pacingTimer (Timer::REMOVE_ON_DESTROY),
595573
m_txTrace (sock.m_txTrace),
596574
m_rxTrace (sock.m_rxTrace)
597575
{
598576
NS_LOG_FUNCTION (this);
599-
NS_LOG_LOGIC (this << " invoked the copy constructor");
600-
m_lastMaxData = 0;
601-
m_maxDataInterval = 10;
602577

603578
// Callback<void, Ptr< Socket > > vPS = MakeNullCallback<void, Ptr<Socket> > ();
604579
// Callback<void, Ptr<Socket>, const Address &> vPSA = MakeNullCallback<void, Ptr<Socket>, const Address &> ();

model/quic-socket-rx-buffer.cc

+5-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,11 @@ NS_OBJECT_ENSURE_REGISTERED (QuicSocketRxBuffer);
7070
TypeId
7171
QuicSocketRxBuffer::GetTypeId (void)
7272
{
73-
static TypeId tid =
74-
TypeId ("ns3::QuicSocketRxBuffer").SetParent<Object> ().SetGroupName (
75-
"Internet").AddConstructor<QuicSocketRxBuffer> ();
73+
static TypeId tid = TypeId ("ns3::QuicSocketRxBuffer")
74+
.SetParent<Object> ()
75+
.SetGroupName ("Internet")
76+
.AddConstructor<QuicSocketRxBuffer> ()
77+
;
7678
return tid;
7779
}
7880

model/quic-socket-tx-buffer.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ NS_LOG_COMPONENT_DEFINE ("QuicSocketTxBuffer");
4343

4444
TypeId QuicSocketTxItem::GetTypeId (void)
4545
{
46-
static TypeId tid =
47-
TypeId ("ns3::QuicSocketTxItem").SetParent<Object>().SetGroupName (
48-
"Internet").AddConstructor<QuicSocketTxItem>()
46+
static TypeId tid = TypeId ("ns3::QuicSocketTxItem")
47+
.SetParent<Object>()
48+
.SetGroupName ("Internet")
49+
.AddConstructor<QuicSocketTxItem>()
4950
// .AddTraceSource ("UnackSequence",
5051
// "First unacknowledged sequence number (SND.UNA)",
5152
// MakeTraceSourceAccessor (&QuicSocketTxBuffer::m_sentSize),

model/quic-socket-tx-edf-scheduler.cc

+9-7
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ NS_OBJECT_ENSURE_REGISTERED (QuicSocketTxEdfScheduler);
4242

4343
TypeId QuicSocketTxEdfScheduler::GetTypeId (void)
4444
{
45-
static TypeId tid = TypeId ("ns3::QuicSocketTxEdfScheduler").SetParent<
46-
QuicSocketTxScheduler>().SetGroupName ("Internet").AddConstructor<
47-
QuicSocketTxEdfScheduler>().AddAttribute ("RetxFirst",
48-
"Prioritize retransmissions regardless of stream",
49-
BooleanValue (false),
50-
MakeBooleanAccessor (&QuicSocketTxEdfScheduler::m_retxFirst),
51-
MakeBooleanChecker ());
45+
static TypeId tid = TypeId ("ns3::QuicSocketTxEdfScheduler")
46+
.SetParent<QuicSocketTxScheduler>()
47+
.SetGroupName ("Internet")
48+
.AddConstructor<QuicSocketTxEdfScheduler>()
49+
.AddAttribute ("RetxFirst", "Prioritize retransmissions regardless of stream",
50+
BooleanValue (false),
51+
MakeBooleanAccessor (&QuicSocketTxEdfScheduler::m_retxFirst),
52+
MakeBooleanChecker ())
53+
;
5254
return tid;
5355
}
5456

model/quic-socket-tx-pfifo-scheduler.cc

+9-7
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ NS_OBJECT_ENSURE_REGISTERED (QuicSocketTxPFifoScheduler);
4242

4343
TypeId QuicSocketTxPFifoScheduler::GetTypeId (void)
4444
{
45-
static TypeId tid = TypeId ("ns3::QuicSocketTxPFifoScheduler").SetParent<
46-
QuicSocketTxScheduler>().SetGroupName ("Internet").AddConstructor<
47-
QuicSocketTxPFifoScheduler>().AddAttribute ("RetxFirst",
48-
"Prioritize retransmissions regardless of stream",
49-
BooleanValue (false),
50-
MakeBooleanAccessor (&QuicSocketTxPFifoScheduler::m_retxFirst),
51-
MakeBooleanChecker ());
45+
static TypeId tid = TypeId ("ns3::QuicSocketTxPFifoScheduler")
46+
.SetParent<QuicSocketTxScheduler> ()
47+
.SetGroupName ("Internet")
48+
.AddConstructor<QuicSocketTxPFifoScheduler> ()
49+
.AddAttribute ("RetxFirst", "Prioritize retransmissions regardless of stream",
50+
BooleanValue (false),
51+
MakeBooleanAccessor (&QuicSocketTxPFifoScheduler::m_retxFirst),
52+
MakeBooleanChecker ())
53+
;
5254
return tid;
5355
}
5456

model/quic-socket-tx-scheduler.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ QuicSocketTxScheduler::GetTypeId (void)
123123
static TypeId tid = TypeId ("ns3::QuicSocketTxScheduler")
124124
.SetParent<Object> ()
125125
.SetGroupName ("Internet")
126-
.AddConstructor<QuicSocketTxScheduler>()
126+
.AddConstructor<QuicSocketTxScheduler> ()
127127
;
128128
return tid;
129129
}

model/quic-stream-rx-buffer.cc

+5-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ NS_OBJECT_ENSURE_REGISTERED (QuicStreamRxBuffer);
7171
TypeId
7272
QuicStreamRxBuffer::GetTypeId (void)
7373
{
74-
static TypeId tid =
75-
TypeId ("ns3::QuicStreamRxBuffer").SetParent<Object> ().SetGroupName (
76-
"Internet").AddConstructor<QuicStreamRxBuffer> ();
74+
static TypeId tid = TypeId ("ns3::QuicStreamRxBuffer")
75+
.SetParent<Object> ()
76+
.SetGroupName ("Internet")
77+
.AddConstructor<QuicStreamRxBuffer> ()
78+
;
7779
return tid;
7880
}
7981

0 commit comments

Comments
 (0)