src/internet/model/nsc-tcp-socket-impl.h
author Brian Swenson <bswenson3@gatech.edu>
Tue, 22 Apr 2014 11:52:55 -0400
changeset 10694 4af272d94cfd
parent 10440 1e48ff9185f1
child 10855 7ef081ddfc7f
permissions -rw-r--r--
Bug 1791
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7385
10beb0e53130 standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents: 7256
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     2
/*
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     3
 * This program is free software; you can redistribute it and/or modify
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     4
 * it under the terms of the GNU General Public License version 2 as
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     5
 * published by the Free Software Foundation;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     6
 *
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     7
 * This program is distributed in the hope that it will be useful,
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    10
 * GNU General Public License for more details.
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    11
 *
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    12
 * You should have received a copy of the GNU General Public License
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    13
 * along with this program; if not, write to the Free Software
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    14
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    15
 */
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    16
#ifndef NSC_TCP_SOCKET_IMPL_H
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    17
#define NSC_TCP_SOCKET_IMPL_H
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    18
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    19
#include <stdint.h>
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    20
#include <queue>
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    21
#include <vector>
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    22
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    23
#include "ns3/callback.h"
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    24
#include "ns3/traced-value.h"
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    25
#include "ns3/tcp-socket.h"
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    26
#include "ns3/ptr.h"
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    27
#include "ns3/ipv4-address.h"
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    28
#include "ns3/inet-socket-address.h"
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    29
#include "ns3/event-id.h"
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    30
#include "pending-data.h"
6434
ac8b4bf77e50 Bug 385 - Add a generic "sequence number" class.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 6273
diff changeset
    31
#include "ns3/sequence-number.h"
4740
34acfd7ad508 export headers from internet-stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3778
diff changeset
    32
34acfd7ad508 export headers from internet-stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3778
diff changeset
    33
struct INetStreamSocket;
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    34
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    35
namespace ns3 {
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    36
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    37
class Ipv4EndPoint;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    38
class Node;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    39
class Packet;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    40
class NscTcpL4Protocol;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    41
class TcpHeader;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    42
3691
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3635
diff changeset
    43
/**
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3635
diff changeset
    44
 * \ingroup socket
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3635
diff changeset
    45
 * \ingroup nsctcp
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3635
diff changeset
    46
 *
7176
9f2663992e99 internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6834
diff changeset
    47
 * \brief Socket logic for the NSC TCP sockets.
3691
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3635
diff changeset
    48
 * 
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3635
diff changeset
    49
 * Most of the TCP internal
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3635
diff changeset
    50
 * logic is handled by the NSC tcp library itself; this class maps ns3::Socket
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3635
diff changeset
    51
 * calls to the NSC TCP library.
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3635
diff changeset
    52
 */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    53
class NscTcpSocketImpl : public TcpSocket
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    54
{
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    55
public:
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    56
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    57
   * \brief Get the type ID.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    58
   * \return the object TypeId
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    59
   */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    60
  static TypeId GetTypeId (void);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    61
  /**
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    62
   * Create an unbound tcp socket.
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    63
   */
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    64
  NscTcpSocketImpl ();
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    65
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    66
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    67
   * Clone a TCP socket, for use upon receiving a connection request in LISTEN state
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    68
   *
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    69
   * \param sock the original Tcp Socket
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    70
   */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    71
  NscTcpSocketImpl (const NscTcpSocketImpl& sock);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    72
  virtual ~NscTcpSocketImpl ();
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    73
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    74
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    75
   * \brief Set the associated node.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    76
   * \param node the node
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    77
   */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    78
  void SetNode (Ptr<Node> node);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    79
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    80
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    81
   * \brief Set the associated TCP L4 protocol.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    82
   * \param tcp the TCP L4 protocol
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
    83
   */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    84
  void SetTcp (Ptr<NscTcpL4Protocol> tcp);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    85
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    86
  virtual enum SocketErrno GetErrno (void) const;
6689
e2de571e920a Implement Socket::GetSocketType
Josh Pelkey <jpelkey@gatech.edu>
parents: 6448
diff changeset
    87
  virtual enum SocketType GetSocketType (void) const;
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    88
  virtual Ptr<Node> GetNode (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    89
  virtual int Bind (void);
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7619
diff changeset
    90
  virtual int Bind6 (void);
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    91
  virtual int Bind (const Address &address);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    92
  virtual int Close (void);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    93
  virtual int ShutdownSend (void);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    94
  virtual int ShutdownRecv (void);
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7176
diff changeset
    95
  virtual int Connect (const Address &address);
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7176
diff changeset
    96
  virtual int Listen (void);
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    97
  virtual uint32_t GetTxAvailable (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    98
  virtual int Send (Ptr<Packet> p, uint32_t flags);
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7176
diff changeset
    99
  virtual int SendTo (Ptr<Packet> p, uint32_t flags, const Address &toAddress);
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   100
  virtual uint32_t GetRxAvailable (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   101
  virtual Ptr<Packet> Recv (uint32_t maxSize, uint32_t flags);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   102
  virtual Ptr<Packet> RecvFrom (uint32_t maxSize, uint32_t flags,
7176
9f2663992e99 internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6834
diff changeset
   103
                                Address &fromAddress);
3778
78c4c41557f3 Liu's GetSockName patch
Craig Dowell <craigdo@ee.washington.edu>
parents: 3772
diff changeset
   104
  virtual int GetSockName (Address &address) const; 
6448
184a509cc71d Still Bug 943: fix UdpSocketImpl::GetAllowBroadcast, let Socket::SetAllowBroadcast return a bool indicating success/failure, instead of a fatal error.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 6442
diff changeset
   105
  virtual bool SetAllowBroadcast (bool allowBroadcast);
6437
c11291f51d57 Bug 943 - Add a SO_BROADCAST socket option
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 6434
diff changeset
   106
  virtual bool GetAllowBroadcast () const;
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   107
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   108
private:
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   109
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   110
   * \brief Called by NscTcpSocketImpl::ForwardUp()
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   111
   *
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   112
   * Actually performs the ForwardUp operations
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   113
   */
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7176
diff changeset
   114
  void NSCWakeup (void);
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   115
  friend class Tcp;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   116
  // invoked by Tcp class
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   117
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   118
   * Finish the binding process
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   119
   * \returns 0 on success, -1 on failure
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   120
   */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   121
  int FinishBind (void);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   122
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   123
   * \brief Called by the L3 protocol when it received a packet to pass on to TCP.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   124
   *
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   125
   * \param p the incoming packet
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   126
   * \param header the packet's IPv4 header
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   127
   * \param port the incoming port
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   128
   * \param incomingInterface the incoming interface
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   129
   */
6442
f380cf1aa4d8 Bug 671 add packet-info-tag.cc for IP_PKTINFO/IPV6_PKTINFO
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 6437
diff changeset
   130
  void ForwardUp (Ptr<Packet> p, Ipv4Header header, uint16_t port, 
f380cf1aa4d8 Bug 671 add packet-info-tag.cc for IP_PKTINFO/IPV6_PKTINFO
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 6437
diff changeset
   131
                  Ptr<Ipv4Interface> incomingInterface);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   132
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   133
   * \brief Kill this socket by zeroing its attributes (IPv4)
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   134
   *
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   135
   * This is a callback function configured to m_endpoint in
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   136
   * SetupCallback(), invoked when the endpoint is destroyed.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   137
   */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   138
  void Destroy (void);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   139
  //methods for state
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   140
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   141
   * \brief Send all the pending data
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   142
   * \returns true on success
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   143
   */
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7176
diff changeset
   144
  bool SendPendingData (void);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   145
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   146
   * \brief Read all the pending data
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   147
   * \returns true on success
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   148
   */
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7176
diff changeset
   149
  bool ReadPendingData (void);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   150
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   151
   * \brief Accept an incoming connection
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   152
   * \returns true on success
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   153
   */
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7176
diff changeset
   154
  bool Accept (void);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   155
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   156
   * \brief Complete the Fork operations (after a connection has been accepted)
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   157
   */
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7176
diff changeset
   158
  void CompleteFork (void);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   159
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   160
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   161
   * \brief Called when a connection is in Established state
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   162
   */
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7176
diff changeset
   163
  void ConnectionSucceeded ();
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   164
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   165
  // Manage data tx/rx
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   166
  // \todo This should be virtual and overridden
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   167
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   168
   * \brief Copy self
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   169
   * \returns a copy of self
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   170
   */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   171
  Ptr<NscTcpSocketImpl> Copy ();
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   172
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   173
  // attribute related
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   174
  virtual void SetSndBufSize (uint32_t size);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   175
  virtual uint32_t GetSndBufSize (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   176
  virtual void SetRcvBufSize (uint32_t size);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   177
  virtual uint32_t GetRcvBufSize (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   178
  virtual void SetSegSize (uint32_t size);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   179
  virtual uint32_t GetSegSize (void) const;
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   180
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   181
   * \brief Set the Advertised Window size
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   182
   * \param window the window size
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   183
   */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   184
  virtual void SetAdvWin (uint32_t window);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   185
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   186
   * \brief Get the Advertised Window size
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   187
   * \returns the window size
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   188
   */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   189
  virtual uint32_t GetAdvWin (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   190
  virtual void SetSSThresh (uint32_t threshold);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   191
  virtual uint32_t GetSSThresh (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   192
  virtual void SetInitialCwnd (uint32_t cwnd);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   193
  virtual uint32_t GetInitialCwnd (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   194
  virtual void SetConnTimeout (Time timeout);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   195
  virtual Time GetConnTimeout (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   196
  virtual void SetConnCount (uint32_t count);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   197
  virtual uint32_t GetConnCount (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   198
  virtual void SetDelAckTimeout (Time timeout);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   199
  virtual Time GetDelAckTimeout (void) const;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   200
  virtual void SetDelAckMaxCount (uint32_t count);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   201
  virtual uint32_t GetDelAckMaxCount (void) const;
7619
b4dee6307aa7 Nagle's algorithm in TCP (closes bug 1039)
Adrian S Tam <adrian.sw.tam@gmail.com>
parents: 7386
diff changeset
   202
  virtual void SetTcpNoDelay (bool noDelay);
b4dee6307aa7 Nagle's algorithm in TCP (closes bug 1039)
Adrian S Tam <adrian.sw.tam@gmail.com>
parents: 7386
diff changeset
   203
  virtual bool GetTcpNoDelay (void) const;
6694
a814f37d15bf merge new TCP code
Josh Pelkey <jpelkey@gatech.edu>
parents: 6689
diff changeset
   204
  virtual void SetPersistTimeout (Time timeout);
a814f37d15bf merge new TCP code
Josh Pelkey <jpelkey@gatech.edu>
parents: 6689
diff changeset
   205
  virtual Time GetPersistTimeout (void) const;
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   206
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   207
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   208
   * \brief Translate between a NSC error and a ns-3 error code
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   209
   * \param err NSC error
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   210
   * \returns ns-3 error code
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   211
   */
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7176
diff changeset
   212
  enum Socket::SocketErrno GetNativeNs3Errno (int err) const;
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   213
  uint32_t m_delAckMaxCount;  //!< Number of packet to fire an ACK before delay timeout
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   214
  Time m_delAckTimeout;       //!< Time to delay an ACK
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   215
  bool m_noDelay;             //!< Disable ACk delay
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   216
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   217
  Ipv4EndPoint *m_endPoint;     //!< the IPv4 endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   218
  Ptr<Node> m_node;             //!< the associated node
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   219
  Ptr<NscTcpL4Protocol> m_tcp;  //!< the associated TCP L4 protocol
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   220
  Ipv4Address m_remoteAddress;  //!< peer IP address
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   221
  uint16_t m_remotePort;        //!< peer port
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   222
  //these two are so that the socket/endpoint cloning works
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   223
  Ipv4Address m_localAddress;   //!< local address
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   224
  uint16_t m_localPort;         //!< local port
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   225
  InetSocketAddress m_peerAddress; //!< peer IP and port
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   226
  enum SocketErrno m_errno;     //!< last error number
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   227
  bool m_shutdownSend;          //!< Send no longer allowed
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   228
  bool m_shutdownRecv;          //!< Receive no longer allowed
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   229
  bool m_connected;             //!< Connection established
7176
9f2663992e99 internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6834
diff changeset
   230
6273
8d70de29d514 spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents: 5971
diff changeset
   231
  //manage the state information
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   232
  TracedValue<TcpStates_t> m_state; //!< state information
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   233
  bool m_closeOnEmpty;              //!< true if socket will close when buffer is empty
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   234
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   235
  //needed to queue data when in SYN_SENT state
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   236
  std::queue<Ptr<Packet> > m_txBuffer; //!< transmission buffer
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   237
  uint32_t m_txBufferSize;             //!< transmission buffer size
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   238
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   239
  // Window management
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   240
  uint32_t                       m_segmentSize;          //!< SegmentSize
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   241
  uint32_t                       m_rxWindowSize;         //!< Receive window size
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   242
  uint32_t                       m_advertisedWindowSize; //!< Window to advertise
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   243
  TracedValue<uint32_t>          m_cWnd;                 //!< Congestion window
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   244
  uint32_t                       m_ssThresh;             //!< Slow Start Threshold
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   245
  uint32_t                       m_initialCWnd;          //!< Initial cWnd value
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   246
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   247
  // Round trip time estimation
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   248
  Time m_lastMeasuredRtt; //!< Last measured RTT
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   249
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   250
  // Timer-related members
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   251
  Time              m_cnTimeout;       //!< Timeout for connection retry
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   252
  uint32_t          m_cnCount;         //!< Count of remaining connection retries
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   253
  Time              m_persistTimeout;  //!< Time between sending 1-byte probes
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   254
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   255
  // Temporary queue for delivering data to application
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   256
  std::queue<Ptr<Packet> > m_deliveryQueue; //!< receive buffer
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   257
  uint32_t m_rxAvailable;                   //!< receive buffer available size
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   258
  INetStreamSocket* m_nscTcpSocket;         //!< the real NSC TCP socket
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   259
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   260
  // Attributes
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   261
  uint32_t m_sndBufSize;   //!< buffer limit for the outgoing queue
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9894
diff changeset
   262
  uint32_t m_rcvBufSize;   //!< maximum receive socket buffer size
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   263
};
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   264
7386
2310ed220a61 standardize ns-3 namespace declaration format
Vedran Miletić <rivanvx@gmail.com>
parents: 7385
diff changeset
   265
} // namespace ns3
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   266
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   267
#endif /* NSC_TCP_SOCKET_IMPL_H */