This file is indexed.

/usr/include/ns3.26/ns3/uan-transducer.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
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2009 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
 *
 * Author: Leonard Tracy <lentracy@gmail.com>
 */

#ifndef UAN_TRANSDUCER_H
#define UAN_TRANSDUCER_H

#include "ns3/object.h"
#include "ns3/packet.h"
#include "uan-tx-mode.h"
#include "ns3/uan-prop-model.h"

#include <list>

namespace ns3 {

class UanPhy;
class UanChannel;


/**
 * \ingroup uan
 *
 * Class consisting of packet arrival information (Time, RxPower, mode, PDP).
 */
class UanPacketArrival
{
public:

  /** Default constructor. */
  UanPacketArrival () 
  {
  }

  /**
   * Constructor.
   *
   * \param packet Packet arriving.
   * \param rxPowerDb RX signal power in dB of arriving packet.
   * \param txMode TX mode of arriving packet.
   * \param pdp Power delay profile of arriving packet.
   * \param arrTime Arrival time of packet.
   */
  UanPacketArrival (Ptr<Packet> packet, double rxPowerDb, UanTxMode txMode, UanPdp pdp, Time arrTime)
    : m_packet (packet),
      m_rxPowerDb (rxPowerDb),
      m_txMode (txMode),
      m_pdp (pdp),
      m_arrTime (arrTime)
  {
  }

  /** Destructor */
  ~UanPacketArrival()
  {
    m_packet = 0;
  }

  /**
   * Get the arriving packet.
   *
   * \return Pointer to packet.
   */
  inline Ptr<Packet> GetPacket (void) const
  {
    return m_packet;
  }
  /**
   * Get the received signal strength.
   *
   * \return Received signal strength in dB re 1uPa
   */
  inline double GetRxPowerDb (void) const
  {
    return m_rxPowerDb;
  }
  /**
   * Get the transmission mode of the packet.
   *
   * \return UanTxMode.
   */
  inline const UanTxMode &GetTxMode (void) const
  {
    return m_txMode;
  }
  /**
   * Get the packet arrival time.
   *
   * \return Arrival time.
   */
  inline Time GetArrivalTime (void) const
  {
    return m_arrTime;
  }
  /**
   * Get the propagation delay profile.
   *
   * \return PDP of arriving signal.
   */
  inline UanPdp GetPdp (void) const
  {
    return m_pdp;
  }
private:
  Ptr<Packet> m_packet;  //!< The arrived packet.
  double m_rxPowerDb;    //!< The received power, in dB.
  UanTxMode m_txMode;    //!< The transmission mode.
  UanPdp m_pdp;          //!< The propagation delay profile.
  Time m_arrTime;        //!< The arrival time.

};  // class UanPacketArrival

/**
 * \ingroup uan
 *
 * Virtual base for Transducer objects.
 *
 * The Transducer was added to support classes such as UanPhyDual.
 * In a generic Phy setting, this class functions to hold information about all
 * possibly interfering packets.
 */
class UanTransducer : public Object
{
public:
  /**
   * Register this type.
   * \return The object TypeId.
   */
  static TypeId GetTypeId (void);

  /** Transducer state. */
  enum State {
    TX,  //!< Transmitting.
    RX   //!< Receiving.
  };

  /** List of arriving packets overlapping in time. */
  typedef std::list<UanPacketArrival> ArrivalList;
  /** List of UanPhy objects. */
  typedef std::list<Ptr<UanPhy> > UanPhyList;

  /**
   * Get the transducer state.
   *
   * \return State (TX or RX) of this transducer.
   */
  virtual State GetState (void) const = 0;

  /**
   * Is the state receiving (or available for reception)?
   *
   * \return True if this transducer is available for receiving
   *   an incoming packet.
   */
  virtual bool IsRx (void) const = 0;
  /**
   * Is the state transmitting?
   * 
   * \return True if there is a packet being transmitted from this transducer.
   */
  virtual bool IsTx (void) const = 0;
  /**
   * Get the list of overlapped (in time) packets at this transducer.
   *
   * \return List of all packets currently crossing this node in the water.
   */
  virtual const ArrivalList &GetArrivalList (void) const = 0;
  /**
   * Notify this object that a new packet has arrived at this nodes location
   *
   * \param packet Packet arriving.
   * \param rxPowerDb Signal power in dB of arriving packet.
   * \param txMode Mode arriving packet is using.
   * \param pdp PDP of arriving signal.
   */
  virtual void Receive (Ptr<Packet> packet, double rxPowerDb, UanTxMode txMode, UanPdp pdp) = 0;
  /**
   * Transmit a packet from this transducer.
   *
   * \param src Source PHY.
   * \param packet Packet to transmit.
   * \param txPowerDb Outgoing Tx power of packet.
   * \param txMode Mode to transmit packet with.
   */
  virtual void Transmit (Ptr<UanPhy> src, Ptr<Packet> packet, double txPowerDb, UanTxMode txMode) = 0;
  /**
   * Attach this transducer to a channel.
   * 
   * \param chan The channel
   */
  virtual void SetChannel (Ptr<UanChannel> chan) = 0;
  /**
   * Get the attached channel.
   *
   * \return The channel.
   */
  virtual Ptr<UanChannel> GetChannel (void) const = 0;
  /**
   * Attach a physical network layer above this transducer.
   *
   * More than one physical layer may be attached.
   *
   * \param phy The physical layer.
   */
  virtual void AddPhy (Ptr<UanPhy> phy) = 0;
  /**
   * Get the list of physical layer above this transducer.
   *
   * \return List of attached physical layers.
   */
  virtual const UanPhyList &GetPhyList (void) const = 0;
  /**
   * Clears all pointer references.
   */
  virtual void Clear (void) = 0;

};  // class UanTransducer

} // namespace ns3

#endif /* UAN_TRANSDUCER_H */