Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2076)

Side by Side Diff: src/internet/model/tcp-socket-base.cc

Issue 6463048: Codel, fq_codel in ns3
Patch Set: Created 12 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /* 2 /*
3 * Copyright (c) 2007 Georgia Tech Research Corporation 3 * Copyright (c) 2007 Georgia Tech Research Corporation
4 * Copyright (c) 2010 Adrian Sai-wah Tam 4 * Copyright (c) 2010 Adrian Sai-wah Tam
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation; 8 * published by the Free Software Foundation;
9 * 9 *
10 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * 18 *
19 * Author: Adrian Sai-wah Tam <adrian.sw.tam@gmail.com> 19 * Author: Adrian Sai-wah Tam <adrian.sw.tam@gmail.com>
20 */ 20 */
21 21
22 #define NS_LOG_APPEND_CONTEXT \ 22 #define NS_LOG_APPEND_CONTEXT \
23 if (m_node) { std::clog << Simulator::Now ().GetSeconds () << " [node " << m_n ode->GetId () << "] "; } 23 if (m_node) { std::clog << Simulator::Now ().GetSeconds () << " [node " << m_n ode->GetId () << "] "; }
24 24
25 #include <cstdlib>
25 #include "ns3/abort.h" 26 #include "ns3/abort.h"
26 #include "ns3/node.h" 27 #include "ns3/node.h"
27 #include "ns3/inet-socket-address.h" 28 #include "ns3/inet-socket-address.h"
28 #include "ns3/inet6-socket-address.h" 29 #include "ns3/inet6-socket-address.h"
29 #include "ns3/log.h" 30 #include "ns3/log.h"
30 #include "ns3/ipv4.h" 31 #include "ns3/ipv4.h"
31 #include "ns3/ipv6.h" 32 #include "ns3/ipv6.h"
32 #include "ns3/ipv4-interface-address.h" 33 #include "ns3/ipv4-interface-address.h"
33 #include "ns3/ipv4-route.h" 34 #include "ns3/ipv4-route.h"
34 #include "ns3/ipv6-route.h" 35 #include "ns3/ipv6-route.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 99 }
99 100
100 TcpSocketBase::TcpSocketBase (void) 101 TcpSocketBase::TcpSocketBase (void)
101 : m_dupAckCount (0), 102 : m_dupAckCount (0),
102 m_delAckCount (0), 103 m_delAckCount (0),
103 m_endPoint (0), 104 m_endPoint (0),
104 m_endPoint6 (0), 105 m_endPoint6 (0),
105 m_node (0), 106 m_node (0),
106 m_tcp (0), 107 m_tcp (0),
107 m_rtt (0), 108 m_rtt (0),
108 m_nextTxSequence (0), 109 m_nextTxSequence (std::rand ()),
Tom Henderson 2012/08/17 21:19:31 We would rather use the ns-3 random numbers here.
Tommaso Pecorella 2012/11/10 22:56:39 beside Tom's comment, this change is not strictly
Tom Henderson 2012/11/12 19:29:34 Here is the bug/feature request: https://www.nsnam
109 // Change this for non-zero initial sequence number 110 // Change this for non-zero initial sequence number
110 m_highTxMark (0), 111 m_highTxMark (0),
111 m_rxBuffer (0), 112 m_rxBuffer (0),
112 m_txBuffer (0), 113 m_txBuffer (0),
113 m_state (CLOSED), 114 m_state (CLOSED),
114 m_errno (ERROR_NOTERROR), 115 m_errno (ERROR_NOTERROR),
115 m_closeNotified (false), 116 m_closeNotified (false),
116 m_closeOnEmpty (false), 117 m_closeOnEmpty (false),
117 m_shutdownSend (false), 118 m_shutdownSend (false),
118 m_shutdownRecv (false), 119 m_shutdownRecv (false),
(...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 { 2284 {
2284 } 2285 }
2285 2286
2286 /** Placeholder function for future extension that changes the TCP header */ 2287 /** Placeholder function for future extension that changes the TCP header */
2287 void 2288 void
2288 TcpSocketBase::AddOptions (TcpHeader&) 2289 TcpSocketBase::AddOptions (TcpHeader&)
2289 { 2290 {
2290 } 2291 }
2291 2292
2292 } // namespace ns3 2293 } // namespace ns3
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b