This file is indexed.

/usr/include/ns3.26/ns3/channel-scheduler.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
/* -*- 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: Junling Bu <linlinjavaer@gmail.com>
 */
#ifndef CHANNEL_SCHEDULER_H
#define CHANNEL_SCHEDULER_H

#include <map>
#include "wave-net-device.h"
namespace ns3 {
class WaveNetDevice;

struct EdcaParameter
{
  uint32_t cwmin;
  uint32_t cwmax;
  uint32_t aifsn;
};
typedef std::map<AcIndex,EdcaParameter> EdcaParameters;
typedef std::map<AcIndex,EdcaParameter>::const_iterator EdcaParametersI;

#define EXTENDED_ALTERNATING 0x00
#define EXTENDED_CONTINUOUS 0xff
/**
 * \param channelNumber channel number that the SCH service
 * can be made available for communications.
 * \param operationalRateSet OperationalRateSet if present, as specified in IEEE Std 802.11.
 * valid range: 1-127.
 * \param immediateAccess Indicates that the MLME should provide immediate
 * access to the SCH and not wait until the next SCH interval.
 * \param extendedAccess Indicates that the MLME should provide continuous
 * access (during both SCH interval and CCH interval) to the SCH for ExtendedAccess
 * control channel intervals. A value of 255 indicates indefinite access.
 * \param edcaParameters If present, as specified in IEEE Std 802.11.
 */
struct SchInfo
{
  uint32_t channelNumber;
  //OperationalRateSet  operationalRateSet;  // not supported
  bool immediateAccess;
  uint8_t extendedAccess;
  EdcaParameters edcaParameters;
  SchInfo ()
    : channelNumber (SCH1),
      immediateAccess (false),
      extendedAccess (EXTENDED_ALTERNATING)
  {

  }
  SchInfo (uint32_t channel, bool immediate, uint32_t channelAccess)
    : channelNumber (channel),
      immediateAccess (immediate),
      extendedAccess (channelAccess)
  {

  }
  SchInfo (uint32_t channel, bool immediate, uint32_t channelAccess, EdcaParameters edca)
    : channelNumber (channel),
      immediateAccess (immediate),
      extendedAccess (channelAccess),
      edcaParameters (edca)
  {

  }
};

enum ChannelAccess
{
  ContinuousAccess,      // continuous access for SCHs
  AlternatingAccess,       //alternating CCH and SCH access
  ExtendedAccess,         // extended access in SCHs
  DefaultCchAccess,     // default continuous CCH access
  NoAccess,                    // no channel access assigned
};

/**
 * \ingroup wave
 * \brief This class will assign channel access for requests from higher layers.
 * The channel access options include (1) continuous access for SCHs, (2) alternating
 * CCH and SCH access,  (3) extended access for SCHs and (4) default continuous CCH
 * access. The options except (4) have an immediate parameter to enable immediate
 * access assignment without the need for waiting.
 * Its sub-class can use different mechanism to assign the channel access.
 */
class ChannelScheduler : public Object
{
public:
  static TypeId GetTypeId (void);
  ChannelScheduler ();
  virtual ~ChannelScheduler ();

  /**
   * \param device enable channel scheduler associated with WaveNetDevice
   */
  virtual void SetWaveNetDevice (Ptr<WaveNetDevice> device);
  /**
   * \return whether CCH channel access is assigned.
.   */
  bool IsCchAccessAssigned (void) const;
  /**
   * \return whether SCH channel access is assigned.
.   */
  bool IsSchAccessAssigned (void) const;
  /**
   * \param channelNumber the specified channel number
   * \return  whether channel access is assigned for the channel.
   */
  bool IsChannelAccessAssigned (uint32_t channelNumber) const;
  /**
   * \param channelNumber the specified channel number
   * \return whether the continuous access is assigned for the specific channel.
   */
  bool IsContinuousAccessAssigned (uint32_t channelNumber) const;
  /**
   * \param channelNumber the specified channel number
   * \return whether the continuous access is assigned for the specific channel.
   */
  bool IsAlternatingAccessAssigned (uint32_t channelNumber) const;
  /**
   * \param channelNumber the specified channel number
   * \return whether the continuous access is assigned for the specific channel.
   */
  bool IsExtendedAccessAssigned (uint32_t channelNumber) const;
  /**
   * \return whether the continuous access is assigned for CCHl.
   */
  bool IsDefaultCchAccessAssigned (void) const;
  /**
   * \param channelNumber the specified channel number
   * \return  the type of current assigned channel access for the specific channel.
.  */
  virtual enum ChannelAccess GetAssignedAccessType (uint32_t channelNumber) const = 0;

  /**
   * \param sch_info the request information for assigning SCH access.
   * \return whether the channel access is assigned successfully.
   *
   * This method is called to assign channel access for sending packets.
   */
  bool StartSch (const SchInfo & schInfo);
  /**
   * \param channelNumber indicating which channel should release
   * the assigned channel access resource.
   */
  bool StopSch (uint32_t channelNumber);

protected:
  virtual void DoInitialize (void);

  /**
     * \param channelNumber the specific channel
     * \param immediate indicate whether channel switch to channel
     * \return whether the channel access is assigned successfully
     *
     * This method will assign alternating access for SCHs and CCH.
     */
  virtual bool AssignAlternatingAccess (uint32_t channelNumber, bool immediate) = 0;
  /**
   * \param channelNumber the specific channel
   * \param immediate indicate whether channel switch to channel
   * \return whether the channel access is assigned successfully
   *
   * This method will assign continuous access CCH.
   */
  virtual bool AssignContinuousAccess (uint32_t channelNumber, bool immediate) = 0;
  /**
   * \param channelNumber the specific channel
   * \param immediate indicate whether channel switch to channel
   * \return whether the channel access is assigned successfully
   *
   * This method will assign extended access for SCHs.
   */
  virtual bool AssignExtendedAccess (uint32_t channelNumber, uint32_t extends, bool immediate) = 0;
  /*
   * This method will assign default CCH access for CCH.
   */
  virtual bool AssignDefaultCchAccess (void) = 0;
  /**
   * \param channelNumber indicating for which channel should release
   * the assigned channel access resource.
   */
  virtual bool ReleaseAccess (uint32_t channelNumber) = 0;

  Ptr<WaveNetDevice> m_device;
};

}
#endif /* CHANNEL_SCHEDULER_H */