This file is indexed.

/usr/include/ns3.17/ns3/tap-fd-net-device-helper.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
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2012 INRIA, 2012 University of Washington
 *
 * 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
 *
 */

#ifndef TAP_FD_NET_DEVICE_HELPER_H
#define TAP_FD_NET_DEVICE_HELPER_H

#include <string>

#include "ns3/attribute.h"
#include "ns3/fd-net-device.h"
#include "ns3/object-factory.h"
#include "ns3/mac48-address.h"
#include "ns3/net-device-container.h"
#include "ns3/node-container.h"

#include "emu-fd-net-device-helper.h"

namespace ns3 {

/**
 * \brief build a set of FdNetDevice objects attached to a virtua TAP network
 * interface
 *
 */
class TapFdNetDeviceHelper : public EmuFdNetDeviceHelper
{
public:
  /**
   * Construct a TapFdNetDeviceHelper.
   */
  TapFdNetDeviceHelper ();
  virtual ~TapFdNetDeviceHelper ()
  {
  }

  /**
   * Set flag IFF_NO_PI on the device.
   *
   * \param pi Set the IFF_NO_PI flag if pi is false.
   */
  void SetModePi (bool pi);

  /**
   * Set the device IPv4 address.
   *
   * \param address The IPv4 address for the TAP device.
   */
  void SetTapIpv4Address (Ipv4Address address);

  /**
   * Set the IPv4 network mask for the TAP device.
   *
   * \param mask The IPv4 network mask for the TAP device.
   */
  void SetTapIpv4Mask (Ipv4Mask mask);

  /**
   * Set the device IPv6 address.
   *
   * \param address The IPv6 address for the TAP device.
   */
  void SetTapIpv6Address (Ipv6Address address);

  /**
   * Set the IPv6 network mask for the TAP device.
   *
   * \param prefix The IPv6 network prefix for the TAP device.
   */
  void SetTapIpv6Prefix (int prefix);

  /**
   * Set the MAC address for the TAP device.
   *
   * \param mac The MAC address the TAP device.
   */
  void SetTapMacAddress (Mac48Address mac);

protected:
  /*
   * \internal
   */
  Ptr<NetDevice> InstallPriv (Ptr<Node> node) const;

  /**
   * Sets a file descriptor on the FileDescriptorNetDevice.
   */
  virtual void SetFileDescriptor (Ptr<FdNetDevice> device) const;

  /**
   * Call out to a separate process running as suid root in order to create a
   * TAP device and obtain the file descriptor associated to it.
   */
  virtual int CreateFileDescriptor (void) const;

  /**
  * \internal
  *
  * The TAP device flag IFF_NO_PI.
  */
  bool m_modePi;

  /**
  * \internal
  *
  * The IPv4 address for the TAP device.
  */
  Ipv4Address m_tapIp4;

  /**
  * \internal
  *
  * The IPv6 address for the TAP device.
  */
  Ipv6Address m_tapIp6;


  /**
  * \internal
  *
  * The network mask IPv4 for the TAP device.
  */
  Ipv4Mask m_tapMask4;

  /**
  * \internal
  *
  * The network prefix IPv6 for the TAP device.
  */
  int m_tapPrefix6;


  /**
  * \internal
  *
  * The TAP device MAC address.
  */
  Mac48Address m_tapMac;

};

} // namespace ns3

#endif /* TAP_FD_NET_DEVICE_HELPER_H */