6694
|
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 |
#ifndef TCP_RFC793_H
|
|
22 |
#define TCP_RFC793_H
|
|
23 |
|
|
24 |
#include "tcp-socket-base.h"
|
|
25 |
|
|
26 |
namespace ns3 {
|
|
27 |
|
|
28 |
/**
|
|
29 |
* \ingroup socket
|
|
30 |
* \ingroup tcp
|
|
31 |
*
|
|
32 |
* \brief An implementation of a stream socket using TCP.
|
|
33 |
*
|
|
34 |
* This class contains an RFC793 implementation of TCP, as well as a sockets
|
|
35 |
* interface for talking to TCP. This serves as a base for other TCP functions
|
|
36 |
* where the sliding window mechanism is handled here. This class provides
|
|
37 |
* connection orientation and sliding window flow control.
|
|
38 |
*/
|
|
39 |
class TcpRfc793 : public TcpSocketBase
|
|
40 |
{
|
|
41 |
public:
|
|
42 |
static TypeId GetTypeId (void);
|
|
43 |
/**
|
|
44 |
* Create an unbound tcp socket.
|
|
45 |
*/
|
|
46 |
TcpRfc793 (void);
|
|
47 |
TcpRfc793 (const TcpRfc793& sock);
|
|
48 |
virtual ~TcpRfc793 (void);
|
|
49 |
|
|
50 |
protected:
|
|
51 |
virtual Ptr<TcpSocketBase> Fork (); // Call CopyObject<TcpRfc793> to clone me
|
|
52 |
virtual void DupAck (const TcpHeader& t, uint32_t count);
|
|
53 |
virtual void SetSSThresh (uint32_t threshold);
|
|
54 |
virtual uint32_t GetSSThresh (void) const;
|
|
55 |
virtual void SetInitialCwnd (uint32_t cwnd);
|
|
56 |
virtual uint32_t GetInitialCwnd (void) const;
|
|
57 |
};
|
|
58 |
|
|
59 |
} // namespace ns3
|
|
60 |
|
|
61 |
#endif /* TCP_RFC793_H */
|