author | Peter D. Barnes, Jr. <barnes26@llnl.gov> |
Wed, 08 Oct 2014 11:59:31 -0700 | |
changeset 10991 | 54d908f84801 |
parent 10989 | 71d2c67a51aa |
child 11045 | 6024c150e4c8 |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
6852
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
6841
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
2 |
/* |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
3 |
* Copyright (c) 2009 The Georgia Institute of Technology |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
4 |
* |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
8 |
* |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
13 |
* |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
17 |
* |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
18 |
* Authors: Josh Pelkey <jpelkey@gatech.edu> |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
19 |
*/ |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
20 |
|
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
21 |
#ifndef IPV4_NIX_VECTOR_HELPER_H |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
22 |
#define IPV4_NIX_VECTOR_HELPER_H |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
23 |
|
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
24 |
#include "ns3/object-factory.h" |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
25 |
#include "ns3/ipv4-routing-helper.h" |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
26 |
|
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
27 |
namespace ns3 { |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
28 |
|
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
29 |
/** |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
30 |
* \brief Helper class that adds Nix-vector routing to nodes. |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
31 |
* |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
32 |
* This class is expected to be used in conjunction with |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
33 |
* ns3::InternetStackHelper::SetRoutingHelper |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
34 |
* |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
35 |
*/ |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
36 |
class Ipv4NixVectorHelper : public Ipv4RoutingHelper |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
37 |
{ |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
38 |
public: |
10989
71d2c67a51aa
[Doxygen] minor fixes
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
39 |
/** |
6841
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
40 |
* Construct an Ipv4NixVectorHelper to make life easier while adding Nix-vector |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
41 |
* routing to nodes. |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
42 |
*/ |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
43 |
Ipv4NixVectorHelper (); |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
44 |
|
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
45 |
/** |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
46 |
* \brief Construct an Ipv4NixVectorHelper from another previously |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
47 |
* initialized instance (Copy Constructor). |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
48 |
*/ |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
49 |
Ipv4NixVectorHelper (const Ipv4NixVectorHelper &); |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
50 |
|
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
51 |
/** |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
52 |
* \internal |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
53 |
* \returns pointer to clone of this Ipv4NixVectorHelper |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
54 |
* |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
55 |
* This method is mainly for internal use by the other helpers; |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
56 |
* clients are expected to free the dynamic memory allocated by this method |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
57 |
*/ |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
58 |
Ipv4NixVectorHelper* Copy (void) const; |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
59 |
|
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
60 |
/** |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
61 |
* \param node the node on which the routing protocol will run |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
62 |
* \returns a newly-created routing protocol |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
63 |
* |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
64 |
* This method will be called by ns3::InternetStackHelper::Install |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
65 |
*/ |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
66 |
virtual Ptr<Ipv4RoutingProtocol> Create (Ptr<Node> node) const; |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
67 |
|
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
68 |
private: |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
69 |
/** |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
70 |
* \internal |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
71 |
* \brief Assignment operator declared private and not implemented to disallow |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
72 |
* assignment and prevent the compiler from happily inserting its own. |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
73 |
*/ |
10989
71d2c67a51aa
[Doxygen] minor fixes
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
74 |
Ipv4NixVectorHelper &operator = (const Ipv4NixVectorHelper &); |
6841
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
75 |
|
10989
71d2c67a51aa
[Doxygen] minor fixes
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
76 |
ObjectFactory m_agentFactory; //!< Object factory |
6841
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
77 |
}; |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
78 |
} // namespace ns3 |
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
79 |
|
174e599d1003
modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
80 |
#endif /* IPV4_NIX_VECTOR_HELPER_H */ |