src/internet/model/nsc-tcp-socket-factory-impl.h
author Brian Swenson <bswenson3@gatech.edu>
Tue, 22 Apr 2014 11:52:55 -0400
changeset 10694 4af272d94cfd
parent 10440 1e48ff9185f1
permissions -rw-r--r--
Bug 1791
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
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_FACTORY_IMPL_H
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    17
#define NSC_TCP_SOCKET_FACTORY_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 "ns3/tcp-socket-factory.h"
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    20
#include "ns3/ptr.h"
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    21
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    22
namespace ns3 {
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    23
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    24
class NscTcpL4Protocol;
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    25
3691
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    26
/**
7149
87514e0d866b Fix doxygen groups for some new modules
Mitch Watrous <watrous@u.washington.edu>
parents: 6834
diff changeset
    27
 * \ingroup internet
3691
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    28
 * \defgroup nsctcp NscTcp
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    29
 *
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    30
 * An alternate implementation of TCP for ns-3 is provided by the
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    31
 * Network Simulation Cradle (NSC) project. NSC is a separately linked
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    32
 * library that provides ported TCP stacks from popular operating systems
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    33
 * such as Linux and FreeBSD.  Glue code such as the ns-3 NSC code
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    34
 * allows users to delegate Internet stack processing to the logic
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    35
 * from these operating systems.  This allows a user to reproduce
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    36
 * with high fidelity the behavior of a real TCP stack.
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    37
 */
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    38
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    39
/**
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    40
 * \ingroup nsctcp
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    41
 *
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    42
 * \brief socket factory implementation for creating instances of NSC TCP
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3578
diff changeset
    43
 */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    44
class NscTcpSocketFactoryImpl : public TcpSocketFactory
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    45
{
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    46
public:
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    47
  NscTcpSocketFactoryImpl ();
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    48
  virtual ~NscTcpSocketFactoryImpl ();
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    49
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7149
diff changeset
    50
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7149
diff changeset
    51
   * \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: 7149
diff changeset
    52
   * \param tcp the TCP L4 protocol
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7149
diff changeset
    53
   */
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    54
  void SetTcp (Ptr<NscTcpL4Protocol> tcp);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    55
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    56
  virtual Ptr<Socket> CreateSocket (void);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    57
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    58
protected:
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    59
  virtual void DoDispose (void);
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    60
private:
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7149
diff changeset
    61
  Ptr<NscTcpL4Protocol> m_tcp; //!< the associated TCP L4 protocol
3578
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    62
};
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
} // namespace ns3
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    65
e6374560e19e nsc: core files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    66
#endif /* NSC_TCP_SOCKET_FACTORY_IMPL_H */