author | Florian Westphal <fw@strlen.de> |
Tue, 18 Nov 2008 23:14:02 +0100 | |
changeset 3869 | 0edba1e055aa |
parent 3691 | 372f4475dc47 |
child 6768 | 805f5fc7f670 |
permissions | -rw-r--r-- |
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 |
/** |
3691 | 31 |
* \ingroup internetStack |
32 |
* \defgroup tcp Tcp |
|
3133
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
33 |
* |
3266
1ae7df5cf87b
Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
3260
diff
changeset
|
34 |
* 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
|
35 |
* <a href="http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/"> |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
36 |
* Georgia Tech Network Simulator (GTNetS)</a>. |
3266
1ae7df5cf87b
Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
3260
diff
changeset
|
37 |
* |
3133
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
38 |
* 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
|
39 |
* 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
|
40 |
* 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
|
41 |
*/ |
3691 | 42 |
|
43 |
/** |
|
44 |
* \ingroup tcp |
|
45 |
* |
|
46 |
* \brief socket factory implementation for native ns-3 TCP |
|
47 |
* |
|
48 |
*/ |
|
3133
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
49 |
class TcpSocketFactoryImpl : public TcpSocketFactory |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
50 |
{ |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
51 |
public: |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
52 |
TcpSocketFactoryImpl (); |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
53 |
virtual ~TcpSocketFactoryImpl (); |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
54 |
|
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
55 |
void SetTcp (Ptr<TcpL4Protocol> tcp); |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
56 |
|
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
57 |
virtual Ptr<Socket> CreateSocket (void); |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
58 |
|
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
59 |
protected: |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
60 |
virtual void DoDispose (void); |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
61 |
private: |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
62 |
Ptr<TcpL4Protocol> m_tcp; |
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 |
|
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
65 |
} // namespace ns3 |
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
66 |
|
295e061719fc
change TcpImpl to TcpSocketFactoryImpl
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
67 |
#endif /* TCP_SOCKET_FACTORY_IMPL_H */ |