This file is indexed.

/usr/include/ns3.26/ns3/ipv6-route.h is in libns3-dev 3.26+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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2007-2009 Strasbourg University
 *
 * 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: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
 */

#ifndef IPV6_ROUTE_H
#define IPV6_ROUTE_H

#include <list>
#include <map>
#include <ostream>

#include "ns3/simple-ref-count.h"

#include "ns3/ipv6-address.h"

namespace ns3
{

class NetDevice;

/**
 * \ingroup ipv6Routing
 *
 * \brief IPv6 route cache entry.
 */
class Ipv6Route : public SimpleRefCount<Ipv6Route>
{
public:
  /**
   * \brief Constructor.
   */
  Ipv6Route ();

  /**
   * \brief Destructor.
   */
  virtual ~Ipv6Route ();

  /**
   * \brief Set destination address.
   * \param dest IPv6 destination address
   */
  void SetDestination (Ipv6Address dest);

  /**
   * \brief Get destination address.
   * \return destination address
   */
  Ipv6Address GetDestination () const;

  /**
   * \brief Set source address.
   * \param src IPv6 source address
   */
  void SetSource (Ipv6Address src);

  /**
   * \brief Get source address.
   * \return source address
   */
  Ipv6Address GetSource () const;

  /**
   * \brief Set gateway address.
   * \param gw IPv6 gateway address
   */
  void SetGateway (Ipv6Address gw);

  /**
   * \brief Get gateway address.
   * \return gateway address
   */
  Ipv6Address GetGateway () const;

  /**
   * \brief Set output device for outgoing packets.
   * \param outputDevice output device
   */
  void SetOutputDevice (Ptr<NetDevice> outputDevice);

  /**
   * \brief Get output device.
   * \return output device
   */
  Ptr<NetDevice> GetOutputDevice () const;

private:
  /**
   * \brief Destination address.
   */
  Ipv6Address m_dest;

  /**
   * \brief source address.
   */
  Ipv6Address m_source;

  /**
   * \brief Gateway address.
   */
  Ipv6Address m_gateway;

  /**
   * \brief Output device.
   */
  Ptr<NetDevice> m_outputDevice;
};

/**
 * \brief Stream insertion operator.
 *
 * \param os the reference to the output stream
 * \param route the Ipv6 route
 * \returns the reference to the output stream
 */
std::ostream& operator<< (std::ostream& os, Ipv6Route const& route);

/**
 * \ingroup ipv6Routing
 *
 * \brief IPv6 multicast route entry.
 */
class Ipv6MulticastRoute : public SimpleRefCount<Ipv6MulticastRoute>
{
public:
  /**
   * \brief Maximum number of multicast interfaces on a router.
   */
  static const uint32_t MAX_INTERFACES = 16;

  /**
   * \brief Maximum Time-To-Live (TTL).
   */
  static const uint32_t MAX_TTL = 255;

  /**
   * \brief Constructor.
   */
  Ipv6MulticastRoute ();

  /**
   * \brief Destructor.
   */
  virtual ~Ipv6MulticastRoute ();

  /**
   * \brief Set IPv6 group.
   * \param group Ipv6Address of the multicast group
   */
  void SetGroup (const Ipv6Address group);

  /**
   * \brief Get IPv6 group.
   * \return Ipv6Address of the multicast group
   */
  Ipv6Address GetGroup (void) const;

  /**
   * \brief Set origin address.
   * \param origin Ipv6Address of the origin address
   */
  void SetOrigin (const Ipv6Address origin);

  /**
   * \brief Get source address.
   * \return Ipv6Address of the origin address
   */
  Ipv6Address GetOrigin (void) const;

  /**
   * \brief Set parent for this route.
   * \param iif Parent (input interface) for this route
   */
  void SetParent (uint32_t iif);

  /**
   * \brief Get parent for this route.
   * \return Parent (input interface) for this route
   */
  uint32_t GetParent (void) const;

  /**
   * \brief set output TTL for this route.
   * \param oif Outgoing interface index
   * \param ttl time-to-live for this route
   */
  void SetOutputTtl (uint32_t oif, uint32_t ttl);

  /**
   * \return map of output interface Ids and TTLs for this route
   */
  std::map<uint32_t, uint32_t> GetOutputTtlMap () const;

private:
  /**
   * \brief IPv6 group.
   */
  Ipv6Address m_group;

  /**
   * \brief IPv6 origin (source).
   */
  Ipv6Address m_origin;

  /**
   * \brief Source interface.
   */
  uint32_t m_parent;

  /**
   * \brief TTLs.
   */
  std::map<uint32_t, uint32_t> m_ttls;
};

/**
 * \brief Stream insertion operator.
 *
 * \param os the reference to the output stream
 * \param route the Ipv6 multicast route
 * \returns the reference to the output stream
 */
std::ostream& operator<< (std::ostream& os, Ipv6MulticastRoute const& route);

} /* namespace ns3 */

#endif /* IPV6_ROUTE_H */