This file is indexed.

/usr/include/ns3.17/ns3/mac-messages.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2007,2008,2009 INRIA, UDcast
 *
 * 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
 *
 * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
 *          Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
 *                               <amine.ismail@UDcast.com>
 */


/*
 *This file does not contain all MAC messages, the rest of MAC messages have
 *This been categorized as DL and UL messages and are placed in
 *This dl-mac-messages.h and ul-mac-messages.h files.
 */

#ifndef MANAGEMENT_MESSAGE_TYPE_H
#define MANAGEMENT_MESSAGE_TYPE_H

#include <stdint.h>
#include "ns3/header.h"

namespace ns3 {

/**
 * \ingroup wimax
 */
class ManagementMessageType : public Header
{
public:
  /*
   * Section 6.3.2.3 MAC Management messages page 42, Table 14 page 43
   */
  enum MessageType
  {
    MESSAGE_TYPE_UCD = 0,
    MESSAGE_TYPE_DCD = 1,
    MESSAGE_TYPE_DL_MAP = 2,
    MESSAGE_TYPE_UL_MAP = 3,
    MESSAGE_TYPE_RNG_REQ = 4,
    MESSAGE_TYPE_RNG_RSP = 5,
    MESSAGE_TYPE_REG_REQ = 6,
    MESSAGE_TYPE_REG_RSP = 7,
    MESSAGE_TYPE_DSA_REQ = 11,
    MESSAGE_TYPE_DSA_RSP = 12,
    MESSAGE_TYPE_DSA_ACK = 13
  };

  ManagementMessageType (void);
  ManagementMessageType (uint8_t type);
  virtual ~ManagementMessageType (void);
  void SetType (uint8_t type);
  uint8_t GetType (void) const;

  std::string GetName (void) const;
  static TypeId GetTypeId (void);
  virtual TypeId GetInstanceTypeId (void) const;
  void Print (std::ostream &os) const;
  uint32_t GetSerializedSize (void) const;
  void Serialize (Buffer::Iterator start) const;
  uint32_t Deserialize (Buffer::Iterator start);
private:
  uint8_t m_type;
};

} // namespace ns3

#endif /* MANAGEMENT_MESSAGE_TYPE_H */


// ----------------------------------------------------------------------------------------------------------

#ifndef RNG_RSP_H
#define RNG_RSP_H

#include <stdint.h>
#include "ns3/header.h"
#include "ns3/mac48-address.h"
#include "service-flow.h"
#include "cid.h"

namespace ns3 {

class RngRsp : public Header
{
  /**
   * \brief This class implements the ranging response message described by "IEEE Standard for
   * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access Systems"
   * 6.3.2.3.6 Ranging response (RNG-RSP) message, page 50
   *
   */

public:
  RngRsp (void);
  virtual ~RngRsp (void);
  /**
   * \brief set the  Tx timing offset adjustment (signed 32-bit).
   * \param timingAdjust The time required to advance SS transmission so frames
   *  arrive at the expected time instance at the BS.
   */
  void SetTimingAdjust (uint32_t timingAdjust);
  /**
   *  \brief set the relative change in transmission power level that the SS should make in order that
   * transmissions arrive at the BS at the desired power. When subchannelization is employed, the
   * subscriber shall interpret the power offset adjustment as a required change to the transmitted power
   * density.
   * \param powerLevelAdjust the relative change in transmission power level
   */
  void SetPowerLevelAdjust (uint8_t powerLevelAdjust);
  /**
   * \brief set the relative change in transmission frequency that the SS should take in order to better match
   * the BS. This is fine-frequency adjustment within a channel, not reassignment to a different channel
   * \param offsetFreqAdjust
   */
  void SetOffsetFreqAdjust (uint32_t offsetFreqAdjust);
  void SetRangStatus (uint8_t rangStatus);
  /**
   * \brief set the Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging.
   * \param dlFreqOverride the Center frequency in kHz
   */
  void SetDlFreqOverride (uint32_t dlFreqOverride);
  /**
   * \brief set the identifier of the uplink channel with which the SS is to redo initial ranging
   * \param ulChnlIdOverride the uplink channel index
   */
  void SetUlChnlIdOverride (uint8_t ulChnlIdOverride);
  void SetDlOperBurstProfile (uint16_t dlOperBurstProfile);
  void SetMacAddress (Mac48Address macAddress);

  void SetBasicCid (Cid basicCid);
  void SetPrimaryCid (Cid primaryCid);

  void SetAasBdcastPermission (uint8_t aasBdcastPermission);
  void SetFrameNumber (uint32_t frameNumber);
  void SetInitRangOppNumber (uint8_t initRangOppNumber);
  void SetRangSubchnl (uint8_t rangSubchnl);
  /**
   * \return Tx timing offset adjustment (signed 32-bit). The time required to advance SS transmission so frames
   *  arrive at the expected time instance at the BS.
   */
  uint32_t GetTimingAdjust (void) const;
  /**
   *  \return the relative change in transmission power level that the SS should take in order that
   * transmissions arrive at the BS at the desired power. When subchannelization is employed, the
   * subscriber shall interpret the power offset adjustment as a required change to the transmitted power
   * density.
   */
  uint8_t GetPowerLevelAdjust (void) const;
  /**
   * \return the relative change in transmission frequency that the SS should take in order to better match
   * the BS. This is fine-frequency adjustment within a channel, not reassignment to a different channel.
   */
  uint32_t GetOffsetFreqAdjust (void) const;
  uint8_t GetRangStatus (void) const;
  /**
   * \return Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging.
   */
  uint32_t GetDlFreqOverride (void) const;
  /**
   * \return The identifier of the uplink channel with which the SS is to redo initial ranging
   */
  uint8_t GetUlChnlIdOverride (void) const;
  /**
   * \return DlOperBurstProfile: This parameter is sent in response to the RNG-REQ Requested Downlink Burst Profile parameter
   */
  uint16_t GetDlOperBurstProfile (void) const;
  Mac48Address GetMacAddress (void) const;
  Cid GetBasicCid (void) const;
  Cid GetPrimaryCid (void) const;
  uint8_t GetAasBdcastPermission (void) const;
  uint32_t GetFrameNumber (void) const;
  uint8_t GetInitRangOppNumber (void) const;
  uint8_t GetRangSubchnl (void) const;

  std::string GetName (void) const;
  static TypeId GetTypeId (void);
  virtual TypeId GetInstanceTypeId (void) const;
  void Print (std::ostream &os) const;
  uint32_t GetSerializedSize (void) const;
  void Serialize (Buffer::Iterator start) const;
  uint32_t Deserialize (Buffer::Iterator start);
private:
  uint8_t m_reserved; // changed as per the amendment 802.16e-2005

  // TLV Encoded Information

  // Tx timing offset adjustment (signed 32-bit). The time required to advance SS transmission so frames
  // arrive at the expected time instance at the BS.
  uint32_t m_timingAdjust;

  // Specifies the relative change in transmission power level that the SS is to make in order that
  // transmissions arrive at the BS at the desired power. When subchannelization is employed, the
  // subscriber shall interpret the power offset adjustment as a required change to the transmitted power
  // density.
  uint8_t m_powerLevelAdjust;

  // Specifies the relative change in transmission frequency that the SS is to make in order to better match
  // the BS. This is fine-frequency adjustment within a channel, not reassignment to a different channel.
  uint32_t m_offsetFreqAdjust;
  uint8_t m_rangStatus;

  // Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging.
  uint32_t m_dlFreqOverride;

  // Licensed bands: The identifier of the uplink channel with which the SS is to redo initial ranging (not
  // used with PHYs without channelized uplinks).
  uint8_t m_ulChnlIdOverride;

  // This parameter is sent in response to the RNG-REQ Requested Downlink Burst Profile parameter.
  // Byte 0: Specifies the least robust DIUC that may be used by the BS for transmissions to the SS.
  // Byte 1: Configuration Change Count value of DCD defining the burst profile associated with DIUC.
  uint16_t m_dlOperBurstProfile;

  Mac48Address m_macAddress;
  Cid m_basicCid;
  Cid m_primaryCid;
  uint8_t m_aasBdcastPermission;

  // Frame number where the associated RNG_REQ message was detected by the BS. Usage is mutually
  // exclusive with SS MAC Address
  uint32_t m_frameNumber;

  // Initial Ranging opportunity (1–255) in which the associated RNG_REQ message was detected by the BS.
  // Usage is mutually exclusive with SS MAC Address
  uint8_t m_initRangOppNumber;

  // Used to indicate the OFDM subchannel reference that was used to transmit the initial ranging message
  // (OFDM with subchannelization).
  uint8_t m_rangSubchnl;
};

} // namespace ns3

#endif /* RNG_RSP_H */

// ----------------------------------------------------------------------------------------------------------

#ifndef DSA_REQ_H
#define DSA_REQ_H

#include <stdint.h>
#include "ns3/header.h"
#include "ns3/buffer.h"
#include "cid.h"
#include "service-flow.h"

namespace ns3 {
class serviceFlow;
class DsaReq : public Header
{
  /**
   * \brief This class implements the ranging request message described by "IEEE Standard for
   * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access Systems"
   * 6.3.2.3.7 Registration request (REG-REQ) message, page 51
   *
   */
public:
  DsaReq ();
  ~DsaReq ();
  DsaReq (ServiceFlow sf);
  void SetTransactionId (uint16_t transactionId);
  /**
   * \brief set the service flow identifier
   * \param sfid the service flow identifier
   */
  void SetSfid (uint32_t sfid);
  /**
   * \brief set the connection identifier
   * \param cid the connection identifier
   */
  void SetCid (Cid cid);
  /**
   * \brief specify a service flow to be requested by this message
   * \param sf the service flow
   */
  void SetServiceFlow (ServiceFlow sf);
  /**
   * \return the service flow requested by this message
   */
  ServiceFlow GetServiceFlow (void) const;
  uint16_t GetTransactionId (void) const;
  /**
   * \return the service flow identifier
   */
  uint32_t GetSfid (void) const;
  /**
   * \return the connection identifier
   */
  Cid GetCid (void) const;
  std::string GetName (void) const;
  static TypeId GetTypeId (void);
  virtual TypeId GetInstanceTypeId (void) const;
  void Print (std::ostream &os) const;
  uint32_t GetSerializedSize (void) const;
  void Serialize (Buffer::Iterator start) const;
  uint32_t Deserialize (Buffer::Iterator start);

private:
  uint16_t m_transactionId;
  // TLV Encoded Information
  uint32_t m_sfid;
  Cid m_cid;
  ServiceFlow m_serviceFlow;
};

} // namespace ns3

#endif /* DSA_REQ_H */

// ----------------------------------------------------------------------------------------------------------

#ifndef DSA_RSP_H
#define DSA_RSP_H

#include <stdint.h>
#include "ns3/header.h"
#include "ns3/buffer.h"
#include "cid.h"

namespace ns3 {

class DsaRsp : public Header
{
  /**
   * \brief This class implements the DSA-RSP message described by "IEEE Standard for
   * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access Systems"
   * 6.3.2.3.11 DSA-RSP message, page 63
   */

public:
  DsaRsp (void);
  ~DsaRsp (void);

  void SetTransactionId (uint16_t transactionId);
  uint16_t GetTransactionId (void) const;

  void SetConfirmationCode (uint16_t confirmationCode);
  uint16_t GetConfirmationCode (void) const;
  /**
   * \brief set the service flow identifier
   * \param sfid the service flow identifier
   */
  void SetSfid (uint32_t sfid);
  /**
   * \return the service flow identifier
   */
  uint32_t GetSfid (void) const;
  /**
   * \brief set the connection identifier
   * \param cid the connection identifier
   */
  void SetCid (Cid cid);
  /**
   * \return the connection identifier
   */
  Cid GetCid (void) const;
  /**
   * \brief specify a service flow to be requested by this message
   * \param sf the service flow
   */
  void SetServiceFlow (ServiceFlow sf);
  /**
   * \return the service flow requested by this message
   */
  ServiceFlow GetServiceFlow (void) const;

  std::string GetName (void) const;
  static TypeId GetTypeId (void);
  virtual TypeId GetInstanceTypeId (void) const;
  void Print (std::ostream &os) const;
  uint32_t GetSerializedSize (void) const;
  void Serialize (Buffer::Iterator start) const;
  uint32_t Deserialize (Buffer::Iterator start);
private:
  uint16_t m_transactionId;
  uint8_t m_confirmationCode;
  // TLV Encoded Information
  ServiceFlow m_serviceFlow;
  uint32_t m_sfid;
  Cid m_cid;

};

} // namespace ns3

#endif /* DSA_RSP_H */

// ----------------------------------------------------------------------------------------------------------

#ifndef DSA_ACK_H
#define DSA_ACK_H

#include <stdint.h>
#include "ns3/header.h"
#include "ns3/buffer.h"

namespace ns3 {

class DsaAck : public Header
{

  /**
   * \brief This class implements the DSA-ACK message described by "IEEE Standard for
   * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access Systems"
   * 6.3.2.3.12 DSA-ACK message, page 64
   */
public:
  DsaAck (void);
  ~DsaAck (void);

  void SetTransactionId (uint16_t transactionId);
  uint16_t GetTransactionId (void) const;

  void SetConfirmationCode (uint16_t confirmationCode);
  uint16_t GetConfirmationCode (void) const;

  std::string GetName (void) const;
  static TypeId GetTypeId (void);
  virtual TypeId GetInstanceTypeId (void) const;
  void Print (std::ostream &os) const;
  uint32_t GetSerializedSize (void) const;
  void Serialize (Buffer::Iterator start) const;
  uint32_t Deserialize (Buffer::Iterator start);
private:
  uint16_t m_transactionId;
  uint8_t m_confirmationCode;
};

} // namespace ns3

#endif /* DSA_ACK_H */

// ----------------------------------------------------------------------------------------------------------

#ifndef RNG_REQ_H
#define RNG_REQ_H

#include <stdint.h>
#include "ns3/header.h"
#include "ns3/mac48-address.h"
#include "service-flow.h"

namespace ns3 {

class RngReq : public Header
{
  /**
   * \brief This class implements the DSA-REQ message described by "IEEE Standard for
   * Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband Wireless Access Systems"
   * 6.3.2.3.10 DSA-REQ message, page 62
   */

public:
  RngReq (void);
  virtual ~RngReq (void);

  void SetReqDlBurstProfile (uint8_t reqDlBurstProfile);
  void SetMacAddress (Mac48Address macAddress);
  void SetRangingAnomalies (uint8_t rangingAnomalies);

  uint8_t GetReqDlBurstProfile (void) const;
  Mac48Address GetMacAddress (void) const;
  uint8_t GetRangingAnomalies (void) const;

  std::string GetName (void) const;
  static TypeId GetTypeId (void);
  virtual TypeId GetInstanceTypeId (void) const;
  void Print (std::ostream &os) const;
  void PrintDebug (void) const;
  uint32_t GetSerializedSize (void) const;
  void Serialize (Buffer::Iterator start) const;
  uint32_t Deserialize (Buffer::Iterator start);
private:
  uint8_t m_reserved; // changed as per the amendment 802.16e-2005

  // TLV Encoded Information
  uint8_t m_reqDlBurstProfile;
  Mac48Address m_macAddress;
  uint8_t m_rangingAnomalies;
};

} // namespace ns3

#endif /* RNG_REQ_H */