This file is indexed.

/usr/include/ns3.27/ns3/point-to-point-dumbbell.h is in libns3-dev 3.27+dfsg-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: George F. Riley<riley@ece.gatech.edu>
 */

// Define an object to create a dumbbell topology.

#ifndef POINT_TO_POINT_DUMBBELL_HELPER_H
#define POINT_TO_POINT_DUMBBELL_HELPER_H

#include <string>

#include "point-to-point-helper.h"
#include "ipv4-address-helper.h"
#include "ipv6-address-helper.h"
#include "internet-stack-helper.h"
#include "ipv4-interface-container.h"
#include "ipv6-interface-container.h"

namespace ns3 {

/**
 * \ingroup point-to-point-layout
 *
 * \brief A helper to make it easier to create a dumbbell topology
 * with p2p links
 */
class PointToPointDumbbellHelper
{
public:
  /**
   * Create a PointToPointDumbbellHelper in order to easily create
   * dumbbell topologies using p2p links
   *
   * \param nLeftLeaf number of left side leaf nodes in the dumbbell
   *
   * \param leftHelper PointToPointHelper used to install the links 
   *                   between the left leaf nodes and the left-most 
   *                   router
   *
   * \param nRightLeaf number of right side leaf nodes in the dumbbell
   *
   * \param rightHelper PointToPointHelper used to install the links 
   *                    between the right leaf nodes and the right-most 
   *                    router
   *
   * \param bottleneckHelper PointToPointHelper used to install the link 
   *                         between the inner-routers, usually known as 
   *                         the bottleneck link
   */
  PointToPointDumbbellHelper (uint32_t nLeftLeaf,
                              PointToPointHelper leftHelper,
                              uint32_t nRightLeaf,
                              PointToPointHelper rightHelper,
                              PointToPointHelper bottleneckHelper);

  ~PointToPointDumbbellHelper ();

public:
  /**
   * \returns pointer to the node of the left side bottleneck
   *          router
   */
  Ptr<Node> GetLeft () const;

  /**
   * \returns pointer to the i'th left side leaf node
   * \param i node number
   */
  Ptr<Node> GetLeft (uint32_t i) const;

  /**
   * \returns pointer to the node of the right side bottleneck
   *          router
   */
  Ptr<Node> GetRight () const;

  /**
   * \returns pointer to the i'th left side leaf node
   * \param i node number
   */
  Ptr<Node> GetRight (uint32_t i) const;

  /**
   * \returns an Ipv4Address of the i'th left leaf
   * \param i node number
   */
  Ipv4Address GetLeftIpv4Address (uint32_t i ) const; // Get left leaf address

  /**
   * \returns an Ipv4Address of the i'th right leaf
   * \param i node number
   */
  Ipv4Address GetRightIpv4Address (uint32_t i) const;

  /**
   * \returns an Ipv6Address of the i'th left leaf
   * \param i node number
   */
  Ipv6Address GetLeftIpv6Address (uint32_t i ) const; // Get left leaf address

  /**
   * \returns an Ipv6Address of the i'th right leaf
   * \param i node number
   */
  Ipv6Address GetRightIpv6Address (uint32_t i) const; // Get right leaf address

  /**
   * \returns total number of left side leaf nodes
   */
  uint32_t  LeftCount () const;

  /**
   * \returns total number of right side leaf nodes
   */
  uint32_t  RightCount () const;

  /**
   * \param stack an InternetStackHelper which is used to install 
   *              on every node in the dumbbell
   */
  void      InstallStack (InternetStackHelper stack);

  /**
   * \param leftIp Ipv4AddressHelper to assign Ipv4 addresses to the
   *               interfaces on the left side of the dumbbell
   *
   * \param rightIp Ipv4AddressHelper to assign Ipv4 addresses to the
   *                interfaces on the right side of the dumbbell
   *
   * \param routerIp Ipv4AddressHelper to assign Ipv4 addresses to the 
   *                 interfaces on the bottleneck link
   */
  void      AssignIpv4Addresses (Ipv4AddressHelper leftIp,
                                 Ipv4AddressHelper rightIp,
                                 Ipv4AddressHelper routerIp);

  /**
   * \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 dumbbell.
   * This is needed for use with the animation interface
   *
   * \param ulx upper left x value
   * \param uly upper left y value
   * \param lrx lower right x value
   * \param lry lower right y value
   */
  void      BoundingBox (double ulx, double uly, double lrx, double lry);

private:
  NodeContainer          m_leftLeaf;            //!< Left Leaf nodes
  NetDeviceContainer     m_leftLeafDevices;     //!< Left Leaf NetDevices
  NodeContainer          m_rightLeaf;           //!< Right Leaf nodes
  NetDeviceContainer     m_rightLeafDevices;    //!< Right Leaf NetDevices
  NodeContainer          m_routers;             //!< Routers
  NetDeviceContainer     m_routerDevices;       //!< Routers NetDevices
  NetDeviceContainer     m_leftRouterDevices;     //!< Left router NetDevices
  NetDeviceContainer     m_rightRouterDevices;    //!< Right router NetDevices
  Ipv4InterfaceContainer m_leftLeafInterfaces;    //!< Left Leaf interfaces (IPv4)
  Ipv4InterfaceContainer m_leftRouterInterfaces;  //!< Left router interfaces (IPv4)
  Ipv4InterfaceContainer m_rightLeafInterfaces;   //!< Right Leaf interfaces (IPv4)
  Ipv4InterfaceContainer m_rightRouterInterfaces; //!< Right router interfaces (IPv4)
  Ipv4InterfaceContainer m_routerInterfaces;      //!< Router interfaces (IPv4)
  Ipv6InterfaceContainer m_leftLeafInterfaces6;   //!< Left Leaf interfaces (IPv6)
  Ipv6InterfaceContainer m_leftRouterInterfaces6; //!< Left router interfaces (IPv6)
  Ipv6InterfaceContainer m_rightLeafInterfaces6;  //!< Right Leaf interfaces (IPv6)
  Ipv6InterfaceContainer m_rightRouterInterfaces6;  //!< Right router interfaces (IPv6)
  Ipv6InterfaceContainer m_routerInterfaces6;     //!< Router interfaces (IPv6)
};

} // namespace ns3

#endif /* POINT_TO_POINT_DUMBBELL_HELPER_H */