src/csma-layout/model/csma-star-helper.cc
author Tom Henderson <tomh@tomh.org>
Sun, 20 May 2012 15:19:52 -0700
changeset 8798 5d8dfd7c6609
parent 7815 1ff10ed6e878
child 10968 2d29fee2b7b8
permissions -rw-r--r--
bug 1432: Align Ipv6AddressHelper API with Ipv4AddressHelper API
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
     2
/*
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
     3
 * This program is free software; you can redistribute it and/or modify
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
     4
 * it under the terms of the GNU General Public License version 2 as
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
     5
 * published by the Free Software Foundation;
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
     6
 *
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
     7
 * This program is distributed in the hope that it will be useful,
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
     8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
     9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    10
 * GNU General Public License for more details.
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    11
 *
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    12
 * You should have received a copy of the GNU General Public License
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    13
 * along with this program; if not, write to the Free Software
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    14
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    15
 */
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    16
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    17
#include <iostream>
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    18
#include <sstream>
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    19
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    20
// ns3 includes
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    21
#include "ns3/csma-star-helper.h"
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    22
#include "ns3/node-list.h"
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    23
#include "ns3/point-to-point-net-device.h"
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    24
#include "ns3/vector.h"
7815
1ff10ed6e878 no one needs animation-interface.h here.
Mathieu Lacage <mathieu.lacage@cutebugs.net>
parents: 7717
diff changeset
    25
#include "ns3/log.h"
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    26
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7202
diff changeset
    27
NS_LOG_COMPONENT_DEFINE ("CsmaStarHelper");
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    28
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    29
namespace ns3 {
7133
db7061624ae6 csma-layout code-style changes
John Abraham<john.abraham@gatech.edu>
parents: 7089
diff changeset
    30
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    31
CsmaStarHelper::CsmaStarHelper (uint32_t numSpokes,
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    32
                                CsmaHelper csmaHelper)
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    33
{
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    34
  m_hub.Create (1);
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    35
  m_spokes.Create (numSpokes);
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    36
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    37
  for (uint32_t i = 0; i < m_spokes.GetN (); ++i)
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    38
    {
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    39
      NodeContainer nodes (m_hub.Get (0), m_spokes.Get (i));
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    40
      NetDeviceContainer nd = csmaHelper.Install (nodes);
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    41
      m_hubDevices.Add (nd.Get (0));
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    42
      m_spokeDevices.Add (nd.Get (1));
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    43
    }
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    44
}
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    45
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    46
CsmaStarHelper::~CsmaStarHelper ()
7171
7495f96e068f csma-layout coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7133
diff changeset
    47
{
7495f96e068f csma-layout coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7133
diff changeset
    48
}
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    49
7171
7495f96e068f csma-layout coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7133
diff changeset
    50
Ptr<Node>
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    51
CsmaStarHelper::GetHub () const
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    52
{
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    53
  return m_hub.Get (0);
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    54
}
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    55
7171
7495f96e068f csma-layout coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7133
diff changeset
    56
Ptr<Node>
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    57
CsmaStarHelper::GetSpokeNode (uint32_t i) const
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    58
{
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    59
  return m_spokes.Get (i);
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    60
}
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    61
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    62
NetDeviceContainer
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    63
CsmaStarHelper::GetHubDevices () const
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    64
{
7202
08ae7db938f6 Bug 1143 CsmaStarHelper::GetHubDevices) returns spoke devices, not hub devices
John Abraham<john.abraham@gatech.edu>
parents: 7171
diff changeset
    65
  return m_hubDevices;
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    66
}
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    67
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    68
NetDeviceContainer
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    69
CsmaStarHelper::GetSpokeDevices () const
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    70
{
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    71
  return m_spokeDevices;
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    72
}
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    73
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    74
Ipv4Address 
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    75
CsmaStarHelper::GetHubIpv4Address (uint32_t i) const
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    76
{
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    77
  return m_hubInterfaces.GetAddress (i);
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    78
}
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    79
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    80
Ipv4Address 
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    81
CsmaStarHelper::GetSpokeIpv4Address (uint32_t i) const
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    82
{
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    83
  return m_spokeInterfaces.GetAddress (i);
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    84
}
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    85
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    86
Ipv6Address
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    87
CsmaStarHelper::GetHubIpv6Address (uint32_t i) const
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    88
{
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    89
  return m_hubInterfaces6.GetAddress (i, 1);
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    90
}
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    91
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    92
Ipv6Address
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    93
CsmaStarHelper::GetSpokeIpv6Address (uint32_t i) const
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    94
{
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    95
  return m_spokeInterfaces6.GetAddress (i, 1);
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    96
}
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
    97
7133
db7061624ae6 csma-layout code-style changes
John Abraham<john.abraham@gatech.edu>
parents: 7089
diff changeset
    98
uint32_t
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
    99
CsmaStarHelper::SpokeCount () const
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   100
{
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   101
  return m_spokes.GetN ();
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   102
}
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   103
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   104
void 
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   105
CsmaStarHelper::InstallStack (InternetStackHelper stack)
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   106
{
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   107
  stack.Install (m_hub);
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   108
  stack.Install (m_spokes);
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   109
}
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   110
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   111
void 
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   112
CsmaStarHelper::AssignIpv4Addresses (Ipv4AddressHelper address)
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   113
{
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   114
  for (uint32_t i = 0; i < m_spokes.GetN (); ++i)
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   115
    {
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   116
      m_hubInterfaces.Add (address.Assign (m_hubDevices.Get (i)));
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   117
      m_spokeInterfaces.Add (address.Assign (m_spokeDevices.Get (i)));
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   118
      address.NewNetwork ();
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   119
    }
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   120
}
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   121
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   122
void 
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   123
CsmaStarHelper::AssignIpv6Addresses (Ipv6Address network, Ipv6Prefix prefix)
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   124
{
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   125
  Ipv6AddressGenerator::Init(network, prefix);
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   126
  Ipv6Address v6network;
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   127
  Ipv6AddressHelper addressHelper;
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   128
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   129
  for (uint32_t i = 0; i < m_spokes.GetN (); ++i)
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   130
    {
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   131
      v6network = Ipv6AddressGenerator::GetNetwork (prefix);
8798
5d8dfd7c6609 bug 1432: Align Ipv6AddressHelper API with Ipv4AddressHelper API
Tom Henderson <tomh@tomh.org>
parents: 7815
diff changeset
   132
      addressHelper.SetBase (v6network, prefix);
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   133
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   134
      Ipv6InterfaceContainer ic = addressHelper.Assign (m_hubDevices.Get (i));
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   135
      m_hubInterfaces6.Add (ic);
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   136
      ic = addressHelper.Assign (m_spokeDevices.Get (i));
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   137
      m_spokeInterfaces6.Add (ic);
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   138
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   139
      Ipv6AddressGenerator::NextNetwork (prefix);
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   140
    }
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   141
}
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7256
diff changeset
   142
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents:
diff changeset
   143
} // namespace ns3