A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ipv6-interface-container.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008-2009 Strasbourg University
4  * 2013 Universita' di Firenze
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
20  * Tommaso Pecorella <tommaso.pecorella@unifi.it>
21  */
22 
23 #ifndef IPV6_INTERFACE_CONTAINER_H
24 #define IPV6_INTERFACE_CONTAINER_H
25 
26 #include <stdint.h>
27 
28 #include <vector>
29 
30 #include "ns3/ipv6.h"
31 #include "ns3/ipv6-address.h"
32 #include "ns3/deprecated.h"
33 
34 namespace ns3
35 {
36 
42 {
43 public:
44  typedef std::vector<std::pair<Ptr<Ipv6>, uint32_t> >::const_iterator Iterator;
49 
69  uint32_t GetN (void) const;
70 
76  uint32_t GetInterfaceIndex (uint32_t i) const;
77 
84  Ipv6Address GetAddress (uint32_t i, uint32_t j) const;
85 
91  Ipv6Address GetLinkLocalAddress (uint32_t i);
92 
99 
105  void Add (Ptr<Ipv6> ipv6, uint32_t interface);
106 
127  Iterator Begin (void) const;
128 
149  Iterator End (void) const;
150 
155  void Add (Ipv6InterfaceContainer& c);
156 
162  void Add (std::string ipv6Name, uint32_t interface);
163 
169  void SetRouter (uint32_t i, bool router) NS_DEPRECATED;
170 
177  void SetForwarding (uint32_t i, bool state);
178 
183  void SetDefaultRouteInAllNodes (uint32_t router);
184 
190  void SetDefaultRouteInAllNodes (Ipv6Address routerAddr);
191 
197  void SetDefaultRoute (uint32_t i, uint32_t router);
198 
205  void SetDefaultRoute (uint32_t i, Ipv6Address routerAddr);
206 
207 private:
208  typedef std::vector<std::pair<Ptr<Ipv6>, uint32_t> > InterfaceVector;
209 
215 };
216 
217 } /* namespace ns3 */
218 
219 #endif /* IPV6_INTERFACE_CONTAINER_H */
220