ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mip6d-helper.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 Hajime Tazaki
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
19  */
20 #ifndef MIP6D_HELPER_H
21 #define MIP6D_HELPER_H
22 
23 #include "ns3/node-container.h"
24 #include "ns3/application-container.h"
25 #include "ns3/object-factory.h"
26 #include "ns3/boolean.h"
27 #include "ns3/ipv4-interface-container.h"
28 #include "ns3/address-utils.h"
29 
30 namespace ns3 {
31 
37 {
38 public:
44  Mip6dHelper ();
45 
54  ApplicationContainer Install (NodeContainer nodes);
55 
64  ApplicationContainer Install (Ptr<Node> node);
65 
75  ApplicationContainer Install (std::string nodeName);
76 
82  void SetAttribute (std::string name, const AttributeValue &value);
83 
84  // For HA
85  void EnableHA (NodeContainer nodes);
86  void AddHaServedPrefix (Ptr<Node> node,
87  Ipv6Address prefix, Ipv6Prefix plen);
88 
89  // For MR
90  void AddMobileNetworkPrefix (Ptr<Node> node,
91  Ipv6Address prefix, Ipv6Prefix plen);
92  void AddEgressInterface (Ptr<Node> node, const char *ifname);
93  void AddHomeAgentAddress (Ptr<Node> node, Ipv6Address addr);
94  void AddHomeAddress (Ptr<Node> node,
95  Ipv6Address addr, Ipv6Prefix plen);
96  void EnableMR (NodeContainer nodes);
97  void EnableDSMIP6 (NodeContainer nodes);
98 
99  // For PMIP
100  void AddMNProfileMAG (Ptr<Node> node, Mac48Address mn_id,
101  Ipv6Address lma_addr,
102  Ipv6Address home_pfx, Ipv6Prefix home_plen);
103  void EnableMAG (Ptr<Node> node, const char *ifname, Ipv6Address addr);
104  void EnableLMA (Ptr<Node> node, const char *ifname);
105 
106  // Common
107  void EnableDebug (NodeContainer nodes);
108  void UseManualConfig (NodeContainer nodes);
109  void SetBinary (NodeContainer nodes, std::string binary);
110 
111 private:
115  ApplicationContainer InstallPriv (Ptr<Node> node);
116  void GenerateConfig (Ptr<Node> node);
117 };
118 
119 } // namespace ns3
120 
121 #endif /* MIP6D_HELPER_H */