A Discrete-Event Network Simulator
API
tcp-rfc793.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 Adrian Sai-wah Tam
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  * Author: Adrian Sai-wah Tam <adrian.sw.tam@gmail.com>
19  */
20 
21 #include "tcp-rfc793.h"
22 #include "ns3/log.h"
23 
24 namespace ns3 {
25 
26 NS_LOG_COMPONENT_DEFINE ("TcpRfc793");
27 
28 NS_OBJECT_ENSURE_REGISTERED (TcpRfc793);
29 
30 TypeId
32 {
33  static TypeId tid = TypeId ("ns3::TcpRfc793")
35  .AddConstructor<TcpRfc793> ()
36  ;
37  return tid;
38 }
39 
41 {
42  NS_LOG_FUNCTION (this);
43  SetDelAckMaxCount (0); // Delayed ACK is not in RFC793
44 }
45 
47 {
48 }
49 
51 {
52 }
53 
56 {
57  return CopyObject<TcpRfc793> (this);
58 }
59 
60 void
61 TcpRfc793::DupAck (const TcpHeader& t, uint32_t count)
62 {
63 }
64 
65 void
66 TcpRfc793::SetInitialSSThresh (uint32_t threshold)
67 {
68  NS_LOG_WARN ("DoD TCP does not perform slow start");
69 }
70 
71 uint32_t
73 {
74  NS_LOG_WARN ("DoD TCP does not perform slow start");
75  return 0;
76 }
77 
78 void
80 {
81  NS_LOG_WARN ("DoD TCP does not have congestion window");
82 }
83 
84 uint32_t
86 {
87  NS_LOG_WARN ("DoD TCP does not have congestion window");
88  return 0;
89 }
90 
91 } // namespace ns3
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:44
virtual void SetInitialSSThresh(uint32_t threshold)
Set the initial Slow Start Threshold.
Definition: tcp-rfc793.cc:66
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
static TypeId GetTypeId(void)
Get the type ID.
Definition: tcp-rfc793.cc:31
virtual uint32_t GetInitialCwnd(void) const
Get the initial Congestion Window.
Definition: tcp-rfc793.cc:85
An implementation of a stream socket using TCP.
Definition: tcp-rfc793.h:39
virtual ~TcpRfc793(void)
Definition: tcp-rfc793.cc:50
virtual void DupAck(const TcpHeader &t, uint32_t count)
Received dupack (duplicate ACK)
Definition: tcp-rfc793.cc:61
A base class for implementation of a stream socket using TCP.
virtual void SetDelAckMaxCount(uint32_t count)
Set the number of packet to fire an ACK before delay timeout.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Header for the Transmission Control Protocol.
Definition: tcp-header.h:44
virtual Ptr< TcpSocketBase > Fork()
Call CopyObject<> to clone me.
Definition: tcp-rfc793.cc:55
virtual void SetInitialCwnd(uint32_t cwnd)
Set the initial Congestion Window.
Definition: tcp-rfc793.cc:79
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:228
a unique identifier for an interface.
Definition: type-id.h:51
TypeId SetParent(TypeId tid)
Definition: type-id.cc:631
virtual uint32_t GetInitialSSThresh(void) const
Get the initial Slow Start Threshold.
Definition: tcp-rfc793.cc:72
TcpRfc793(void)
Create an unbound tcp socket.
Definition: tcp-rfc793.cc:40