src/point-to-point-layout/model/point-to-point-grid.h
changeset 7717 cfa1741013dd
parent 7241 0a7a16b599e8
child 10407 ea97f1c81af5
--- a/src/point-to-point-layout/model/point-to-point-grid.h	Sun Feb 19 16:22:51 2012 +0100
+++ b/src/point-to-point-layout/model/point-to-point-grid.h	Mon Feb 20 14:05:07 2012 +0100
@@ -24,7 +24,9 @@
 #include "internet-stack-helper.h"
 #include "point-to-point-helper.h"
 #include "ipv4-address-helper.h"
+#include "ipv6-address-helper.h"
 #include "ipv4-interface-container.h"
+#include "ipv6-interface-container.h"
 #include "net-device-container.h"
 
 namespace ns3 {
@@ -85,6 +87,24 @@
   Ipv4Address GetIpv4Address (uint32_t row, uint32_t col);
 
   /**
+   * This returns an Ipv6 address at the node specified by 
+   * the (row, col) address.  Technically, a node will have 
+   * multiple interfaces in the grid; therefore, it also has 
+   * multiple Ipv6 addresses.  This method only returns one of 
+   * the addresses. If you picture the grid, the address returned 
+   * is the left row device of all the nodes, except the left-most 
+   * grid nodes, which returns the right row device.
+   *
+   * \param row the row address of the node desired
+   *
+   * \param col the column address of the node desired
+   *
+   * \returns Ipv6Address of one of the interfaces of the node 
+   *          specified by the (row, col) address
+   */
+  Ipv6Address GetIpv6Address (uint32_t row, uint32_t col);
+
+  /**
    * \param stack an InternetStackHelper which is used to install 
    *              on every node in the grid
    */
@@ -102,6 +122,15 @@
   void AssignIpv4Addresses (Ipv4AddressHelper rowIp, Ipv4AddressHelper colIp);
 
   /**
+   * Assigns Ipv6 addresses to all the row and column interfaces
+   *
+   * \param network an IPv6 address representing the network portion
+   *                of the IPv6 Address
+   * \param prefix the prefix length
+   */
+  void AssignIpv6Addresses (Ipv6Address network, Ipv6Prefix prefix);
+
+  /**
    * Sets up the node canvas locations for every node in the grid.
    * This is needed for use with the animation interface
    *
@@ -119,6 +148,8 @@
   std::vector<NetDeviceContainer> m_colDevices;
   std::vector<Ipv4InterfaceContainer> m_rowInterfaces;
   std::vector<Ipv4InterfaceContainer> m_colInterfaces;
+  std::vector<Ipv6InterfaceContainer> m_rowInterfaces6;
+  std::vector<Ipv6InterfaceContainer> m_colInterfaces6;
   std::vector<NodeContainer> m_nodes;
 };