src/internet-stack/tcp-socket-factory-impl.h
author Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
Fri, 11 Jul 2008 18:39:19 +0100
changeset 3416 926ccb845111
parent 3266 1ae7df5cf87b
child 3691 372f4475dc47
permissions -rw-r--r--
Rescan APIs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3133
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     2
/*
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     3
 * Copyright (c) 2007 Georgia Tech Research Corporation
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     4
 *
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     8
 *
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    12
 * GNU General Public License for more details.
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    13
 *
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    17
 *
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    18
 * Author: Raj Bhattacharjea <raj.b@gatech.edu>
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    19
 */
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    20
#ifndef TCP_SOCKET_FACTORY_IMPL_H
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    21
#define TCP_SOCKET_FACTORY_IMPL_H
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    22
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    23
#include "ns3/tcp-socket-factory.h"
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    24
#include "ns3/ptr.h"
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    25
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    26
namespace ns3 {
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    27
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    28
class TcpL4Protocol;
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    29
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    30
/**
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    31
 * \ingroup internetNode
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    32
 * \defgroup Tcp Tcp
3222
f61c17b62fd1 bug 202: classes disappeared from doxygen output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3133
diff changeset
    33
 */
f61c17b62fd1 bug 202: classes disappeared from doxygen output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3133
diff changeset
    34
/**
f61c17b62fd1 bug 202: classes disappeared from doxygen output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3133
diff changeset
    35
 * \ingroup Tcp
3133
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    36
 * \section Tcp Overview
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    37
 *
3266
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    38
 * The TCP code in ns3's internet stack is ported from the  
3133
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    39
 * <a href="http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/">
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    40
 * Georgia Tech Network Simulator (GTNetS)</a>.
3266
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    41
 *
3133
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    42
 * Most of the logic is in class ns3::TcpSocketImpl.
3266
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    43
 * This class serves to create sockets of the TcpSocketImpl
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    44
 * type.  That is, it creates sockets which use the GTNetS Tahoe code.
3133
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    45
 */
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    46
class TcpSocketFactoryImpl : public TcpSocketFactory
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    47
{
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    48
public:
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    49
  TcpSocketFactoryImpl ();
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    50
  virtual ~TcpSocketFactoryImpl ();
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    51
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    52
  void SetTcp (Ptr<TcpL4Protocol> tcp);
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    53
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    54
  virtual Ptr<Socket> CreateSocket (void);
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    55
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    56
protected:
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    57
  virtual void DoDispose (void);
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    58
private:
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    59
  Ptr<TcpL4Protocol> m_tcp;
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    60
};
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    61
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    62
} // namespace ns3
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    63
295e061719fc change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    64
#endif /* TCP_SOCKET_FACTORY_IMPL_H */