00001 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 00002 /* 00003 * Copyright (c) 2007 Georgia Tech Research Corporation 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 2 as 00007 * published by the Free Software Foundation; 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 * 00018 * Author: Raj Bhattacharjea <raj.b@gatech.edu> 00019 */ 00020 #ifndef TCP_SOCKET_FACTORY_IMPL_H 00021 #define TCP_SOCKET_FACTORY_IMPL_H 00022 00023 #include "ns3/tcp-socket-factory.h" 00024 #include "ns3/ptr.h" 00025 00026 namespace ns3 { 00027 00028 class TcpL4Protocol; 00029 00030 /** 00031 * \ingroup internetStack 00032 * \defgroup tcp Tcp 00033 * 00034 * The TCP code in ns3's internet stack is ported from the 00035 * <a href="http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/"> 00036 * Georgia Tech Network Simulator (GTNetS)</a>. 00037 * 00038 * Most of the logic is in class ns3::TcpSocketImpl. 00039 * This class serves to create sockets of the TcpSocketImpl 00040 * type. That is, it creates sockets which use the GTNetS Tahoe code. 00041 */ 00042 00043 /** 00044 * \ingroup tcp 00045 * 00046 * \brief socket factory implementation for native ns-3 TCP 00047 * 00048 */ 00049 class TcpSocketFactoryImpl : public TcpSocketFactory 00050 { 00051 public: 00052 TcpSocketFactoryImpl (); 00053 virtual ~TcpSocketFactoryImpl (); 00054 00055 void SetTcp (Ptr<TcpL4Protocol> tcp); 00056 00057 virtual Ptr<Socket> CreateSocket (void); 00058 00059 protected: 00060 virtual void DoDispose (void); 00061 private: 00062 Ptr<TcpL4Protocol> m_tcp; 00063 }; 00064 00065 } // namespace ns3 00066 00067 #endif /* TCP_SOCKET_FACTORY_IMPL_H */