This file is indexed.

/usr/include/ns3.17/ns3/ipv4-routing-table-entry.h is in libns3-dev 3.17+dfsg-1build1.

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
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2005 INRIA
 *
 * 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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
 */
#ifndef IPV4_ROUTING_TABLE_ENTRY_H
#define IPV4_ROUTING_TABLE_ENTRY_H

#include <list>
#include <vector>
#include <ostream>

#include "ns3/ipv4-address.h"

namespace ns3 {

/**
 * \ingroup internet
 *
 * A record of an IPv4 routing table entry for Ipv4GlobalRouting and 
 * Ipv4StaticRouting.  This is not a reference counted object.
 */
class Ipv4RoutingTableEntry {
public:
  /**
   * \brief This constructor does nothing
   */
  Ipv4RoutingTableEntry ();
  /**
   * \brief Copy Constructor
   * \param route The route to copy
   */
  Ipv4RoutingTableEntry (Ipv4RoutingTableEntry const &route);
  /**
   * \brief Copy Constructor
   * \param route The route to copy
   */
  Ipv4RoutingTableEntry (Ipv4RoutingTableEntry const *route);
  /**
   * \return True if this route is a host route (mask of all ones); false otherwise
   */
  bool IsHost (void) const;
  /**
   * \return True if this route is not a host route (mask is not all ones); false otherwise
   *
   * This method is implemented as !IsHost ().
   */
  bool IsNetwork (void) const;
  /**
   * \return True if this route is a default route; false otherwise
   */
  bool IsDefault (void) const;
  /**
   * \return True if this route is a gateway route; false otherwise
   */
  bool IsGateway (void) const;
  /**
   * \return address of the gateway stored in this entry
   */
  Ipv4Address GetGateway (void) const;
  /**
   * \return The IPv4 address of the destination of this route
   */
  Ipv4Address GetDest (void) const;
  /**
   * \return The IPv4 network number of the destination of this route
   */
  Ipv4Address GetDestNetwork (void) const;
  /**
   * \return The IPv4 network mask of the destination of this route
   */
  Ipv4Mask GetDestNetworkMask (void) const;
  /**
   * \return The Ipv4 interface number used for sending outgoing packets
   */
  uint32_t GetInterface (void) const;
  /**
   * \return An Ipv4RoutingTableEntry object corresponding to the input parameters.
   * \param dest Ipv4Address of the destination
   * \param nextHop Ipv4Address of the next hop
   * \param interface Outgoing interface 
   */
  static Ipv4RoutingTableEntry CreateHostRouteTo (Ipv4Address dest, 
                                                  Ipv4Address nextHop,
                                                  uint32_t interface);
  /**
   * \return An Ipv4RoutingTableEntry object corresponding to the input parameters.
   * \param dest Ipv4Address of the destination
   * \param interface Outgoing interface 
   */
  static Ipv4RoutingTableEntry CreateHostRouteTo (Ipv4Address dest, 
                                                  uint32_t interface);
  /**
   * \return An Ipv4RoutingTableEntry object corresponding to the input parameters.
   * \param network Ipv4Address of the destination network
   * \param networkMask Ipv4Mask of the destination network mask
   * \param nextHop Ipv4Address of the next hop
   * \param interface Outgoing interface 
   */
  static Ipv4RoutingTableEntry CreateNetworkRouteTo (Ipv4Address network, 
                                                     Ipv4Mask networkMask,
                                                     Ipv4Address nextHop,
                                                     uint32_t interface);
  /**
   * \return An Ipv4RoutingTableEntry object corresponding to the input parameters.
   * \param network Ipv4Address of the destination network
   * \param networkMask Ipv4Mask of the destination network mask
   * \param interface Outgoing interface 
   */
  static Ipv4RoutingTableEntry CreateNetworkRouteTo (Ipv4Address network, 
                                                     Ipv4Mask networkMask,
                                                     uint32_t interface);
  /**
   * \return An Ipv4RoutingTableEntry object corresponding to the input 
   * parameters.  This route is distinguished; it will match any 
   * destination for which a more specific route does not exist.
   * \param nextHop Ipv4Address of the next hop
   * \param interface Outgoing interface 
   */
  static Ipv4RoutingTableEntry CreateDefaultRoute (Ipv4Address nextHop, 
                                                   uint32_t interface);

private:
  Ipv4RoutingTableEntry (Ipv4Address network,
                         Ipv4Mask mask,
                         Ipv4Address gateway,
                         uint32_t interface);
  Ipv4RoutingTableEntry (Ipv4Address dest,
                         Ipv4Mask mask,
                         uint32_t interface);
  Ipv4RoutingTableEntry (Ipv4Address dest,
                         Ipv4Address gateway,
                         uint32_t interface);
  Ipv4RoutingTableEntry (Ipv4Address dest,
                         uint32_t interface);

  Ipv4Address m_dest;
  Ipv4Mask m_destNetworkMask;
  Ipv4Address m_gateway;
  uint32_t m_interface;
};

std::ostream& operator<< (std::ostream& os, Ipv4RoutingTableEntry const& route);

/**
 * \ingroup internet
 *
 * \brief A record of an IPv4 multicast route for Ipv4GlobalRouting and Ipv4StaticRouting
 */
class Ipv4MulticastRoutingTableEntry {
public:
  /**
   * \brief This constructor does nothing
   */
  Ipv4MulticastRoutingTableEntry ();

  /**
   * \brief Copy Constructor
   * \param route The route to copy
   */
  Ipv4MulticastRoutingTableEntry (Ipv4MulticastRoutingTableEntry const &route);
  /**
   * \brief Copy Constructor
   * \param route The route to copy
   */
  Ipv4MulticastRoutingTableEntry (Ipv4MulticastRoutingTableEntry const *route);
  /**
   * \return The IPv4 address of the source of this route
   */
  Ipv4Address GetOrigin (void) const;
  /**
   * \return The IPv4 address of the multicast group of this route
   */
  Ipv4Address GetGroup (void) const;
  /**
   * \return The IPv4 address of the input interface of this route
   */
  uint32_t GetInputInterface (void) const;
  /**
   * \return The number of output interfaces of this route
   */
  uint32_t GetNOutputInterfaces (void) const;
  /**
   * \param n interface index
   * \return A specified output interface.
   */
  uint32_t GetOutputInterface (uint32_t n) const;
  /**
   * \return A vector of all of the output interfaces of this route.
   */
  std::vector<uint32_t> GetOutputInterfaces (void) const;
  /**
   * \return Ipv4MulticastRoutingTableEntry corresponding to the input parameters.
   * \param origin Source address for the multicast route 
   * \param group Group destination address for the multicast route
   * \param inputInterface Input interface that multicast datagram must be received on
   * \param outputInterfaces vector of output interfaces to copy and forward the datagram to
   */
  static Ipv4MulticastRoutingTableEntry CreateMulticastRoute (Ipv4Address origin, 
                                                              Ipv4Address group, uint32_t inputInterface,
                                                              std::vector<uint32_t> outputInterfaces);

private:
  Ipv4MulticastRoutingTableEntry (Ipv4Address origin, Ipv4Address group, 
                                  uint32_t inputInterface, std::vector<uint32_t> outputInterfaces);

  Ipv4Address m_origin;
  Ipv4Address m_group;
  uint32_t m_inputInterface;
  std::vector<uint32_t> m_outputInterfaces;
};

std::ostream& operator<< (std::ostream& os, Ipv4MulticastRoutingTableEntry const& route);

} // namespace ns3

#endif /* IPV4_ROUTING_TABLE_ENTRY_H */