This file is indexed.

/usr/include/ns3.26/ns3/radvd-interface.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
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
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2009 Strasbourg University
 *
 * 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: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
 */

#ifndef RADVD_INTERFACE_H
#define RADVD_INTERFACE_H

#include "radvd-prefix.h"
#include <list>
#include "ns3/simple-ref-count.h"
#include "ns3/nstime.h"

namespace ns3
{

/**
 * \ingroup radvd
 * \brief Radvd interface configuration.
 */
class RadvdInterface : public SimpleRefCount<RadvdInterface>
{
public:
  /// Container: Ptr to RadvdPrefix
  typedef std::list<Ptr<RadvdPrefix> > RadvdPrefixList;
  /// Container Iterator: Ptr to RadvdPrefix
  typedef std::list<Ptr<RadvdPrefix> >::iterator RadvdPrefixListI;
  /// Container Const Iterator: Ptr to RadvdPrefix
  typedef std::list<Ptr<RadvdPrefix> >::const_iterator RadvdPrefixListCI;

  /**
   * \brief Constructor.
   * \param interface interface index
   */
  RadvdInterface (uint32_t interface);

  /**
   * \brief Constructor.
   * \param interface interface index
   * \param maxRtrAdvInterval maximum RA interval (ms)
   * \param minRtrAdvInterval minimum RA interval (ms)
   */
  RadvdInterface (uint32_t interface, uint32_t maxRtrAdvInterval, uint32_t minRtrAdvInterval);

  /**
   * \brief Destructor.
   */
  ~RadvdInterface ();

  /**
   * \brief Get interface index for this configuration.
   * \return interface index
   */
  uint32_t GetInterface () const;

  /**
   * \brief Get list of prefixes advertised for this interface.
   * \return list of IPv6 prefixes
   */
  RadvdPrefixList GetPrefixes () const;

  /**
   * \brief Add a prefix to advertise on interface.
   * \param routerPrefix prefix to advertise
   */
  void AddPrefix (Ptr<RadvdPrefix> routerPrefix);

  /**
   * \brief Is send advert enabled (periodic RA and reply to RS) ?
   * \return send advert flag
   */
  bool IsSendAdvert () const;

  /**
   * \brief Set send advert flag.
   * \param sendAdvert value
   */
  void SetSendAdvert (bool sendAdvert);

  /**
   * \brief Get maximum RA interval.
   * \return RA interval (ms)
   */
  uint32_t GetMaxRtrAdvInterval () const;

  /**
   * \brief Get maximum RA interval.
   * \param maxRtrAdvInterval RA interval (ms)
   */
  void SetMaxRtrAdvInterval (uint32_t maxRtrAdvInterval);

  /**
   * \brief Get minimum RA interval 
   * \return RA interval (ms)
   */
  uint32_t GetMinRtrAdvInterval () const;

  /**
   * \brief Get minimum RA interval 
   * \param minRtrAdvInterval RA interval (ms).
   */
  void SetMinRtrAdvInterval (uint32_t minRtrAdvInterval);

  /**
   * \brief Get minimum delay between RAs.
   * \return minimum delay (ms)
   */
  uint32_t GetMinDelayBetweenRAs () const;

  /**
   * \brief Set minimum delay between RAs.
   * \param minDelayBetweenRAs minimum delay (ms)
   */
  void SetMinDelayBetweenRAs (uint32_t minDelayBetweenRAs);

  /**
   * \brief Is managed flag enabled ?
   * \return managed flag
   */
  bool IsManagedFlag () const;

  /**
   * \brief Set managed flag
   * \param managedFlag value
   */
  void SetManagedFlag (bool managedFlag);

  /**
   * \brief Is "other config" flag enabled ?
   * \return other config flag
   */
  bool IsOtherConfigFlag () const;

  /**
   * \brief Set "other config" flag
   * \param otherConfigFlag value
   */
  void SetOtherConfigFlag (bool otherConfigFlag);

  /**
   * \brief Get link MTU.
   * \return link MTU
   */
  uint32_t GetLinkMtu () const;

  /**
   * \brief Set link MTU.
   * \param linkMtu link MTU
   */
  void SetLinkMtu (uint32_t linkMtu); 

  /**
   * \brief Get reachable time.
   * \return reachable time
   */
  uint32_t GetReachableTime () const;

  /**
   * \brief Set reachable time.
   * \param reachableTime reachable time
   */
  void SetReachableTime (uint32_t reachableTime);

  /**
   * \brief Get default lifetime.
   * \return default lifetime
   */
  uint32_t GetDefaultLifeTime () const;

  /**
   * \brief Set default lifetime.
   * \param defaultLifeTime default lifetime
   */
  void SetDefaultLifeTime (uint32_t defaultLifeTime);

  /**
   * \brief Get retransmission timer.
   * \return retransmission timer
   */
  uint32_t GetRetransTimer () const;

  /**
   * \brief Set retransmission timer.
   * \param retransTimer retransmission timer
   */
  void SetRetransTimer (uint32_t retransTimer);

  /**
   * \brief Get current hop limit.
   * \return current hop limit for the link
   */
  uint8_t GetCurHopLimit () const;

  /**
   * \brief Set current hop limit.
   * \param curHopLimit current hop limit for the link
   */
  void SetCurHopLimit (uint8_t curHopLimit); 

  /**
   * \brief Get default preference.
   * \return default preference
   */
  uint8_t GetDefaultPreference () const;

  /**
   * \brief Set default preference.
   * \param defaultPreference default preference
   */
  void SetDefaultPreference (uint8_t defaultPreference);

  /**
   * \brief Is source LLA option should be included in RA ?
   * \return true if source address is added in RA, false otherwise
   */
  bool IsSourceLLAddress () const;

  /**
   * \brief Set flag to add or not LLA to RA.
   * \param sourceLLAddress value
   */
  void SetSourceLLAddress (bool sourceLLAddress);

  /**
   * \brief Is "home agent" flag enabled ?
   * \return "home agent" flag
   */
  bool IsHomeAgentFlag () const;

  /**
   * \brief Set "home agent" flag.
   * \param homeAgentFlag value
   */
  void SetHomeAgentFlag (bool homeAgentFlag);

  /**
   * \brief Is Home Agent Information option should be included in RA ?
   * \return true if HA information option is added in RA, false otherwise
   */
  bool IsHomeAgentInfo () const;

  /**
   * \brief Set flag to add or not HA information option to RA.
   * \param homeAgentFlag value
   */
  void SetHomeAgentInfo (bool homeAgentFlag);

  /**
   * \brief Get home agent lifetime.
   * \return home agent lifetime
   */
  uint32_t GetHomeAgentLifeTime () const;

  /**
   * \brief Set home agent lifetime.
   * \param homeAgentLifeTime home agent lifetime
   */
  void SetHomeAgentLifeTime (uint32_t homeAgentLifeTime);

  /**
   * \brief Get home agent preference.
   * \return home agent preference
   */
  uint32_t GetHomeAgentPreference () const;

  /**
   * \brief Set home agent preference.
   * \param homeAgentPreference home agent preference
   */
  void SetHomeAgentPreference (uint32_t homeAgentPreference);

  /**
   * \brief Is "mobile router support" flag enabled ?
   * \return "mobile router support" flag
   */
  bool IsMobRtrSupportFlag () const;

  /**
   * \brief Set "mobile router support" flag.
   * \param mobRtrSupportFlag value
   */
  void SetMobRtrSupportFlag (bool mobRtrSupportFlag);

  /**
   * \brief Is advertisement interval option should be included in RA ?
   * \return true if advertisement interval option is added in RA, false otherwise
   */
  bool IsIntervalOpt () const;

  /**
   * \brief Set flag to add or not advertisement interval to RA.
   * \param intervalOpt value
   */
  void SetIntervalOpt (bool intervalOpt);

  /**
   * \brief Get the last time a RA has been sent.
   * \returns the last RA send time
   */
  Time GetLastRaTxTime ();

  /**
   * \brief Set the last RA send time. It also decrements the initial Rtr Advertisements counter.
   * \param now the last RA send time
   */
  void SetLastRaTxTime (Time now);

  /**
   * \brief Checks if the interface is subject to the initial Rtr Advertisements rule.
   * \returns true if the initial Rtr Advertisements counter is greater than zero.
   */
  bool IsInitialRtrAdv ();

private:

  /**
   * \brief Interface to advertise RA.
   */
  uint32_t m_interface;

  /**
   * \brief List of prefixes to advertise.
   */
  RadvdPrefixList m_prefixes;

  /**
   * \brief Flag whether or not router sends periodic RA and respond to RS.
   */
  bool m_sendAdvert;

  /**
   * \brief Maximum RA interval in milliseconds.
   */
  uint32_t m_maxRtrAdvInterval;

  /**
   * \brief Minimum RA interval in milliseconds.
   */
  uint32_t m_minRtrAdvInterval;

  /**
   * \brief Minimum delay between RA in milliseconds.
   */
  uint32_t m_minDelayBetweenRAs;

  /**
   * \brief Managed flag. If true host use the stateful protocol for address autoconfiguration.
   */
  bool m_managedFlag;

  /**
   * \brief Other configuration flag. If true host use stateful protocol for other (non-address) information.
   */
  bool m_otherConfigFlag;

  /**
   * \brief Link MTU to use.
   */
  uint32_t m_linkMtu;

  /**
   * \brief Reachable time in milliseconds.
   */
  uint32_t m_reachableTime;

  /**
   * \brief Retransmission timer in milliseconds.
   */
  uint32_t m_retransTimer;

  /**
   * \brief Current hop limit (TTL).
   */
  uint32_t m_curHopLimit;

  /**
   * \brief Default life time in seconds.
   */
  uint32_t m_defaultLifeTime;

  /**
   * \brief Preference associated with default router.
   * 0 = low
   * 1 = medium
   * 2 = high
   */
  uint8_t m_defaultPreference;

  /**
   * \brief Flag to add link-layer address in RA.
   */
  bool m_sourceLLAddress;

  /**
   * \brief Flag to add HA (home agent) flag in RA.
   */
  bool m_homeAgentFlag;

  /**
   * \brief Flag to add Home Agent Information option (Mobile IPv6).
   * Currently not implemented.
   */
  bool m_homeAgentInfo;

  /**
   * \brief Home agent lifetime in seconds. Ignored if home agent info is not set.
   */
  uint32_t m_homeAgentLifeTime;

  /**
   * \brief Home agent preference. Ignored if home agent info is not set.
   */
  uint32_t m_homeAgentPreference;

  /**
   * \brief Flag for HA to signals it supports Mobile Router registrations (NEMO Basic).
   */
  bool m_mobRtrSupportFlag;

  /**
   * \brief Flag to add Advertisement Interval option in RA.
   */
  bool m_intervalOpt;

  /**
   * \brief Last RA send time.
   */
  Time m_lastSendTime;

  /**
   * \brief Number of fast announcement to do
   */
  uint8_t m_initialRtrAdvertisementsLeft;

};

} /* namespace ns3 */

#endif /* RADVD_INTERFACE_H */