View | Details | Raw Unified | Return to bug 938
Collapse All | Expand All

(-)a/doc/doxygen.conf (-9 / +36 lines)
 Lines 25-31    Link Here 
25
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
25
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
26
# by quotes) that should identify the project.
26
# by quotes) that should identify the project.
27
27
28
PROJECT_NAME           = "NS-3 "
28
PROJECT_NAME           = "ns-3 "
29
29
30
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
30
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
31
# This could be handy for archiving the generated documentation or
31
# This could be handy for archiving the generated documentation or
 Lines 590-597    Link Here 
590
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
590
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
591
591
592
FILE_PATTERNS          = *.h \
592
FILE_PATTERNS          = *.h \
593
                         *.tcc \
593
                         *.cc
594
                         node-list.cc
595
594
596
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
595
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
597
# should be searched for input files as well. Possible values are YES and NO.
596
# should be searched for input files as well. Possible values are YES and NO.
 Lines 603-613    Link Here 
603
# excluded from the INPUT source files. This way you can easily exclude a
602
# excluded from the INPUT source files. This way you can easily exclude a
604
# subdirectory from a directory tree whose root is specified with the INPUT tag.
603
# subdirectory from a directory tree whose root is specified with the INPUT tag.
605
604
606
EXCLUDE                = src/olsr/model/olsr-state.h \
605
EXCLUDE                =
607
                         src/olsr/model/olsr-repositories.h \
608
                         src/core/model/high-precision.h \
609
                         src/core/model/high-precision-128.h \
610
                         src/core/model/high-precision-double.h
611
606
612
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
607
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
613
# directories that are symbolic links (a Unix filesystem feature) are excluded
608
# directories that are symbolic links (a Unix filesystem feature) are excluded
 Lines 635-641    Link Here 
635
# directories that contain example code fragments that are included (see
630
# directories that contain example code fragments that are included (see
636
# the \include command).
631
# the \include command).
637
632
638
EXAMPLE_PATH           = 
633
EXAMPLE_PATH           = src/aodv/examples \
634
                         src/bridge/examples \
635
                         src/click/examples \
636
                         src/config-store/examples \
637
                         src/core/examples \
638
                         src/csma/examples \
639
                         src/csma-layout/examples \
640
                         src/dsdv/examples \
641
                         src/emu/examples \
642
                         src/energy/examples \
643
                         src/flow-monitor/examples \
644
                         src/internet/examples \
645
                         src/lte/examples \
646
                         src/mesh/examples \
647
                         src/mobility/examples \
648
                         src/mpi/examples \
649
                         src/netanim/examples \
650
                         src/network/examples \
651
                         src/nix-vector-routing/examples \
652
                         src/olsr/examples \
653
                         src/openflow/examples \
654
                         src/point-to-point/examples \
655
                         src/propagation/examples \
656
                         src/spectrum/examples \
657
                         src/tap-bridge/examples \
658
                         src/template/examples \
659
                         src/tools/examples \
660
                         src/topology-read/examples \
661
                         src/uan/examples \
662
                         src/virtual-net-device/examples \
663
                         src/visualizer/examples \
664
                         src/wifi/examples \
665
                         src/wimax/examples
639
666
640
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
667
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
641
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
668
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
(-)a/src/click/helper/click-internet-stack-helper.h (-11 / +11 lines)
 Lines 157-168    Link Here 
157
  void SetRoutingTableElement (Ptr<Node> node, std::string rt);
157
  void SetRoutingTableElement (Ptr<Node> node, std::string rt);
158
private:
158
private:
159
  /**
159
  /**
160
   * @brief Enable pcap output the indicated Ipv4 and interface pair.
160
   * \brief Enable pcap output the indicated Ipv4 and interface pair.
161
   * @internal
161
   * \internal
162
   *
162
   *
163
   * @param prefix Filename prefix to use for pcap files.
163
   * \param prefix Filename prefix to use for pcap files.
164
   * @param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
164
   * \param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
165
   * @param interface Interface ID on the Ipv4 on which you want to enable tracing.
165
   * \param interface Interface ID on the Ipv4 on which you want to enable tracing.
166
   */
166
   */
167
  virtual void EnablePcapIpv4Internal (std::string prefix,
167
  virtual void EnablePcapIpv4Internal (std::string prefix,
168
                                       Ptr<Ipv4> ipv4,
168
                                       Ptr<Ipv4> ipv4,
 Lines 170-183    Link Here 
170
                                       bool explicitFilename);
170
                                       bool explicitFilename);
171
171
172
  /**
172
  /**
173
   * @brief Enable ascii trace output on the indicated Ipv4 and interface pair.
173
   * \brief Enable ascii trace output on the indicated Ipv4 and interface pair.
174
   * @internal
174
   * \internal
175
   *
175
   *
176
   * @param stream An OutputStreamWrapper representing an existing file to use
176
   * \param stream An OutputStreamWrapper representing an existing file to use
177
   *               when writing trace data.
177
   *               when writing trace data.
178
   * @param prefix Filename prefix to use for ascii trace files.
178
   * \param prefix Filename prefix to use for ascii trace files.
179
   * @param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
179
   * \param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
180
   * @param interface Interface ID on the Ipv4 on which you want to enable tracing.
180
   * \param interface Interface ID on the Ipv4 on which you want to enable tracing.
181
   */
181
   */
182
  virtual void EnableAsciiIpv4Internal (Ptr<OutputStreamWrapper> stream,
182
  virtual void EnableAsciiIpv4Internal (Ptr<OutputStreamWrapper> stream,
183
                                        std::string prefix,
183
                                        std::string prefix,
(-)a/src/core/model/cairo-wideint.c (-1 / +1 lines)
 Lines 659-665    Link Here 
659
 * dividend and 64 bit divisor.  If the quotient doesn't fit into 32
659
 * dividend and 64 bit divisor.  If the quotient doesn't fit into 32
660
 * bits then the returned remainder is equal to the divisor, and the
660
 * bits then the returned remainder is equal to the divisor, and the
661
 * quotient is the largest representable 64 bit integer.  It is an
661
 * quotient is the largest representable 64 bit integer.  It is an
662
 * error to call this function with the high 32 bits of @num being
662
 * error to call this function with the high 32 bits of \num being
663
 * non-zero. */
663
 * non-zero. */
664
cairo_uquorem64_t
664
cairo_uquorem64_t
665
_cairo_uint_96by64_32x64_divrem (cairo_uint128_t num,
665
_cairo_uint_96by64_32x64_divrem (cairo_uint128_t num,
(-)a/src/core/model/command-line.h (-3 / +9 lines)
 Lines 37-45    Link Here 
37
 * CommandLine::AddValue but the most important functionality
37
 * CommandLine::AddValue but the most important functionality
38
 * provided by this class is that it can be used to set the
38
 * provided by this class is that it can be used to set the
39
 * 'initial value' of every attribute in the system with the
39
 * 'initial value' of every attribute in the system with the
40
 * '\--TypeIdName::AttributeName=value' syntax and it can be used
40
 * \verbatim
41
 * to set the value of every GlobalValue in the system with
41
 *   --TypeIdName::AttributeName=value
42
 * the \--GlobalValueName=value syntax.
42
 * \endverbatim
43
 * syntax and it can be used to set the value of every GlobalValue
44
 * in the system with the
45
 * \verbatim
46
 *   --GlobalValueName=value
47
 * \endverbatim
48
 * syntax.
43
 */
49
 */
44
class CommandLine
50
class CommandLine
45
{
51
{
(-)a/src/core/model/global-value.h (-5 / +5 lines)
 Lines 121-130    Link Here 
121
  /** 
121
  /** 
122
   * finds the GlobalValue with the given name and returns its value
122
   * finds the GlobalValue with the given name and returns its value
123
   * 
123
   * 
124
   * @param name the name of the GlobalValue to be found
124
   * \param name the name of the GlobalValue to be found
125
   * @param value where to store the value of the found GlobalValue
125
   * \param value where to store the value of the found GlobalValue
126
   * 
126
   * 
127
   * @return true if the GlobalValue was found, false otherwise
127
   * \return true if the GlobalValue was found, false otherwise
128
   */
128
   */
129
  static bool GetValueByNameFailSafe (std::string name, AttributeValue &value);
129
  static bool GetValueByNameFailSafe (std::string name, AttributeValue &value);
130
130
 Lines 133-140    Link Here 
133
   * value. This method cannot fail, i.e., it will trigger a
133
   * value. This method cannot fail, i.e., it will trigger a
134
   * NS_FATAL_ERROR if the requested GlobalValue is not found.
134
   * NS_FATAL_ERROR if the requested GlobalValue is not found.
135
   * 
135
   * 
136
   * @param name the name of the GlobalValue to be found
136
   * \param name the name of the GlobalValue to be found
137
   * @param value where to store the value of the found GlobalValue
137
   * \param value where to store the value of the found GlobalValue
138
   * 
138
   * 
139
   */
139
   */
140
  static void GetValueByName (std::string name, AttributeValue &value);
140
  static void GetValueByName (std::string name, AttributeValue &value);
(-)a/src/core/model/names.cc (-2 / +2 lines)
 Lines 463-470    Link Here 
463
  NameNode *node = &m_root;
463
  NameNode *node = &m_root;
464
464
465
  //
465
  //
466
  // The string <remaining> is now composed entirely of path segments in the
466
  // The string <remaining> is now composed entirely of path segments in
467
  // /Names name space and we have eaten the leading slash. e.g., 
467
  // the /Names name space and we have eaten the leading slash. e.g., 
468
  // remaining = "ClientNode/eth0"
468
  // remaining = "ClientNode/eth0"
469
  //
469
  //
470
  // The start of the search is always at the root of the name space.
470
  // The start of the search is always at the root of the name space.
(-)a/src/core/model/nstime.h (-8 / +10 lines)
 Lines 256-262    Link Here 
256
  }
256
  }
257
257
258
  /**
258
  /**
259
   * \returns an approximation in seconds of the time stored in this
259
   * \return an approximation in seconds of the time stored in this
260
   *          instance.
260
   *          instance.
261
   */
261
   */
262
  inline double GetSeconds (void) const
262
  inline double GetSeconds (void) const
 Lines 265-271    Link Here 
265
  }
265
  }
266
266
267
  /**
267
  /**
268
   * \returns an approximation in milliseconds of the time stored in this
268
   * \return an approximation in milliseconds of the time stored in this
269
   *          instance.
269
   *          instance.
270
   */
270
   */
271
  inline int64_t GetMilliSeconds (void) const
271
  inline int64_t GetMilliSeconds (void) const
 Lines 273-279    Link Here 
273
    return ToInteger (Time::MS);
273
    return ToInteger (Time::MS);
274
  }
274
  }
275
  /**
275
  /**
276
   * \returns an approximation in microseconds of the time stored in this
276
   * \return an approximation in microseconds of the time stored in this
277
   *          instance.
277
   *          instance.
278
   */
278
   */
279
  inline int64_t GetMicroSeconds (void) const
279
  inline int64_t GetMicroSeconds (void) const
 Lines 281-287    Link Here 
281
    return ToInteger (Time::US);
281
    return ToInteger (Time::US);
282
  }
282
  }
283
  /**
283
  /**
284
   * \returns an approximation in nanoseconds of the time stored in this
284
   * \return an approximation in nanoseconds of the time stored in this
285
   *          instance.
285
   *          instance.
286
   */
286
   */
287
  inline int64_t GetNanoSeconds (void) const
287
  inline int64_t GetNanoSeconds (void) const
 Lines 289-295    Link Here 
289
    return ToInteger (Time::NS);
289
    return ToInteger (Time::NS);
290
  }
290
  }
291
  /**
291
  /**
292
   * \returns an approximation in picoseconds of the time stored in this
292
   * \return an approximation in picoseconds of the time stored in this
293
   *          instance.
293
   *          instance.
294
   */
294
   */
295
  inline int64_t GetPicoSeconds (void) const
295
  inline int64_t GetPicoSeconds (void) const
 Lines 297-303    Link Here 
297
    return ToInteger (Time::PS);
297
    return ToInteger (Time::PS);
298
  }
298
  }
299
  /**
299
  /**
300
   * \returns an approximation in femtoseconds of the time stored in this
300
   * \return an approximation in femtoseconds of the time stored in this
301
   *          instance.
301
   *          instance.
302
   */
302
   */
303
  inline int64_t GetFemtoSeconds (void) const
303
  inline int64_t GetFemtoSeconds (void) const
 Lines 305-311    Link Here 
305
    return ToInteger (Time::FS);
305
    return ToInteger (Time::FS);
306
  }
306
  }
307
  /**
307
  /**
308
   * \returns an approximation of the time stored in this
308
   * \return an approximation of the time stored in this
309
   *          instance in the units specified in m_tsPrecision.
309
   *          instance in the units specified in m_tsPrecision.
310
   */
310
   */
311
  inline int64_t GetTimeStep (void) const
311
  inline int64_t GetTimeStep (void) const
 Lines 331-337    Link Here 
331
   */
331
   */
332
  static void SetResolution (enum Unit resolution);
332
  static void SetResolution (enum Unit resolution);
333
  /**
333
  /**
334
   * \returns the current global resolution.
334
   * \return the current global resolution.
335
   */
335
   */
336
  static enum Unit GetResolution (void);
336
  static enum Unit GetResolution (void);
337
  /**
337
  /**
 Lines 359-364    Link Here 
359
  }
359
  }
360
  /**
360
  /**
361
   * \param timeUnit the unit of the value to return
361
   * \param timeUnit the unit of the value to return
362
   * \return int64_t time value
362
   *
363
   *
363
   * Convert the input time into an integer value according to the requested
364
   * Convert the input time into an integer value according to the requested
364
   * time unit.
365
   * time unit.
 Lines 390-395    Link Here 
390
  }
391
  }
391
  /**
392
  /**
392
   * \param timeUnit the unit of the value to return
393
   * \param timeUnit the unit of the value to return
394
   * \return double time value
393
   *
395
   *
394
   * Convert the input time into a floating point value according to the requested
396
   * Convert the input time into a floating point value according to the requested
395
   * time unit.
397
   * time unit.
(-)a/src/core/model/random-variable.h (-1 / +1 lines)
 Lines 91-97    Link Here 
91
  static void SetRun (uint32_t run);
91
  static void SetRun (uint32_t run);
92
  /**
92
  /**
93
   * \returns the current run number
93
   * \returns the current run number
94
   * @sa SetRun
94
   * \sa SetRun
95
   */
95
   */
96
  static uint32_t GetRun (void);
96
  static uint32_t GetRun (void);
97
97
(-)a/src/core/model/simulator-impl.h (-5 / +5 lines)
 Lines 71-77    Link Here 
71
   * expiration time of the next event to be processed is greater than
71
   * expiration time of the next event to be processed is greater than
72
   * or equal to the stop time.  The stop time is relative to the
72
   * or equal to the stop time.  The stop time is relative to the
73
   * current simulation time.
73
   * current simulation time.
74
   * @param time the stop time, relative to the current time.
74
   * \param time the stop time, relative to the current time.
75
   */
75
   */
76
  virtual void Stop (Time const &time) = 0;
76
  virtual void Stop (Time const &time) = 0;
77
  /**
77
  /**
 Lines 118-124    Link Here 
118
   * Note that it is not possible to remove events which were scheduled
118
   * Note that it is not possible to remove events which were scheduled
119
   * for the "destroy" time. Doing so will result in a program error (crash).
119
   * for the "destroy" time. Doing so will result in a program error (crash).
120
   *
120
   *
121
   * @param ev the event to remove from the list of scheduled events.
121
   * \param ev the event to remove from the list of scheduled events.
122
   */
122
   */
123
  virtual void Remove (const EventId &ev) = 0;
123
  virtual void Remove (const EventId &ev) = 0;
124
  /**
124
  /**
 Lines 131-137    Link Here 
131
   * Note that it is not possible to cancel events which were scheduled
131
   * Note that it is not possible to cancel events which were scheduled
132
   * for the "destroy" time. Doing so will result in a program error (crash).
132
   * for the "destroy" time. Doing so will result in a program error (crash).
133
   * 
133
   * 
134
   * @param ev the event to cancel
134
   * \param ev the event to cancel
135
   */
135
   */
136
  virtual void Cancel (const EventId &ev) = 0;
136
  virtual void Cancel (const EventId &ev) = 0;
137
  /**
137
  /**
 Lines 143-150    Link Here 
143
   * which means that if the code executed by the event calls
143
   * which means that if the code executed by the event calls
144
   * this function, it will get true.
144
   * this function, it will get true.
145
   *
145
   *
146
   * @param ev the event to test for expiration
146
   * \param ev the event to test for expiration
147
   * @returns true if the event has expired, false otherwise.
147
   * \returns true if the event has expired, false otherwise.
148
   */
148
   */
149
  virtual bool IsExpired (const EventId &ev) const = 0;
149
  virtual bool IsExpired (const EventId &ev) const = 0;
150
  /**
150
  /**
(-)a/src/core/model/simulator.h (-245 / +245 lines)
 Lines 135-141    Link Here 
135
   * expiration time of the next event to be processed is greater than
135
   * expiration time of the next event to be processed is greater than
136
   * or equal to the stop time.  The stop time is relative to the
136
   * or equal to the stop time.  The stop time is relative to the
137
   * current simulation time.
137
   * current simulation time.
138
   * @param time the stop time, relative to the current time.
138
   * \param time the stop time, relative to the current time.
139
   */
139
   */
140
  static void Stop (Time const &time);
140
  static void Stop (Time const &time);
141
141
 Lines 148-283    Link Here 
148
   * When the event expires (when it becomes due to be run), the 
148
   * When the event expires (when it becomes due to be run), the 
149
   * input method will be invoked on the input object.
149
   * input method will be invoked on the input object.
150
   *
150
   *
151
   * @param time the relative expiration time of the event.
151
   * \param time the relative expiration time of the event.
152
   * @param mem_ptr member method pointer to invoke
152
   * \param mem_ptr member method pointer to invoke
153
   * @param obj the object on which to invoke the member method
153
   * \param obj the object on which to invoke the member method
154
   * @returns an id for the scheduled event.
154
   * \returns an id for the scheduled event.
155
   */
155
   */
156
  template <typename MEM, typename OBJ>
156
  template <typename MEM, typename OBJ>
157
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj);
157
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj);
158
158
159
  /**
159
  /**
160
   * @param time the relative expiration time of the event.
160
   * \param time the relative expiration time of the event.
161
   * @param mem_ptr member method pointer to invoke
161
   * \param mem_ptr member method pointer to invoke
162
   * @param obj the object on which to invoke the member method
162
   * \param obj the object on which to invoke the member method
163
   * @param a1 the first argument to pass to the invoked method
163
   * \param a1 the first argument to pass to the invoked method
164
   * @returns an id for the scheduled event.
164
   * \returns an id for the scheduled event.
165
   */
165
   */
166
  template <typename MEM, typename OBJ, typename T1>
166
  template <typename MEM, typename OBJ, typename T1>
167
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1);
167
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1);
168
168
169
  /**
169
  /**
170
   * @param time the relative expiration time of the event.
170
   * \param time the relative expiration time of the event.
171
   * @param mem_ptr member method pointer to invoke
171
   * \param mem_ptr member method pointer to invoke
172
   * @param obj the object on which to invoke the member method
172
   * \param obj the object on which to invoke the member method
173
   * @param a1 the first argument to pass to the invoked method
173
   * \param a1 the first argument to pass to the invoked method
174
   * @param a2 the second argument to pass to the invoked method
174
   * \param a2 the second argument to pass to the invoked method
175
   * @returns an id for the scheduled event.
175
   * \returns an id for the scheduled event.
176
   */
176
   */
177
  template <typename MEM, typename OBJ, typename T1, typename T2>
177
  template <typename MEM, typename OBJ, typename T1, typename T2>
178
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2);
178
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2);
179
179
180
  /**
180
  /**
181
   * @param time the relative expiration time of the event.
181
   * \param time the relative expiration time of the event.
182
   * @param mem_ptr member method pointer to invoke
182
   * \param mem_ptr member method pointer to invoke
183
   * @param obj the object on which to invoke the member method
183
   * \param obj the object on which to invoke the member method
184
   * @param a1 the first argument to pass to the invoked method
184
   * \param a1 the first argument to pass to the invoked method
185
   * @param a2 the second argument to pass to the invoked method
185
   * \param a2 the second argument to pass to the invoked method
186
   * @param a3 the third argument to pass to the invoked method
186
   * \param a3 the third argument to pass to the invoked method
187
   * @returns an id for the scheduled event.
187
   * \returns an id for the scheduled event.
188
   */
188
   */
189
  template <typename MEM, typename OBJ, 
189
  template <typename MEM, typename OBJ, 
190
            typename T1, typename T2, typename T3>
190
            typename T1, typename T2, typename T3>
191
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3);
191
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3);
192
192
193
  /**
193
  /**
194
   * @param time the relative expiration time of the event.
194
   * \param time the relative expiration time of the event.
195
   * @param mem_ptr member method pointer to invoke
195
   * \param mem_ptr member method pointer to invoke
196
   * @param obj the object on which to invoke the member method
196
   * \param obj the object on which to invoke the member method
197
   * @param a1 the first argument to pass to the invoked method
197
   * \param a1 the first argument to pass to the invoked method
198
   * @param a2 the second argument to pass to the invoked method
198
   * \param a2 the second argument to pass to the invoked method
199
   * @param a3 the third argument to pass to the invoked method
199
   * \param a3 the third argument to pass to the invoked method
200
   * @param a4 the fourth argument to pass to the invoked method
200
   * \param a4 the fourth argument to pass to the invoked method
201
   * @returns an id for the scheduled event.
201
   * \returns an id for the scheduled event.
202
   */
202
   */
203
  template <typename MEM, typename OBJ, 
203
  template <typename MEM, typename OBJ, 
204
            typename T1, typename T2, typename T3, typename T4>
204
            typename T1, typename T2, typename T3, typename T4>
205
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4);
205
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4);
206
206
207
  /**
207
  /**
208
   * @param time the relative expiration time of the event.
208
   * \param time the relative expiration time of the event.
209
   * @param mem_ptr member method pointer to invoke
209
   * \param mem_ptr member method pointer to invoke
210
   * @param obj the object on which to invoke the member method
210
   * \param obj the object on which to invoke the member method
211
   * @param a1 the first argument to pass to the invoked method
211
   * \param a1 the first argument to pass to the invoked method
212
   * @param a2 the second argument to pass to the invoked method
212
   * \param a2 the second argument to pass to the invoked method
213
   * @param a3 the third argument to pass to the invoked method
213
   * \param a3 the third argument to pass to the invoked method
214
   * @param a4 the fourth argument to pass to the invoked method
214
   * \param a4 the fourth argument to pass to the invoked method
215
   * @param a5 the fifth argument to pass to the invoked method
215
   * \param a5 the fifth argument to pass to the invoked method
216
   * @returns an id for the scheduled event.
216
   * \returns an id for the scheduled event.
217
   */
217
   */
218
  template <typename MEM, typename OBJ, 
218
  template <typename MEM, typename OBJ, 
219
            typename T1, typename T2, typename T3, typename T4, typename T5>
219
            typename T1, typename T2, typename T3, typename T4, typename T5>
220
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, 
220
  static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, 
221
                           T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
221
                           T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
222
  /**
222
  /**
223
   * @param time the relative expiration time of the event.
223
   * \param time the relative expiration time of the event.
224
   * @param f the function to invoke
224
   * \param f the function to invoke
225
   * @returns an id for the scheduled event.
225
   * \returns an id for the scheduled event.
226
   */
226
   */
227
  static EventId Schedule (Time const &time, void (*f)(void));
227
  static EventId Schedule (Time const &time, void (*f)(void));
228
228
229
  /**
229
  /**
230
   * @param time the relative expiration time of the event.
230
   * \param time the relative expiration time of the event.
231
   * @param f the function to invoke
231
   * \param f the function to invoke
232
   * @param a1 the first argument to pass to the function to invoke
232
   * \param a1 the first argument to pass to the function to invoke
233
   * @returns an id for the scheduled event.
233
   * \returns an id for the scheduled event.
234
   */
234
   */
235
  template <typename U1, typename T1>
235
  template <typename U1, typename T1>
236
  static EventId Schedule (Time const &time, void (*f)(U1), T1 a1);
236
  static EventId Schedule (Time const &time, void (*f)(U1), T1 a1);
237
237
238
  /**
238
  /**
239
   * @param time the relative expiration time of the event.
239
   * \param time the relative expiration time of the event.
240
   * @param f the function to invoke
240
   * \param f the function to invoke
241
   * @param a1 the first argument to pass to the function to invoke
241
   * \param a1 the first argument to pass to the function to invoke
242
   * @param a2 the second argument to pass to the function to invoke
242
   * \param a2 the second argument to pass to the function to invoke
243
   * @returns an id for the scheduled event.
243
   * \returns an id for the scheduled event.
244
   */
244
   */
245
  template <typename U1, typename U2, typename T1, typename T2>
245
  template <typename U1, typename U2, typename T1, typename T2>
246
  static EventId Schedule (Time const &time, void (*f)(U1,U2), T1 a1, T2 a2);
246
  static EventId Schedule (Time const &time, void (*f)(U1,U2), T1 a1, T2 a2);
247
247
248
  /**
248
  /**
249
   * @param time the relative expiration time of the event.
249
   * \param time the relative expiration time of the event.
250
   * @param f the function to invoke
250
   * \param f the function to invoke
251
   * @param a1 the first argument to pass to the function to invoke
251
   * \param a1 the first argument to pass to the function to invoke
252
   * @param a2 the second argument to pass to the function to invoke
252
   * \param a2 the second argument to pass to the function to invoke
253
   * @param a3 the third argument to pass to the function to invoke
253
   * \param a3 the third argument to pass to the function to invoke
254
   * @returns an id for the scheduled event.
254
   * \returns an id for the scheduled event.
255
   */
255
   */
256
  template <typename U1, typename U2, typename U3, typename T1, typename T2, typename T3>
256
  template <typename U1, typename U2, typename U3, typename T1, typename T2, typename T3>
257
  static EventId Schedule (Time const &time, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3);
257
  static EventId Schedule (Time const &time, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3);
258
258
259
  /**
259
  /**
260
   * @param time the relative expiration time of the event.
260
   * \param time the relative expiration time of the event.
261
   * @param f the function to invoke
261
   * \param f the function to invoke
262
   * @param a1 the first argument to pass to the function to invoke
262
   * \param a1 the first argument to pass to the function to invoke
263
   * @param a2 the second argument to pass to the function to invoke
263
   * \param a2 the second argument to pass to the function to invoke
264
   * @param a3 the third argument to pass to the function to invoke
264
   * \param a3 the third argument to pass to the function to invoke
265
   * @param a4 the fourth argument to pass to the function to invoke
265
   * \param a4 the fourth argument to pass to the function to invoke
266
   * @returns an id for the scheduled event.
266
   * \returns an id for the scheduled event.
267
   */
267
   */
268
  template <typename U1, typename U2, typename U3, typename U4, 
268
  template <typename U1, typename U2, typename U3, typename U4, 
269
            typename T1, typename T2, typename T3, typename T4>
269
            typename T1, typename T2, typename T3, typename T4>
270
  static EventId Schedule (Time const &time, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4);
270
  static EventId Schedule (Time const &time, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4);
271
271
272
  /**
272
  /**
273
   * @param time the relative expiration time of the event.
273
   * \param time the relative expiration time of the event.
274
   * @param f the function to invoke
274
   * \param f the function to invoke
275
   * @param a1 the first argument to pass to the function to invoke
275
   * \param a1 the first argument to pass to the function to invoke
276
   * @param a2 the second argument to pass to the function to invoke
276
   * \param a2 the second argument to pass to the function to invoke
277
   * @param a3 the third argument to pass to the function to invoke
277
   * \param a3 the third argument to pass to the function to invoke
278
   * @param a4 the fourth argument to pass to the function to invoke
278
   * \param a4 the fourth argument to pass to the function to invoke
279
   * @param a5 the fifth argument to pass to the function to invoke
279
   * \param a5 the fifth argument to pass to the function to invoke
280
   * @returns an id for the scheduled event.
280
   * \returns an id for the scheduled event.
281
   */
281
   */
282
  template <typename U1, typename U2, typename U3, typename U4, typename U5,
282
  template <typename U1, typename U2, typename U3, typename U4, typename U5,
283
            typename T1, typename T2, typename T3, typename T4, typename T5>
283
            typename T1, typename T2, typename T3, typename T4, typename T5>
 Lines 287-422    Link Here 
287
   * Schedule an event with the given context.
287
   * Schedule an event with the given context.
288
   * A context of 0xffffffff means no context is specified.
288
   * A context of 0xffffffff means no context is specified.
289
   *
289
   *
290
   * @param time the relative expiration time of the event.
290
   * \param time the relative expiration time of the event.
291
   * @param context user-specified context parameter
291
   * \param context user-specified context parameter
292
   * @param mem_ptr member method pointer to invoke
292
   * \param mem_ptr member method pointer to invoke
293
   * @param obj the object on which to invoke the member method
293
   * \param obj the object on which to invoke the member method
294
   */
294
   */
295
  template <typename MEM, typename OBJ>
295
  template <typename MEM, typename OBJ>
296
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj);
296
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj);
297
297
298
  /**
298
  /**
299
   * @param time the relative expiration time of the event.
299
   * \param time the relative expiration time of the event.
300
   * @param context user-specified context parameter
300
   * \param context user-specified context parameter
301
   * @param mem_ptr member method pointer to invoke
301
   * \param mem_ptr member method pointer to invoke
302
   * @param obj the object on which to invoke the member method
302
   * \param obj the object on which to invoke the member method
303
   * @param a1 the first argument to pass to the invoked method
303
   * \param a1 the first argument to pass to the invoked method
304
   */
304
   */
305
  template <typename MEM, typename OBJ, typename T1>
305
  template <typename MEM, typename OBJ, typename T1>
306
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, T1 a1);
306
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, T1 a1);
307
307
308
  /**
308
  /**
309
   * @param time the relative expiration time of the event.
309
   * \param time the relative expiration time of the event.
310
   * @param context user-specified context parameter
310
   * \param context user-specified context parameter
311
   * @param mem_ptr member method pointer to invoke
311
   * \param mem_ptr member method pointer to invoke
312
   * @param obj the object on which to invoke the member method
312
   * \param obj the object on which to invoke the member method
313
   * @param a1 the first argument to pass to the invoked method
313
   * \param a1 the first argument to pass to the invoked method
314
   * @param a2 the second argument to pass to the invoked method
314
   * \param a2 the second argument to pass to the invoked method
315
   */
315
   */
316
  template <typename MEM, typename OBJ, typename T1, typename T2>
316
  template <typename MEM, typename OBJ, typename T1, typename T2>
317
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2);
317
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2);
318
318
319
  /**
319
  /**
320
   * @param time the relative expiration time of the event.
320
   * \param time the relative expiration time of the event.
321
   * @param context user-specified context parameter
321
   * \param context user-specified context parameter
322
   * @param mem_ptr member method pointer to invoke
322
   * \param mem_ptr member method pointer to invoke
323
   * @param obj the object on which to invoke the member method
323
   * \param obj the object on which to invoke the member method
324
   * @param a1 the first argument to pass to the invoked method
324
   * \param a1 the first argument to pass to the invoked method
325
   * @param a2 the second argument to pass to the invoked method
325
   * \param a2 the second argument to pass to the invoked method
326
   * @param a3 the third argument to pass to the invoked method
326
   * \param a3 the third argument to pass to the invoked method
327
   */
327
   */
328
  template <typename MEM, typename OBJ, 
328
  template <typename MEM, typename OBJ, 
329
            typename T1, typename T2, typename T3>
329
            typename T1, typename T2, typename T3>
330
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3);
330
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3);
331
331
332
  /**
332
  /**
333
   * @param time the relative expiration time of the event.
333
   * \param time the relative expiration time of the event.
334
   * @param context user-specified context parameter
334
   * \param context user-specified context parameter
335
   * @param mem_ptr member method pointer to invoke
335
   * \param mem_ptr member method pointer to invoke
336
   * @param obj the object on which to invoke the member method
336
   * \param obj the object on which to invoke the member method
337
   * @param a1 the first argument to pass to the invoked method
337
   * \param a1 the first argument to pass to the invoked method
338
   * @param a2 the second argument to pass to the invoked method
338
   * \param a2 the second argument to pass to the invoked method
339
   * @param a3 the third argument to pass to the invoked method
339
   * \param a3 the third argument to pass to the invoked method
340
   * @param a4 the fourth argument to pass to the invoked method
340
   * \param a4 the fourth argument to pass to the invoked method
341
   */
341
   */
342
  template <typename MEM, typename OBJ, 
342
  template <typename MEM, typename OBJ, 
343
            typename T1, typename T2, typename T3, typename T4>
343
            typename T1, typename T2, typename T3, typename T4>
344
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4);
344
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4);
345
345
346
  /**
346
  /**
347
   * @param time the relative expiration time of the event.
347
   * \param time the relative expiration time of the event.
348
   * @param context user-specified context parameter
348
   * \param context user-specified context parameter
349
   * @param mem_ptr member method pointer to invoke
349
   * \param mem_ptr member method pointer to invoke
350
   * @param obj the object on which to invoke the member method
350
   * \param obj the object on which to invoke the member method
351
   * @param a1 the first argument to pass to the invoked method
351
   * \param a1 the first argument to pass to the invoked method
352
   * @param a2 the second argument to pass to the invoked method
352
   * \param a2 the second argument to pass to the invoked method
353
   * @param a3 the third argument to pass to the invoked method
353
   * \param a3 the third argument to pass to the invoked method
354
   * @param a4 the fourth argument to pass to the invoked method
354
   * \param a4 the fourth argument to pass to the invoked method
355
   * @param a5 the fifth argument to pass to the invoked method
355
   * \param a5 the fifth argument to pass to the invoked method
356
   */
356
   */
357
  template <typename MEM, typename OBJ, 
357
  template <typename MEM, typename OBJ, 
358
            typename T1, typename T2, typename T3, typename T4, typename T5>
358
            typename T1, typename T2, typename T3, typename T4, typename T5>
359
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, 
359
  static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, 
360
                                   T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
360
                                   T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
361
  /**
361
  /**
362
   * @param time the relative expiration time of the event.
362
   * \param time the relative expiration time of the event.
363
   * @param context user-specified context parameter
363
   * \param context user-specified context parameter
364
   * @param f the function to invoke
364
   * \param f the function to invoke
365
   */
365
   */
366
  static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(void));
366
  static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(void));
367
367
368
  /**
368
  /**
369
   * @param time the relative expiration time of the event.
369
   * \param time the relative expiration time of the event.
370
   * @param context user-specified context parameter
370
   * \param context user-specified context parameter
371
   * @param f the function to invoke
371
   * \param f the function to invoke
372
   * @param a1 the first argument to pass to the function to invoke
372
   * \param a1 the first argument to pass to the function to invoke
373
   */
373
   */
374
  template <typename U1, typename T1>
374
  template <typename U1, typename T1>
375
  static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1), T1 a1);
375
  static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1), T1 a1);
376
376
377
  /**
377
  /**
378
   * @param time the relative expiration time of the event.
378
   * \param time the relative expiration time of the event.
379
   * @param context user-specified context parameter
379
   * \param context user-specified context parameter
380
   * @param f the function to invoke
380
   * \param f the function to invoke
381
   * @param a1 the first argument to pass to the function to invoke
381
   * \param a1 the first argument to pass to the function to invoke
382
   * @param a2 the second argument to pass to the function to invoke
382
   * \param a2 the second argument to pass to the function to invoke
383
   */
383
   */
384
  template <typename U1, typename U2, typename T1, typename T2>
384
  template <typename U1, typename U2, typename T1, typename T2>
385
  static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2), T1 a1, T2 a2);
385
  static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2), T1 a1, T2 a2);
386
386
387
  /**
387
  /**
388
   * @param time the relative expiration time of the event.
388
   * \param time the relative expiration time of the event.
389
   * @param context user-specified context parameter
389
   * \param context user-specified context parameter
390
   * @param f the function to invoke
390
   * \param f the function to invoke
391
   * @param a1 the first argument to pass to the function to invoke
391
   * \param a1 the first argument to pass to the function to invoke
392
   * @param a2 the second argument to pass to the function to invoke
392
   * \param a2 the second argument to pass to the function to invoke
393
   * @param a3 the third argument to pass to the function to invoke
393
   * \param a3 the third argument to pass to the function to invoke
394
   */
394
   */
395
  template <typename U1, typename U2, typename U3, typename T1, typename T2, typename T3>
395
  template <typename U1, typename U2, typename U3, typename T1, typename T2, typename T3>
396
  static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3);
396
  static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3);
397
397
398
  /**
398
  /**
399
   * @param time the relative expiration time of the event.
399
   * \param time the relative expiration time of the event.
400
   * @param context user-specified context parameter
400
   * \param context user-specified context parameter
401
   * @param f the function to invoke
401
   * \param f the function to invoke
402
   * @param a1 the first argument to pass to the function to invoke
402
   * \param a1 the first argument to pass to the function to invoke
403
   * @param a2 the second argument to pass to the function to invoke
403
   * \param a2 the second argument to pass to the function to invoke
404
   * @param a3 the third argument to pass to the function to invoke
404
   * \param a3 the third argument to pass to the function to invoke
405
   * @param a4 the fourth argument to pass to the function to invoke
405
   * \param a4 the fourth argument to pass to the function to invoke
406
   */
406
   */
407
  template <typename U1, typename U2, typename U3, typename U4, 
407
  template <typename U1, typename U2, typename U3, typename U4, 
408
            typename T1, typename T2, typename T3, typename T4>
408
            typename T1, typename T2, typename T3, typename T4>
409
  static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4);
409
  static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4);
410
410
411
  /**
411
  /**
412
   * @param time the relative expiration time of the event.
412
   * \param time the relative expiration time of the event.
413
   * @param context user-specified context parameter
413
   * \param context user-specified context parameter
414
   * @param f the function to invoke
414
   * \param f the function to invoke
415
   * @param a1 the first argument to pass to the function to invoke
415
   * \param a1 the first argument to pass to the function to invoke
416
   * @param a2 the second argument to pass to the function to invoke
416
   * \param a2 the second argument to pass to the function to invoke
417
   * @param a3 the third argument to pass to the function to invoke
417
   * \param a3 the third argument to pass to the function to invoke
418
   * @param a4 the fourth argument to pass to the function to invoke
418
   * \param a4 the fourth argument to pass to the function to invoke
419
   * @param a5 the fifth argument to pass to the function to invoke
419
   * \param a5 the fifth argument to pass to the function to invoke
420
   */
420
   */
421
  template <typename U1, typename U2, typename U3, typename U4, typename U5,
421
  template <typename U1, typename U2, typename U3, typename U4, typename U5,
422
            typename T1, typename T2, typename T3, typename T4, typename T5>
422
            typename T1, typename T2, typename T3, typename T4, typename T5>
 Lines 427-543    Link Here 
427
   * to expire "Now" are scheduled FIFO, after all normal events
427
   * to expire "Now" are scheduled FIFO, after all normal events
428
   * have expired. 
428
   * have expired. 
429
   *
429
   *
430
   * @param mem_ptr member method pointer to invoke
430
   * \param mem_ptr member method pointer to invoke
431
   * @param obj the object on which to invoke the member method
431
   * \param obj the object on which to invoke the member method
432
   */
432
   */
433
  template <typename MEM, typename OBJ>
433
  template <typename MEM, typename OBJ>
434
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj);
434
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj);
435
435
436
  /**
436
  /**
437
   * @param mem_ptr member method pointer to invoke
437
   * \param mem_ptr member method pointer to invoke
438
   * @param obj the object on which to invoke the member method
438
   * \param obj the object on which to invoke the member method
439
   * @param a1 the first argument to pass to the invoked method
439
   * \param a1 the first argument to pass to the invoked method
440
   */
440
   */
441
  template <typename MEM, typename OBJ, 
441
  template <typename MEM, typename OBJ, 
442
            typename T1>
442
            typename T1>
443
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1);
443
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1);
444
444
445
  /**
445
  /**
446
   * @param mem_ptr member method pointer to invoke
446
   * \param mem_ptr member method pointer to invoke
447
   * @param obj the object on which to invoke the member method
447
   * \param obj the object on which to invoke the member method
448
   * @param a1 the first argument to pass to the invoked method
448
   * \param a1 the first argument to pass to the invoked method
449
   * @param a2 the second argument to pass to the invoked method
449
   * \param a2 the second argument to pass to the invoked method
450
   */
450
   */
451
  template <typename MEM, typename OBJ, 
451
  template <typename MEM, typename OBJ, 
452
            typename T1, typename T2>
452
            typename T1, typename T2>
453
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2);
453
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2);
454
454
455
  /**
455
  /**
456
   * @param mem_ptr member method pointer to invoke
456
   * \param mem_ptr member method pointer to invoke
457
   * @param obj the object on which to invoke the member method
457
   * \param obj the object on which to invoke the member method
458
   * @param a1 the first argument to pass to the invoked method
458
   * \param a1 the first argument to pass to the invoked method
459
   * @param a2 the second argument to pass to the invoked method
459
   * \param a2 the second argument to pass to the invoked method
460
   * @param a3 the third argument to pass to the invoked method
460
   * \param a3 the third argument to pass to the invoked method
461
   */
461
   */
462
  template <typename MEM, typename OBJ, 
462
  template <typename MEM, typename OBJ, 
463
            typename T1, typename T2, typename T3>
463
            typename T1, typename T2, typename T3>
464
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3);
464
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3);
465
465
466
  /**
466
  /**
467
   * @param mem_ptr member method pointer to invoke
467
   * \param mem_ptr member method pointer to invoke
468
   * @param obj the object on which to invoke the member method
468
   * \param obj the object on which to invoke the member method
469
   * @param a1 the first argument to pass to the invoked method
469
   * \param a1 the first argument to pass to the invoked method
470
   * @param a2 the second argument to pass to the invoked method
470
   * \param a2 the second argument to pass to the invoked method
471
   * @param a3 the third argument to pass to the invoked method
471
   * \param a3 the third argument to pass to the invoked method
472
   * @param a4 the fourth argument to pass to the invoked method
472
   * \param a4 the fourth argument to pass to the invoked method
473
   */
473
   */
474
  template <typename MEM, typename OBJ, 
474
  template <typename MEM, typename OBJ, 
475
            typename T1, typename T2, typename T3, typename T4>
475
            typename T1, typename T2, typename T3, typename T4>
476
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj, 
476
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj, 
477
                              T1 a1, T2 a2, T3 a3, T4 a4);
477
                              T1 a1, T2 a2, T3 a3, T4 a4);
478
  /**
478
  /**
479
   * @param mem_ptr member method pointer to invoke
479
   * \param mem_ptr member method pointer to invoke
480
   * @param obj the object on which to invoke the member method
480
   * \param obj the object on which to invoke the member method
481
   * @param a1 the first argument to pass to the invoked method
481
   * \param a1 the first argument to pass to the invoked method
482
   * @param a2 the second argument to pass to the invoked method
482
   * \param a2 the second argument to pass to the invoked method
483
   * @param a3 the third argument to pass to the invoked method
483
   * \param a3 the third argument to pass to the invoked method
484
   * @param a4 the fourth argument to pass to the invoked method
484
   * \param a4 the fourth argument to pass to the invoked method
485
   * @param a5 the fifth argument to pass to the invoked method
485
   * \param a5 the fifth argument to pass to the invoked method
486
   */
486
   */
487
  template <typename MEM, typename OBJ, 
487
  template <typename MEM, typename OBJ, 
488
            typename T1, typename T2, typename T3, typename T4, typename T5>
488
            typename T1, typename T2, typename T3, typename T4, typename T5>
489
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj, 
489
  static EventId ScheduleNow (MEM mem_ptr, OBJ obj, 
490
                              T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
490
                              T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
491
  /**
491
  /**
492
   * @param f the function to invoke
492
   * \param f the function to invoke
493
   */
493
   */
494
  static EventId ScheduleNow (void (*f)(void));
494
  static EventId ScheduleNow (void (*f)(void));
495
495
496
  /**
496
  /**
497
   * @param f the function to invoke
497
   * \param f the function to invoke
498
   * @param a1 the first argument to pass to the function to invoke
498
   * \param a1 the first argument to pass to the function to invoke
499
   */
499
   */
500
  template <typename U1,
500
  template <typename U1,
501
            typename T1>
501
            typename T1>
502
  static EventId ScheduleNow (void (*f)(U1), T1 a1);
502
  static EventId ScheduleNow (void (*f)(U1), T1 a1);
503
503
504
  /**
504
  /**
505
   * @param f the function to invoke
505
   * \param f the function to invoke
506
   * @param a1 the first argument to pass to the function to invoke
506
   * \param a1 the first argument to pass to the function to invoke
507
   * @param a2 the second argument to pass to the function to invoke
507
   * \param a2 the second argument to pass to the function to invoke
508
   */
508
   */
509
  template <typename U1, typename U2,
509
  template <typename U1, typename U2,
510
            typename T1, typename T2>
510
            typename T1, typename T2>
511
  static EventId ScheduleNow (void (*f)(U1,U2), T1 a1, T2 a2);
511
  static EventId ScheduleNow (void (*f)(U1,U2), T1 a1, T2 a2);
512
512
513
  /**
513
  /**
514
   * @param f the function to invoke
514
   * \param f the function to invoke
515
   * @param a1 the first argument to pass to the function to invoke
515
   * \param a1 the first argument to pass to the function to invoke
516
   * @param a2 the second argument to pass to the function to invoke
516
   * \param a2 the second argument to pass to the function to invoke
517
   * @param a3 the third argument to pass to the function to invoke
517
   * \param a3 the third argument to pass to the function to invoke
518
   */
518
   */
519
  template <typename U1, typename U2, typename U3,
519
  template <typename U1, typename U2, typename U3,
520
            typename T1, typename T2, typename T3>
520
            typename T1, typename T2, typename T3>
521
  static EventId ScheduleNow (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3);
521
  static EventId ScheduleNow (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3);
522
522
523
  /**
523
  /**
524
   * @param f the function to invoke
524
   * \param f the function to invoke
525
   * @param a1 the first argument to pass to the function to invoke
525
   * \param a1 the first argument to pass to the function to invoke
526
   * @param a2 the second argument to pass to the function to invoke
526
   * \param a2 the second argument to pass to the function to invoke
527
   * @param a3 the third argument to pass to the function to invoke
527
   * \param a3 the third argument to pass to the function to invoke
528
   * @param a4 the fourth argument to pass to the function to invoke
528
   * \param a4 the fourth argument to pass to the function to invoke
529
   */
529
   */
530
  template <typename U1, typename U2, typename U3, typename U4,
530
  template <typename U1, typename U2, typename U3, typename U4,
531
            typename T1, typename T2, typename T3, typename T4>
531
            typename T1, typename T2, typename T3, typename T4>
532
  static EventId ScheduleNow (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4);
532
  static EventId ScheduleNow (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4);
533
533
534
  /**
534
  /**
535
   * @param f the function to invoke
535
   * \param f the function to invoke
536
   * @param a1 the first argument to pass to the function to invoke
536
   * \param a1 the first argument to pass to the function to invoke
537
   * @param a2 the second argument to pass to the function to invoke
537
   * \param a2 the second argument to pass to the function to invoke
538
   * @param a3 the third argument to pass to the function to invoke
538
   * \param a3 the third argument to pass to the function to invoke
539
   * @param a4 the fourth argument to pass to the function to invoke
539
   * \param a4 the fourth argument to pass to the function to invoke
540
   * @param a5 the fifth argument to pass to the function to invoke
540
   * \param a5 the fifth argument to pass to the function to invoke
541
   */
541
   */
542
  template <typename U1, typename U2, typename U3, typename U4, typename U5,
542
  template <typename U1, typename U2, typename U3, typename U4, typename U5,
543
            typename T1, typename T2, typename T3, typename T4, typename T5>
543
            typename T1, typename T2, typename T3, typename T4, typename T5>
 Lines 549-665    Link Here 
549
   * after all normal events have expired and only when 
549
   * after all normal events have expired and only when 
550
   * Simulator::Destroy is invoked.
550
   * Simulator::Destroy is invoked.
551
   *
551
   *
552
   * @param mem_ptr member method pointer to invoke
552
   * \param mem_ptr member method pointer to invoke
553
   * @param obj the object on which to invoke the member method
553
   * \param obj the object on which to invoke the member method
554
   */
554
   */
555
  template <typename MEM, typename OBJ>
555
  template <typename MEM, typename OBJ>
556
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj);
556
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj);
557
557
558
  /**
558
  /**
559
   * @param mem_ptr member method pointer to invoke
559
   * \param mem_ptr member method pointer to invoke
560
   * @param obj the object on which to invoke the member method
560
   * \param obj the object on which to invoke the member method
561
   * @param a1 the first argument to pass to the invoked method
561
   * \param a1 the first argument to pass to the invoked method
562
   */
562
   */
563
  template <typename MEM, typename OBJ, 
563
  template <typename MEM, typename OBJ, 
564
            typename T1>
564
            typename T1>
565
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1);
565
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1);
566
566
567
  /**
567
  /**
568
   * @param mem_ptr member method pointer to invoke
568
   * \param mem_ptr member method pointer to invoke
569
   * @param obj the object on which to invoke the member method
569
   * \param obj the object on which to invoke the member method
570
   * @param a1 the first argument to pass to the invoked method
570
   * \param a1 the first argument to pass to the invoked method
571
   * @param a2 the second argument to pass to the invoked method
571
   * \param a2 the second argument to pass to the invoked method
572
   */
572
   */
573
  template <typename MEM, typename OBJ,
573
  template <typename MEM, typename OBJ,
574
            typename T1, typename T2>
574
            typename T1, typename T2>
575
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2);
575
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2);
576
576
577
  /**
577
  /**
578
   * @param mem_ptr member method pointer to invoke
578
   * \param mem_ptr member method pointer to invoke
579
   * @param obj the object on which to invoke the member method
579
   * \param obj the object on which to invoke the member method
580
   * @param a1 the first argument to pass to the invoked method
580
   * \param a1 the first argument to pass to the invoked method
581
   * @param a2 the second argument to pass to the invoked method
581
   * \param a2 the second argument to pass to the invoked method
582
   * @param a3 the third argument to pass to the invoked method
582
   * \param a3 the third argument to pass to the invoked method
583
   */
583
   */
584
  template <typename MEM, typename OBJ, 
584
  template <typename MEM, typename OBJ, 
585
            typename T1, typename T2, typename T3>
585
            typename T1, typename T2, typename T3>
586
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3);
586
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3);
587
587
588
  /**
588
  /**
589
   * @param mem_ptr member method pointer to invoke
589
   * \param mem_ptr member method pointer to invoke
590
   * @param obj the object on which to invoke the member method
590
   * \param obj the object on which to invoke the member method
591
   * @param a1 the first argument to pass to the invoked method
591
   * \param a1 the first argument to pass to the invoked method
592
   * @param a2 the second argument to pass to the invoked method
592
   * \param a2 the second argument to pass to the invoked method
593
   * @param a3 the third argument to pass to the invoked method
593
   * \param a3 the third argument to pass to the invoked method
594
   * @param a4 the fourth argument to pass to the invoked method
594
   * \param a4 the fourth argument to pass to the invoked method
595
   */
595
   */
596
  template <typename MEM, typename OBJ, 
596
  template <typename MEM, typename OBJ, 
597
            typename T1, typename T2, typename T3, typename T4>
597
            typename T1, typename T2, typename T3, typename T4>
598
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, 
598
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, 
599
                                  T1 a1, T2 a2, T3 a3, T4 a4);
599
                                  T1 a1, T2 a2, T3 a3, T4 a4);
600
  /**
600
  /**
601
   * @param mem_ptr member method pointer to invoke
601
   * \param mem_ptr member method pointer to invoke
602
   * @param obj the object on which to invoke the member method
602
   * \param obj the object on which to invoke the member method
603
   * @param a1 the first argument to pass to the invoked method
603
   * \param a1 the first argument to pass to the invoked method
604
   * @param a2 the second argument to pass to the invoked method
604
   * \param a2 the second argument to pass to the invoked method
605
   * @param a3 the third argument to pass to the invoked method
605
   * \param a3 the third argument to pass to the invoked method
606
   * @param a4 the fourth argument to pass to the invoked method
606
   * \param a4 the fourth argument to pass to the invoked method
607
   * @param a5 the fifth argument to pass to the invoked method
607
   * \param a5 the fifth argument to pass to the invoked method
608
   */
608
   */
609
  template <typename MEM, typename OBJ, 
609
  template <typename MEM, typename OBJ, 
610
            typename T1, typename T2, typename T3, typename T4, typename T5>
610
            typename T1, typename T2, typename T3, typename T4, typename T5>
611
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, 
611
  static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, 
612
                                  T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
612
                                  T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
613
  /**
613
  /**
614
   * @param f the function to invoke
614
   * \param f the function to invoke
615
   */
615
   */
616
  static EventId ScheduleDestroy (void (*f)(void));
616
  static EventId ScheduleDestroy (void (*f)(void));
617
617
618
  /**
618
  /**
619
   * @param f the function to invoke
619
   * \param f the function to invoke
620
   * @param a1 the first argument to pass to the function to invoke
620
   * \param a1 the first argument to pass to the function to invoke
621
   */
621
   */
622
  template <typename U1,
622
  template <typename U1,
623
            typename T1>
623
            typename T1>
624
  static EventId ScheduleDestroy (void (*f)(U1), T1 a1);
624
  static EventId ScheduleDestroy (void (*f)(U1), T1 a1);
625
625
626
  /**
626
  /**
627
   * @param f the function to invoke
627
   * \param f the function to invoke
628
   * @param a1 the first argument to pass to the function to invoke
628
   * \param a1 the first argument to pass to the function to invoke
629
   * @param a2 the second argument to pass to the function to invoke
629
   * \param a2 the second argument to pass to the function to invoke
630
   */
630
   */
631
  template <typename U1, typename U2,
631
  template <typename U1, typename U2,
632
            typename T1, typename T2>
632
            typename T1, typename T2>
633
  static EventId ScheduleDestroy (void (*f)(U1,U2), T1 a1, T2 a2);
633
  static EventId ScheduleDestroy (void (*f)(U1,U2), T1 a1, T2 a2);
634
634
635
  /**
635
  /**
636
   * @param f the function to invoke
636
   * \param f the function to invoke
637
   * @param a1 the first argument to pass to the function to invoke
637
   * \param a1 the first argument to pass to the function to invoke
638
   * @param a2 the second argument to pass to the function to invoke
638
   * \param a2 the second argument to pass to the function to invoke
639
   * @param a3 the third argument to pass to the function to invoke
639
   * \param a3 the third argument to pass to the function to invoke
640
   */
640
   */
641
  template <typename U1, typename U2, typename U3,
641
  template <typename U1, typename U2, typename U3,
642
            typename T1, typename T2, typename T3>
642
            typename T1, typename T2, typename T3>
643
  static EventId ScheduleDestroy (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3);
643
  static EventId ScheduleDestroy (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3);
644
644
645
  /**
645
  /**
646
   * @param f the function to invoke
646
   * \param f the function to invoke
647
   * @param a1 the first argument to pass to the function to invoke
647
   * \param a1 the first argument to pass to the function to invoke
648
   * @param a2 the second argument to pass to the function to invoke
648
   * \param a2 the second argument to pass to the function to invoke
649
   * @param a3 the third argument to pass to the function to invoke
649
   * \param a3 the third argument to pass to the function to invoke
650
   * @param a4 the fourth argument to pass to the function to invoke
650
   * \param a4 the fourth argument to pass to the function to invoke
651
   */
651
   */
652
  template <typename U1, typename U2, typename U3, typename U4,
652
  template <typename U1, typename U2, typename U3, typename U4,
653
            typename T1, typename T2, typename T3, typename T4>
653
            typename T1, typename T2, typename T3, typename T4>
654
  static EventId ScheduleDestroy (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4);
654
  static EventId ScheduleDestroy (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4);
655
655
656
  /**
656
  /**
657
   * @param f the function to invoke
657
   * \param f the function to invoke
658
   * @param a1 the first argument to pass to the function to invoke
658
   * \param a1 the first argument to pass to the function to invoke
659
   * @param a2 the second argument to pass to the function to invoke
659
   * \param a2 the second argument to pass to the function to invoke
660
   * @param a3 the third argument to pass to the function to invoke
660
   * \param a3 the third argument to pass to the function to invoke
661
   * @param a4 the fourth argument to pass to the function to invoke
661
   * \param a4 the fourth argument to pass to the function to invoke
662
   * @param a5 the fifth argument to pass to the function to invoke
662
   * \param a5 the fifth argument to pass to the function to invoke
663
   */
663
   */
664
  template <typename U1, typename U2, typename U3, typename U4, typename U5,
664
  template <typename U1, typename U2, typename U3, typename U4, typename U5,
665
            typename T1, typename T2, typename T3, typename T4, typename T5>
665
            typename T1, typename T2, typename T3, typename T4, typename T5>
 Lines 674-680    Link Here 
674
   * Note that it is not possible to remove events which were scheduled
674
   * Note that it is not possible to remove events which were scheduled
675
   * for the "destroy" time. Doing so will result in a program error (crash).
675
   * for the "destroy" time. Doing so will result in a program error (crash).
676
   *
676
   *
677
   * @param id the event to remove from the list of scheduled events.
677
   * \param id the event to remove from the list of scheduled events.
678
   */
678
   */
679
  static void Remove (const EventId &id);
679
  static void Remove (const EventId &id);
680
680
 Lines 688-694    Link Here 
688
   * Note that it is not possible to cancel events which were scheduled
688
   * Note that it is not possible to cancel events which were scheduled
689
   * for the "destroy" time. Doing so will result in a program error (crash).
689
   * for the "destroy" time. Doing so will result in a program error (crash).
690
   * 
690
   * 
691
   * @param id the event to cancel
691
   * \param id the event to cancel
692
   */
692
   */
693
  static void Cancel (const EventId &id);
693
  static void Cancel (const EventId &id);
694
694
 Lines 701-708    Link Here 
701
   * which means that if the code executed by the event calls
701
   * which means that if the code executed by the event calls
702
   * this function, it will get true.
702
   * this function, it will get true.
703
   *
703
   *
704
   * @param id the event to test for expiration
704
   * \param id the event to test for expiration
705
   * @returns true if the event has expired, false otherwise.
705
   * \returns true if the event has expired, false otherwise.
706
   */
706
   */
707
  static bool IsExpired (const EventId &id);
707
  static bool IsExpired (const EventId &id);
708
708
(-)a/src/core/model/synchronizer.h (-81 / +81 lines)
 Lines 26-32    Link Here 
26
namespace ns3 {
26
namespace ns3 {
27
27
28
/**
28
/**
29
 * @brief Base class used for synchronizing the simulation events to some
29
 * \brief Base class used for synchronizing the simulation events to some
30
 * real time "wall clock."
30
 * real time "wall clock."
31
 *
31
 *
32
 * The simulation clock is maintained as a 64-bit integer in a unit specified
32
 * The simulation clock is maintained as a 64-bit integer in a unit specified
 Lines 50-73    Link Here 
50
  virtual ~Synchronizer ();
50
  virtual ~Synchronizer ();
51
51
52
/**
52
/**
53
 * @brief Return true if this synchronizer is actually synchronizing to a
53
 * \brief Return true if this synchronizer is actually synchronizing to a
54
 * realtime clock.  The simulator sometimes needs to know this.
54
 * realtime clock.  The simulator sometimes needs to know this.
55
 * @returns True if locked with realtime, false if not.
55
 * \returns True if locked with realtime, false if not.
56
 */
56
 */
57
  bool Realtime (void);
57
  bool Realtime (void);
58
58
59
/**
59
/**
60
 * @brief Retrieve the value of the origin of the underlying normalized wall
60
 * \brief Retrieve the value of the origin of the underlying normalized wall
61
 * clock time in simulator timestep units.
61
 * clock time in simulator timestep units.
62
 *
62
 *
63
 * @returns The normalized wall clock time (in simulator timestep units).
63
 * \returns The normalized wall clock time (in simulator timestep units).
64
 * @see TimeStepPrecision::Get
64
 * \see TimeStepPrecision::Get
65
 * @see Synchronizer::SetOrigin
65
 * \see Synchronizer::SetOrigin
66
 */
66
 */
67
  uint64_t GetCurrentRealtime (void);
67
  uint64_t GetCurrentRealtime (void);
68
68
69
/**
69
/**
70
 * @brief Establish a correspondence between a simulation time and the
70
 * \brief Establish a correspondence between a simulation time and the
71
 * synchronizer real time.
71
 * synchronizer real time.
72
 *
72
 *
73
 * This method is expected to be called at the "instant" before simulation
73
 * This method is expected to be called at the "instant" before simulation
 Lines 80-120    Link Here 
80
 * virtual method to do the actual real-time-clock-specific work of making the 
80
 * virtual method to do the actual real-time-clock-specific work of making the 
81
 * correspondence mentioned above.
81
 * correspondence mentioned above.
82
 *
82
 *
83
 * @param ts The simulation time we should use as the origin (in simulator
83
 * \param ts The simulation time we should use as the origin (in simulator
84
 * timestep units).
84
 * timestep units).
85
 * @see TimeStepPrecision::Get
85
 * \see TimeStepPrecision::Get
86
 * @see TimeStepPrecision::DoSetOrigin
86
 * \see TimeStepPrecision::DoSetOrigin
87
 */
87
 */
88
  void SetOrigin (uint64_t ts);
88
  void SetOrigin (uint64_t ts);
89
89
90
/**
90
/**
91
 * @brief Retrieve the value of the origin of the simulation time in 
91
 * \brief Retrieve the value of the origin of the simulation time in 
92
 * simulator timestep units.
92
 * simulator timestep units.
93
 *
93
 *
94
 * @returns The simulation time used as the origin (in simulator timestep
94
 * \returns The simulation time used as the origin (in simulator timestep
95
 * units).
95
 * units).
96
 * @see TimeStepPrecision::Get
96
 * \see TimeStepPrecision::Get
97
 * @see Synchronizer::SetOrigin
97
 * \see Synchronizer::SetOrigin
98
 */
98
 */
99
  uint64_t GetOrigin (void);
99
  uint64_t GetOrigin (void);
100
100
101
/**
101
/**
102
 * @brief Retrieve the difference between the real time clock used to 
102
 * \brief Retrieve the difference between the real time clock used to 
103
 * synchronize the simulation and the simulation time (in simulator timestep
103
 * synchronize the simulation and the simulation time (in simulator timestep
104
 * units).
104
 * units).
105
 *
105
 *
106
 * @param ts Simulation timestep from the simulator interpreted as current time
106
 * \param ts Simulation timestep from the simulator interpreted as current time
107
 * in the simulator.
107
 * in the simulator.
108
 * @returns Simulation timestep (in simulator timestep units) minus origin 
108
 * \returns Simulation timestep (in simulator timestep units) minus origin 
109
 * time (stored internally in nanosecond units).
109
 * time (stored internally in nanosecond units).
110
 * @see TimeStepPrecision::Get
110
 * \see TimeStepPrecision::Get
111
 * @see Synchronizer::SetOrigin
111
 * \see Synchronizer::SetOrigin
112
 * @see Synchronizer::DoGetDrift
112
 * \see Synchronizer::DoGetDrift
113
 */
113
 */
114
  int64_t GetDrift (uint64_t ts);
114
  int64_t GetDrift (uint64_t ts);
115
115
116
/**
116
/**
117
 * @brief Wait until the real time is in sync with the specified simulation
117
 * \brief Wait until the real time is in sync with the specified simulation
118
 * time or until the synchronizer is Sigalled.
118
 * time or until the synchronizer is Sigalled.
119
 *
119
 *
120
 * This is where the real work of synchronization is done.  The Time passed
120
 * This is where the real work of synchronization is done.  The Time passed
 Lines 128-189    Link Here 
128
 * (either busy-waiting or sleeping, or some combination thereof) until the
128
 * (either busy-waiting or sleeping, or some combination thereof) until the
129
 * requested simulation time.
129
 * requested simulation time.
130
 *
130
 *
131
 * @param tsCurrent The current simulation time (in simulator timestep units).
131
 * \param tsCurrent The current simulation time (in simulator timestep units).
132
 * @param tsDelay The simulation time we need to wait for (in simulator
132
 * \param tsDelay The simulation time we need to wait for (in simulator
133
 * timestep units).
133
 * timestep units).
134
 * @returns True if the function ran to completion, false if it was interrupted
134
 * \returns True if the function ran to completion, false if it was interrupted
135
 * by a Signal.
135
 * by a Signal.
136
 * @see TimeStepPrecision::Get
136
 * \see TimeStepPrecision::Get
137
 * @see Synchronizer::DoSynchronize
137
 * \see Synchronizer::DoSynchronize
138
 * @see Synchronizer::Signal
138
 * \see Synchronizer::Signal
139
 */
139
 */
140
  bool Synchronize (uint64_t tsCurrent, uint64_t tsDelay);
140
  bool Synchronize (uint64_t tsCurrent, uint64_t tsDelay);
141
141
142
/**
142
/**
143
 * @brief Tell a possible simulator thread waiting in the Synchronize method
143
 * \brief Tell a possible simulator thread waiting in the Synchronize method
144
 * that an event has happened which demands a reevaluation of the wait time.
144
 * that an event has happened which demands a reevaluation of the wait time.
145
 * This will cause the thread to wake and return to the simulator proper
145
 * This will cause the thread to wake and return to the simulator proper
146
 * where it can get its bearings.
146
 * where it can get its bearings.
147
 *
147
 *
148
 * @see Synchronizer::Synchronize
148
 * \see Synchronizer::Synchronize
149
 * @see Synchronizer::DoSignal
149
 * \see Synchronizer::DoSignal
150
 */
150
 */
151
  void Signal (void);
151
  void Signal (void);
152
152
153
/**
153
/**
154
 * @brief Set the condition variable that tells a possible simulator thread 
154
 * \brief Set the condition variable that tells a possible simulator thread 
155
 * waiting in the Synchronize method that an event has happened which demands
155
 * waiting in the Synchronize method that an event has happened which demands
156
 * a reevaluation of the wait time.
156
 * a reevaluation of the wait time.
157
 *
157
 *
158
 * @see Synchronizer::Signal
158
 * \see Synchronizer::Signal
159
 */
159
 */
160
  void SetCondition (bool);
160
  void SetCondition (bool);
161
161
162
/**
162
/**
163
 * @brief Ask the synchronizer to remember what time it is.  Typically used
163
 * \brief Ask the synchronizer to remember what time it is.  Typically used
164
 * with EventEnd to determine the real execution time of a simulation event.
164
 * with EventEnd to determine the real execution time of a simulation event.
165
 *
165
 *
166
 * @see Synchronizer::EventEnd
166
 * \see Synchronizer::EventEnd
167
 * @see TimeStepPrecision::Get
167
 * \see TimeStepPrecision::Get
168
 */
168
 */
169
  void EventStart (void);
169
  void EventStart (void);
170
170
171
/**
171
/**
172
 * @brief Ask the synchronizer to return the time step between the instant
172
 * \brief Ask the synchronizer to return the time step between the instant
173
 * remembered during EventStart and now.  Used in conjunction with EventStart
173
 * remembered during EventStart and now.  Used in conjunction with EventStart
174
 * to determine the real execution time of a simulation event.
174
 * to determine the real execution time of a simulation event.
175
 *
175
 *
176
 * @see Synchronizer::EventStart
176
 * \see Synchronizer::EventStart
177
 * @see TimeStepPrecision::Get
177
 * \see TimeStepPrecision::Get
178
 */
178
 */
179
  uint64_t EventEnd (void);
179
  uint64_t EventEnd (void);
180
180
181
protected:
181
protected:
182
/**
182
/**
183
 * @brief Establish a correspondence between a simulation time and a 
183
 * \brief Establish a correspondence between a simulation time and a 
184
 * wall-clock (real) time.
184
 * wall-clock (real) time.
185
 *
185
 *
186
 * @internal
186
 * \internal
187
 *
187
 *
188
 * There are three timelines involved here:  the simulation time, the 
188
 * There are three timelines involved here:  the simulation time, the 
189
 * (absolute) wall-clock time and the (relative) synchronizer real time.
189
 * (absolute) wall-clock time and the (relative) synchronizer real time.
 Lines 201-246    Link Here 
201
 * for example, this is where the differences between Time parameters and
201
 * for example, this is where the differences between Time parameters and
202
 * parameters to clock_nanosleep would be dealt with. 
202
 * parameters to clock_nanosleep would be dealt with. 
203
 *
203
 *
204
 * @param ns The simulation time we need to use as the origin (normalized to
204
 * \param ns The simulation time we need to use as the origin (normalized to
205
 * nanosecond units).
205
 * nanosecond units).
206
 * @see Synchronizer::SetOrigin
206
 * \see Synchronizer::SetOrigin
207
 * @see TimeStepPrecision::Get
207
 * \see TimeStepPrecision::Get
208
 */
208
 */
209
  virtual void DoSetOrigin (uint64_t ns) = 0;
209
  virtual void DoSetOrigin (uint64_t ns) = 0;
210
210
211
/**
211
/**
212
 * @brief Return true if this synchronizer is actually synchronizing to a
212
 * \brief Return true if this synchronizer is actually synchronizing to a
213
 * realtime clock.  The simulator sometimes needs to know this.
213
 * realtime clock.  The simulator sometimes needs to know this.
214
 *
214
 *
215
 * @internal
215
 * \internal
216
 *
216
 *
217
 * Subclasses are expected to implement this method to tell the outside world
217
 * Subclasses are expected to implement this method to tell the outside world
218
 * whether or not they are synchronizing to a realtime clock.
218
 * whether or not they are synchronizing to a realtime clock.
219
 *
219
 *
220
 * @returns True if locked with realtime, false if not.
220
 * \returns True if locked with realtime, false if not.
221
 */
221
 */
222
  virtual bool DoRealtime (void) = 0;
222
  virtual bool DoRealtime (void) = 0;
223
223
224
/**
224
/**
225
 * @brief Retrieve the value of the origin of the underlying normalized wall
225
 * \brief Retrieve the value of the origin of the underlying normalized wall
226
 * clock time in simulator timestep units.
226
 * clock time in simulator timestep units.
227
 *
227
 *
228
 * @internal
228
 * \internal
229
 *
229
 *
230
 * Subclasses are expected to implement this method to do the actual
230
 * Subclasses are expected to implement this method to do the actual
231
 * real-time-clock-specific work of getting the current time.
231
 * real-time-clock-specific work of getting the current time.
232
 *
232
 *
233
 * @returns The normalized wall clock time (in nanosecond units).
233
 * \returns The normalized wall clock time (in nanosecond units).
234
 * @see TimeStepPrecision::Get
234
 * \see TimeStepPrecision::Get
235
 * @see Synchronizer::SetOrigin
235
 * \see Synchronizer::SetOrigin
236
 */
236
 */
237
  virtual uint64_t DoGetCurrentRealtime (void) = 0;
237
  virtual uint64_t DoGetCurrentRealtime (void) = 0;
238
238
239
/**
239
/**
240
 * @brief Wait until the real time is in sync with the specified simulation
240
 * \brief Wait until the real time is in sync with the specified simulation
241
 * time.
241
 * time.
242
 *
242
 *
243
 * @internal
243
 * \internal
244
 *
244
 *
245
 * This is where the real work of synchronization is done.  The Time passed
245
 * This is where the real work of synchronization is done.  The Time passed
246
 * in as a parameter is the simulation time.  The job of Synchronize is to
246
 * in as a parameter is the simulation time.  The job of Synchronize is to
 Lines 252-299    Link Here 
252
 * real-time-clock-specific work of waiting (either busy-waiting or sleeping,
252
 * real-time-clock-specific work of waiting (either busy-waiting or sleeping,
253
 * or some combination) until the requested simulation time.
253
 * or some combination) until the requested simulation time.
254
 *
254
 *
255
 * @param nsCurrent The current simulation time (normalized to nanosecond
255
 * \param nsCurrent The current simulation time (normalized to nanosecond
256
 * units).
256
 * units).
257
 * @param nsDelay The simulation time we need to wait for (normalized to 
257
 * \param nsDelay The simulation time we need to wait for (normalized to 
258
 * nanosecond units).
258
 * nanosecond units).
259
 * @returns True if the function ran to completion, false if it was interrupted
259
 * \returns True if the function ran to completion, false if it was interrupted
260
 * by a Signal.
260
 * by a Signal.
261
 * @see Synchronizer::Synchronize
261
 * \see Synchronizer::Synchronize
262
 * @see TimeStepPrecision::Get
262
 * \see TimeStepPrecision::Get
263
 * @see Synchronizer::Signal
263
 * \see Synchronizer::Signal
264
 */
264
 */
265
  virtual bool DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay) = 0;
265
  virtual bool DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay) = 0;
266
266
267
/**
267
/**
268
 * @brief Declaration of the method used to tell a possible simulator thread 
268
 * \brief Declaration of the method used to tell a possible simulator thread 
269
 * waiting in the DoSynchronize method that an event has happened which
269
 * waiting in the DoSynchronize method that an event has happened which
270
 * demands a reevaluation of the wait time.
270
 * demands a reevaluation of the wait time.
271
 *
271
 *
272
 * @see Synchronizer::Signal
272
 * \see Synchronizer::Signal
273
 */
273
 */
274
  virtual void DoSignal (void) = 0;
274
  virtual void DoSignal (void) = 0;
275
275
276
/**
276
/**
277
 * @brief Declaration of the method used to set the condition variable that 
277
 * \brief Declaration of the method used to set the condition variable that 
278
 * tells a possible simulator thread waiting in the Synchronize method that an
278
 * tells a possible simulator thread waiting in the Synchronize method that an
279
 * event has happened which demands a reevaluation of the wait time.
279
 * event has happened which demands a reevaluation of the wait time.
280
 *
280
 *
281
 * @see Synchronizer::SetCondition
281
 * \see Synchronizer::SetCondition
282
 */
282
 */
283
  virtual void DoSetCondition (bool) = 0;
283
  virtual void DoSetCondition (bool) = 0;
284
284
285
/**
285
/**
286
 * @brief Declaration of method used to retrieve drift between the real time
286
 * \brief Declaration of method used to retrieve drift between the real time
287
 * clock used to synchronize the simulation and the current simulation time.
287
 * clock used to synchronize the simulation and the current simulation time.
288
 *
288
 *
289
 * @internal
289
 * \internal
290
 *
290
 *
291
 * @param ns Simulation timestep from the simulator normalized to nanosecond 
291
 * \param ns Simulation timestep from the simulator normalized to nanosecond 
292
 * steps.
292
 * steps.
293
 * @returns Drift in nanosecond units.
293
 * \returns Drift in nanosecond units.
294
 * @see TimeStepPrecision::Get
294
 * \see TimeStepPrecision::Get
295
 * @see Synchronizer::SetOrigin
295
 * \see Synchronizer::SetOrigin
296
 * @see Synchronizer::GetDrift
296
 * \see Synchronizer::GetDrift
297
 */
297
 */
298
  virtual int64_t DoGetDrift (uint64_t ns) = 0;
298
  virtual int64_t DoGetDrift (uint64_t ns) = 0;
299
299
 Lines 305-330    Link Here 
305
305
306
private:
306
private:
307
/**
307
/**
308
 * @brief Convert a simulator time step (which can be steps of time in a 
308
 * \brief Convert a simulator time step (which can be steps of time in a 
309
 * user-specified unit) to a normalized time step in nanosecond units.
309
 * user-specified unit) to a normalized time step in nanosecond units.
310
 *
310
 *
311
 * @internal
311
 * \internal
312
 *
312
 *
313
 * @param ts The simulation time step to be normalized.
313
 * \param ts The simulation time step to be normalized.
314
 * @returns The simulation time step normalized to nanosecond units.
314
 * \returns The simulation time step normalized to nanosecond units.
315
 * @see TimeStepPrecision::Get
315
 * \see TimeStepPrecision::Get
316
 */
316
 */
317
  uint64_t TimeStepToNanosecond (uint64_t ts);
317
  uint64_t TimeStepToNanosecond (uint64_t ts);
318
318
319
/**
319
/**
320
 * @brief Convert a normalized nanosecond count into a simulator time step
320
 * \brief Convert a normalized nanosecond count into a simulator time step
321
 * (which can be steps of time in a user-specified unit).
321
 * (which can be steps of time in a user-specified unit).
322
 *
322
 *
323
 * @internal
323
 * \internal
324
 *
324
 *
325
 * @param ns The nanosecond count step to be converted
325
 * \param ns The nanosecond count step to be converted
326
 * @returns The simulation time step to be interpreted in appropriate units.
326
 * \returns The simulation time step to be interpreted in appropriate units.
327
 * @see TimeStepPrecision::Get
327
 * \see TimeStepPrecision::Get
328
 */
328
 */
329
  uint64_t NanosecondToTimeStep (uint64_t ns);
329
  uint64_t NanosecondToTimeStep (uint64_t ns);
330
};
330
};
(-)a/src/core/model/system-condition.h (-1 / +1 lines)
 Lines 26-32    Link Here 
26
class SystemConditionPrivate;
26
class SystemConditionPrivate;
27
27
28
/**
28
/**
29
 * @brief A class which provides a relatively platform-independent 
29
 * \brief A class which provides a relatively platform-independent 
30
 * conditional-wait thread synchronization primitive.
30
 * conditional-wait thread synchronization primitive.
31
 *
31
 *
32
 * It is often desirable to have a mechanism by which a thread can suspend its
32
 * It is often desirable to have a mechanism by which a thread can suspend its
(-)a/src/core/model/system-mutex.h (-4 / +4 lines)
 Lines 28-34    Link Here 
28
class SystemMutexPrivate;
28
class SystemMutexPrivate;
29
29
30
/**
30
/**
31
 * @brief A class which provides a relatively platform-independent Mutual
31
 * \brief A class which provides a relatively platform-independent Mutual
32
 * Exclusion thread synchronization primitive.
32
 * Exclusion thread synchronization primitive.
33
 *
33
 *
34
 * When more than one thread needs to access a shared resource (data structure
34
 * When more than one thread needs to access a shared resource (data structure
 Lines 45-51    Link Here 
45
 * SystemThread, the calling SystemThread is blocked until the current owner
45
 * SystemThread, the calling SystemThread is blocked until the current owner
46
 * releases the SystemMutex by calling Unlock.
46
 * releases the SystemMutex by calling Unlock.
47
 *
47
 *
48
 * @see CriticalSection
48
 * \see CriticalSection
49
 */
49
 */
50
class SystemMutex 
50
class SystemMutex 
51
{
51
{
 Lines 68-74    Link Here 
68
};
68
};
69
69
70
/**
70
/**
71
 * @brief A class which provides a simple way to implement a Critical Section.
71
 * \brief A class which provides a simple way to implement a Critical Section.
72
 *
72
 *
73
 * When more than one SystemThread needs to access a shared resource, we
73
 * When more than one SystemThread needs to access a shared resource, we
74
 * control access by acquiring a SystemMutex.  The CriticalSection class uses
74
 * control access by acquiring a SystemMutex.  The CriticalSection class uses
 Lines 104-110    Link Here 
104
 * The critical section is exited when the CriticalSection object goes out of
104
 * The critical section is exited when the CriticalSection object goes out of
105
 * scope at the end of block.
105
 * scope at the end of block.
106
 *
106
 *
107
 * @see SystemMutex
107
 * \see SystemMutex
108
 */
108
 */
109
class CriticalSection
109
class CriticalSection
110
{
110
{
(-)a/src/core/model/system-thread.h (-15 / +15 lines)
 Lines 28-34    Link Here 
28
class SystemThreadImpl;
28
class SystemThreadImpl;
29
29
30
/**
30
/**
31
 * @brief A class which provides a relatively platform-independent thread
31
 * \brief A class which provides a relatively platform-independent thread
32
 * primitive.
32
 * primitive.
33
 *
33
 *
34
 * This class allows for creation of multiple threads of execution in a
34
 * This class allows for creation of multiple threads of execution in a
 Lines 46-52    Link Here 
46
{
46
{
47
public:
47
public:
48
  /**
48
  /**
49
   * @brief Create a SystemThread object.
49
   * \brief Create a SystemThread object.
50
   *
50
   *
51
   * A system thread object is not created running.  A thread of execution
51
   * A system thread object is not created running.  A thread of execution
52
   * must be explicitly started by calling the Start method.  When the 
52
   * must be explicitly started by calling the Start method.  When the 
 Lines 92-104    Link Here 
92
   * method provided to do this is Join (). If you call Join() you will block
92
   * method provided to do this is Join (). If you call Join() you will block
93
   * until the SystemThread run method returns.
93
   * until the SystemThread run method returns.
94
   *
94
   *
95
   * @param callback entry point of the thread
95
   * \param callback entry point of the thread
96
   * 
96
   * 
97
   * @warning The SystemThread uses SIGALRM to wake threads that are possibly
97
   * \warning The SystemThread uses SIGALRM to wake threads that are possibly
98
   * blocked on IO.
98
   * blocked on IO.
99
   * @see Shutdown
99
   * \see Shutdown
100
   *
100
   *
101
   * @warning I've made the system thread class look like a normal ns3 object
101
   * \warning I've made the system thread class look like a normal ns3 object
102
   * with smart pointers, and living in the heap.  This makes it very easy to
102
   * with smart pointers, and living in the heap.  This makes it very easy to
103
   * manage threads from a single master thread context.  You should be very
103
   * manage threads from a single master thread context.  You should be very
104
   * aware though that I have not made Ptr multithread safe!  This means that
104
   * aware though that I have not made Ptr multithread safe!  This means that
 Lines 110-133    Link Here 
110
  SystemThread(Callback<void> callback);
110
  SystemThread(Callback<void> callback);
111
111
112
  /**
112
  /**
113
   * @brief Destroy a SystemThread object.
113
   * \brief Destroy a SystemThread object.
114
   *
114
   *
115
   */
115
   */
116
  ~SystemThread();
116
  ~SystemThread();
117
117
118
  /**
118
  /**
119
   * @brief Start a thread of execution, running the provided callback.
119
   * \brief Start a thread of execution, running the provided callback.
120
   */
120
   */
121
  void Start (void);
121
  void Start (void);
122
122
123
  /**
123
  /**
124
   * @brief Suspend the caller until the thread of execution, running the 
124
   * \brief Suspend the caller until the thread of execution, running the 
125
   * provided callback, finishes.
125
   * provided callback, finishes.
126
   */
126
   */
127
  void Join (void);
127
  void Join (void);
128
128
129
  /**
129
  /**
130
   * @brief Indicates to a managed thread doing cooperative multithreading that
130
   * \brief Indicates to a managed thread doing cooperative multithreading that
131
   * its managing thread wants it to exit.
131
   * its managing thread wants it to exit.
132
   *
132
   *
133
   * It is often the case that we want a thread to be off doing work until such
133
   * It is often the case that we want a thread to be off doing work until such
 Lines 142-155    Link Here 
142
   * read somehow.  This method also provides that functionality, by sending a
142
   * read somehow.  This method also provides that functionality, by sending a
143
   * SIGALRM signal to the possibly blocked thread.
143
   * SIGALRM signal to the possibly blocked thread.
144
   *
144
   *
145
   * @warning Uses SIGALRM to notify threads possibly blocked on IO.  Beware
145
   * \warning Uses SIGALRM to notify threads possibly blocked on IO.  Beware
146
   * if you are using signals.
146
   * if you are using signals.
147
   * @see Break
147
   * \see Break
148
   */
148
   */
149
  void Shutdown (void);
149
  void Shutdown (void);
150
150
151
  /**
151
  /**
152
   * @brief Indicates to a thread doing cooperative multithreading that
152
   * \brief Indicates to a thread doing cooperative multithreading that
153
   * its managing thread wants it to exit.
153
   * its managing thread wants it to exit.
154
   *
154
   *
155
   * It is often the case that we want a thread to be off doing work until such
155
   * It is often the case that we want a thread to be off doing work until such
 Lines 158-165    Link Here 
158
   * Typically, the worker thread is running in a forever-loop, and will need to
158
   * Typically, the worker thread is running in a forever-loop, and will need to
159
   * "break" out of that loop to exit -- thus the name.
159
   * "break" out of that loop to exit -- thus the name.
160
   *
160
   *
161
   * @see Shutdown
161
   * \see Shutdown
162
   * @returns true if thread is expected to exit (break out of the forever-loop)
162
   * \returns true if thread is expected to exit (break out of the forever-loop)
163
   */
163
   */
164
  bool Break (void);
164
  bool Break (void);
165
165
(-)a/src/core/model/test.h (-1 / +1 lines)
 Lines 937-943    Link Here 
937
{
937
{
938
public:
938
public:
939
  /**
939
  /**
940
   * \enum TestType
940
   * \enum Type
941
   * \brief Type of test.
941
   * \brief Type of test.
942
   */
942
   */
943
  enum Type {
943
  enum Type {
(-)a/src/core/model/wall-clock-synchronizer.h (-23 / +23 lines)
 Lines 25-31    Link Here 
25
namespace ns3 {
25
namespace ns3 {
26
26
27
/**
27
/**
28
 * @brief Class used for synchronizing the simulation events to a real-time
28
 * \brief Class used for synchronizing the simulation events to a real-time
29
 * "wall clock" using Posix Clock functions.
29
 * "wall clock" using Posix Clock functions.
30
 *
30
 *
31
 * Enable this synchronizer using:
31
 * Enable this synchronizer using:
 Lines 71-108    Link Here 
71
71
72
protected:
72
protected:
73
/**
73
/**
74
 * @brief Return true if this synchronizer is actually synchronizing to a
74
 * \brief Return true if this synchronizer is actually synchronizing to a
75
 * realtime clock.  The simulator sometimes needs to know this.
75
 * realtime clock.  The simulator sometimes needs to know this.
76
 *
76
 *
77
 * @internal
77
 * \internal
78
 *
78
 *
79
 * Subclasses are expected to implement this method to tell the outside world
79
 * Subclasses are expected to implement this method to tell the outside world
80
 * whether or not they are synchronizing to a realtime clock.
80
 * whether or not they are synchronizing to a realtime clock.
81
 *
81
 *
82
 * @returns True if locked with realtime, false if not.
82
 * \returns True if locked with realtime, false if not.
83
 */
83
 */
84
  virtual bool DoRealtime (void);
84
  virtual bool DoRealtime (void);
85
85
86
/**
86
/**
87
 * @brief Retrieve the value of the origin of the underlying normalized wall
87
 * \brief Retrieve the value of the origin of the underlying normalized wall
88
 * clock time in nanosecond units.
88
 * clock time in nanosecond units.
89
 *
89
 *
90
 * @internal
90
 * \internal
91
 *
91
 *
92
 * Subclasses are expected to implement this method to do the actual
92
 * Subclasses are expected to implement this method to do the actual
93
 * real-time-clock-specific work of getting the current time.
93
 * real-time-clock-specific work of getting the current time.
94
 *
94
 *
95
 * @returns The normalized wall clock time (in nanosecond units).
95
 * \returns The normalized wall clock time (in nanosecond units).
96
 * @see TimeStepPrecision::Get
96
 * \see TimeStepPrecision::Get
97
 * @see Synchronizer::SetOrigin
97
 * \see Synchronizer::SetOrigin
98
 */
98
 */
99
  virtual uint64_t DoGetCurrentRealtime (void);
99
  virtual uint64_t DoGetCurrentRealtime (void);
100
100
101
/**
101
/**
102
 * @brief Establish a correspondence between a simulation time and a 
102
 * \brief Establish a correspondence between a simulation time and a 
103
 * wall-clock (real) time.
103
 * wall-clock (real) time.
104
 *
104
 *
105
 * @internal
105
 * \internal
106
 *
106
 *
107
 * There are three timelines involved here:  the simulation time, the 
107
 * There are three timelines involved here:  the simulation time, the 
108
 * (absolute) wall-clock time and the (relative) synchronizer real time.
108
 * (absolute) wall-clock time and the (relative) synchronizer real time.
 Lines 120-150    Link Here 
120
 * for example, this is where the differences between Time parameters and
120
 * for example, this is where the differences between Time parameters and
121
 * parameters to clock_nanosleep would be dealt with. 
121
 * parameters to clock_nanosleep would be dealt with. 
122
 *
122
 *
123
 * @param ns The simulation time we need to use as the origin (normalized to
123
 * \param ns The simulation time we need to use as the origin (normalized to
124
 * nanosecond units).
124
 * nanosecond units).
125
 */
125
 */
126
  virtual void DoSetOrigin (uint64_t ns);
126
  virtual void DoSetOrigin (uint64_t ns);
127
127
128
/**
128
/**
129
 * @brief Declaration of method used to retrieve drift between the real time
129
 * \brief Declaration of method used to retrieve drift between the real time
130
 * clock used to synchronize the simulation and the current simulation time.
130
 * clock used to synchronize the simulation and the current simulation time.
131
 *
131
 *
132
 * @internal
132
 * \internal
133
 *
133
 *
134
 * @param ns Simulation timestep from the simulator normalized to nanosecond 
134
 * \param ns Simulation timestep from the simulator normalized to nanosecond 
135
 * steps.
135
 * steps.
136
 * @returns Drift in nanosecond units.
136
 * \returns Drift in nanosecond units.
137
 * @see TimeStepPrecision::Get
137
 * \see TimeStepPrecision::Get
138
 * @see Synchronizer::SetOrigin
138
 * \see Synchronizer::SetOrigin
139
 * @see Synchronizer::GetDrift
139
 * \see Synchronizer::GetDrift
140
 */
140
 */
141
  virtual int64_t DoGetDrift (uint64_t ns);
141
  virtual int64_t DoGetDrift (uint64_t ns);
142
142
143
/**
143
/**
144
 * @brief Wait until the real time is in sync with the specified simulation
144
 * \brief Wait until the real time is in sync with the specified simulation
145
 * time.
145
 * time.
146
 *
146
 *
147
 * @internal
147
 * \internal
148
 *
148
 *
149
 * This is where the real work of synchronization is done.  The Time passed
149
 * This is where the real work of synchronization is done.  The Time passed
150
 * in as a parameter is the simulation time.  The job of Synchronize is to
150
 * in as a parameter is the simulation time.  The job of Synchronize is to
 Lines 156-164    Link Here 
156
 * real-time-clock-specific work of waiting (either busy-waiting or sleeping,
156
 * real-time-clock-specific work of waiting (either busy-waiting or sleeping,
157
 * or some combination) until the requested simulation time.
157
 * or some combination) until the requested simulation time.
158
 *
158
 *
159
 * @param ns The simulation time we need to wait for (normalized to nanosecond
159
 * \param ns The simulation time we need to wait for (normalized to nanosecond
160
 * units).
160
 * units).
161
 * @see TimeStepPrecision::Get
161
 * \see TimeStepPrecision::Get
162
 */
162
 */
163
  virtual bool DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay);
163
  virtual bool DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay);
164
  virtual void DoSignal (void);
164
  virtual void DoSignal (void);
(-)a/src/dsdv/model/dsdv-packet-queue.h (-20 / +20 lines)
 Lines 47-53    Link Here 
47
public:
47
public:
48
  typedef Ipv4RoutingProtocol::UnicastForwardCallback UnicastForwardCallback;
48
  typedef Ipv4RoutingProtocol::UnicastForwardCallback UnicastForwardCallback;
49
  typedef Ipv4RoutingProtocol::ErrorCallback ErrorCallback;
49
  typedef Ipv4RoutingProtocol::ErrorCallback ErrorCallback;
50
  // / c-tor
50
  /// c-tor
51
  QueueEntry (Ptr<const Packet> pa = 0, Ipv4Header const & h = Ipv4Header (),
51
  QueueEntry (Ptr<const Packet> pa = 0, Ipv4Header const & h = Ipv4Header (),
52
              UnicastForwardCallback ucb = UnicastForwardCallback (),
52
              UnicastForwardCallback ucb = UnicastForwardCallback (),
53
              ErrorCallback ecb = ErrorCallback ())
53
              ErrorCallback ecb = ErrorCallback ())
 Lines 67-73    Link Here 
67
  {
67
  {
68
    return ((m_packet == o.m_packet) && (m_header.GetDestination () == o.m_header.GetDestination ()) && (m_expire == o.m_expire));
68
    return ((m_packet == o.m_packet) && (m_header.GetDestination () == o.m_header.GetDestination ()) && (m_expire == o.m_expire));
69
  }
69
  }
70
  // /\name Fields
70
  ///\name Fields
71
  // \{
71
  // \{
72
  UnicastForwardCallback GetUnicastForwardCallback () const
72
  UnicastForwardCallback GetUnicastForwardCallback () const
73
  {
73
  {
 Lines 111-125    Link Here 
111
  }
111
  }
112
  // \}
112
  // \}
113
private:
113
private:
114
  // / Data packet
114
  /// Data packet
115
  Ptr<const Packet> m_packet;
115
  Ptr<const Packet> m_packet;
116
  // / IP header
116
  /// IP header
117
  Ipv4Header m_header;
117
  Ipv4Header m_header;
118
  // / Unicast forward callback
118
  /// Unicast forward callback
119
  UnicastForwardCallback m_ucb;
119
  UnicastForwardCallback m_ucb;
120
  // / Error callback
120
  /// Error callback
121
  ErrorCallback m_ecb;
121
  ErrorCallback m_ecb;
122
  // / Expire time for queue entry
122
  /// Expire time for queue entry
123
  Time m_expire;
123
  Time m_expire;
124
};
124
};
125
/**
125
/**
 Lines 133-156    Link Here 
133
class PacketQueue
133
class PacketQueue
134
{
134
{
135
public:
135
public:
136
  // / Default c-tor
136
  /// Default c-tor
137
  PacketQueue ()
137
  PacketQueue ()
138
  {
138
  {
139
  }
139
  }
140
  // / Push entry in queue, if there is no entry with the same packet and destination address in queue.
140
  /// Push entry in queue, if there is no entry with the same packet and destination address in queue.
141
  bool Enqueue (QueueEntry & entry);
141
  bool Enqueue (QueueEntry & entry);
142
  // / Return first found (the earliest) entry for given destination
142
  /// Return first found (the earliest) entry for given destination
143
  bool Dequeue (Ipv4Address dst, QueueEntry & entry);
143
  bool Dequeue (Ipv4Address dst, QueueEntry & entry);
144
  // / Remove all packets with destination IP address dst
144
  /// Remove all packets with destination IP address dst
145
  void DropPacketWithDst (Ipv4Address dst);
145
  void DropPacketWithDst (Ipv4Address dst);
146
  // / Finds whether a packet with destination dst exists in the queue
146
  /// Finds whether a packet with destination dst exists in the queue
147
  bool Find (Ipv4Address dst);
147
  bool Find (Ipv4Address dst);
148
  // / Get count of packets with destination dst in the queue
148
  /// Get count of packets with destination dst in the queue
149
  uint32_t
149
  uint32_t
150
  GetCountForPacketsWithDst (Ipv4Address dst);
150
  GetCountForPacketsWithDst (Ipv4Address dst);
151
  // / Number of entries
151
  /// Number of entries
152
  uint32_t GetSize ();
152
  uint32_t GetSize ();
153
  // /\name Fields
153
  ///\name Fields
154
  // \{
154
  // \{
155
  uint32_t GetMaxQueueLen () const
155
  uint32_t GetMaxQueueLen () const
156
  {
156
  {
 Lines 180-194    Link Here 
180
180
181
private:
181
private:
182
  std::vector<QueueEntry> m_queue;
182
  std::vector<QueueEntry> m_queue;
183
  // / Remove all expired entries
183
  /// Remove all expired entries
184
  void Purge ();
184
  void Purge ();
185
  // / Notify that packet is dropped from queue by timeout
185
  /// Notify that packet is dropped from queue by timeout
186
  void Drop (QueueEntry en, std::string reason);
186
  void Drop (QueueEntry en, std::string reason);
187
  // / The maximum number of packets that we allow a routing protocol to buffer.
187
  /// The maximum number of packets that we allow a routing protocol to buffer.
188
  uint32_t m_maxLen;
188
  uint32_t m_maxLen;
189
  // / The maximum number of packets that we allow per destination to buffer.
189
  /// The maximum number of packets that we allow per destination to buffer.
190
  uint32_t m_maxLenPerDst;
190
  uint32_t m_maxLenPerDst;
191
  // / The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds.
191
  /// The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds.
192
  Time m_queueTimeout;
192
  Time m_queueTimeout;
193
  static bool IsEqual (QueueEntry en, const Ipv4Address dst)
193
  static bool IsEqual (QueueEntry en, const Ipv4Address dst)
194
  {
194
  {
(-)a/src/dsdv/model/dsdv-packet.h (-3 / +3 lines)
 Lines 98-106    Link Here 
98
    return m_dstSeqNo;
98
    return m_dstSeqNo;
99
  }
99
  }
100
private:
100
private:
101
  Ipv4Address m_dst;     // /< Destination IP Address
101
  Ipv4Address m_dst; ///< Destination IP Address
102
  uint32_t m_hopCount;     // /< Number of Hops
102
  uint32_t m_hopCount; ///< Number of Hops
103
  uint32_t m_dstSeqNo;     // /< Destination Sequence Number
103
  uint32_t m_dstSeqNo; ///< Destination Sequence Number
104
};
104
};
105
static inline std::ostream & operator<< (std::ostream& os, const DsdvHeader & packet)
105
static inline std::ostream & operator<< (std::ostream& os, const DsdvHeader & packet)
106
{
106
{
(-)a/src/dsdv/model/dsdv-routing-protocol.cc (-3 / +3 lines)
 Lines 47-59    Link Here 
47
namespace dsdv {
47
namespace dsdv {
48
NS_OBJECT_ENSURE_REGISTERED (RoutingProtocol);
48
NS_OBJECT_ENSURE_REGISTERED (RoutingProtocol);
49
49
50
// / UDP Port for DSDV control traffic
50
/// UDP Port for DSDV control traffic
51
const uint32_t RoutingProtocol::DSDV_PORT = 269;
51
const uint32_t RoutingProtocol::DSDV_PORT = 269;
52
52
53
// / Tag used by DSDV implementation
53
/// Tag used by DSDV implementation
54
struct DeferredRouteOutputTag : public Tag
54
struct DeferredRouteOutputTag : public Tag
55
{
55
{
56
  // / Positive if output device is fixed in RouteOutput
56
  /// Positive if output device is fixed in RouteOutput
57
  int32_t oif;
57
  int32_t oif;
58
58
59
  DeferredRouteOutputTag (int32_t o = -1)
59
  DeferredRouteOutputTag (int32_t o = -1)
(-)a/src/dsdv/model/dsdv-routing-protocol.h (-43 / +42 lines)
 Lines 56-69    Link Here 
56
  GetTypeId (void);
56
  GetTypeId (void);
57
  static const uint32_t DSDV_PORT;
57
  static const uint32_t DSDV_PORT;
58
58
59
  // / c-tor
59
  /// c-tor
60
  RoutingProtocol ();
60
  RoutingProtocol ();
61
  virtual
61
  virtual
62
  ~RoutingProtocol ();
62
  ~RoutingProtocol ();
63
  virtual void
63
  virtual void
64
  DoDispose ();
64
  DoDispose ();
65
65
66
  // /\name From Ipv4RoutingProtocol
66
  ///\name From Ipv4RoutingProtocol
67
  // \{
67
  // \{
68
  Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDevice> oif, Socket::SocketErrno &sockerr);
68
  Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDevice> oif, Socket::SocketErrno &sockerr);
69
  bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev, UnicastForwardCallback ucb,
69
  bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev, UnicastForwardCallback ucb,
 Lines 75-81    Link Here 
75
  virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address);
75
  virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address);
76
  virtual void SetIpv4 (Ptr<Ipv4> ipv4);
76
  virtual void SetIpv4 (Ptr<Ipv4> ipv4);
77
  // \}
77
  // \}
78
  // /\name Methods to handle protocol parameters
78
  ///\name Methods to handle protocol parameters
79
  // \{
79
  // \{
80
  void SetEnableBufferFlag (bool f);
80
  void SetEnableBufferFlag (bool f);
81
  bool GetEnableBufferFlag () const;
81
  bool GetEnableBufferFlag () const;
 Lines 86-149    Link Here 
86
  // \}
86
  // \}
87
87
88
private:
88
private:
89
  // /\name Protocol parameters.
89
  ///\name Protocol parameters.
90
  // \{
90
  // \{
91
  // / \{Holdtimes is the multiplicative factor of PeriodicUpdateInterval for which the node waits since the last update
91
  /// Holdtimes is the multiplicative factor of PeriodicUpdateInterval for which the node waits since the last update
92
  // / before flushing a route from the routing table. If PeriodicUpdateInterval is 8s and Holdtimes is 3, the node
92
  /// before flushing a route from the routing table. If PeriodicUpdateInterval is 8s and Holdtimes is 3, the node
93
  // / waits for 24s since the last update to flush this route from its routing table. \}
93
  /// waits for 24s since the last update to flush this route from its routing table.
94
  uint32_t Holdtimes;
94
  uint32_t Holdtimes;
95
  // / \{PeriodicUpdateInterval specifies the periodic time interval between which the a node broadcasts
95
  /// PeriodicUpdateInterval specifies the periodic time interval between which the a node broadcasts
96
  // / its entire routing table.\}
96
  /// its entire routing table.
97
  Time m_periodicUpdateInterval;
97
  Time m_periodicUpdateInterval;
98
  // /\{ SettlingTime specifies the time for which a node waits before propagating an update.
98
  /// SettlingTime specifies the time for which a node waits before propagating an update.
99
  // / It waits for this time interval in hope of receiving an update with a better metric.
99
  /// It waits for this time interval in hope of receiving an update with a better metric.
100
  // /\}
101
  Time m_settlingTime;
100
  Time m_settlingTime;
102
  // /Nodes IP address
101
  /// Nodes IP address
103
  Ipv4Address m_mainAddress;
102
  Ipv4Address m_mainAddress;
104
  // / IP protocol
103
  /// IP protocol
105
  Ptr<Ipv4> m_ipv4;
104
  Ptr<Ipv4> m_ipv4;
106
  // / Raw socket per each IP interface, map socket -> iface address (IP + mask)
105
  /// Raw socket per each IP interface, map socket -> iface address (IP + mask)
107
  std::map<Ptr<Socket>, Ipv4InterfaceAddress> m_socketAddresses;
106
  std::map<Ptr<Socket>, Ipv4InterfaceAddress> m_socketAddresses;
108
  // / Loopback device used to defer route requests until a route is found
107
  /// Loopback device used to defer route requests until a route is found
109
  Ptr<NetDevice> m_lo;
108
  Ptr<NetDevice> m_lo;
110
  // / Main Routing table for the node
109
  /// Main Routing table for the node
111
  RoutingTable m_routingTable;
110
  RoutingTable m_routingTable;
112
  // / Advertised Routing table for the node
111
  /// Advertised Routing table for the node
113
  RoutingTable m_advRoutingTable;
112
  RoutingTable m_advRoutingTable;
114
  // / The maximum number of packets that we allow a routing protocol to buffer.
113
  /// The maximum number of packets that we allow a routing protocol to buffer.
115
  uint32_t m_maxQueueLen;
114
  uint32_t m_maxQueueLen;
116
  // / The maximum number of packets that we allow per destination to buffer.
115
  /// The maximum number of packets that we allow per destination to buffer.
117
  uint32_t m_maxQueuedPacketsPerDst;
116
  uint32_t m_maxQueuedPacketsPerDst;
118
  // /< The maximum period of time that a routing protocol is allowed to buffer a packet for.
117
  /// The maximum period of time that a routing protocol is allowed to buffer a packet for.
119
  Time m_maxQueueTime;
118
  Time m_maxQueueTime;
120
  // / A "drop front on full" queue used by the routing layer to buffer packets to which it does not have a route.
119
  /// A "drop front on full" queue used by the routing layer to buffer packets to which it does not have a route.
121
  PacketQueue m_queue;
120
  PacketQueue m_queue;
122
  // / Flag that is used to enable or disable buffering
121
  /// Flag that is used to enable or disable buffering
123
  bool EnableBuffering;
122
  bool EnableBuffering;
124
  // / Flag that is used to enable or disable Weighted Settling Time
123
  /// Flag that is used to enable or disable Weighted Settling Time
125
  bool EnableWST;
124
  bool EnableWST;
126
  // / This is the wighted factor to determine the weighted settling time
125
  /// This is the wighted factor to determine the weighted settling time
127
  double m_weightedFactor;
126
  double m_weightedFactor;
128
  // / This is a flag to enable route aggregation. Route aggregation will aggregate all routes for
127
  /// This is a flag to enable route aggregation. Route aggregation will aggregate all routes for
129
  // / 'RouteAggregationTime' from the time an update is received by a node and sends them as a single update .
128
  /// 'RouteAggregationTime' from the time an update is received by a node and sends them as a single update .
130
  bool EnableRouteAggregation;
129
  bool EnableRouteAggregation;
131
  // / Parameter that holds the route aggregation time interval
130
  /// Parameter that holds the route aggregation time interval
132
  Time m_routeAggregationTime;
131
  Time m_routeAggregationTime;
133
  // / Unicast callback for own packets
132
  /// Unicast callback for own packets
134
  UnicastForwardCallback m_scb;
133
  UnicastForwardCallback m_scb;
135
  // / Error callback for own packets
134
  /// Error callback for own packets
136
  ErrorCallback m_ecb;
135
  ErrorCallback m_ecb;
137
  // /\}
136
  // \}
138
137
139
private:
138
private:
140
  // / Start protocol operation
139
  /// Start protocol operation
141
  void
140
  void
142
  Start ();
141
  Start ();
143
  // / Queue packet untill we find a route
142
  /// Queue packet untill we find a route
144
  void
143
  void
145
  DeferredRouteOutput (Ptr<const Packet> p, const Ipv4Header & header, UnicastForwardCallback ucb, ErrorCallback ecb);
144
  DeferredRouteOutput (Ptr<const Packet> p, const Ipv4Header & header, UnicastForwardCallback ucb, ErrorCallback ecb);
146
  // / Look for any queued packets to send them out
145
  /// Look for any queued packets to send them out
147
  void
146
  void
148
  LookForQueuedPackets (void);
147
  LookForQueuedPackets (void);
149
  /**
148
  /**
 Lines 153-170    Link Here 
153
   */
152
   */
154
  void
153
  void
155
  SendPacketFromQueue (Ipv4Address dst, Ptr<Ipv4Route> route);
154
  SendPacketFromQueue (Ipv4Address dst, Ptr<Ipv4Route> route);
156
  // / Find socket with local interface address iface
155
  /// Find socket with local interface address iface
157
  Ptr<Socket>
156
  Ptr<Socket>
158
  FindSocketWithInterfaceAddress (Ipv4InterfaceAddress iface) const;
157
  FindSocketWithInterfaceAddress (Ipv4InterfaceAddress iface) const;
159
  // /\name Receive dsdv control packets
158
  ///\name Receive dsdv control packets
160
  // \{
159
  // \{
161
  // / Receive and process dsdv control packet
160
  /// Receive and process dsdv control packet
162
  void
161
  void
163
  RecvDsdv (Ptr<Socket> socket);
162
  RecvDsdv (Ptr<Socket> socket);
164
  // \}
163
  // \}
165
  void
164
  void
166
  Send (Ptr<Ipv4Route>, Ptr<const Packet>, const Ipv4Header &);
165
  Send (Ptr<Ipv4Route>, Ptr<const Packet>, const Ipv4Header &);
167
  // / Create loopback route for given header
166
  /// Create loopback route for given header
168
  Ptr<Ipv4Route>
167
  Ptr<Ipv4Route>
169
  LoopbackRoute (const Ipv4Header & header, Ptr<NetDevice> oif) const;
168
  LoopbackRoute (const Ipv4Header & header, Ptr<NetDevice> oif) const;
170
  /**
169
  /**
 Lines 174-193    Link Here 
174
   */
173
   */
175
  Time
174
  Time
176
  GetSettlingTime (Ipv4Address dst);
175
  GetSettlingTime (Ipv4Address dst);
177
  // / Sends trigger update from a node
176
  /// Sends trigger update from a node
178
  void
177
  void
179
  SendTriggeredUpdate ();
178
  SendTriggeredUpdate ();
180
  // / Broadcasts the entire routing table for every PeriodicUpdateInterval
179
  /// Broadcasts the entire routing table for every PeriodicUpdateInterval
181
  void
180
  void
182
  SendPeriodicUpdate ();
181
  SendPeriodicUpdate ();
183
  void
182
  void
184
  MergeTriggerPeriodicUpdates ();
183
  MergeTriggerPeriodicUpdates ();
185
  // / Notify that packet is dropped for some reason
184
  /// Notify that packet is dropped for some reason
186
  void
185
  void
187
  Drop (Ptr<const Packet>, const Ipv4Header &, Socket::SocketErrno);
186
  Drop (Ptr<const Packet>, const Ipv4Header &, Socket::SocketErrno);
188
  // / Timer to trigger periodic updates from a node
187
  /// Timer to trigger periodic updates from a node
189
  Timer m_periodicUpdateTimer;
188
  Timer m_periodicUpdateTimer;
190
  // / Timer used by the trigger updates in case of Weighted Settling Time is used
189
  /// Timer used by the trigger updates in case of Weighted Settling Time is used
191
  Timer m_triggeredExpireTimer;
190
  Timer m_triggeredExpireTimer;
192
};
191
};
193
192
(-)a/src/dsdv/model/dsdv-rtable.h (-30 / +30 lines)
 Lines 56-62    Link Here 
56
class RoutingTableEntry
56
class RoutingTableEntry
57
{
57
{
58
public:
58
public:
59
  // / c-tor
59
  /// c-tor
60
  RoutingTableEntry (Ptr<NetDevice> dev = 0, Ipv4Address dst = Ipv4Address (), u_int32_t m_seqNo = 0,
60
  RoutingTableEntry (Ptr<NetDevice> dev = 0, Ipv4Address dst = Ipv4Address (), u_int32_t m_seqNo = 0,
61
                     Ipv4InterfaceAddress iface = Ipv4InterfaceAddress (), u_int32_t hops = 0, Ipv4Address nextHop = Ipv4Address (),
61
                     Ipv4InterfaceAddress iface = Ipv4InterfaceAddress (), u_int32_t hops = 0, Ipv4Address nextHop = Ipv4Address (),
62
                     Time lifetime = Simulator::Now (), Time SettlingTime = Simulator::Now (), bool changedEntries = false);
62
                     Time lifetime = Simulator::Now (), Time SettlingTime = Simulator::Now (), bool changedEntries = false);
 Lines 180-190    Link Here 
180
  Print (Ptr<OutputStreamWrapper> stream) const;
180
  Print (Ptr<OutputStreamWrapper> stream) const;
181
181
182
private:
182
private:
183
  // /\name Fields
183
  ///\name Fields
184
  // \{
184
  // \{
185
  // / Destination Sequence Number
185
  /// Destination Sequence Number
186
  uint32_t m_seqNo;
186
  uint32_t m_seqNo;
187
  // / Hop Count (number of hops needed to reach destination)
187
  /// Hop Count (number of hops needed to reach destination)
188
  uint32_t m_hops;
188
  uint32_t m_hops;
189
  /**
189
  /**
190
   * \brief Expiration or deletion time of the route
190
   * \brief Expiration or deletion time of the route
 Lines 200-215    Link Here 
200
   *   - output device
200
   *   - output device
201
   */
201
   */
202
  Ptr<Ipv4Route> m_ipv4Route;
202
  Ptr<Ipv4Route> m_ipv4Route;
203
  // / Output interface address
203
  /// Output interface address
204
  Ipv4InterfaceAddress m_iface;
204
  Ipv4InterfaceAddress m_iface;
205
  // / Routing flags: valid, invalid or in search
205
  /// Routing flags: valid, invalid or in search
206
  RouteFlags m_flag;
206
  RouteFlags m_flag;
207
  // / Time for which the node retains an update with changed metric before broadcasting it.
207
  /// Time for which the node retains an update with changed metric before broadcasting it.
208
  // / A node does that in hope of receiving a better update.
208
  /// A node does that in hope of receiving a better update.
209
  Time m_settlingTime;
209
  Time m_settlingTime;
210
  // / Flag to show if any of the routing table entries were changed with the routing update.
210
  /// Flag to show if any of the routing table entries were changed with the routing update.
211
  uint32_t m_entriesChanged;
211
  uint32_t m_entriesChanged;
212
  // \}
212
  //\}
213
};
213
};
214
214
215
/**
215
/**
 Lines 219-225    Link Here 
219
class RoutingTable
219
class RoutingTable
220
{
220
{
221
public:
221
public:
222
  // / c-tor
222
  /// c-tor
223
  RoutingTable ();
223
  RoutingTable ();
224
  /**
224
  /**
225
   * Add routing table entry if it doesn't yet exist in routing table
225
   * Add routing table entry if it doesn't yet exist in routing table
 Lines 247-260    Link Here 
247
  LookupRoute (Ipv4Address id, RoutingTableEntry & rt, bool forRouteInput);
247
  LookupRoute (Ipv4Address id, RoutingTableEntry & rt, bool forRouteInput);
248
  /**
248
  /**
249
   * Updating the routing Table with routing table entry rt
249
   * Updating the routing Table with routing table entry rt
250
   * \param routing table entry rt
250
   * \param rt routing table entry
251
   * \return true on success
251
   * \return true on success
252
   */
252
   */
253
  bool
253
  bool
254
  Update (RoutingTableEntry & rt);
254
  Update (RoutingTableEntry & rt);
255
  /**
255
  /**
256
   * Lookup list of addresses for which nxtHp is the next Hop address
256
   * Lookup list of addresses for which nxtHp is the next Hop address
257
   * \param nexthop's address for which we want the list of destinations
257
   * \param nxtHp nexthop's address for which we want the list of destinations
258
   * \param dstList is the list that will hold all these destination addresses
258
   * \param dstList is the list that will hold all these destination addresses
259
   */
259
   */
260
  void
260
  void
 Lines 265-299    Link Here 
265
   */
265
   */
266
  void
266
  void
267
  GetListOfAllRoutes (std::map<Ipv4Address, RoutingTableEntry> & allRoutes);
267
  GetListOfAllRoutes (std::map<Ipv4Address, RoutingTableEntry> & allRoutes);
268
  // / Delete all route from interface with address iface
268
  /// Delete all route from interface with address iface
269
  void
269
  void
270
  DeleteAllRoutesFromInterface (Ipv4InterfaceAddress iface);
270
  DeleteAllRoutesFromInterface (Ipv4InterfaceAddress iface);
271
  // / Delete all entries from routing table
271
  /// Delete all entries from routing table
272
  void
272
  void
273
  Clear ()
273
  Clear ()
274
  {
274
  {
275
    m_ipv4AddressEntry.clear ();
275
    m_ipv4AddressEntry.clear ();
276
  }
276
  }
277
  // / Delete all outdated entries if Lifetime is expired
277
  /// Delete all outdated entries if Lifetime is expired
278
  void
278
  void
279
  Purge (std::map<Ipv4Address, RoutingTableEntry> & removedAddresses);
279
  Purge (std::map<Ipv4Address, RoutingTableEntry> & removedAddresses);
280
  // / Print routing table
280
  /// Print routing table
281
  void
281
  void
282
  Print (Ptr<OutputStreamWrapper> stream) const;
282
  Print (Ptr<OutputStreamWrapper> stream) const;
283
  // / Provides the number of routes present in that nodes routing table.
283
  /// Provides the number of routes present in that nodes routing table.
284
  uint32_t
284
  uint32_t
285
  RoutingTableSize ();
285
  RoutingTableSize ();
286
  /**
286
  /**
287
  * Add an event for a destination address so that the update to for that destination is sent
287
  * Add an event for a destination address so that the update to for that destination is sent
288
  * after the event is completed.
288
  * after the event is completed.
289
  * \param destination address for which this event is running.
289
  * \param address destination address for which this event is running.
290
  * \param unique eventid that was generated.
290
  * \param id unique eventid that was generated.
291
  */
291
  */
292
  bool
292
  bool
293
  AddIpv4Event (Ipv4Address, EventId);
293
  AddIpv4Event (Ipv4Address address, EventId id);
294
  /**
294
  /**
295
  * Clear up the entry from the map after the event is completed
295
  * Clear up the entry from the map after the event is completed
296
  * \param destination address for which this event is running.
296
  * \param address destination address for which this event is running.
297
  * \return true on success
297
  * \return true on success
298
  */
298
  */
299
  bool
299
  bool
 Lines 301-307    Link Here 
301
  /**
301
  /**
302
  * Force delete an update waiting for settling time to complete as a better update to
302
  * Force delete an update waiting for settling time to complete as a better update to
303
  * same destination was received.
303
  * same destination was received.
304
  * \param destination address for which this event is running.
304
  * \param address destination address for which this event is running.
305
  * \return true on success
305
  * \return true on success
306
  */
306
  */
307
  bool
307
  bool
 Lines 309-327    Link Here 
309
  /**
309
  /**
310
  * Force delete an update waiting for settling time to complete as a better update to
310
  * Force delete an update waiting for settling time to complete as a better update to
311
  * same destination was received.
311
  * same destination was received.
312
  * \param destination address for which this event is running.
312
  * \param address destination address for which this event is running.
313
  * \return true on finding out that an event is already running for that destination address.
313
  * \return true on finding out that an event is already running for that destination address.
314
  */
314
  */
315
  bool
315
  bool
316
  ForceDeleteIpv4Event (Ipv4Address address);
316
  ForceDeleteIpv4Event (Ipv4Address address);
317
  /**
317
  /**
318
    * Get the EcentId associated with that address.
318
    * Get the EcentId associated with that address.
319
    * \param destination address for which this event is running.
319
    * \param address destination address for which this event is running.
320
    * \return EventId on finding out an event is associated else return NULL.
320
    * \return EventId on finding out an event is associated else return NULL.
321
    */
321
    */
322
  EventId
322
  EventId
323
  GetEventId (Ipv4Address address);
323
  GetEventId (Ipv4Address address);
324
  // /\name Handle life time of invalid route
324
  ///\name Handle life time of invalid route
325
  // \{
325
  // \{
326
  Time Getholddowntime () const
326
  Time Getholddowntime () const
327
  {
327
  {
 Lines 334-346    Link Here 
334
  // \}
334
  // \}
335
335
336
private:
336
private:
337
  // /\name Fields
337
  ///\name Fields
338
  // \{
338
  // \{
339
  // / an entry in the routing table.
339
  /// an entry in the routing table.
340
  std::map<Ipv4Address, RoutingTableEntry> m_ipv4AddressEntry;
340
  std::map<Ipv4Address, RoutingTableEntry> m_ipv4AddressEntry;
341
  // / an entry in the event table.
341
  /// an entry in the event table.
342
  std::map<Ipv4Address, EventId> m_ipv4Events;
342
  std::map<Ipv4Address, EventId> m_ipv4Events;
343
  // /
343
  ///
344
  Time m_holddownTime;
344
  Time m_holddownTime;
345
  // \}
345
  // \}
346
};
346
};
(-)a/src/emu/model/emu-net-device.h (-12 / +12 lines)
 Lines 80-101    Link Here 
80
  /**
80
  /**
81
   * Set the Data Rate used for transmission of packets.
81
   * Set the Data Rate used for transmission of packets.
82
   *
82
   *
83
   * @see Attach ()
83
   * \see Attach ()
84
   * @param bps the data rate at which this object operates
84
   * \param bps the data rate at which this object operates
85
   */
85
   */
86
  void SetDataRate (DataRate bps);
86
  void SetDataRate (DataRate bps);
87
87
88
  /**
88
  /**
89
   * Set a start time for the device.
89
   * Set a start time for the device.
90
   *
90
   *
91
   * @param tStart the start time
91
   * \param tStart the start time
92
   */
92
   */
93
  void Start (Time tStart);
93
  void Start (Time tStart);
94
94
95
  /**
95
  /**
96
   * Set a stop time for the device.
96
   * Set a stop time for the device.
97
   *
97
   *
98
   * @param tStop the stop time
98
   * \param tStop the stop time
99
   */
99
   */
100
  void Stop (Time tStop);
100
  void Stop (Time tStop);
101
101
 Lines 105-120    Link Here 
105
   * The EmuNetDevice "owns" a queue that implements a queueing 
105
   * The EmuNetDevice "owns" a queue that implements a queueing 
106
   * method such as DropTail or RED.
106
   * method such as DropTail or RED.
107
   *
107
   *
108
   * @see Queue
108
   * \see Queue
109
   * @see DropTailQueue
109
   * \see DropTailQueue
110
   * @param queue Ptr to the new queue.
110
   * \param queue Ptr to the new queue.
111
   */
111
   */
112
  void SetQueue (Ptr<Queue> queue);
112
  void SetQueue (Ptr<Queue> queue);
113
113
114
  /**
114
  /**
115
   * Get a copy of the attached Queue.
115
   * Get a copy of the attached Queue.
116
   *
116
   *
117
   * @returns Ptr to the queue.
117
   * \returns Ptr to the queue.
118
   */
118
   */
119
  Ptr<Queue> GetQueue (void) const;
119
  Ptr<Queue> GetQueue (void) const;
120
120
 Lines 275-282    Link Here 
275
275
276
  /**
276
  /**
277
   * Start Sending a Packet Down the Wire.
277
   * Start Sending a Packet Down the Wire.
278
   * @param p packet to send
278
   * \param p packet to send
279
   * @returns true if success, false on failure
279
   * \returns true if success, false on failure
280
   */
280
   */
281
  bool TransmitStart (Ptr<Packet> p);
281
  bool TransmitStart (Ptr<Packet> p);
282
282
 Lines 286-293    Link Here 
286
   * The Queue which this EmuNetDevice uses as a packet source.
286
   * The Queue which this EmuNetDevice uses as a packet source.
287
   * Management of this Queue has been delegated to the EmuNetDevice
287
   * Management of this Queue has been delegated to the EmuNetDevice
288
   * and it has the responsibility for deletion.
288
   * and it has the responsibility for deletion.
289
   * @see class Queue
289
   * \see class Queue
290
   * @see class DropTailQueue
290
   * \see class DropTailQueue
291
   */
291
   */
292
  Ptr<Queue> m_queue;
292
  Ptr<Queue> m_queue;
293
293
(-)a/src/internet/helper/internet-stack-helper.h (-22 / +22 lines)
 Lines 180-191    Link Here 
180
180
181
private:
181
private:
182
  /**
182
  /**
183
   * @brief Enable pcap output the indicated Ipv4 and interface pair.
183
   * \brief Enable pcap output the indicated Ipv4 and interface pair.
184
   * @internal
184
   * \internal
185
   *
185
   *
186
   * @param prefix Filename prefix to use for pcap files.
186
   * \param prefix Filename prefix to use for pcap files.
187
   * @param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
187
   * \param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
188
   * @param interface Interface ID on the Ipv4 on which you want to enable tracing.
188
   * \param interface Interface ID on the Ipv4 on which you want to enable tracing.
189
   */
189
   */
190
  virtual void EnablePcapIpv4Internal (std::string prefix, 
190
  virtual void EnablePcapIpv4Internal (std::string prefix, 
191
                                       Ptr<Ipv4> ipv4, 
191
                                       Ptr<Ipv4> ipv4, 
 Lines 193-206    Link Here 
193
                                       bool explicitFilename);
193
                                       bool explicitFilename);
194
194
195
  /**
195
  /**
196
   * @brief Enable ascii trace output on the indicated Ipv4 and interface pair.
196
   * \brief Enable ascii trace output on the indicated Ipv4 and interface pair.
197
   * @internal
197
   * \internal
198
   *
198
   *
199
   * @param stream An OutputStreamWrapper representing an existing file to use
199
   * \param stream An OutputStreamWrapper representing an existing file to use
200
   *               when writing trace data.
200
   *               when writing trace data.
201
   * @param prefix Filename prefix to use for ascii trace files.
201
   * \param prefix Filename prefix to use for ascii trace files.
202
   * @param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
202
   * \param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
203
   * @param interface Interface ID on the Ipv4 on which you want to enable tracing.
203
   * \param interface Interface ID on the Ipv4 on which you want to enable tracing.
204
   */
204
   */
205
  virtual void EnableAsciiIpv4Internal (Ptr<OutputStreamWrapper> stream, 
205
  virtual void EnableAsciiIpv4Internal (Ptr<OutputStreamWrapper> stream, 
206
                                        std::string prefix, 
206
                                        std::string prefix, 
 Lines 209-220    Link Here 
209
                                        bool explicitFilename);
209
                                        bool explicitFilename);
210
210
211
  /**
211
  /**
212
   * @brief Enable pcap output the indicated Ipv4 and interface pair.
212
   * \brief Enable pcap output the indicated Ipv4 and interface pair.
213
   * @internal
213
   * \internal
214
   *
214
   *
215
   * @param prefix Filename prefix to use for pcap files.
215
   * \param prefix Filename prefix to use for pcap files.
216
   * @param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
216
   * \param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
217
   * @param interface Interface ID on the Ipv4 on which you want to enable tracing.
217
   * \param interface Interface ID on the Ipv4 on which you want to enable tracing.
218
   */
218
   */
219
  virtual void EnablePcapIpv6Internal (std::string prefix, 
219
  virtual void EnablePcapIpv6Internal (std::string prefix, 
220
                                       Ptr<Ipv6> ipv6, 
220
                                       Ptr<Ipv6> ipv6, 
 Lines 222-235    Link Here 
222
                                       bool explicitFilename);
222
                                       bool explicitFilename);
223
223
224
  /**
224
  /**
225
   * @brief Enable ascii trace output on the indicated Ipv4 and interface pair.
225
   * \brief Enable ascii trace output on the indicated Ipv4 and interface pair.
226
   * @internal
226
   * \internal
227
   *
227
   *
228
   * @param stream An OutputStreamWrapper representing an existing file to use
228
   * \param stream An OutputStreamWrapper representing an existing file to use
229
   *               when writing trace data.
229
   *               when writing trace data.
230
   * @param prefix Filename prefix to use for ascii trace files.
230
   * \param prefix Filename prefix to use for ascii trace files.
231
   * @param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
231
   * \param ipv4 Ptr to the Ipv4 interface on which you want to enable tracing.
232
   * @param interface Interface ID on the Ipv4 on which you want to enable tracing.
232
   * \param interface Interface ID on the Ipv4 on which you want to enable tracing.
233
   */
233
   */
234
  virtual void EnableAsciiIpv6Internal (Ptr<OutputStreamWrapper> stream, 
234
  virtual void EnableAsciiIpv6Internal (Ptr<OutputStreamWrapper> stream, 
235
                                        std::string prefix, 
235
                                        std::string prefix, 
(-)a/src/internet/helper/internet-trace-helper.h (-171 / +171 lines)
 Lines 29-58    Link Here 
29
namespace ns3 {
29
namespace ns3 {
30
30
31
/**
31
/**
32
 * @brief Base class providing common user-level pcap operations for helpers
32
 * \brief Base class providing common user-level pcap operations for helpers
33
 * representing IPv4 protocols .
33
 * representing IPv4 protocols .
34
 */
34
 */
35
class PcapHelperForIpv4
35
class PcapHelperForIpv4
36
{
36
{
37
public:
37
public:
38
  /**
38
  /**
39
   * @brief Construct a PcapHelperForIpv4.
39
   * \brief Construct a PcapHelperForIpv4.
40
   */
40
   */
41
  PcapHelperForIpv4 () {}
41
  PcapHelperForIpv4 () {}
42
42
43
  /**
43
  /**
44
   * @brief Destroy a PcapHelperForIpv4.
44
   * \brief Destroy a PcapHelperForIpv4.
45
   */
45
   */
46
  virtual ~PcapHelperForIpv4 () {}
46
  virtual ~PcapHelperForIpv4 () {}
47
47
48
  /**
48
  /**
49
   * @brief Enable pcap output the indicated Ipv4 and interface pair.
49
   * \brief Enable pcap output the indicated Ipv4 and interface pair.
50
   * @internal
50
   * \internal
51
   *
51
   *
52
   * @param prefix Filename prefix to use for pcap files.
52
   * \param prefix Filename prefix to use for pcap files.
53
   * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
53
   * \param ipv4 Ptr<Ipv4> on which you want to enable tracing.
54
   * @param interface Interface on ipv4 on which you want to enable tracing.
54
   * \param interface Interface on ipv4 on which you want to enable tracing.
55
   * @param explicitFilename Treat the prefix as an explicit filename if true
55
   * \param explicitFilename Treat the prefix as an explicit filename if true
56
   */
56
   */
57
  virtual void EnablePcapIpv4Internal (std::string prefix, 
57
  virtual void EnablePcapIpv4Internal (std::string prefix, 
58
                                       Ptr<Ipv4> ipv4, 
58
                                       Ptr<Ipv4> ipv4, 
 Lines 60-95    Link Here 
60
                                       bool explicitFilename) = 0;
60
                                       bool explicitFilename) = 0;
61
61
62
  /**
62
  /**
63
   * @brief Enable pcap output the indicated Ipv4 and interface pair.
63
   * \brief Enable pcap output the indicated Ipv4 and interface pair.
64
   *
64
   *
65
   * @param prefix Filename prefix to use for pcap files.
65
   * \param prefix Filename prefix to use for pcap files.
66
   * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
66
   * \param ipv4 Ptr<Ipv4> on which you want to enable tracing.
67
   * @param interface Interface on ipv4 on which you want to enable tracing.
67
   * \param interface Interface on ipv4 on which you want to enable tracing.
68
   * @param explicitFilename Treat the prefix as an explicit filename if true.
68
   * \param explicitFilename Treat the prefix as an explicit filename if true.
69
   */
69
   */
70
  void EnablePcapIpv4 (std::string prefix, Ptr<Ipv4> ipv4, uint32_t interface, bool explicitFilename = false);
70
  void EnablePcapIpv4 (std::string prefix, Ptr<Ipv4> ipv4, uint32_t interface, bool explicitFilename = false);
71
71
72
  /**
72
  /**
73
   * @brief Enable pcap output the indicated Ipv4 and interface pair using a
73
   * \brief Enable pcap output the indicated Ipv4 and interface pair using a
74
   * Ptr<Ipv4> previously named using the ns-3 object name service.
74
   * Ptr<Ipv4> previously named using the ns-3 object name service.
75
   *
75
   *
76
   * @param prefix filename prefix to use for pcap files.
76
   * \param prefix filename prefix to use for pcap files.
77
   * @param ipv4Name Name of the Ptr<Ipv4> on which you want to enable tracing.
77
   * \param ipv4Name Name of the Ptr<Ipv4> on which you want to enable tracing.
78
   * @param interface Interface on ipv4 on which you want to enable tracing.
78
   * \param interface Interface on ipv4 on which you want to enable tracing.
79
   * @param explicitFilename Treat the prefix as an explicit filename if true.
79
   * \param explicitFilename Treat the prefix as an explicit filename if true.
80
   */
80
   */
81
  void EnablePcapIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename = false);
81
  void EnablePcapIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename = false);
82
82
83
  /**
83
  /**
84
   * @brief Enable pcap output on each Ipv4 and interface pair in the container.
84
   * \brief Enable pcap output on each Ipv4 and interface pair in the container.
85
   *
85
   *
86
   * @param prefix Filename prefix to use for pcap files.
86
   * \param prefix Filename prefix to use for pcap files.
87
   * @param c Ipv4InterfaceContainer of Ipv4 and interface pairs
87
   * \param c Ipv4InterfaceContainer of Ipv4 and interface pairs
88
   */
88
   */
89
  void EnablePcapIpv4 (std::string prefix, Ipv4InterfaceContainer c);
89
  void EnablePcapIpv4 (std::string prefix, Ipv4InterfaceContainer c);
90
90
91
  /**
91
  /**
92
   * @brief Enable pcap output on all Ipv4 and interface pairs existing in the
92
   * \brief Enable pcap output on all Ipv4 and interface pairs existing in the
93
   * nodes provided in the container.
93
   * nodes provided in the container.
94
   *
94
   *
95
   * \param prefix Filename prefix to use for pcap files.
95
   * \param prefix Filename prefix to use for pcap files.
 Lines 98-145    Link Here 
98
  void EnablePcapIpv4 (std::string prefix, NodeContainer n);
98
  void EnablePcapIpv4 (std::string prefix, NodeContainer n);
99
99
100
  /**
100
  /**
101
   * @brief Enable pcap output on the Ipv4 and interface pair specified by a 
101
   * \brief Enable pcap output on the Ipv4 and interface pair specified by a 
102
   * global node-id (of a previously created node) and interface.  Since there
102
   * global node-id (of a previously created node) and interface.  Since there
103
   * can be only one Ipv4 aggregated to a node, the node-id unambiguously 
103
   * can be only one Ipv4 aggregated to a node, the node-id unambiguously 
104
   * determines the Ipv4.
104
   * determines the Ipv4.
105
   *
105
   *
106
   * @param prefix Filename prefix to use for pcap files.
106
   * \param prefix Filename prefix to use for pcap files.
107
   * @param nodeid The node identifier/number of the node on which to enable tracing.
107
   * \param nodeid The node identifier/number of the node on which to enable tracing.
108
   * @param interface Interface on ipv4 on which you want to enable tracing.
108
   * \param interface Interface on ipv4 on which you want to enable tracing.
109
   * @param explicitFilename Treat the prefix as an explicit filename if true
109
   * \param explicitFilename Treat the prefix as an explicit filename if true
110
   */
110
   */
111
  void EnablePcapIpv4 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename);
111
  void EnablePcapIpv4 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename);
112
112
113
  /**
113
  /**
114
   * @brief Enable pcap output on all Ipv4 and interface pairs existing in the 
114
   * \brief Enable pcap output on all Ipv4 and interface pairs existing in the 
115
   * set of all nodes created in the simulation.
115
   * set of all nodes created in the simulation.
116
   *
116
   *
117
   * @param prefix Filename prefix to use for pcap files.
117
   * \param prefix Filename prefix to use for pcap files.
118
   */
118
   */
119
  void EnablePcapIpv4All (std::string prefix);
119
  void EnablePcapIpv4All (std::string prefix);
120
120
121
};
121
};
122
122
123
/**
123
/**
124
 * @brief Base class providing common user-level ascii trace operations for 
124
 * \brief Base class providing common user-level ascii trace operations for 
125
 * helpers representing IPv4 protocols .
125
 * helpers representing IPv4 protocols .
126
 */
126
 */
127
class AsciiTraceHelperForIpv4
127
class AsciiTraceHelperForIpv4
128
{
128
{
129
public:
129
public:
130
  /**
130
  /**
131
   * @brief Construct an AsciiTraceHelperForIpv4.
131
   * \brief Construct an AsciiTraceHelperForIpv4.
132
   */
132
   */
133
  AsciiTraceHelperForIpv4 () {}
133
  AsciiTraceHelperForIpv4 () {}
134
134
135
  /**
135
  /**
136
   * @brief Destroy an AsciiTraceHelperForIpv4
136
   * \brief Destroy an AsciiTraceHelperForIpv4
137
   */
137
   */
138
  virtual ~AsciiTraceHelperForIpv4 () {}
138
  virtual ~AsciiTraceHelperForIpv4 () {}
139
139
140
  /**
140
  /**
141
   * @brief Enable ascii trace output on the indicated Ipv4 and interface pair.
141
   * \brief Enable ascii trace output on the indicated Ipv4 and interface pair.
142
   * @internal
142
   * \internal
143
   *
143
   *
144
   * The implementation is expected to use a provided Ptr<OutputStreamWrapper>
144
   * The implementation is expected to use a provided Ptr<OutputStreamWrapper>
145
   * if it is non-null.  If the OutputStreamWrapper is null, the implementation
145
   * if it is non-null.  If the OutputStreamWrapper is null, the implementation
 Lines 155-166    Link Here 
155
   * context could be important, so the helper implementation is expected to 
155
   * context could be important, so the helper implementation is expected to 
156
   * TraceConnect.
156
   * TraceConnect.
157
   *
157
   *
158
   * @param stream An OutputStreamWrapper representing an existing file to use
158
   * \param stream An OutputStreamWrapper representing an existing file to use
159
   *               when writing trace data.
159
   *               when writing trace data.
160
   * @param prefix Filename prefix to use for ascii trace files.
160
   * \param prefix Filename prefix to use for ascii trace files.
161
   * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
161
   * \param ipv4 Ptr<Ipv4> on which you want to enable tracing.
162
   * @param interface The interface on which you want to enable tracing.
162
   * \param interface The interface on which you want to enable tracing.
163
   * @param explicitFilename Treat the prefix as an explicit filename if true.
163
   * \param explicitFilename Treat the prefix as an explicit filename if true.
164
   */
164
   */
165
  virtual void EnableAsciiIpv4Internal (Ptr<OutputStreamWrapper> stream, 
165
  virtual void EnableAsciiIpv4Internal (Ptr<OutputStreamWrapper> stream, 
166
                                        std::string prefix, 
166
                                        std::string prefix, 
 Lines 169-238    Link Here 
169
                                        bool explicitFilename) = 0;
169
                                        bool explicitFilename) = 0;
170
170
171
  /**
171
  /**
172
   * @brief Enable ascii trace output on the indicated Ipv4 and interface pair.
172
   * \brief Enable ascii trace output on the indicated Ipv4 and interface pair.
173
   *
173
   *
174
   * @param prefix Filename prefix to use for ascii files.
174
   * \param prefix Filename prefix to use for ascii files.
175
   * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
175
   * \param ipv4 Ptr<Ipv4> on which you want to enable tracing.
176
   * @param interface The interface on which you want to enable tracing.
176
   * \param interface The interface on which you want to enable tracing.
177
   * @param explicitFilename Treat the prefix as an explicit filename if true.
177
   * \param explicitFilename Treat the prefix as an explicit filename if true.
178
   */
178
   */
179
  void EnableAsciiIpv4 (std::string prefix, Ptr<Ipv4> ipv4, uint32_t interface, bool explicitFilename = false);
179
  void EnableAsciiIpv4 (std::string prefix, Ptr<Ipv4> ipv4, uint32_t interface, bool explicitFilename = false);
180
180
181
  /**
181
  /**
182
   * @brief Enable ascii trace output on the indicated Ipv4 and interface pair.
182
   * \brief Enable ascii trace output on the indicated Ipv4 and interface pair.
183
   *
183
   *
184
   * @param stream An OutputStreamWrapper representing an existing file to use
184
   * \param stream An OutputStreamWrapper representing an existing file to use
185
   *               when writing trace data.
185
   *               when writing trace data.
186
   * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
186
   * \param ipv4 Ptr<Ipv4> on which you want to enable tracing.
187
   * @param interface The interface on which you want to enable tracing.
187
   * \param interface The interface on which you want to enable tracing.
188
   */
188
   */
189
  void EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, Ptr<Ipv4> ipv4, uint32_t interface);
189
  void EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, Ptr<Ipv4> ipv4, uint32_t interface);
190
190
191
  /**
191
  /**
192
   * @brief Enable ascii trace output the indicated Ipv4 and interface pair
192
   * \brief Enable ascii trace output the indicated Ipv4 and interface pair
193
   * using an Ipv4 previously named using the ns-3 object name service.
193
   * using an Ipv4 previously named using the ns-3 object name service.
194
   *
194
   *
195
   * @param prefix filename prefix to use for ascii files.
195
   * \param prefix filename prefix to use for ascii files.
196
   * @param ipv4Name The name of the Ipv4 on which you want to enable tracing.
196
   * \param ipv4Name The name of the Ipv4 on which you want to enable tracing.
197
   * @param interface The interface on which you want to enable tracing.
197
   * \param interface The interface on which you want to enable tracing.
198
   * @param explicitFilename Treat the prefix as an explicit filename if true.
198
   * \param explicitFilename Treat the prefix as an explicit filename if true.
199
   */
199
   */
200
  void EnableAsciiIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename = false);
200
  void EnableAsciiIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename = false);
201
201
202
  /**
202
  /**
203
   * @brief Enable ascii trace output the indicated net device using a device 
203
   * \brief Enable ascii trace output the indicated net device using a device 
204
   * previously named using the ns-3 object name service.
204
   * previously named using the ns-3 object name service.
205
   *
205
   *
206
   * @param stream An OutputStreamWrapper representing an existing file to use
206
   * \param stream An OutputStreamWrapper representing an existing file to use
207
   *               when writing trace data.
207
   *               when writing trace data.
208
   * @param ipv4Name The name of the Ipv4 on which you want to enable tracing.
208
   * \param ipv4Name The name of the Ipv4 on which you want to enable tracing.
209
   * @param interface The interface on which you want to enable tracing.
209
   * \param interface The interface on which you want to enable tracing.
210
   */
210
   */
211
  void EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, std::string ipv4Name, uint32_t interface);
211
  void EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, std::string ipv4Name, uint32_t interface);
212
212
213
  /**
213
  /**
214
   * @brief Enable ascii trace output on each Ipv4 and interface pair in the 
214
   * \brief Enable ascii trace output on each Ipv4 and interface pair in the 
215
   * container
215
   * container
216
   *
216
   *
217
   * @param prefix Filename prefix to use for ascii files.
217
   * \param prefix Filename prefix to use for ascii files.
218
   * @param c Ipv4InterfaceContainer of Ipv4 and interface pairs on which to 
218
   * \param c Ipv4InterfaceContainer of Ipv4 and interface pairs on which to 
219
   *          enable tracing.
219
   *          enable tracing.
220
   */
220
   */
221
  void EnableAsciiIpv4 (std::string prefix, Ipv4InterfaceContainer c);
221
  void EnableAsciiIpv4 (std::string prefix, Ipv4InterfaceContainer c);
222
222
223
  /**
223
  /**
224
   * @brief Enable ascii trace output on each device in the container which is
224
   * \brief Enable ascii trace output on each device in the container which is
225
   * of the appropriate type.
225
   * of the appropriate type.
226
   *
226
   *
227
   * @param stream An OutputStreamWrapper representing an existing file to use
227
   * \param stream An OutputStreamWrapper representing an existing file to use
228
   *               when writing trace data.
228
   *               when writing trace data.
229
   * @param c Ipv4InterfaceContainer of Ipv4 and interface pairs on which to 
229
   * \param c Ipv4InterfaceContainer of Ipv4 and interface pairs on which to 
230
   *          enable tracing.
230
   *          enable tracing.
231
   */
231
   */
232
  void EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, Ipv4InterfaceContainer c);
232
  void EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, Ipv4InterfaceContainer c);
233
233
234
  /**
234
  /**
235
   * @brief Enable ascii trace output on all Ipv4 and interface pairs existing
235
   * \brief Enable ascii trace output on all Ipv4 and interface pairs existing
236
   * in the nodes provided in the container.
236
   * in the nodes provided in the container.
237
   *
237
   *
238
   * \param prefix Filename prefix to use for ascii files.
238
   * \param prefix Filename prefix to use for ascii files.
 Lines 241-305    Link Here 
241
  void EnableAsciiIpv4 (std::string prefix, NodeContainer n);
241
  void EnableAsciiIpv4 (std::string prefix, NodeContainer n);
242
242
243
  /**
243
  /**
244
   * @brief Enable ascii trace output on all Ipv4 and interface pairs existing
244
   * \brief Enable ascii trace output on all Ipv4 and interface pairs existing
245
   * in the nodes provided in the container.
245
   * in the nodes provided in the container.
246
   *
246
   *
247
   * @param stream An OutputStreamWrapper representing an existing file to use
247
   * \param stream An OutputStreamWrapper representing an existing file to use
248
   *               when writing trace data.
248
   *               when writing trace data.
249
   * \param n container of nodes.
249
   * \param n container of nodes.
250
   */
250
   */
251
  void EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, NodeContainer n);
251
  void EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, NodeContainer n);
252
252
253
  /**
253
  /**
254
   * @brief Enable ascii trace output on all Ipv4 and interface pairs existing
254
   * \brief Enable ascii trace output on all Ipv4 and interface pairs existing
255
   * in the set of all nodes created in the simulation.
255
   * in the set of all nodes created in the simulation.
256
   *
256
   *
257
   * @param prefix Filename prefix to use for ascii files.
257
   * \param prefix Filename prefix to use for ascii files.
258
   */
258
   */
259
  void EnableAsciiIpv4All (std::string prefix);
259
  void EnableAsciiIpv4All (std::string prefix);
260
260
261
  /**
261
  /**
262
   * @brief Enable ascii trace output on each device (which is of the
262
   * \brief Enable ascii trace output on each device (which is of the
263
   * appropriate type) in the set of all nodes created in the simulation.
263
   * appropriate type) in the set of all nodes created in the simulation.
264
   *
264
   *
265
   * @param stream An OutputStreamWrapper representing an existing file to use
265
   * \param stream An OutputStreamWrapper representing an existing file to use
266
   *               when writing trace data.
266
   *               when writing trace data.
267
   */
267
   */
268
  void EnableAsciiIpv4All (Ptr<OutputStreamWrapper> stream);
268
  void EnableAsciiIpv4All (Ptr<OutputStreamWrapper> stream);
269
269
270
  /**
270
  /**
271
   * @brief Enable pcap output on the Ipv4 and interface pair specified by a 
271
   * \brief Enable pcap output on the Ipv4 and interface pair specified by a 
272
   * global node-id (of a previously created node) and interface.  Since there
272
   * global node-id (of a previously created node) and interface.  Since there
273
   * can be only one Ipv4 aggregated to a node, the node-id unambiguously 
273
   * can be only one Ipv4 aggregated to a node, the node-id unambiguously 
274
   * determines the Ipv4.
274
   * determines the Ipv4.
275
   *
275
   *
276
   * @param prefix Filename prefix to use when creating ascii trace files
276
   * \param prefix Filename prefix to use when creating ascii trace files
277
   * @param nodeid The node identifier/number of the node on which to enable
277
   * \param nodeid The node identifier/number of the node on which to enable
278
   *               ascii tracing
278
   *               ascii tracing
279
   * @param deviceid The device identifier/index of the device on which to enable
279
   * \param deviceid The device identifier/index of the device on which to enable
280
   *                 ascii tracing
280
   *                 ascii tracing
281
   * @param explicitFilename Treat the prefix as an explicit filename if true
281
   * \param explicitFilename Treat the prefix as an explicit filename if true
282
   */
282
   */
283
  void EnableAsciiIpv4 (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename);
283
  void EnableAsciiIpv4 (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename);
284
284
285
  /**
285
  /**
286
   * @brief Enable pcap output on the Ipv4 and interface pair specified by a 
286
   * \brief Enable pcap output on the Ipv4 and interface pair specified by a 
287
   * global node-id (of a previously created node) and interface.  Since there
287
   * global node-id (of a previously created node) and interface.  Since there
288
   * can be only one Ipv4 aggregated to a node, the node-id unambiguously 
288
   * can be only one Ipv4 aggregated to a node, the node-id unambiguously 
289
   * determines the Ipv4.
289
   * determines the Ipv4.
290
   *
290
   *
291
   * @param stream An OutputStreamWrapper representing an existing file to use
291
   * \param stream An OutputStreamWrapper representing an existing file to use
292
   *               when writing trace data.
292
   *               when writing trace data.
293
   * @param nodeid The node identifier/number of the node on which to enable
293
   * \param nodeid The node identifier/number of the node on which to enable
294
   *               ascii tracing
294
   *               ascii tracing
295
   * @param interface The interface on which you want to enable tracing.
295
   * \param interface The interface on which you want to enable tracing.
296
   * @param explicitFilename Treat the prefix as an explicit filename if true
296
   * \param explicitFilename Treat the prefix as an explicit filename if true
297
   */
297
   */
298
  void EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, uint32_t nodeid, uint32_t interface, bool explicitFilename);
298
  void EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, uint32_t nodeid, uint32_t interface, bool explicitFilename);
299
299
300
private:
300
private:
301
  /**
301
  /**
302
   * @internal Avoid code duplication.
302
   * \internal Avoid code duplication.
303
   */
303
   */
304
  void EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, 
304
  void EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, 
305
                            std::string prefix, 
305
                            std::string prefix, 
 Lines 308-324    Link Here 
308
                            bool explicitFilename);
308
                            bool explicitFilename);
309
309
310
  /**
310
  /**
311
   * @internal Avoid code duplication.
311
   * \internal Avoid code duplication.
312
   */
312
   */
313
  void EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n);
313
  void EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n);
314
314
315
  /**
315
  /**
316
   * @internal Avoid code duplication.
316
   * \internal Avoid code duplication.
317
   */
317
   */
318
  void EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, Ipv4InterfaceContainer c);
318
  void EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, Ipv4InterfaceContainer c);
319
319
320
  /**
320
  /**
321
   * @internal Avoid code duplication.
321
   * \internal Avoid code duplication.
322
   */
322
   */
323
  void EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, 
323
  void EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, 
324
                            std::string prefix, 
324
                            std::string prefix, 
 Lines 327-333    Link Here 
327
                            bool explicitFilename);
327
                            bool explicitFilename);
328
328
329
  /**
329
  /**
330
   * @internal Avoid code duplication.
330
   * \internal Avoid code duplication.
331
   */
331
   */
332
  void EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, 
332
  void EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, 
333
                            std::string prefix, 
333
                            std::string prefix, 
 Lines 337-366    Link Here 
337
};
337
};
338
338
339
/**
339
/**
340
 * @brief Base class providing common user-level pcap operations for helpers
340
 * \brief Base class providing common user-level pcap operations for helpers
341
 * representing IPv6 protocols .
341
 * representing IPv6 protocols .
342
 */
342
 */
343
class PcapHelperForIpv6
343
class PcapHelperForIpv6
344
{
344
{
345
public:
345
public:
346
  /**
346
  /**
347
   * @brief Construct a PcapHelperForIpv6.
347
   * \brief Construct a PcapHelperForIpv6.
348
   */
348
   */
349
  PcapHelperForIpv6 () {}
349
  PcapHelperForIpv6 () {}
350
350
351
  /**
351
  /**
352
   * @brief Destroy a PcapHelperForIpv6
352
   * \brief Destroy a PcapHelperForIpv6
353
   */
353
   */
354
  virtual ~PcapHelperForIpv6 () {}
354
  virtual ~PcapHelperForIpv6 () {}
355
355
356
  /**
356
  /**
357
   * @brief Enable pcap output the indicated Ipv6 and interface pair.
357
   * \brief Enable pcap output the indicated Ipv6 and interface pair.
358
   * @internal
358
   * \internal
359
   *
359
   *
360
   * @param prefix Filename prefix to use for pcap files.
360
   * \param prefix Filename prefix to use for pcap files.
361
   * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
361
   * \param ipv6 Ptr<Ipv6> on which you want to enable tracing.
362
   * @param interface Interface on ipv6 on which you want to enable tracing.
362
   * \param interface Interface on ipv6 on which you want to enable tracing.
363
   * @param explicitFilename Treat the prefix as an explicit filename if true.
363
   * \param explicitFilename Treat the prefix as an explicit filename if true.
364
   */
364
   */
365
  virtual void EnablePcapIpv6Internal (std::string prefix, 
365
  virtual void EnablePcapIpv6Internal (std::string prefix, 
366
                                       Ptr<Ipv6> ipv6, 
366
                                       Ptr<Ipv6> ipv6, 
 Lines 368-403    Link Here 
368
                                       bool explicitFilename) = 0;
368
                                       bool explicitFilename) = 0;
369
369
370
  /**
370
  /**
371
   * @brief Enable pcap output the indicated Ipv6 and interface pair.
371
   * \brief Enable pcap output the indicated Ipv6 and interface pair.
372
   *
372
   *
373
   * @param prefix Filename prefix to use for pcap files.
373
   * \param prefix Filename prefix to use for pcap files.
374
   * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
374
   * \param ipv6 Ptr<Ipv6> on which you want to enable tracing.
375
   * @param interface Interface on ipv6 on which you want to enable tracing.
375
   * \param interface Interface on ipv6 on which you want to enable tracing.
376
   * @param explicitFilename Treat the prefix as an explicit filename if true.
376
   * \param explicitFilename Treat the prefix as an explicit filename if true.
377
   */
377
   */
378
  void EnablePcapIpv6 (std::string prefix, Ptr<Ipv6> ipv6, uint32_t interface, bool explicitFilename = false);
378
  void EnablePcapIpv6 (std::string prefix, Ptr<Ipv6> ipv6, uint32_t interface, bool explicitFilename = false);
379
379
380
  /**
380
  /**
381
   * @brief Enable pcap output the indicated Ipv6 and interface pair using a
381
   * \brief Enable pcap output the indicated Ipv6 and interface pair using a
382
   * Ptr<Ipv6> previously named using the ns-3 object name service.
382
   * Ptr<Ipv6> previously named using the ns-3 object name service.
383
   *
383
   *
384
   * @param prefix filename prefix to use for pcap files.
384
   * \param prefix filename prefix to use for pcap files.
385
   * @param ipv6Name Name of the Ptr<Ipv6> on which you want to enable tracing.
385
   * \param ipv6Name Name of the Ptr<Ipv6> on which you want to enable tracing.
386
   * @param interface Interface on ipv6 on which you want to enable tracing.
386
   * \param interface Interface on ipv6 on which you want to enable tracing.
387
   * @param explicitFilename Treat the prefix as an explicit filename if true.
387
   * \param explicitFilename Treat the prefix as an explicit filename if true.
388
   */
388
   */
389
  void EnablePcapIpv6 (std::string prefix, std::string ipv6Name, uint32_t interface, bool explicitFilename = false);
389
  void EnablePcapIpv6 (std::string prefix, std::string ipv6Name, uint32_t interface, bool explicitFilename = false);
390
390
391
  /**
391
  /**
392
   * @brief Enable pcap output on each Ipv6 and interface pair in the container.
392
   * \brief Enable pcap output on each Ipv6 and interface pair in the container.
393
   *
393
   *
394
   * @param prefix Filename prefix to use for pcap files.
394
   * \param prefix Filename prefix to use for pcap files.
395
   * @param c Ipv6InterfaceContainer of Ipv6 and interface pairs
395
   * \param c Ipv6InterfaceContainer of Ipv6 and interface pairs
396
   */
396
   */
397
  void EnablePcapIpv6 (std::string prefix, Ipv6InterfaceContainer c);
397
  void EnablePcapIpv6 (std::string prefix, Ipv6InterfaceContainer c);
398
398
399
  /**
399
  /**
400
   * @brief Enable pcap output on all Ipv6 and interface pairs existing in the
400
   * \brief Enable pcap output on all Ipv6 and interface pairs existing in the
401
   * nodes provided in the container.
401
   * nodes provided in the container.
402
   *
402
   *
403
   * \param prefix Filename prefix to use for pcap files.
403
   * \param prefix Filename prefix to use for pcap files.
 Lines 406-452    Link Here 
406
  void EnablePcapIpv6 (std::string prefix, NodeContainer n);
406
  void EnablePcapIpv6 (std::string prefix, NodeContainer n);
407
407
408
  /**
408
  /**
409
   * @brief Enable pcap output on the Ipv6 and interface pair specified by a 
409
   * \brief Enable pcap output on the Ipv6 and interface pair specified by a 
410
   * global node-id (of a previously created node) and interface.  Since there
410
   * global node-id (of a previously created node) and interface.  Since there
411
   * can be only one Ipv6 aggregated to a node, the node-id unambiguously 
411
   * can be only one Ipv6 aggregated to a node, the node-id unambiguously 
412
   * determines the Ipv6.
412
   * determines the Ipv6.
413
   *
413
   *
414
   * @param prefix Filename prefix to use for pcap files.
414
   * \param prefix Filename prefix to use for pcap files.
415
   * @param nodeid The node identifier/number of the node on which to enable tracing.
415
   * \param nodeid The node identifier/number of the node on which to enable tracing.
416
   * @param interface Interface on ipv6 on which you want to enable tracing.
416
   * \param interface Interface on ipv6 on which you want to enable tracing.
417
   * @param explicitFilename Treat the prefix as an explicit filename if true
417
   * \param explicitFilename Treat the prefix as an explicit filename if true
418
   */
418
   */
419
  void EnablePcapIpv6 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename);
419
  void EnablePcapIpv6 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename);
420
420
421
  /**
421
  /**
422
   * @brief Enable pcap output on all Ipv6 and interface pairs existing in the 
422
   * \brief Enable pcap output on all Ipv6 and interface pairs existing in the 
423
   * set of all nodes created in the simulation.
423
   * set of all nodes created in the simulation.
424
   *
424
   *
425
   * @param prefix Filename prefix to use for pcap files.
425
   * \param prefix Filename prefix to use for pcap files.
426
   */
426
   */
427
  void EnablePcapIpv6All (std::string prefix);
427
  void EnablePcapIpv6All (std::string prefix);
428
};
428
};
429
429
430
/**
430
/**
431
 * @brief Base class providing common user-level ascii trace operations for
431
 * \brief Base class providing common user-level ascii trace operations for
432
 * helpers representing IPv6 protocols .
432
 * helpers representing IPv6 protocols .
433
 */
433
 */
434
class AsciiTraceHelperForIpv6
434
class AsciiTraceHelperForIpv6
435
{
435
{
436
public:
436
public:
437
  /**
437
  /**
438
   * @brief Construct an AsciiTraceHelperForIpv6.
438
   * \brief Construct an AsciiTraceHelperForIpv6.
439
   */
439
   */
440
  AsciiTraceHelperForIpv6 () {}
440
  AsciiTraceHelperForIpv6 () {}
441
441
442
  /**
442
  /**
443
   * @brief Destroy an AsciiTraceHelperForIpv6
443
   * \brief Destroy an AsciiTraceHelperForIpv6
444
   */
444
   */
445
  virtual ~AsciiTraceHelperForIpv6 () {}
445
  virtual ~AsciiTraceHelperForIpv6 () {}
446
446
447
  /**
447
  /**
448
   * @brief Enable ascii trace output on the indicated Ipv6 and interface pair.
448
   * \brief Enable ascii trace output on the indicated Ipv6 and interface pair.
449
   * @internal
449
   * \internal
450
   *
450
   *
451
   * The implementation is expected to use a provided Ptr<OutputStreamWrapper>
451
   * The implementation is expected to use a provided Ptr<OutputStreamWrapper>
452
   * if it is non-null.  If the OutputStreamWrapper is null, the implementation
452
   * if it is non-null.  If the OutputStreamWrapper is null, the implementation
 Lines 462-473    Link Here 
462
   * context could be important, so the helper implementation is expected to 
462
   * context could be important, so the helper implementation is expected to 
463
   * TraceConnect.
463
   * TraceConnect.
464
   *
464
   *
465
   * @param stream An OutputStreamWrapper representing an existing file to use
465
   * \param stream An OutputStreamWrapper representing an existing file to use
466
   *               when writing trace data.
466
   *               when writing trace data.
467
   * @param prefix Filename prefix to use for ascii trace files.
467
   * \param prefix Filename prefix to use for ascii trace files.
468
   * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
468
   * \param ipv6 Ptr<Ipv6> on which you want to enable tracing.
469
   * @param interface The interface on which you want to enable tracing.
469
   * \param interface The interface on which you want to enable tracing.
470
   * @param explicitFilename Treat the prefix as an explicit filename if true.
470
   * \param explicitFilename Treat the prefix as an explicit filename if true.
471
   */
471
   */
472
  virtual void EnableAsciiIpv6Internal (Ptr<OutputStreamWrapper> stream, 
472
  virtual void EnableAsciiIpv6Internal (Ptr<OutputStreamWrapper> stream, 
473
                                        std::string prefix, 
473
                                        std::string prefix, 
 Lines 476-545    Link Here 
476
                                        bool explicitFilename) = 0;
476
                                        bool explicitFilename) = 0;
477
477
478
  /**
478
  /**
479
   * @brief Enable ascii trace output on the indicated Ipv6 and interface pair.
479
   * \brief Enable ascii trace output on the indicated Ipv6 and interface pair.
480
   *
480
   *
481
   * @param prefix Filename prefix to use for ascii files.
481
   * \param prefix Filename prefix to use for ascii files.
482
   * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
482
   * \param ipv6 Ptr<Ipv6> on which you want to enable tracing.
483
   * @param interface The interface on which you want to enable tracing.
483
   * \param interface The interface on which you want to enable tracing.
484
   * @param explicitFilename Treat the prefix as an explicit filename if true.
484
   * \param explicitFilename Treat the prefix as an explicit filename if true.
485
   */
485
   */
486
  void EnableAsciiIpv6 (std::string prefix, Ptr<Ipv6> ipv6, uint32_t interface, bool explicitFilename = false);
486
  void EnableAsciiIpv6 (std::string prefix, Ptr<Ipv6> ipv6, uint32_t interface, bool explicitFilename = false);
487
487
488
  /**
488
  /**
489
   * @brief Enable ascii trace output on the indicated Ipv6 and interface pair.
489
   * \brief Enable ascii trace output on the indicated Ipv6 and interface pair.
490
   *
490
   *
491
   * @param stream An OutputStreamWrapper representing an existing file to use
491
   * \param stream An OutputStreamWrapper representing an existing file to use
492
   *               when writing trace data.
492
   *               when writing trace data.
493
   * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
493
   * \param ipv6 Ptr<Ipv6> on which you want to enable tracing.
494
   * @param interface The interface on which you want to enable tracing.
494
   * \param interface The interface on which you want to enable tracing.
495
   */
495
   */
496
  void EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, Ptr<Ipv6> ipv6, uint32_t interface);
496
  void EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, Ptr<Ipv6> ipv6, uint32_t interface);
497
497
498
  /**
498
  /**
499
   * @brief Enable ascii trace output the indicated Ipv6 and interface pair
499
   * \brief Enable ascii trace output the indicated Ipv6 and interface pair
500
   * using an Ipv6 previously named using the ns-3 object name service.
500
   * using an Ipv6 previously named using the ns-3 object name service.
501
   *
501
   *
502
   * @param prefix filename prefix to use for ascii files.
502
   * \param prefix filename prefix to use for ascii files.
503
   * @param ipv6Name The name of the Ipv6 on which you want to enable tracing.
503
   * \param ipv6Name The name of the Ipv6 on which you want to enable tracing.
504
   * @param interface The interface on which you want to enable tracing.
504
   * \param interface The interface on which you want to enable tracing.
505
   * @param explicitFilename Treat the prefix as an explicit filename if true.
505
   * \param explicitFilename Treat the prefix as an explicit filename if true.
506
   */
506
   */
507
  void EnableAsciiIpv6 (std::string prefix, std::string ipv6Name, uint32_t interface, bool explicitFilename = false);
507
  void EnableAsciiIpv6 (std::string prefix, std::string ipv6Name, uint32_t interface, bool explicitFilename = false);
508
508
509
  /**
509
  /**
510
   * @brief Enable ascii trace output the indicated net device using a device 
510
   * \brief Enable ascii trace output the indicated net device using a device 
511
   * previously named using the ns-3 object name service.
511
   * previously named using the ns-3 object name service.
512
   *
512
   *
513
   * @param stream An OutputStreamWrapper representing an existing file to use
513
   * \param stream An OutputStreamWrapper representing an existing file to use
514
   *               when writing trace data.
514
   *               when writing trace data.
515
   * @param ipv6Name The name of the Ipv6 on which you want to enable tracing.
515
   * \param ipv6Name The name of the Ipv6 on which you want to enable tracing.
516
   * @param interface The interface on which you want to enable tracing.
516
   * \param interface The interface on which you want to enable tracing.
517
   */
517
   */
518
  void EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, std::string ipv6Name, uint32_t interface); 
518
  void EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, std::string ipv6Name, uint32_t interface); 
519
519
520
  /**
520
  /**
521
   * @brief Enable ascii trace output on each Ipv6 and interface pair in the 
521
   * \brief Enable ascii trace output on each Ipv6 and interface pair in the 
522
   * container
522
   * container
523
   *
523
   *
524
   * @param prefix Filename prefix to use for ascii files.
524
   * \param prefix Filename prefix to use for ascii files.
525
   * @param c Ipv6InterfaceContainer of Ipv6 and interface pairs on which to 
525
   * \param c Ipv6InterfaceContainer of Ipv6 and interface pairs on which to 
526
   *          enable tracing.
526
   *          enable tracing.
527
   */
527
   */
528
  void EnableAsciiIpv6 (std::string prefix, Ipv6InterfaceContainer c);
528
  void EnableAsciiIpv6 (std::string prefix, Ipv6InterfaceContainer c);
529
529
530
  /**
530
  /**
531
   * @brief Enable ascii trace output on each device in the container which is
531
   * \brief Enable ascii trace output on each device in the container which is
532
   * of the appropriate type.
532
   * of the appropriate type.
533
   *
533
   *
534
   * @param stream An OutputStreamWrapper representing an existing file to use
534
   * \param stream An OutputStreamWrapper representing an existing file to use
535
   *               when writing trace data.
535
   *               when writing trace data.
536
   * @param c Ipv6InterfaceContainer of Ipv6 and interface pairs on which to 
536
   * \param c Ipv6InterfaceContainer of Ipv6 and interface pairs on which to 
537
   *          enable tracing.
537
   *          enable tracing.
538
   */
538
   */
539
  void EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, Ipv6InterfaceContainer c);
539
  void EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, Ipv6InterfaceContainer c);
540
540
541
  /**
541
  /**
542
   * @brief Enable ascii trace output on all Ipv6 and interface pairs existing
542
   * \brief Enable ascii trace output on all Ipv6 and interface pairs existing
543
   * in the nodes provided in the container.
543
   * in the nodes provided in the container.
544
   *
544
   *
545
   * \param prefix Filename prefix to use for ascii files.
545
   * \param prefix Filename prefix to use for ascii files.
 Lines 548-611    Link Here 
548
  void EnableAsciiIpv6 (std::string prefix, NodeContainer n);
548
  void EnableAsciiIpv6 (std::string prefix, NodeContainer n);
549
549
550
  /**
550
  /**
551
   * @brief Enable ascii trace output on all Ipv6 and interface pairs existing
551
   * \brief Enable ascii trace output on all Ipv6 and interface pairs existing
552
   * in the nodes provided in the container.
552
   * in the nodes provided in the container.
553
   *
553
   *
554
   * @param stream An OutputStreamWrapper representing an existing file to use
554
   * \param stream An OutputStreamWrapper representing an existing file to use
555
   *               when writing trace data.
555
   *               when writing trace data.
556
   * \param n container of nodes.
556
   * \param n container of nodes.
557
   */
557
   */
558
  void EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, NodeContainer n);
558
  void EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, NodeContainer n);
559
559
560
  /**
560
  /**
561
   * @brief Enable pcap output on the Ipv6 and interface pair specified by a 
561
   * \brief Enable pcap output on the Ipv6 and interface pair specified by a 
562
   * global node-id (of a previously created node) and interface.  Since there
562
   * global node-id (of a previously created node) and interface.  Since there
563
   * can be only one Ipv6 aggregated to a node, the node-id unambiguously 
563
   * can be only one Ipv6 aggregated to a node, the node-id unambiguously 
564
   * determines the Ipv6.
564
   * determines the Ipv6.
565
   *
565
   *
566
   * @param prefix Filename prefix to use when creating ascii trace files
566
   * \param prefix Filename prefix to use when creating ascii trace files
567
   * @param nodeid The node identifier/number of the node on which to enable
567
   * \param nodeid The node identifier/number of the node on which to enable
568
   *               ascii tracing
568
   *               ascii tracing
569
   * @param interface The device identifier/index of the device on which to enable
569
   * \param interface The device identifier/index of the device on which to enable
570
   *               ascii tracing
570
   *               ascii tracing
571
   * @param explicitFilename Treat the prefix as an explicit filename if true.
571
   * \param explicitFilename Treat the prefix as an explicit filename if true.
572
   */
572
   */
573
  void EnableAsciiIpv6 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename);
573
  void EnableAsciiIpv6 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename);
574
574
575
  /**
575
  /**
576
   * @brief Enable pcap output on the Ipv6 and interface pair specified by a 
576
   * \brief Enable pcap output on the Ipv6 and interface pair specified by a 
577
   * global node-id (of a previously created node) and interface.  Since there
577
   * global node-id (of a previously created node) and interface.  Since there
578
   * can be only one Ipv6 aggregated to a node, the node-id unambiguously 
578
   * can be only one Ipv6 aggregated to a node, the node-id unambiguously 
579
   * determines the Ipv6.
579
   * determines the Ipv6.
580
   *
580
   *
581
   * @param stream An OutputStreamWrapper representing an existing file to use
581
   * \param stream An OutputStreamWrapper representing an existing file to use
582
   *               when writing trace data.
582
   *               when writing trace data.
583
   * @param nodeid The node identifier/number of the node on which to enable
583
   * \param nodeid The node identifier/number of the node on which to enable
584
   *               ascii tracing
584
   *               ascii tracing
585
   * @param interface The interface on which you want to enable tracing.
585
   * \param interface The interface on which you want to enable tracing.
586
   */
586
   */
587
  void EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, uint32_t nodeid, uint32_t interface);
587
  void EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, uint32_t nodeid, uint32_t interface);
588
588
589
  /**
589
  /**
590
   * @brief Enable ascii trace output on all Ipv6 and interface pairs existing
590
   * \brief Enable ascii trace output on all Ipv6 and interface pairs existing
591
   * in the set of all nodes created in the simulation.
591
   * in the set of all nodes created in the simulation.
592
   *
592
   *
593
   * @param prefix Filename prefix to use for ascii files.
593
   * \param prefix Filename prefix to use for ascii files.
594
   */
594
   */
595
  void EnableAsciiIpv6All (std::string prefix);
595
  void EnableAsciiIpv6All (std::string prefix);
596
596
597
  /**
597
  /**
598
   * @brief Enable ascii trace output on each device (which is of the
598
   * \brief Enable ascii trace output on each device (which is of the
599
   * appropriate type) in the set of all nodes created in the simulation.
599
   * appropriate type) in the set of all nodes created in the simulation.
600
   *
600
   *
601
   * @param stream An OutputStreamWrapper representing an existing file to use
601
   * \param stream An OutputStreamWrapper representing an existing file to use
602
   *               when writing trace data.
602
   *               when writing trace data.
603
   */
603
   */
604
  void EnableAsciiIpv6All (Ptr<OutputStreamWrapper> stream);
604
  void EnableAsciiIpv6All (Ptr<OutputStreamWrapper> stream);
605
605
606
private:
606
private:
607
  /**
607
  /**
608
   * @internal Avoid code duplication.
608
   * \internal Avoid code duplication.
609
   */
609
   */
610
  void EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, 
610
  void EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, 
611
                            std::string prefix, 
611
                            std::string prefix, 
 Lines 614-630    Link Here 
614
                            bool explicitFilename);
614
                            bool explicitFilename);
615
615
616
  /**
616
  /**
617
   * @internal Avoid code duplication.
617
   * \internal Avoid code duplication.
618
   */
618
   */
619
  void EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n);
619
  void EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n);
620
620
621
  /**
621
  /**
622
   * @internal Avoid code duplication.
622
   * \internal Avoid code duplication.
623
   */
623
   */
624
  void EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, Ipv6InterfaceContainer c);
624
  void EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, Ipv6InterfaceContainer c);
625
625
626
  /**
626
  /**
627
   * @internal Avoid code duplication.
627
   * \internal Avoid code duplication.
628
   */
628
   */
629
  void EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, 
629
  void EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, 
630
                            std::string prefix, 
630
                            std::string prefix, 
 Lines 633-639    Link Here 
633
                            bool explicitFilename);
633
                            bool explicitFilename);
634
634
635
  /**
635
  /**
636
   * @internal Avoid code duplication.
636
   * \internal Avoid code duplication.
637
   */
637
   */
638
  void EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, 
638
  void EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, 
639
                            std::string prefix, 
639
                            std::string prefix, 
(-)a/src/internet/helper/ipv4-address-helper.h (-23 / +23 lines)
 Lines 26-32    Link Here 
26
namespace ns3 {
26
namespace ns3 {
27
27
28
/**
28
/**
29
 * @brief A helper class to make life easier while doing simple IPv4 address
29
 * \brief A helper class to make life easier while doing simple IPv4 address
30
 * assignment in scripts.
30
 * assignment in scripts.
31
 *
31
 *
32
 * This class is a very simple IPv4 address generator.  You can think of it
32
 * This class is a very simple IPv4 address generator.  You can think of it
 Lines 40-58    Link Here 
40
 * We do call into the global address generator to make sure that there are
40
 * We do call into the global address generator to make sure that there are
41
 * no duplicate addresses generated.
41
 * no duplicate addresses generated.
42
 *
42
 *
43
 * @see Ipv4AddressGenerator
43
 * \see Ipv4AddressGenerator
44
 */
44
 */
45
class Ipv4AddressHelper
45
class Ipv4AddressHelper
46
{
46
{
47
public:
47
public:
48
/**
48
/**
49
 * @brief Construct a helper class to make life easier while doing simple IPv4
49
 * \brief Construct a helper class to make life easier while doing simple IPv4
50
 * address assignment in scripts.
50
 * address assignment in scripts.
51
 */
51
 */
52
  Ipv4AddressHelper ();
52
  Ipv4AddressHelper ();
53
53
54
/**
54
/**
55
 * @brief Construct a helper class to make life easier while doing simple IPv4
55
 * \brief Construct a helper class to make life easier while doing simple IPv4
56
 * address assignment in scripts.  This version sets the base and mask
56
 * address assignment in scripts.  This version sets the base and mask
57
 * in the constructor
57
 * in the constructor
58
 */
58
 */
 Lines 60-66    Link Here 
60
                     Ipv4Address base = "0.0.0.1");
60
                     Ipv4Address base = "0.0.0.1");
61
61
62
/**
62
/**
63
 * @brief Set the base network number, network mask and base address.
63
 * \brief Set the base network number, network mask and base address.
64
 *
64
 *
65
 * The address helper allocates IP addresses based on a given network number
65
 * The address helper allocates IP addresses based on a given network number
66
 * and mask combination along with an initial IP address.
66
 * and mask combination along with an initial IP address.
 Lines 79-98    Link Here 
79
 *
79
 *
80
 * and the first address generated will be 192.168.1.1.
80
 * and the first address generated will be 192.168.1.1.
81
 *
81
 *
82
 * @param network The Ipv4Address containing the initial network number to
82
 * \param network The Ipv4Address containing the initial network number to
83
 * use during allocation.  The bits outside the network mask are not used.
83
 * use during allocation.  The bits outside the network mask are not used.
84
 * @param mask The Ipv4Mask containing one bits in each bit position of the 
84
 * \param mask The Ipv4Mask containing one bits in each bit position of the 
85
 * network number.
85
 * network number.
86
 * @param base An optional Ipv4Address containing the initial address used for 
86
 * \param base An optional Ipv4Address containing the initial address used for 
87
 * IP address allocation.  Will be combined (ORed) with the network number to
87
 * IP address allocation.  Will be combined (ORed) with the network number to
88
 * generate the first IP address.  Defaults to 0.0.0.1.
88
 * generate the first IP address.  Defaults to 0.0.0.1.
89
 * @returns Nothing.
89
 * \returns Nothing.
90
 */
90
 */
91
  void SetBase (Ipv4Address network, Ipv4Mask mask, 
91
  void SetBase (Ipv4Address network, Ipv4Mask mask, 
92
                Ipv4Address base = "0.0.0.1");
92
                Ipv4Address base = "0.0.0.1");
93
93
94
/**
94
/**
95
 * @brief Increment the network number and reset the IP address counter to 
95
 * \brief Increment the network number and reset the IP address counter to 
96
 * the base value provided in the SetBase method.
96
 * the base value provided in the SetBase method.
97
 *
97
 *
98
 * The address helper allocates IP addresses based on a given network number
98
 * The address helper allocates IP addresses based on a given network number
 Lines 112-126    Link Here 
112
 * allocated addresses returned by NewAddress would be 192.168.2.3, 
112
 * allocated addresses returned by NewAddress would be 192.168.2.3, 
113
 * 192.168.2.4, etc.
113
 * 192.168.2.4, etc.
114
 *
114
 *
115
 * @returns The value of the incremented network number that will be used in
115
 * \returns The value of the incremented network number that will be used in
116
 * following address allocations.
116
 * following address allocations.
117
 * @see SetBase
117
 * \see SetBase
118
 * @see NewAddress
118
 * \see NewAddress
119
 */
119
 */
120
  Ipv4Address NewNetwork (void);
120
  Ipv4Address NewNetwork (void);
121
121
122
/**
122
/**
123
 * @brief Increment the IP address counter used to allocate IP addresses
123
 * \brief Increment the IP address counter used to allocate IP addresses
124
 *
124
 *
125
 * The address helper allocates IP addresses based on a given network number
125
 * The address helper allocates IP addresses based on a given network number
126
 * and initial IP address.  In order to separate the network number and IP 
126
 * and initial IP address.  In order to separate the network number and IP 
 Lines 139-152    Link Here 
139
 * 192.168.0.4, etc., until the 253rd call which would assert due to an address
139
 * 192.168.0.4, etc., until the 253rd call which would assert due to an address
140
 * overflow.
140
 * overflow.
141
 *
141
 *
142
 * @returns The value of the newly allocated IP address.
142
 * \returns The value of the newly allocated IP address.
143
 * @see SetBase
143
 * \see SetBase
144
 * @see NewNetwork
144
 * \see NewNetwork
145
 */
145
 */
146
  Ipv4Address NewAddress (void);
146
  Ipv4Address NewAddress (void);
147
147
148
/**
148
/**
149
 * @brief Assign IP addresses to the net devices specified in the container
149
 * \brief Assign IP addresses to the net devices specified in the container
150
 * based on the current network prefix and address base.
150
 * based on the current network prefix and address base.
151
 *
151
 *
152
 * The address helper allocates IP addresses based on a given network number
152
 * The address helper allocates IP addresses based on a given network number
 Lines 166-183    Link Here 
166
 * the addresses overflow the number of bits allocated for them by the network 
166
 * the addresses overflow the number of bits allocated for them by the network 
167
 * mask in the SetBase method, the system will NS_ASSERT and halt.
167
 * mask in the SetBase method, the system will NS_ASSERT and halt.
168
 *
168
 *
169
 * @param c The NetDeviceContainer holding the collection of net devices we
169
 * \param c The NetDeviceContainer holding the collection of net devices we
170
 * are asked to assign Ipv4 addresses to.
170
 * are asked to assign Ipv4 addresses to.
171
 *
171
 *
172
 * @returns Nothing
172
 * \returns Nothing
173
 * @see SetBase
173
 * \see SetBase
174
 * @see NewNetwork
174
 * \see NewNetwork
175
 */
175
 */
176
  Ipv4InterfaceContainer Assign (const NetDeviceContainer &c);
176
  Ipv4InterfaceContainer Assign (const NetDeviceContainer &c);
177
177
178
private:
178
private:
179
  /**
179
  /**
180
   * @internal
180
   * \internal
181
   */
181
   */
182
  uint32_t NumAddressBits (uint32_t maskbits) const;
182
  uint32_t NumAddressBits (uint32_t maskbits) const;
183
183
(-)a/src/internet/helper/ipv4-interface-container.h (-6 / +6 lines)
 Lines 26-33    Link Here 
26
 * an identical index into the Ipv4InterfaceContainer that has a std::pair with
26
 * an identical index into the Ipv4InterfaceContainer that has a std::pair with
27
 * the Ptr<Ipv4> and interface index you need to play with the interface.
27
 * the Ptr<Ipv4> and interface index you need to play with the interface.
28
 *
28
 *
29
 * @see Ipv4AddressHelper
29
 * \see Ipv4AddressHelper
30
 * @see Ipv4
30
 * \see Ipv4
31
 */
31
 */
32
class Ipv4InterfaceContainer
32
class Ipv4InterfaceContainer
33
{
33
{
 Lines 133-139    Link Here 
133
   * \param ipv4 pointer to Ipv4 object
133
   * \param ipv4 pointer to Ipv4 object
134
   * \param interface interface index of the Ipv4Interface to add to the container
134
   * \param interface interface index of the Ipv4Interface to add to the container
135
   *
135
   *
136
   * @see Ipv4InterfaceContainer
136
   * \see Ipv4InterfaceContainer
137
   */
137
   */
138
  void Add (Ptr<Ipv4> ipv4, uint32_t interface);
138
  void Add (Ptr<Ipv4> ipv4, uint32_t interface);
139
139
 Lines 143-149    Link Here 
143
   *
143
   *
144
   * \param ipInterfacePair the pair of a pointer to Ipv4 object and interface index of the Ipv4Interface to add to the container
144
   * \param ipInterfacePair the pair of a pointer to Ipv4 object and interface index of the Ipv4Interface to add to the container
145
   *
145
   *
146
   * @see Ipv4InterfaceContainer
146
   * \see Ipv4InterfaceContainer
147
   */
147
   */
148
  void Add (std::pair<Ptr<Ipv4>, uint32_t> ipInterfacePair);
148
  void Add (std::pair<Ptr<Ipv4>, uint32_t> ipInterfacePair);
149
149
 Lines 155-161    Link Here 
155
   *        has been previously named using the Object Name Service.
155
   *        has been previously named using the Object Name Service.
156
   * \param interface interface index of the Ipv4Interface to add to the container
156
   * \param interface interface index of the Ipv4Interface to add to the container
157
   *
157
   *
158
   * @see Ipv4InterfaceContainer
158
   * \see Ipv4InterfaceContainer
159
   */
159
   */
160
  void Add (std::string ipv4Name, uint32_t interface);
160
  void Add (std::string ipv4Name, uint32_t interface);
161
161
 Lines 165-171    Link Here 
165
   *
165
   *
166
   * \param i the index of the entery to retrieve.
166
   * \param i the index of the entery to retrieve.
167
   *
167
   *
168
   * @see Ipv4InterfaceContainer
168
   * \see Ipv4InterfaceContainer
169
   */
169
   */
170
  std::pair<Ptr<Ipv4>, uint32_t> Get (uint32_t i) const;
170
  std::pair<Ptr<Ipv4>, uint32_t> Get (uint32_t i) const;
171
171
(-)a/src/internet/model/candidate-queue.h (-38 / +38 lines)
 Lines 50-154    Link Here 
50
{
50
{
51
public:
51
public:
52
/**
52
/**
53
 * @brief Create an empty SPF Candidate Queue.
53
 * \brief Create an empty SPF Candidate Queue.
54
 * @internal
54
 * \internal
55
 *
55
 *
56
 * @see SPFVertex
56
 * \see SPFVertex
57
 */
57
 */
58
  CandidateQueue ();
58
  CandidateQueue ();
59
59
60
/**
60
/**
61
 * @internal Destroy an SPF Candidate Queue and release any resources held 
61
 * \internal Destroy an SPF Candidate Queue and release any resources held 
62
 * by the contents.
62
 * by the contents.
63
 * @internal
63
 * \internal
64
 *
64
 *
65
 * @see SPFVertex
65
 * \see SPFVertex
66
 */
66
 */
67
  virtual ~CandidateQueue ();
67
  virtual ~CandidateQueue ();
68
68
69
/**
69
/**
70
 * @brief Empty the Candidate Queue and release all of the resources 
70
 * \brief Empty the Candidate Queue and release all of the resources 
71
 * associated with the Shortest Path First Vertex pointers in the queue.
71
 * associated with the Shortest Path First Vertex pointers in the queue.
72
 * @internal
72
 * \internal
73
 *
73
 *
74
 * @see SPFVertex
74
 * \see SPFVertex
75
 */
75
 */
76
  void Clear (void);
76
  void Clear (void);
77
77
78
/**
78
/**
79
 * @brief Push a Shortest Path First Vertex pointer onto the queue according
79
 * \brief Push a Shortest Path First Vertex pointer onto the queue according
80
 * to the priority scheme.
80
 * to the priority scheme.
81
 * @internal
81
 * \internal
82
 * 
82
 * 
83
 * On completion, the top of the queue will hold the Shortest Path First
83
 * On completion, the top of the queue will hold the Shortest Path First
84
 * Vertex pointer that points to a vertex having lowest value of the field
84
 * Vertex pointer that points to a vertex having lowest value of the field
85
 * m_distanceFromRoot.  Remaining vertices are ordered according to 
85
 * m_distanceFromRoot.  Remaining vertices are ordered according to 
86
 * increasing distance.
86
 * increasing distance.
87
 *
87
 *
88
 * @see SPFVertex
88
 * \see SPFVertex
89
 * @param vNew The Shortest Path First Vertex to add to the queue.
89
 * \param vNew The Shortest Path First Vertex to add to the queue.
90
 */
90
 */
91
  void Push (SPFVertex *vNew);
91
  void Push (SPFVertex *vNew);
92
92
93
/**
93
/**
94
 * @brief Pop the Shortest Path First Vertex pointer at the top of the queue.
94
 * \brief Pop the Shortest Path First Vertex pointer at the top of the queue.
95
 * @internal
95
 * \internal
96
 *
96
 *
97
 * The caller is given the responsibility for releasing the resources 
97
 * The caller is given the responsibility for releasing the resources 
98
 * associated with the vertex.
98
 * associated with the vertex.
99
 *
99
 *
100
 * @see SPFVertex
100
 * \see SPFVertex
101
 * @see Top ()
101
 * \see Top ()
102
 * @returns The Shortest Path First Vertex pointer at the top of the queue.
102
 * \returns The Shortest Path First Vertex pointer at the top of the queue.
103
 */
103
 */
104
  SPFVertex* Pop (void);
104
  SPFVertex* Pop (void);
105
105
106
/**
106
/**
107
 * @brief Return the Shortest Path First Vertex pointer at the top of the 
107
 * \brief Return the Shortest Path First Vertex pointer at the top of the 
108
 * queue.
108
 * queue.
109
 * @internal
109
 * \internal
110
 *
110
 *
111
 * This method does not pop the SPFVertex* off of the queue, it simply 
111
 * This method does not pop the SPFVertex* off of the queue, it simply 
112
 * returns the pointer.
112
 * returns the pointer.
113
 *
113
 *
114
 * @see SPFVertex
114
 * \see SPFVertex
115
 * @see Pop ()
115
 * \see Pop ()
116
 * @returns The Shortest Path First Vertex pointer at the top of the queue.
116
 * \returns The Shortest Path First Vertex pointer at the top of the queue.
117
 */
117
 */
118
  SPFVertex* Top (void) const;
118
  SPFVertex* Top (void) const;
119
119
120
/**
120
/**
121
 * @brief Test the Candidate Queue to determine if it is empty.
121
 * \brief Test the Candidate Queue to determine if it is empty.
122
 * @internal
122
 * \internal
123
 *
123
 *
124
 * @returns True if the queue is empty, false otherwise.
124
 * \returns True if the queue is empty, false otherwise.
125
 */
125
 */
126
  bool Empty (void) const;
126
  bool Empty (void) const;
127
127
128
/**
128
/**
129
 * @brief Return the number of Shortest Path First Vertex pointers presently
129
 * \brief Return the number of Shortest Path First Vertex pointers presently
130
 * stored in the Candidate Queue.
130
 * stored in the Candidate Queue.
131
 * @internal
131
 * \internal
132
 *
132
 *
133
 * @see SPFVertex
133
 * \see SPFVertex
134
 * @returns The number of SPFVertex* pointers in the Candidate Queue.
134
 * \returns The number of SPFVertex* pointers in the Candidate Queue.
135
 */
135
 */
136
  uint32_t Size (void) const;
136
  uint32_t Size (void) const;
137
137
138
/**
138
/**
139
 * @brief Searches the Candidate Queue for a Shortest Path First Vertex 
139
 * \brief Searches the Candidate Queue for a Shortest Path First Vertex 
140
 * pointer that points to a vertex having the given IP address.
140
 * pointer that points to a vertex having the given IP address.
141
 * @internal
141
 * \internal
142
 *
142
 *
143
 * @see SPFVertex
143
 * \see SPFVertex
144
 * @param addr The IP address to search for.
144
 * \param addr The IP address to search for.
145
 * @returns The SPFVertex* pointer corresponding to the given IP address.
145
 * \returns The SPFVertex* pointer corresponding to the given IP address.
146
 */
146
 */
147
  SPFVertex* Find (const Ipv4Address addr) const;
147
  SPFVertex* Find (const Ipv4Address addr) const;
148
148
149
/**
149
/**
150
 * @brief Reorders the Candidate Queue according to the priority scheme.
150
 * \brief Reorders the Candidate Queue according to the priority scheme.
151
 * @internal
151
 * \internal
152
 * 
152
 * 
153
 * On completion, the top of the queue will hold the Shortest Path First
153
 * On completion, the top of the queue will hold the Shortest Path First
154
 * Vertex pointer that points to a vertex having lowest value of the field
154
 * Vertex pointer that points to a vertex having lowest value of the field
 Lines 158-164    Link Here 
158
 * This method is provided in case the values of m_distanceFromRoot change
158
 * This method is provided in case the values of m_distanceFromRoot change
159
 * during the routing calculations.
159
 * during the routing calculations.
160
 *
160
 *
161
 * @see SPFVertex
161
 * \see SPFVertex
162
 */
162
 */
163
  void Reorder (void);
163
  void Reorder (void);
164
164
(-)a/src/internet/model/global-route-manager-impl.h (-132 / +132 lines)
 Lines 40-46    Link Here 
40
class Ipv4GlobalRouting;
40
class Ipv4GlobalRouting;
41
41
42
/**
42
/**
43
 * @brief Vertex used in shortest path first (SPF) computations. See RFC 2328,
43
 * \brief Vertex used in shortest path first (SPF) computations. See RFC 2328,
44
 * Section 16.
44
 * Section 16.
45
 *
45
 *
46
 * Each router in the simulation is associated with an SPFVertex object.  When
46
 * Each router in the simulation is associated with an SPFVertex object.  When
 Lines 67-74    Link Here 
67
{
67
{
68
public:
68
public:
69
/**
69
/**
70
 * @brief Enumeration of the possible types of SPFVertex objects.
70
 * \brief Enumeration of the possible types of SPFVertex objects.
71
 * @internal
71
 * \internal
72
 *
72
 *
73
 * Currently we use VertexRouter to identify objects that represent a router 
73
 * Currently we use VertexRouter to identify objects that represent a router 
74
 * in the simulation topology, and VertexNetwork to identify objects that 
74
 * in the simulation topology, and VertexNetwork to identify objects that 
 Lines 81-89    Link Here 
81
  };
81
  };
82
82
83
/**
83
/**
84
 * @brief Construct an empty ("uninitialized") SPFVertex (Shortest Path First 
84
 * \brief Construct an empty ("uninitialized") SPFVertex (Shortest Path First 
85
 * Vertex).
85
 * Vertex).
86
 * @internal
86
 * \internal
87
 *
87
 *
88
 * The Vertex Type is set to VertexUnknown, the Vertex ID is set to 
88
 * The Vertex Type is set to VertexUnknown, the Vertex ID is set to 
89
 * 255.255.255.255, and the distance from root is set to infinity 
89
 * 255.255.255.255, and the distance from root is set to infinity 
 Lines 92-104    Link Here 
92
 * infinity, the next hop address is set to 0.0.0.0 and the list of children
92
 * infinity, the next hop address is set to 0.0.0.0 and the list of children
93
 * of the SPFVertex is initialized to empty.
93
 * of the SPFVertex is initialized to empty.
94
 *
94
 *
95
 * @see VertexType
95
 * \see VertexType
96
 */
96
 */
97
  SPFVertex();
97
  SPFVertex();
98
98
99
/**
99
/**
100
 * @brief Construct an initialized SPFVertex (Shortest Path First Vertex).
100
 * \brief Construct an initialized SPFVertex (Shortest Path First Vertex).
101
 * @internal
101
 * \internal
102
 *
102
 *
103
 * The Vertex Type is initialized to VertexRouter and the Vertex ID is found
103
 * The Vertex Type is initialized to VertexRouter and the Vertex ID is found
104
 * from the Link State ID of the Link State Advertisement (LSA) passed as a
104
 * from the Link State ID of the Link State Advertisement (LSA) passed as a
 Lines 107-156    Link Here 
107
 * these members, initialization is as in the default constructor.
107
 * these members, initialization is as in the default constructor.
108
 * of the SPFVertex is initialized to empty.
108
 * of the SPFVertex is initialized to empty.
109
 *
109
 *
110
 * @see SPFVertex::SPFVertex ()
110
 * \see SPFVertex::SPFVertex ()
111
 * @see VertexType
111
 * \see VertexType
112
 * @see GlobalRoutingLSA
112
 * \see GlobalRoutingLSA
113
 * @param lsa The Link State Advertisement used for finding initial values.
113
 * \param lsa The Link State Advertisement used for finding initial values.
114
 */
114
 */
115
  SPFVertex(GlobalRoutingLSA* lsa);
115
  SPFVertex(GlobalRoutingLSA* lsa);
116
116
117
/**
117
/**
118
 * @brief Destroy an SPFVertex (Shortest Path First Vertex).
118
 * \brief Destroy an SPFVertex (Shortest Path First Vertex).
119
 * @internal
119
 * \internal
120
 *
120
 *
121
 * The children vertices of the SPFVertex are recursively deleted.
121
 * The children vertices of the SPFVertex are recursively deleted.
122
 *
122
 *
123
 * @see SPFVertex::SPFVertex ()
123
 * \see SPFVertex::SPFVertex ()
124
 */
124
 */
125
  ~SPFVertex();
125
  ~SPFVertex();
126
126
127
/**
127
/**
128
 * @brief Get the Vertex Type field of a SPFVertex object.
128
 * \brief Get the Vertex Type field of a SPFVertex object.
129
 * @internal
129
 * \internal
130
 *
130
 *
131
 * The Vertex Type describes the kind of simulation object a given SPFVertex
131
 * The Vertex Type describes the kind of simulation object a given SPFVertex
132
 * represents.
132
 * represents.
133
 *
133
 *
134
 * @see VertexType
134
 * \see VertexType
135
 * @returns The VertexType of the current SPFVertex object.
135
 * \returns The VertexType of the current SPFVertex object.
136
 */
136
 */
137
  VertexType GetVertexType (void) const;
137
  VertexType GetVertexType (void) const;
138
138
139
/**
139
/**
140
 * @brief Set the Vertex Type field of a SPFVertex object.
140
 * \brief Set the Vertex Type field of a SPFVertex object.
141
 * @internal
141
 * \internal
142
 *
142
 *
143
 * The Vertex Type describes the kind of simulation object a given SPFVertex
143
 * The Vertex Type describes the kind of simulation object a given SPFVertex
144
 * represents.
144
 * represents.
145
 *
145
 *
146
 * @see VertexType
146
 * \see VertexType
147
 * @param type The new VertexType for the current SPFVertex object.
147
 * \param type The new VertexType for the current SPFVertex object.
148
 */
148
 */
149
  void SetVertexType (VertexType type);
149
  void SetVertexType (VertexType type);
150
150
151
/**
151
/**
152
 * @brief Get the Vertex ID field of a SPFVertex object.
152
 * \brief Get the Vertex ID field of a SPFVertex object.
153
 * @internal
153
 * \internal
154
 *
154
 *
155
 * The Vertex ID uniquely identifies the simulation object a given SPFVertex
155
 * The Vertex ID uniquely identifies the simulation object a given SPFVertex
156
 * represents.  Typically, this is the Router ID for SPFVertex objects 
156
 * represents.  Typically, this is the Router ID for SPFVertex objects 
 Lines 160-172    Link Here 
160
 * beginning at 0.0.0.0 and monotonically increasing as new routers are
160
 * beginning at 0.0.0.0 and monotonically increasing as new routers are
161
 * instantiated.
161
 * instantiated.
162
 *
162
 *
163
 * @returns The Ipv4Address Vertex ID of the current SPFVertex object.
163
 * \returns The Ipv4Address Vertex ID of the current SPFVertex object.
164
 */
164
 */
165
  Ipv4Address GetVertexId (void) const;
165
  Ipv4Address GetVertexId (void) const;
166
166
167
/**
167
/**
168
 * @brief Set the Vertex ID field of a SPFVertex object.
168
 * \brief Set the Vertex ID field of a SPFVertex object.
169
 * @internal
169
 * \internal
170
 *
170
 *
171
 * The Vertex ID uniquely identifies the simulation object a given SPFVertex
171
 * The Vertex ID uniquely identifies the simulation object a given SPFVertex
172
 * represents.  Typically, this is the Router ID for SPFVertex objects 
172
 * represents.  Typically, this is the Router ID for SPFVertex objects 
 Lines 177-219    Link Here 
177
 * instantiated.  This method is an explicit override of the automatically
177
 * instantiated.  This method is an explicit override of the automatically
178
 * generated value.
178
 * generated value.
179
 *
179
 *
180
 * @param id The new Ipv4Address Vertex ID for the current SPFVertex object.
180
 * \param id The new Ipv4Address Vertex ID for the current SPFVertex object.
181
 */
181
 */
182
  void SetVertexId (Ipv4Address id);
182
  void SetVertexId (Ipv4Address id);
183
183
184
/**
184
/**
185
 * @brief Get the Global Router Link State Advertisement returned by the 
185
 * \brief Get the Global Router Link State Advertisement returned by the 
186
 * Global Router represented by this SPFVertex during the route discovery 
186
 * Global Router represented by this SPFVertex during the route discovery 
187
 * process.
187
 * process.
188
 * @internal
188
 * \internal
189
 *
189
 *
190
 * @see GlobalRouter
190
 * \see GlobalRouter
191
 * @see GlobalRoutingLSA
191
 * \see GlobalRoutingLSA
192
 * @see GlobalRouter::DiscoverLSAs ()
192
 * \see GlobalRouter::DiscoverLSAs ()
193
 * @returns A pointer to the GlobalRoutingLSA found by the router represented
193
 * \returns A pointer to the GlobalRoutingLSA found by the router represented
194
 * by this SPFVertex object.
194
 * by this SPFVertex object.
195
 */
195
 */
196
  GlobalRoutingLSA* GetLSA (void) const;
196
  GlobalRoutingLSA* GetLSA (void) const;
197
197
198
/**
198
/**
199
 * @brief Set the Global Router Link State Advertisement returned by the 
199
 * \brief Set the Global Router Link State Advertisement returned by the 
200
 * Global Router represented by this SPFVertex during the route discovery 
200
 * Global Router represented by this SPFVertex during the route discovery 
201
 * process.
201
 * process.
202
 * @internal
202
 * \internal
203
 *
203
 *
204
 * @see SPFVertex::GetLSA ()
204
 * \see SPFVertex::GetLSA ()
205
 * @see GlobalRouter
205
 * \see GlobalRouter
206
 * @see GlobalRoutingLSA
206
 * \see GlobalRoutingLSA
207
 * @see GlobalRouter::DiscoverLSAs ()
207
 * \see GlobalRouter::DiscoverLSAs ()
208
 * @warning Ownership of the LSA is transferred to the "this" SPFVertex.  You
208
 * \warning Ownership of the LSA is transferred to the "this" SPFVertex.  You
209
 * must not delete the LSA after calling this method.
209
 * must not delete the LSA after calling this method.
210
 * @param lsa A pointer to the GlobalRoutingLSA.
210
 * \param lsa A pointer to the GlobalRoutingLSA.
211
 */
211
 */
212
  void SetLSA (GlobalRoutingLSA* lsa);
212
  void SetLSA (GlobalRoutingLSA* lsa);
213
213
214
/**
214
/**
215
 * @brief Get the distance from the root vertex to "this" SPFVertex object.
215
 * \brief Get the distance from the root vertex to "this" SPFVertex object.
216
 * @internal
216
 * \internal
217
 *
217
 *
218
 * Each router in the simulation is associated with an SPFVertex object.  When
218
 * Each router in the simulation is associated with an SPFVertex object.  When
219
 * calculating routes, each of these routers is, in turn, chosen as the "root"
219
 * calculating routes, each of these routers is, in turn, chosen as the "root"
 Lines 230-242    Link Here 
230
 * The distance is calculated during route discovery and is stored in a
230
 * The distance is calculated during route discovery and is stored in a
231
 * member variable.  This method simply fetches that value.
231
 * member variable.  This method simply fetches that value.
232
 *
232
 *
233
 * @returns The distance, in hops, from the root SPFVertex to "this" SPFVertex.
233
 * \returns The distance, in hops, from the root SPFVertex to "this" SPFVertex.
234
 */
234
 */
235
  uint32_t GetDistanceFromRoot (void) const;
235
  uint32_t GetDistanceFromRoot (void) const;
236
236
237
/**
237
/**
238
 * @brief Set the distance from the root vertex to "this" SPFVertex object.
238
 * \brief Set the distance from the root vertex to "this" SPFVertex object.
239
 * @internal
239
 * \internal
240
 *
240
 *
241
 * Each router in the simulation is associated with an SPFVertex object.  When
241
 * Each router in the simulation is associated with an SPFVertex object.  When
242
 * calculating routes, each of these routers is, in turn, chosen as the "root"
242
 * calculating routes, each of these routers is, in turn, chosen as the "root"
 Lines 250-264    Link Here 
250
 * we're asking for is the number of hops from the root vertex to the vertex
250
 * we're asking for is the number of hops from the root vertex to the vertex
251
 * in question.
251
 * in question.
252
 *
252
 *
253
 * @param distance The distance, in hops, from the root SPFVertex to "this"
253
 * \param distance The distance, in hops, from the root SPFVertex to "this"
254
 * SPFVertex.
254
 * SPFVertex.
255
 */
255
 */
256
  void SetDistanceFromRoot (uint32_t distance);
256
  void SetDistanceFromRoot (uint32_t distance);
257
257
258
/**
258
/**
259
 * @brief Set the IP address and outgoing interface index that should be used 
259
 * \brief Set the IP address and outgoing interface index that should be used 
260
 * to begin forwarding packets from the root SPFVertex to "this" SPFVertex.
260
 * to begin forwarding packets from the root SPFVertex to "this" SPFVertex.
261
 * @internal
261
 * \internal
262
 *
262
 *
263
 * Each router node in the simulation is associated with an SPFVertex object.
263
 * Each router node in the simulation is associated with an SPFVertex object.
264
 * When calculating routes, each of these routers is, in turn, chosen as the 
264
 * When calculating routes, each of these routers is, in turn, chosen as the 
 Lines 289-308    Link Here 
289
 * In this method we are telling the root node which exit direction it should send
289
 * In this method we are telling the root node which exit direction it should send
290
 * should I send a packet to the network or host represented by 'this' SPFVertex.
290
 * should I send a packet to the network or host represented by 'this' SPFVertex.
291
 *
291
 *
292
 * @see GlobalRouter
292
 * \see GlobalRouter
293
 * @see GlobalRoutingLSA
293
 * \see GlobalRoutingLSA
294
 * @see GlobalRoutingLinkRecord
294
 * \see GlobalRoutingLinkRecord
295
 * @param nextHop The IP address to use when forwarding packets to the host
295
 * \param nextHop The IP address to use when forwarding packets to the host
296
 * or network represented by "this" SPFVertex.
296
 * or network represented by "this" SPFVertex.
297
 * @param id The interface index to use when forwarding packets to the host or
297
 * \param id The interface index to use when forwarding packets to the host or
298
 * network represented by "this" SPFVertex.
298
 * network represented by "this" SPFVertex.
299
 */
299
 */
300
  void SetRootExitDirection (Ipv4Address nextHop, int32_t id = SPF_INFINITY);
300
  void SetRootExitDirection (Ipv4Address nextHop, int32_t id = SPF_INFINITY);
301
  typedef std::pair<Ipv4Address, int32_t> NodeExit_t;
301
  typedef std::pair<Ipv4Address, int32_t> NodeExit_t;
302
/**
302
/**
303
 * @brief Set the IP address and outgoing interface index that should be used 
303
 * \brief Set the IP address and outgoing interface index that should be used 
304
 * to begin forwarding packets from the root SPFVertex to "this" SPFVertex.
304
 * to begin forwarding packets from the root SPFVertex to "this" SPFVertex.
305
 * @internal
305
 * \internal
306
 *
306
 *
307
 * Each router node in the simulation is associated with an SPFVertex object.
307
 * Each router node in the simulation is associated with an SPFVertex object.
308
 * When calculating routes, each of these routers is, in turn, chosen as the 
308
 * When calculating routes, each of these routers is, in turn, chosen as the 
 Lines 333-344    Link Here 
333
 * In this method we are telling the root node which exit direction it should send
333
 * In this method we are telling the root node which exit direction it should send
334
 * should I send a packet to the network or host represented by 'this' SPFVertex.
334
 * should I send a packet to the network or host represented by 'this' SPFVertex.
335
 *
335
 *
336
 * @see GlobalRouter
336
 * \see GlobalRouter
337
 * @see GlobalRoutingLSA
337
 * \see GlobalRoutingLSA
338
 * @see GlobalRoutingLinkRecord
338
 * \see GlobalRoutingLinkRecord
339
 * @param nextHop The IP address to use when forwarding packets to the host
339
 * \param nextHop The IP address to use when forwarding packets to the host
340
 * or network represented by "this" SPFVertex.
340
 * or network represented by "this" SPFVertex.
341
 * @param exit The pair of next-hop-IP and outgoing-interface-index to use when 
341
 * \param exit The pair of next-hop-IP and outgoing-interface-index to use when 
342
 * forwarding packets to the host or network represented by "this" SPFVertex.
342
 * forwarding packets to the host or network represented by "this" SPFVertex.
343
 */
343
 */
344
  void SetRootExitDirection (SPFVertex::NodeExit_t exit);
344
  void SetRootExitDirection (SPFVertex::NodeExit_t exit);
 Lines 386-394    Link Here 
386
  uint32_t GetNRootExitDirections () const;
386
  uint32_t GetNRootExitDirections () const;
387
387
388
/**
388
/**
389
 * @brief Get a pointer to the SPFVector that is the parent of "this" 
389
 * \brief Get a pointer to the SPFVector that is the parent of "this" 
390
 * SPFVertex.
390
 * SPFVertex.
391
 * @internal
391
 * \internal
392
 *
392
 *
393
 * Each router node in the simulation is associated with an SPFVertex object.
393
 * Each router node in the simulation is associated with an SPFVertex object.
394
 * When calculating routes, each of these routers is, in turn, chosen as the 
394
 * When calculating routes, each of these routers is, in turn, chosen as the 
 Lines 401-416    Link Here 
401
 * This method returns a pointer to the parent node of "this" SPFVertex
401
 * This method returns a pointer to the parent node of "this" SPFVertex
402
 * (both of which reside in that SPF tree).
402
 * (both of which reside in that SPF tree).
403
 *
403
 *
404
 * @param i The index to one of the parents
404
 * \param i The index to one of the parents
405
 * @returns A pointer to the SPFVertex that is the parent of "this" SPFVertex
405
 * \returns A pointer to the SPFVertex that is the parent of "this" SPFVertex
406
 * in the SPF tree.
406
 * in the SPF tree.
407
 */
407
 */
408
  SPFVertex* GetParent (uint32_t i = 0) const;
408
  SPFVertex* GetParent (uint32_t i = 0) const;
409
409
410
/**
410
/**
411
 * @brief Set the pointer to the SPFVector that is the parent of "this" 
411
 * \brief Set the pointer to the SPFVector that is the parent of "this" 
412
 * SPFVertex.
412
 * SPFVertex.
413
 * @internal
413
 * \internal
414
 *
414
 *
415
 * Each router node in the simulation is associated with an SPFVertex object.
415
 * Each router node in the simulation is associated with an SPFVertex object.
416
 * When calculating routes, each of these routers is, in turn, chosen as the 
416
 * When calculating routes, each of these routers is, in turn, chosen as the 
 Lines 423-429    Link Here 
423
 * This method sets the parent pointer of "this" SPFVertex (both of which
423
 * This method sets the parent pointer of "this" SPFVertex (both of which
424
 * reside in that SPF tree).
424
 * reside in that SPF tree).
425
 *
425
 *
426
 * @param parent A pointer to the SPFVertex that is the parent of "this" 
426
 * \param parent A pointer to the SPFVertex that is the parent of "this" 
427
 * SPFVertex* in the SPF tree.
427
 * SPFVertex* in the SPF tree.
428
 */
428
 */
429
  void SetParent (SPFVertex* parent);
429
  void SetParent (SPFVertex* parent);
 Lines 437-444    Link Here 
437
  void MergeParent (const SPFVertex* v);
437
  void MergeParent (const SPFVertex* v);
438
438
439
/**
439
/**
440
 * @brief Get the number of children of "this" SPFVertex.
440
 * \brief Get the number of children of "this" SPFVertex.
441
 * @internal
441
 * \internal
442
 *
442
 *
443
 * Each router node in the simulation is associated with an SPFVertex object.
443
 * Each router node in the simulation is associated with an SPFVertex object.
444
 * When calculating routes, each of these routers is, in turn, chosen as the 
444
 * When calculating routes, each of these routers is, in turn, chosen as the 
 Lines 453-467    Link Here 
453
 * This method returns the number of children of "this" SPFVertex (which 
453
 * This method returns the number of children of "this" SPFVertex (which 
454
 * reside in the SPF tree).
454
 * reside in the SPF tree).
455
 *
455
 *
456
 * @returns The number of children of "this" SPFVertex (which reside in the
456
 * \returns The number of children of "this" SPFVertex (which reside in the
457
 * SPF tree).
457
 * SPF tree).
458
 */
458
 */
459
  uint32_t GetNChildren (void) const;
459
  uint32_t GetNChildren (void) const;
460
460
461
/**
461
/**
462
 * @brief Get a borrowed SPFVertex pointer to the specified child of "this" 
462
 * \brief Get a borrowed SPFVertex pointer to the specified child of "this" 
463
 * SPFVertex.
463
 * SPFVertex.
464
 * @internal
464
 * \internal
465
 *
465
 *
466
 * Each router node in the simulation is associated with an SPFVertex object.
466
 * Each router node in the simulation is associated with an SPFVertex object.
467
 * When calculating routes, each of these routers is, in turn, chosen as the 
467
 * When calculating routes, each of these routers is, in turn, chosen as the 
 Lines 476-496    Link Here 
476
 * This method the number of children of "this" SPFVertex (which reside in
476
 * This method the number of children of "this" SPFVertex (which reside in
477
 * the SPF tree.
477
 * the SPF tree.
478
 *
478
 *
479
 * @see SPFVertex::GetNChildren
479
 * \see SPFVertex::GetNChildren
480
 * @param n The index (from 0 to the number of children minus 1) of the 
480
 * \param n The index (from 0 to the number of children minus 1) of the 
481
 * child SPFVertex to return.
481
 * child SPFVertex to return.
482
 * @warning The pointer returned by GetChild () is a borrowed pointer.  You
482
 * \warning The pointer returned by GetChild () is a borrowed pointer.  You
483
 * do not have any ownership of the underlying object and must not delete
483
 * do not have any ownership of the underlying object and must not delete
484
 * that object.
484
 * that object.
485
 * @returns A pointer to the specified child SPFVertex (which resides in the
485
 * \returns A pointer to the specified child SPFVertex (which resides in the
486
 * SPF tree).
486
 * SPF tree).
487
 */
487
 */
488
  SPFVertex* GetChild (uint32_t n) const;
488
  SPFVertex* GetChild (uint32_t n) const;
489
489
490
/**
490
/**
491
 * @brief Get a borrowed SPFVertex pointer to the specified child of "this" 
491
 * \brief Get a borrowed SPFVertex pointer to the specified child of "this" 
492
 * SPFVertex.
492
 * SPFVertex.
493
 * @internal
493
 * \internal
494
 *
494
 *
495
 * Each router node in the simulation is associated with an SPFVertex object.
495
 * Each router node in the simulation is associated with an SPFVertex object.
496
 * When calculating routes, each of these routers is, in turn, chosen as the 
496
 * When calculating routes, each of these routers is, in turn, chosen as the 
 Lines 505-536    Link Here 
505
 * This method the number of children of "this" SPFVertex (which reside in
505
 * This method the number of children of "this" SPFVertex (which reside in
506
 * the SPF tree.
506
 * the SPF tree.
507
 *
507
 *
508
 * @see SPFVertex::GetNChildren
508
 * \see SPFVertex::GetNChildren
509
 * @warning Ownership of the pointer added to the children of "this" 
509
 * \warning Ownership of the pointer added to the children of "this" 
510
 * SPFVertex is transferred to the "this" SPFVertex.  You must not delete the
510
 * SPFVertex is transferred to the "this" SPFVertex.  You must not delete the
511
 * (now) child SPFVertex after calling this method.
511
 * (now) child SPFVertex after calling this method.
512
 * @param child A pointer to the SPFVertex (which resides in the SPF tree) to
512
 * \param child A pointer to the SPFVertex (which resides in the SPF tree) to
513
 * be added to the list of children of "this" SPFVertex.
513
 * be added to the list of children of "this" SPFVertex.
514
 * @returns The number of children of "this" SPFVertex after the addition of
514
 * \returns The number of children of "this" SPFVertex after the addition of
515
 * the new child.
515
 * the new child.
516
 */
516
 */
517
  uint32_t AddChild (SPFVertex* child);
517
  uint32_t AddChild (SPFVertex* child);
518
518
519
  /**
519
  /**
520
   * @brief Set the value of the VertexProcessed flag
520
   * \brief Set the value of the VertexProcessed flag
521
   *
521
   *
522
   * Flag to note whether vertex has been processed in stage two of 
522
   * Flag to note whether vertex has been processed in stage two of 
523
   * SPF computation
523
   * SPF computation
524
   * @param value boolean value to set the flag
524
   * \param value boolean value to set the flag
525
   */ 
525
   */ 
526
  void SetVertexProcessed (bool value);
526
  void SetVertexProcessed (bool value);
527
527
528
  /**
528
  /**
529
   * @brief Check the value of the VertexProcessed flag
529
   * \brief Check the value of the VertexProcessed flag
530
   *
530
   *
531
   * Flag to note whether vertex has been processed in stage two of 
531
   * Flag to note whether vertex has been processed in stage two of 
532
   * SPF computation
532
   * SPF computation
533
   * @returns value of underlying flag
533
   * \returns value of underlying flag
534
   */ 
534
   */ 
535
  bool IsVertexProcessed (void) const;
535
  bool IsVertexProcessed (void) const;
536
536
 Lines 552-564    Link Here 
552
  bool m_vertexProcessed; 
552
  bool m_vertexProcessed; 
553
553
554
/**
554
/**
555
 * @brief The SPFVertex copy construction is disallowed.  There's no need for
555
 * \brief The SPFVertex copy construction is disallowed.  There's no need for
556
 * it and a compiler provided shallow copy would be wrong.
556
 * it and a compiler provided shallow copy would be wrong.
557
 */
557
 */
558
  SPFVertex (SPFVertex& v);
558
  SPFVertex (SPFVertex& v);
559
559
560
/**
560
/**
561
 * @brief The SPFVertex copy assignment operator is disallowed.  There's no 
561
 * \brief The SPFVertex copy assignment operator is disallowed.  There's no 
562
 * need for it and a compiler provided shallow copy would be wrong.
562
 * need for it and a compiler provided shallow copy would be wrong.
563
 */
563
 */
564
  SPFVertex& operator= (SPFVertex& v);
564
  SPFVertex& operator= (SPFVertex& v);
 Lines 569-575    Link Here 
569
};
569
};
570
570
571
/**
571
/**
572
 * @brief The Link State DataBase (LSDB) of the Global Route Manager.
572
 * \brief The Link State DataBase (LSDB) of the Global Route Manager.
573
 *
573
 *
574
 * Each node in the simulation participating in global routing has a
574
 * Each node in the simulation participating in global routing has a
575
 * GlobalRouter interface.  The primary job of this interface is to export
575
 * GlobalRouter interface.  The primary job of this interface is to export
 Lines 585-592    Link Here 
585
{
585
{
586
public:
586
public:
587
/**
587
/**
588
 * @brief Construct an empty Global Router Manager Link State Database.
588
 * \brief Construct an empty Global Router Manager Link State Database.
589
 * @internal
589
 * \internal
590
 *
590
 *
591
 * The database map composing the Link State Database is initialized in
591
 * The database map composing the Link State Database is initialized in
592
 * this constructor.
592
 * this constructor.
 Lines 594-601    Link Here 
594
  GlobalRouteManagerLSDB ();
594
  GlobalRouteManagerLSDB ();
595
595
596
/**
596
/**
597
 * @brief Destroy an empty Global Router Manager Link State Database.
597
 * \brief Destroy an empty Global Router Manager Link State Database.
598
 * @internal
598
 * \internal
599
 *
599
 *
600
 * The database map is walked and all of the Link State Advertisements stored
600
 * The database map is walked and all of the Link State Advertisements stored
601
 * in the database are freed; then the database map itself is clear ()ed to
601
 * in the database are freed; then the database map itself is clear ()ed to
 Lines 604-666    Link Here 
604
  ~GlobalRouteManagerLSDB ();
604
  ~GlobalRouteManagerLSDB ();
605
605
606
/**
606
/**
607
 * @brief Insert an IP address / Link State Advertisement pair into the Link
607
 * \brief Insert an IP address / Link State Advertisement pair into the Link
608
 * State Database.
608
 * State Database.
609
 * @internal
609
 * \internal
610
 *
610
 *
611
 * The IPV4 address and the GlobalRoutingLSA given as parameters are converted
611
 * The IPV4 address and the GlobalRoutingLSA given as parameters are converted
612
 * to an STL pair and are inserted into the database map.
612
 * to an STL pair and are inserted into the database map.
613
 *
613
 *
614
 * @see GlobalRoutingLSA
614
 * \see GlobalRoutingLSA
615
 * @see Ipv4Address
615
 * \see Ipv4Address
616
 * @param addr The IP address associated with the LSA.  Typically the Router 
616
 * \param addr The IP address associated with the LSA.  Typically the Router 
617
 * ID.
617
 * ID.
618
 * @param lsa A pointer to the Link State Advertisement for the router.
618
 * \param lsa A pointer to the Link State Advertisement for the router.
619
 */
619
 */
620
  void Insert (Ipv4Address addr, GlobalRoutingLSA* lsa);
620
  void Insert (Ipv4Address addr, GlobalRoutingLSA* lsa);
621
621
622
/**
622
/**
623
 * @brief Look up the Link State Advertisement associated with the given
623
 * \brief Look up the Link State Advertisement associated with the given
624
 * link state ID (address).
624
 * link state ID (address).
625
 * @internal
625
 * \internal
626
 *
626
 *
627
 * The database map is searched for the given IPV4 address and corresponding
627
 * The database map is searched for the given IPV4 address and corresponding
628
 * GlobalRoutingLSA is returned.
628
 * GlobalRoutingLSA is returned.
629
 *
629
 *
630
 * @see GlobalRoutingLSA
630
 * \see GlobalRoutingLSA
631
 * @see Ipv4Address
631
 * \see Ipv4Address
632
 * @param addr The IP address associated with the LSA.  Typically the Router 
632
 * \param addr The IP address associated with the LSA.  Typically the Router 
633
 * ID.
633
 * ID.
634
 * @returns A pointer to the Link State Advertisement for the router specified
634
 * \returns A pointer to the Link State Advertisement for the router specified
635
 * by the IP address addr.
635
 * by the IP address addr.
636
 */
636
 */
637
  GlobalRoutingLSA* GetLSA (Ipv4Address addr) const;
637
  GlobalRoutingLSA* GetLSA (Ipv4Address addr) const;
638
/**
638
/**
639
 * @brief Look up the Link State Advertisement associated with the given
639
 * \brief Look up the Link State Advertisement associated with the given
640
 * link state ID (address).  This is a variation of the GetLSA call
640
 * link state ID (address).  This is a variation of the GetLSA call
641
 * to allow the LSA to be found by matching addr with the LinkData field
641
 * to allow the LSA to be found by matching addr with the LinkData field
642
 * of the TransitNetwork link record.
642
 * of the TransitNetwork link record.
643
 * @internal
643
 * \internal
644
 *
644
 *
645
 * @see GetLSA
645
 * \see GetLSA
646
 * @param addr The IP address associated with the LSA.  Typically the Router 
646
 * \param addr The IP address associated with the LSA.  Typically the Router 
647
 * @returns A pointer to the Link State Advertisement for the router specified
647
 * \returns A pointer to the Link State Advertisement for the router specified
648
 * by the IP address addr.
648
 * by the IP address addr.
649
 * ID.
649
 * ID.
650
 */
650
 */
651
  GlobalRoutingLSA* GetLSAByLinkData (Ipv4Address addr) const;
651
  GlobalRoutingLSA* GetLSAByLinkData (Ipv4Address addr) const;
652
652
653
/**
653
/**
654
 * @brief Set all LSA flags to an initialized state, for SPF computation
654
 * \brief Set all LSA flags to an initialized state, for SPF computation
655
 * @internal
655
 * \internal
656
 *
656
 *
657
 * This function walks the database and resets the status flags of all of the
657
 * This function walks the database and resets the status flags of all of the
658
 * contained Link State Advertisements to LSA_SPF_NOT_EXPLORED.  This is done
658
 * contained Link State Advertisements to LSA_SPF_NOT_EXPLORED.  This is done
659
 * prior to each SPF calculation to reset the state of the SPFVertex structures
659
 * prior to each SPF calculation to reset the state of the SPFVertex structures
660
 * that will reference the LSAs during the calculation.
660
 * that will reference the LSAs during the calculation.
661
 *
661
 *
662
 * @see GlobalRoutingLSA
662
 * \see GlobalRoutingLSA
663
 * @see SPFVertex
663
 * \see SPFVertex
664
 */
664
 */
665
  void Initialize ();
665
  void Initialize ();
666
666
 Lines 676-695    Link Here 
676
  std::vector<GlobalRoutingLSA*> m_extdatabase;
676
  std::vector<GlobalRoutingLSA*> m_extdatabase;
677
677
678
/**
678
/**
679
 * @brief GlobalRouteManagerLSDB copy construction is disallowed.  There's no 
679
 * \brief GlobalRouteManagerLSDB copy construction is disallowed.  There's no 
680
 * need for it and a compiler provided shallow copy would be wrong.
680
 * need for it and a compiler provided shallow copy would be wrong.
681
 */
681
 */
682
  GlobalRouteManagerLSDB (GlobalRouteManagerLSDB& lsdb);
682
  GlobalRouteManagerLSDB (GlobalRouteManagerLSDB& lsdb);
683
683
684
/**
684
/**
685
 * @brief The SPFVertex copy assignment operator is disallowed.  There's no 
685
 * \brief The SPFVertex copy assignment operator is disallowed.  There's no 
686
 * need for it and a compiler provided shallow copy would be wrong.
686
 * need for it and a compiler provided shallow copy would be wrong.
687
 */
687
 */
688
  GlobalRouteManagerLSDB& operator= (GlobalRouteManagerLSDB& lsdb);
688
  GlobalRouteManagerLSDB& operator= (GlobalRouteManagerLSDB& lsdb);
689
};
689
};
690
690
691
/**
691
/**
692
 * @brief A global router implementation.
692
 * \brief A global router implementation.
693
 *
693
 *
694
 * This singleton object can query interface each node in the system
694
 * This singleton object can query interface each node in the system
695
 * for a GlobalRouter interface.  For those nodes, it fetches one or
695
 * for a GlobalRouter interface.  For those nodes, it fetches one or
 Lines 705-756    Link Here 
705
  GlobalRouteManagerImpl ();
705
  GlobalRouteManagerImpl ();
706
  virtual ~GlobalRouteManagerImpl ();
706
  virtual ~GlobalRouteManagerImpl ();
707
/**
707
/**
708
 * @brief Delete all static routes on all nodes that have a
708
 * \brief Delete all static routes on all nodes that have a
709
 * GlobalRouterInterface
709
 * GlobalRouterInterface
710
 *
710
 *
711
 * TODO:  separate manually assigned static routes from static routes that
711
 * TODO:  separate manually assigned static routes from static routes that
712
 * the global routing code injects, and only delete the latter
712
 * the global routing code injects, and only delete the latter
713
 * @internal
713
 * \internal
714
 *
714
 *
715
 */
715
 */
716
  virtual void DeleteGlobalRoutes ();
716
  virtual void DeleteGlobalRoutes ();
717
717
718
/**
718
/**
719
 * @brief Build the routing database by gathering Link State Advertisements
719
 * \brief Build the routing database by gathering Link State Advertisements
720
 * from each node exporting a GlobalRouter interface.
720
 * from each node exporting a GlobalRouter interface.
721
 * @internal
721
 * \internal
722
 */
722
 */
723
  virtual void BuildGlobalRoutingDatabase ();
723
  virtual void BuildGlobalRoutingDatabase ();
724
724
725
/**
725
/**
726
 * @brief Compute routes using a Dijkstra SPF computation and populate
726
 * \brief Compute routes using a Dijkstra SPF computation and populate
727
 * per-node forwarding tables
727
 * per-node forwarding tables
728
 * @internal
728
 * \internal
729
 */
729
 */
730
  virtual void InitializeRoutes ();
730
  virtual void InitializeRoutes ();
731
731
732
/**
732
/**
733
 * @brief Debugging routine; allow client code to supply a pre-built LSDB
733
 * \brief Debugging routine; allow client code to supply a pre-built LSDB
734
 * @internal
734
 * \internal
735
 */
735
 */
736
  void DebugUseLsdb (GlobalRouteManagerLSDB*);
736
  void DebugUseLsdb (GlobalRouteManagerLSDB*);
737
737
738
/**
738
/**
739
 * @brief Debugging routine; call the core SPF from the unit tests
739
 * \brief Debugging routine; call the core SPF from the unit tests
740
 * @internal
740
 * \internal
741
 */
741
 */
742
  void DebugSPFCalculate (Ipv4Address root);
742
  void DebugSPFCalculate (Ipv4Address root);
743
743
744
private:
744
private:
745
/**
745
/**
746
 * @brief GlobalRouteManagerImpl copy construction is disallowed.
746
 * \brief GlobalRouteManagerImpl copy construction is disallowed.
747
 * There's no  need for it and a compiler provided shallow copy would be 
747
 * There's no  need for it and a compiler provided shallow copy would be 
748
 * wrong.
748
 * wrong.
749
 */
749
 */
750
  GlobalRouteManagerImpl (GlobalRouteManagerImpl& srmi);
750
  GlobalRouteManagerImpl (GlobalRouteManagerImpl& srmi);
751
751
752
/**
752
/**
753
 * @brief Global Route Manager Implementation assignment operator is
753
 * \brief Global Route Manager Implementation assignment operator is
754
 * disallowed.  There's no  need for it and a compiler provided shallow copy
754
 * disallowed.  There's no  need for it and a compiler provided shallow copy
755
 * would be hopelessly wrong.
755
 * would be hopelessly wrong.
756
 */
756
 */
(-)a/src/internet/model/global-route-manager.h (-9 / +9 lines)
 Lines 27-33    Link Here 
27
namespace ns3 {
27
namespace ns3 {
28
28
29
/**
29
/**
30
 * @brief A global global router
30
 * \brief A global global router
31
 *
31
 *
32
 * This singleton object can query interface each node in the system
32
 * This singleton object can query interface each node in the system
33
 * for a GlobalRouter interface.  For those nodes, it fetches one or
33
 * for a GlobalRouter interface.  For those nodes, it fetches one or
 Lines 41-82    Link Here 
41
{
41
{
42
public:
42
public:
43
/**
43
/**
44
 * @brief Allocate a 32-bit router ID from monotonically increasing counter.
44
 * \brief Allocate a 32-bit router ID from monotonically increasing counter.
45
 */
45
 */
46
  static uint32_t AllocateRouterId ();
46
  static uint32_t AllocateRouterId ();
47
47
48
/**
48
/**
49
 * @brief Delete all static routes on all nodes that have a 
49
 * \brief Delete all static routes on all nodes that have a 
50
 * GlobalRouterInterface
50
 * GlobalRouterInterface
51
 *
51
 *
52
 */
52
 */
53
  static void DeleteGlobalRoutes ();
53
  static void DeleteGlobalRoutes ();
54
54
55
/**
55
/**
56
 * @brief Build the routing database by gathering Link State Advertisements
56
 * \brief Build the routing database by gathering Link State Advertisements
57
 * from each node exporting a GlobalRouter interface.
57
 * from each node exporting a GlobalRouter interface.
58
 * @internal
58
 * \internal
59
 *
59
 *
60
 */
60
 */
61
  static void BuildGlobalRoutingDatabase ();
61
  static void BuildGlobalRoutingDatabase ();
62
62
63
/**
63
/**
64
 * @brief Compute routes using a Dijkstra SPF computation and populate
64
 * \brief Compute routes using a Dijkstra SPF computation and populate
65
 * per-node forwarding tables
65
 * per-node forwarding tables
66
 * @internal
66
 * \internal
67
 */
67
 */
68
  static void InitializeRoutes ();
68
  static void InitializeRoutes ();
69
69
70
private:
70
private:
71
/**
71
/**
72
 * @brief Global Route Manager copy construction is disallowed.  There's no 
72
 * \brief Global Route Manager copy construction is disallowed.  There's no 
73
 * need for it and a compiler provided shallow copy would be wrong.
73
 * need for it and a compiler provided shallow copy would be wrong.
74
 *
74
 *
75
 */
75
 */
76
  GlobalRouteManager (GlobalRouteManager& srm);
76
  GlobalRouteManager (GlobalRouteManager& srm);
77
77
78
/**
78
/**
79
 * @brief Global Router copy assignment operator is disallowed.  There's no 
79
 * \brief Global Router copy assignment operator is disallowed.  There's no 
80
 * need for it and a compiler provided shallow copy would be wrong.
80
 * need for it and a compiler provided shallow copy would be wrong.
81
 */
81
 */
82
  GlobalRouteManager& operator= (GlobalRouteManager& srm);
82
  GlobalRouteManager& operator= (GlobalRouteManager& srm);
(-)a/src/internet/model/global-router-interface.h (-145 / +145 lines)
 Lines 40-46    Link Here 
40
class Ipv4GlobalRouting;
40
class Ipv4GlobalRouting;
41
41
42
/**
42
/**
43
 * @brief A single link record for a link state advertisement.
43
 * \brief A single link record for a link state advertisement.
44
 *
44
 *
45
 * The GlobalRoutingLinkRecord is modeled after the OSPF link record field of
45
 * The GlobalRoutingLinkRecord is modeled after the OSPF link record field of
46
 * a Link State Advertisement.  Right now we will only see two types of link
46
 * a Link State Advertisement.  Right now we will only see two types of link
 Lines 51-58    Link Here 
51
public:
51
public:
52
  friend class GlobalRoutingLSA;
52
  friend class GlobalRoutingLSA;
53
/**
53
/**
54
 * @enum LinkType
54
 * \enum LinkType
55
 * @brief Enumeration of the possible types of Global Routing Link Records.
55
 * \brief Enumeration of the possible types of Global Routing Link Records.
56
 *
56
 *
57
 * These values are defined in the OSPF spec.  We currently only use 
57
 * These values are defined in the OSPF spec.  We currently only use 
58
 * PointToPoint and StubNetwork types.
58
 * PointToPoint and StubNetwork types.
 Lines 66-72    Link Here 
66
  };
66
  };
67
67
68
/**
68
/**
69
 * @brief Construct an empty ("uninitialized") Global Routing Link Record.
69
 * \brief Construct an empty ("uninitialized") Global Routing Link Record.
70
 *
70
 *
71
 * The Link ID and Link Data Ipv4 addresses are set to "0.0.0.0";
71
 * The Link ID and Link Data Ipv4 addresses are set to "0.0.0.0";
72
 * The Link Type is set to Unknown;
72
 * The Link Type is set to Unknown;
 Lines 77-89    Link Here 
77
/**
77
/**
78
 * Construct an initialized Global Routing Link Record.
78
 * Construct an initialized Global Routing Link Record.
79
 *
79
 *
80
 * @param linkType The type of link record to construct.
80
 * \param linkType The type of link record to construct.
81
 * @param linkId The link ID for the record.
81
 * \param linkId The link ID for the record.
82
 * @param linkData The link data field for the record.
82
 * \param linkData The link data field for the record.
83
 * @param metric The metric field for the record.
83
 * \param metric The metric field for the record.
84
 * @see LinkType
84
 * \see LinkType
85
 * @see SetLinkId
85
 * \see SetLinkId
86
 * @see SetLinkData
86
 * \see SetLinkData
87
 */
87
 */
88
  GlobalRoutingLinkRecord (
88
  GlobalRoutingLinkRecord (
89
    LinkType    linkType, 
89
    LinkType    linkType, 
 Lines 92-98    Link Here 
92
    uint16_t    metric);
92
    uint16_t    metric);
93
93
94
/**
94
/**
95
 * @brief Destroy a Global Routing Link Record.
95
 * \brief Destroy a Global Routing Link Record.
96
 *
96
 *
97
 * Currently does nothing.  Here as a placeholder only.
97
 * Currently does nothing.  Here as a placeholder only.
98
 */
98
 */
 Lines 107-118    Link Here 
107
 * For an OSPF type 3 link (StubNetwork), the Link ID will be the adjacent
107
 * For an OSPF type 3 link (StubNetwork), the Link ID will be the adjacent
108
 * neighbor's IP address
108
 * neighbor's IP address
109
 *
109
 *
110
 * @returns The Ipv4Address corresponding to the Link ID field of the record.
110
 * \returns The Ipv4Address corresponding to the Link ID field of the record.
111
 */
111
 */
112
  Ipv4Address GetLinkId (void) const;
112
  Ipv4Address GetLinkId (void) const;
113
113
114
/**
114
/**
115
 * @brief Set the Link ID field of the Global Routing Link Record.
115
 * \brief Set the Link ID field of the Global Routing Link Record.
116
 *
116
 *
117
 * For an OSPF type 1 link (PointToPoint) the Link ID must be the Router ID
117
 * For an OSPF type 1 link (PointToPoint) the Link ID must be the Router ID
118
 * of the neighboring router.
118
 * of the neighboring router.
 Lines 120-131    Link Here 
120
 * For an OSPF type 3 link (StubNetwork), the Link ID must be the adjacent
120
 * For an OSPF type 3 link (StubNetwork), the Link ID must be the adjacent
121
 * neighbor's IP address
121
 * neighbor's IP address
122
 *
122
 *
123
 * @param addr An Ipv4Address to store in the Link ID field of the record.
123
 * \param addr An Ipv4Address to store in the Link ID field of the record.
124
 */
124
 */
125
  void SetLinkId (Ipv4Address addr);
125
  void SetLinkId (Ipv4Address addr);
126
126
127
/**
127
/**
128
 * @brief Get the Link Data field of the Global Routing Link Record.
128
 * \brief Get the Link Data field of the Global Routing Link Record.
129
 *
129
 *
130
 * For an OSPF type 1 link (PointToPoint) the Link Data will be the IP
130
 * For an OSPF type 1 link (PointToPoint) the Link Data will be the IP
131
 * address of the node of the local side of the link.
131
 * address of the node of the local side of the link.
 Lines 133-144    Link Here 
133
 * For an OSPF type 3 link (StubNetwork), the Link Data will be the
133
 * For an OSPF type 3 link (StubNetwork), the Link Data will be the
134
 * network mask
134
 * network mask
135
 *
135
 *
136
 * @returns The Ipv4Address corresponding to the Link Data field of the record.
136
 * \returns The Ipv4Address corresponding to the Link Data field of the record.
137
 */
137
 */
138
  Ipv4Address GetLinkData (void) const;
138
  Ipv4Address GetLinkData (void) const;
139
139
140
/**
140
/**
141
 * @brief Set the Link Data field of the Global Routing Link Record.
141
 * \brief Set the Link Data field of the Global Routing Link Record.
142
 *
142
 *
143
 * For an OSPF type 1 link (PointToPoint) the Link Data must be the IP
143
 * For an OSPF type 1 link (PointToPoint) the Link Data must be the IP
144
 * address of the node of the local side of the link.
144
 * address of the node of the local side of the link.
 Lines 146-179    Link Here 
146
 * For an OSPF type 3 link (StubNetwork), the Link Data must be set to the
146
 * For an OSPF type 3 link (StubNetwork), the Link Data must be set to the
147
 * network mask
147
 * network mask
148
 *
148
 *
149
 * @param addr An Ipv4Address to store in the Link Data field of the record.
149
 * \param addr An Ipv4Address to store in the Link Data field of the record.
150
 */
150
 */
151
  void SetLinkData (Ipv4Address addr);
151
  void SetLinkData (Ipv4Address addr);
152
152
153
/**
153
/**
154
 * @brief Get the Link Type field of the Global Routing Link Record.
154
 * \brief Get the Link Type field of the Global Routing Link Record.
155
 *
155
 *
156
 * The Link Type describes the kind of link a given record represents.  The
156
 * The Link Type describes the kind of link a given record represents.  The
157
 * values are defined by OSPF.
157
 * values are defined by OSPF.
158
 *
158
 *
159
 * @see LinkType
159
 * \see LinkType
160
 * @returns The LinkType of the current Global Routing Link Record.
160
 * \returns The LinkType of the current Global Routing Link Record.
161
 */
161
 */
162
  LinkType GetLinkType (void) const;
162
  LinkType GetLinkType (void) const;
163
163
164
/**
164
/**
165
 * @brief Set the Link Type field of the Global Routing Link Record.
165
 * \brief Set the Link Type field of the Global Routing Link Record.
166
 *
166
 *
167
 * The Link Type describes the kind of link a given record represents.  The
167
 * The Link Type describes the kind of link a given record represents.  The
168
 * values are defined by OSPF.
168
 * values are defined by OSPF.
169
 *
169
 *
170
 * @see LinkType
170
 * \see LinkType
171
 * @param linkType The new LinkType for the current Global Routing Link Record.
171
 * \param linkType The new LinkType for the current Global Routing Link Record.
172
 */
172
 */
173
  void SetLinkType (LinkType linkType);
173
  void SetLinkType (LinkType linkType);
174
174
175
/**
175
/**
176
 * @brief Get the Metric Data field of the Global Routing Link Record.
176
 * \brief Get the Metric Data field of the Global Routing Link Record.
177
 *
177
 *
178
 * The metric is an abstract cost associated with forwarding a packet across
178
 * The metric is an abstract cost associated with forwarding a packet across
179
 * a link.  A sum of metrics must have a well-defined meaning.  That is, you
179
 * a link.  A sum of metrics must have a well-defined meaning.  That is, you
 Lines 181-192    Link Here 
181
 * two hops relate to the cost of sending a packet); rather you should use
181
 * two hops relate to the cost of sending a packet); rather you should use
182
 * something like delay.
182
 * something like delay.
183
 *
183
 *
184
 * @returns The metric field of the Global Routing Link Record.
184
 * \returns The metric field of the Global Routing Link Record.
185
 */
185
 */
186
  uint16_t GetMetric (void) const;
186
  uint16_t GetMetric (void) const;
187
187
188
/**
188
/**
189
 * @brief Set the Metric Data field of the Global Routing Link Record.
189
 * \brief Set the Metric Data field of the Global Routing Link Record.
190
 *
190
 *
191
 * The metric is an abstract cost associated with forwarding a packet across
191
 * The metric is an abstract cost associated with forwarding a packet across
192
 * a link.  A sum of metrics must have a well-defined meaning.  That is, you
192
 * a link.  A sum of metrics must have a well-defined meaning.  That is, you
 Lines 194-200    Link Here 
194
 * two hops relate to the cost of sending a packet); rather you should use
194
 * two hops relate to the cost of sending a packet); rather you should use
195
 * something like delay.
195
 * something like delay.
196
 *
196
 *
197
 * @param metric The new metric for the current Global Routing Link Record.
197
 * \param metric The new metric for the current Global Routing Link Record.
198
 */
198
 */
199
  void SetMetric (uint16_t metric);
199
  void SetMetric (uint16_t metric);
200
200
 Lines 241-247    Link Here 
241
};
241
};
242
242
243
/**
243
/**
244
 * @brief a Link State Advertisement (LSA) for a router, used in global 
244
 * \brief a Link State Advertisement (LSA) for a router, used in global 
245
 * routing.
245
 * routing.
246
 * 
246
 * 
247
 * Roughly equivalent to a global incarnation of the OSPF link state header
247
 * Roughly equivalent to a global incarnation of the OSPF link state header
 Lines 252-259    Link Here 
252
{
252
{
253
public:
253
public:
254
/**
254
/**
255
 * @enum LSType
255
 * \enum LSType
256
 * @brief corresponds to LS type field of RFC 2328 OSPF LSA header
256
 * \brief corresponds to LS type field of RFC 2328 OSPF LSA header
257
 */
257
 */
258
  enum LSType {
258
  enum LSType {
259
    Unknown = 0,        /**< Uninitialized Type */
259
    Unknown = 0,        /**< Uninitialized Type */
 Lines 264-271    Link Here 
264
    ASExternalLSAs
264
    ASExternalLSAs
265
  };
265
  };
266
/**
266
/**
267
 * @enum SPFStatus
267
 * \enum SPFStatus
268
 * @brief Enumeration of the possible values of the status flag in the Routing 
268
 * \brief Enumeration of the possible values of the status flag in the Routing 
269
 * Link State Advertisements.
269
 * Link State Advertisements.
270
 */
270
 */
271
  enum SPFStatus {
271
  enum SPFStatus {
 Lines 274-280    Link Here 
274
    LSA_SPF_IN_SPFTREE          /**< Vertex is in the SPF tree */
274
    LSA_SPF_IN_SPFTREE          /**< Vertex is in the SPF tree */
275
  };
275
  };
276
/**
276
/**
277
 * @brief Create a blank Global Routing Link State Advertisement.
277
 * \brief Create a blank Global Routing Link State Advertisement.
278
 *
278
 *
279
 * On completion Ipv4Address variables initialized to 0.0.0.0 and the 
279
 * On completion Ipv4Address variables initialized to 0.0.0.0 and the 
280
 * list of Link State Records is empty.
280
 * list of Link State Records is empty.
 Lines 282-317    Link Here 
282
  GlobalRoutingLSA();
282
  GlobalRoutingLSA();
283
283
284
/**
284
/**
285
 * @brief Create an initialized Global Routing Link State Advertisement.
285
 * \brief Create an initialized Global Routing Link State Advertisement.
286
 *
286
 *
287
 * On completion the list of Link State Records is empty.
287
 * On completion the list of Link State Records is empty.
288
 *
288
 *
289
 * @param status The status to of the new LSA.
289
 * \param status The status to of the new LSA.
290
 * @param linkStateId The Ipv4Address for the link state ID field.
290
 * \param linkStateId The Ipv4Address for the link state ID field.
291
 * @param advertisingRtr The Ipv4Address for the advertising router field.
291
 * \param advertisingRtr The Ipv4Address for the advertising router field.
292
 */
292
 */
293
  GlobalRoutingLSA(SPFStatus status, Ipv4Address linkStateId, 
293
  GlobalRoutingLSA(SPFStatus status, Ipv4Address linkStateId, 
294
                   Ipv4Address advertisingRtr);
294
                   Ipv4Address advertisingRtr);
295
295
296
/**
296
/**
297
 * @brief Copy constructor for a Global Routing Link State Advertisement.
297
 * \brief Copy constructor for a Global Routing Link State Advertisement.
298
 *
298
 *
299
 * Takes a piece of memory and constructs a semantically identical copy of
299
 * Takes a piece of memory and constructs a semantically identical copy of
300
 * the given LSA.
300
 * the given LSA.
301
 *
301
 *
302
 * @param lsa The existing LSA to be used as the source.
302
 * \param lsa The existing LSA to be used as the source.
303
 */
303
 */
304
  GlobalRoutingLSA (GlobalRoutingLSA& lsa);
304
  GlobalRoutingLSA (GlobalRoutingLSA& lsa);
305
305
306
/**
306
/**
307
 * @brief Destroy an existing Global Routing Link State Advertisement.
307
 * \brief Destroy an existing Global Routing Link State Advertisement.
308
 *
308
 *
309
 * Any Global Routing Link Records present in the list are freed.
309
 * Any Global Routing Link Records present in the list are freed.
310
 */
310
 */
311
  ~GlobalRoutingLSA();
311
  ~GlobalRoutingLSA();
312
312
313
/**
313
/**
314
 * @brief Assignment operator for a Global Routing Link State Advertisement.
314
 * \brief Assignment operator for a Global Routing Link State Advertisement.
315
 *
315
 *
316
 * Takes an existing Global Routing Link State Advertisement and overwrites
316
 * Takes an existing Global Routing Link State Advertisement and overwrites
317
 * it to make a semantically identical copy of a given prototype LSA.
317
 * it to make a semantically identical copy of a given prototype LSA.
 Lines 319-493    Link Here 
319
 * If there are any Global Routing Link Records present in the existing 
319
 * If there are any Global Routing Link Records present in the existing 
320
 * LSA, they are freed before the assignment happens.
320
 * LSA, they are freed before the assignment happens.
321
 *
321
 *
322
 * @param lsa The existing LSA to be used as the source.
322
 * \param lsa The existing LSA to be used as the source.
323
 * @returns Reference to the overwritten LSA.
323
 * \returns Reference to the overwritten LSA.
324
 */
324
 */
325
  GlobalRoutingLSA& operator= (const GlobalRoutingLSA& lsa);
325
  GlobalRoutingLSA& operator= (const GlobalRoutingLSA& lsa);
326
326
327
/**
327
/**
328
 * @brief Copy any Global Routing Link Records in a given Global Routing Link
328
 * \brief Copy any Global Routing Link Records in a given Global Routing Link
329
 * State Advertisement to the current LSA.
329
 * State Advertisement to the current LSA.
330
 * 
330
 * 
331
 * Existing Link Records are not deleted -- this is a concatenation of Link 
331
 * Existing Link Records are not deleted -- this is a concatenation of Link 
332
 * Records.
332
 * Records.
333
 *
333
 *
334
 * @see ClearLinkRecords ()
334
 * \see ClearLinkRecords ()
335
 * @param lsa The LSA to copy the Link Records from.
335
 * \param lsa The LSA to copy the Link Records from.
336
 */
336
 */
337
  void CopyLinkRecords (const GlobalRoutingLSA& lsa);
337
  void CopyLinkRecords (const GlobalRoutingLSA& lsa);
338
338
339
/**
339
/**
340
 * @brief Add a given Global Routing Link Record to the LSA.
340
 * \brief Add a given Global Routing Link Record to the LSA.
341
 *
341
 *
342
 * @param lr The Global Routing Link Record to be added.
342
 * \param lr The Global Routing Link Record to be added.
343
 * @returns The number of link records in the list.
343
 * \returns The number of link records in the list.
344
 */
344
 */
345
  uint32_t AddLinkRecord (GlobalRoutingLinkRecord* lr);
345
  uint32_t AddLinkRecord (GlobalRoutingLinkRecord* lr);
346
346
347
/**
347
/**
348
 * @brief Return the number of Global Routing Link Records in the LSA.
348
 * \brief Return the number of Global Routing Link Records in the LSA.
349
 *
349
 *
350
 * @returns The number of link records in the list.
350
 * \returns The number of link records in the list.
351
 */
351
 */
352
  uint32_t GetNLinkRecords (void) const;
352
  uint32_t GetNLinkRecords (void) const;
353
353
354
/**
354
/**
355
 * @brief Return a pointer to the specified Global Routing Link Record.
355
 * \brief Return a pointer to the specified Global Routing Link Record.
356
 *
356
 *
357
 * @param n The LSA number desired.
357
 * \param n The LSA number desired.
358
 * @returns The number of link records in the list.
358
 * \returns The number of link records in the list.
359
 */
359
 */
360
  GlobalRoutingLinkRecord* GetLinkRecord (uint32_t n) const;
360
  GlobalRoutingLinkRecord* GetLinkRecord (uint32_t n) const;
361
361
362
/**
362
/**
363
 * @brief Release all of the Global Routing Link Records present in the Global
363
 * \brief Release all of the Global Routing Link Records present in the Global
364
 * Routing Link State Advertisement and make the list of link records empty.
364
 * Routing Link State Advertisement and make the list of link records empty.
365
 */
365
 */
366
  void ClearLinkRecords (void);
366
  void ClearLinkRecords (void);
367
367
368
/**
368
/**
369
 * @brief Check to see if the list of Global Routing Link Records present in the
369
 * \brief Check to see if the list of Global Routing Link Records present in the
370
 * Global Routing Link State Advertisement is empty.
370
 * Global Routing Link State Advertisement is empty.
371
 *
371
 *
372
 * @returns True if the list is empty, false otherwise.
372
 * \returns True if the list is empty, false otherwise.
373
 */
373
 */
374
  bool IsEmpty (void) const;
374
  bool IsEmpty (void) const;
375
375
376
/**
376
/**
377
 * @brief Print the contents of the Global Routing Link State Advertisement and
377
 * \brief Print the contents of the Global Routing Link State Advertisement and
378
 * any Global Routing Link Records present in the list.  Quite verbose.
378
 * any Global Routing Link Records present in the list.  Quite verbose.
379
 */
379
 */
380
  void Print (std::ostream &os) const;
380
  void Print (std::ostream &os) const;
381
381
382
/**
382
/**
383
 * @brief Return the LSType field of the LSA 
383
 * \brief Return the LSType field of the LSA 
384
 */
384
 */
385
  LSType GetLSType (void) const;
385
  LSType GetLSType (void) const;
386
/**
386
/**
387
 * @brief Set the LS type field of the LSA
387
 * \brief Set the LS type field of the LSA
388
 */
388
 */
389
  void SetLSType (LSType typ);
389
  void SetLSType (LSType typ);
390
390
391
/**
391
/**
392
 * @brief Get the Link State ID as defined by the OSPF spec.  We always set it
392
 * \brief Get the Link State ID as defined by the OSPF spec.  We always set it
393
 * to the router ID of the router making the advertisement.
393
 * to the router ID of the router making the advertisement.
394
 *
394
 *
395
 * @see RoutingEnvironment::AllocateRouterId ()
395
 * \see RoutingEnvironment::AllocateRouterId ()
396
 * @see GlobalRouting::GetRouterId ()
396
 * \see GlobalRouting::GetRouterId ()
397
 * @returns The Ipv4Address stored as the link state ID.
397
 * \returns The Ipv4Address stored as the link state ID.
398
 */
398
 */
399
  Ipv4Address GetLinkStateId (void) const;
399
  Ipv4Address GetLinkStateId (void) const;
400
400
401
/**
401
/**
402
 * @brief Set the Link State ID is defined by the OSPF spec.  We always set it
402
 * \brief Set the Link State ID is defined by the OSPF spec.  We always set it
403
 * to the router ID of the router making the advertisement.
403
 * to the router ID of the router making the advertisement.
404
 * @param addr IPv4 address which will act as ID
404
 * \param addr IPv4 address which will act as ID
405
 * @see RoutingEnvironment::AllocateRouterId ()
405
 * \see RoutingEnvironment::AllocateRouterId ()
406
 * @see GlobalRouting::GetRouterId ()
406
 * \see GlobalRouting::GetRouterId ()
407
 */
407
 */
408
  void SetLinkStateId (Ipv4Address addr);
408
  void SetLinkStateId (Ipv4Address addr);
409
409
410
/**
410
/**
411
 * @brief Get the Advertising Router as defined by the OSPF spec.  We always
411
 * \brief Get the Advertising Router as defined by the OSPF spec.  We always
412
 * set it to the router ID of the router making the advertisement.
412
 * set it to the router ID of the router making the advertisement.
413
 *
413
 *
414
 * @see RoutingEnvironment::AllocateRouterId ()
414
 * \see RoutingEnvironment::AllocateRouterId ()
415
 * @see GlobalRouting::GetRouterId ()
415
 * \see GlobalRouting::GetRouterId ()
416
 * @returns The Ipv4Address stored as the advertising router.
416
 * \returns The Ipv4Address stored as the advertising router.
417
 */
417
 */
418
  Ipv4Address GetAdvertisingRouter (void) const;
418
  Ipv4Address GetAdvertisingRouter (void) const;
419
419
420
/**
420
/**
421
 * @brief Set the Advertising Router as defined by the OSPF spec.  We always
421
 * \brief Set the Advertising Router as defined by the OSPF spec.  We always
422
 * set it to the router ID of the router making the advertisement.
422
 * set it to the router ID of the router making the advertisement.
423
 *
423
 *
424
 * @param rtr ID of the router making advertisement
424
 * \param rtr ID of the router making advertisement
425
 * @see RoutingEnvironment::AllocateRouterId ()
425
 * \see RoutingEnvironment::AllocateRouterId ()
426
 * @see GlobalRouting::GetRouterId ()
426
 * \see GlobalRouting::GetRouterId ()
427
 */
427
 */
428
  void SetAdvertisingRouter (Ipv4Address  rtr);
428
  void SetAdvertisingRouter (Ipv4Address  rtr);
429
429
430
/**
430
/**
431
 * @brief For a Network LSA, set the Network Mask field that precedes
431
 * \brief For a Network LSA, set the Network Mask field that precedes
432
 * the list of attached routers.
432
 * the list of attached routers.
433
 */
433
 */
434
  void SetNetworkLSANetworkMask (Ipv4Mask mask);
434
  void SetNetworkLSANetworkMask (Ipv4Mask mask);
435
435
436
/**
436
/**
437
 * @brief For a Network LSA, get the Network Mask field that precedes
437
 * \brief For a Network LSA, get the Network Mask field that precedes
438
 * the list of attached routers.
438
 * the list of attached routers.
439
 * 
439
 * 
440
 * @returns the NetworkLSANetworkMask 
440
 * \returns the NetworkLSANetworkMask 
441
 */
441
 */
442
  Ipv4Mask GetNetworkLSANetworkMask (void) const;
442
  Ipv4Mask GetNetworkLSANetworkMask (void) const;
443
443
444
/**
444
/**
445
 * @brief Add an attached router to the list in the NetworkLSA
445
 * \brief Add an attached router to the list in the NetworkLSA
446
 *
446
 *
447
 * @param addr The Ipv4Address of the interface on the network link
447
 * \param addr The Ipv4Address of the interface on the network link
448
 * @returns The number of addresses in the list.
448
 * \returns The number of addresses in the list.
449
 */
449
 */
450
  uint32_t AddAttachedRouter (Ipv4Address addr);
450
  uint32_t AddAttachedRouter (Ipv4Address addr);
451
451
452
/**
452
/**
453
 * @brief Return the number of attached routers listed in the NetworkLSA
453
 * \brief Return the number of attached routers listed in the NetworkLSA
454
 *
454
 *
455
 * @returns The number of attached routers.
455
 * \returns The number of attached routers.
456
 */
456
 */
457
  uint32_t GetNAttachedRouters (void) const;
457
  uint32_t GetNAttachedRouters (void) const;
458
458
459
/**
459
/**
460
 * @brief Return an Ipv4Address corresponding to the specified attached router
460
 * \brief Return an Ipv4Address corresponding to the specified attached router
461
 *
461
 *
462
 * @param n The attached router number desired (number in the list).
462
 * \param n The attached router number desired (number in the list).
463
 * @returns The Ipv4Address of the requested router
463
 * \returns The Ipv4Address of the requested router
464
 */
464
 */
465
  Ipv4Address GetAttachedRouter (uint32_t n) const;
465
  Ipv4Address GetAttachedRouter (uint32_t n) const;
466
466
467
/**
467
/**
468
 * @brief Get the SPF status of the advertisement.
468
 * \brief Get the SPF status of the advertisement.
469
 *
469
 *
470
 * @see SPFStatus
470
 * \see SPFStatus
471
 * @returns The SPFStatus of the LSA.
471
 * \returns The SPFStatus of the LSA.
472
 */
472
 */
473
  SPFStatus GetStatus (void) const;
473
  SPFStatus GetStatus (void) const;
474
474
475
/**
475
/**
476
 * @brief Set the SPF status of the advertisement
476
 * \brief Set the SPF status of the advertisement
477
 * @param status SPF status to set
477
 * \param status SPF status to set
478
 * @see SPFStatus
478
 * \see SPFStatus
479
 */
479
 */
480
  void SetStatus (SPFStatus status);
480
  void SetStatus (SPFStatus status);
481
481
482
/**
482
/**
483
 * @brief Get the Node pointer of the node that originated this LSA
483
 * \brief Get the Node pointer of the node that originated this LSA
484
 * @returns Node pointer
484
 * \returns Node pointer
485
 */
485
 */
486
  Ptr<Node> GetNode (void) const;
486
  Ptr<Node> GetNode (void) const;
487
487
488
/**
488
/**
489
 * @brief Set the Node pointer of the node that originated this LSA
489
 * \brief Set the Node pointer of the node that originated this LSA
490
 * @param node Node pointer
490
 * \param node Node pointer
491
 */
491
 */
492
  void SetNode (Ptr<Node> node);
492
  void SetNode (Ptr<Node> node);
493
493
 Lines 501-508    Link Here 
501
 * The Link State ID is defined by the OSPF spec.  We always set it to the
501
 * The Link State ID is defined by the OSPF spec.  We always set it to the
502
 * router ID of the router making the advertisement.
502
 * router ID of the router making the advertisement.
503
 *
503
 *
504
 * @see RoutingEnvironment::AllocateRouterId ()
504
 * \see RoutingEnvironment::AllocateRouterId ()
505
 * @see GlobalRouting::GetRouterId ()
505
 * \see GlobalRouting::GetRouterId ()
506
 */
506
 */
507
  Ipv4Address  m_linkStateId;
507
  Ipv4Address  m_linkStateId;
508
508
 Lines 510-517    Link Here 
510
 * The Advertising Router is defined by the OSPF spec.  We always set it to 
510
 * The Advertising Router is defined by the OSPF spec.  We always set it to 
511
 * the router ID of the router making the advertisement.
511
 * the router ID of the router making the advertisement.
512
 *
512
 *
513
 * @see RoutingEnvironment::AllocateRouterId ()
513
 * \see RoutingEnvironment::AllocateRouterId ()
514
 * @see GlobalRouting::GetRouterId ()
514
 * \see GlobalRouting::GetRouterId ()
515
 */
515
 */
516
  Ipv4Address  m_advertisingRtr;
516
  Ipv4Address  m_advertisingRtr;
517
517
 Lines 528-534    Link Here 
528
 * m_linkRecords is an STL list container to hold the Link Records that have
528
 * m_linkRecords is an STL list container to hold the Link Records that have
529
 * been discovered and prepared for the advertisement.
529
 * been discovered and prepared for the advertisement.
530
 *
530
 *
531
 * @see GlobalRouting::DiscoverLSAs ()
531
 * \see GlobalRouting::DiscoverLSAs ()
532
 */
532
 */
533
  ListOfLinkRecords_t m_linkRecords;
533
  ListOfLinkRecords_t m_linkRecords;
534
534
 Lines 548-554    Link Here 
548
 * m_attachedRouters is an STL list container to hold the addresses that have
548
 * m_attachedRouters is an STL list container to hold the addresses that have
549
 * been discovered and prepared for the advertisement.
549
 * been discovered and prepared for the advertisement.
550
 *
550
 *
551
 * @see GlobalRouting::DiscoverLSAs ()
551
 * \see GlobalRouting::DiscoverLSAs ()
552
 */
552
 */
553
  ListOfAttachedRouters_t m_attachedRouters;
553
  ListOfAttachedRouters_t m_attachedRouters;
554
554
 Lines 565-571    Link Here 
565
std::ostream& operator<< (std::ostream& os, GlobalRoutingLSA& lsa);
565
std::ostream& operator<< (std::ostream& os, GlobalRoutingLSA& lsa);
566
566
567
/**
567
/**
568
 * @brief An interface aggregated to a node to provide global routing info
568
 * \brief An interface aggregated to a node to provide global routing info
569
 *
569
 *
570
 * An interface aggregated to a node that provides global routing information
570
 * An interface aggregated to a node that provides global routing information
571
 * to a global route manager.  The presence of the interface indicates that
571
 * to a global route manager.  The presence of the interface indicates that
 Lines 577-590    Link Here 
577
{
577
{
578
public:
578
public:
579
/**
579
/**
580
 * @brief The Interface ID of the Global Router interface.
580
 * \brief The Interface ID of the Global Router interface.
581
 *
581
 *
582
 * @see Object::GetObject ()
582
 * \see Object::GetObject ()
583
 */
583
 */
584
  static TypeId GetTypeId (void);
584
  static TypeId GetTypeId (void);
585
585
586
/**
586
/**
587
 * @brief Create a Global Router class 
587
 * \brief Create a Global Router class 
588
 */
588
 */
589
  GlobalRouter ();
589
  GlobalRouter ();
590
590
 Lines 593-610    Link Here 
593
  Ptr<Ipv4GlobalRouting> GetRoutingProtocol (void);
593
  Ptr<Ipv4GlobalRouting> GetRoutingProtocol (void);
594
594
595
/**
595
/**
596
 * @brief Get the Router ID associated with this Global Router.
596
 * \brief Get the Router ID associated with this Global Router.
597
 *
597
 *
598
 * The Router IDs are allocated in the RoutingEnvironment -- one per Router, 
598
 * The Router IDs are allocated in the RoutingEnvironment -- one per Router, 
599
 * starting at 0.0.0.1 and incrementing with each instantiation of a router.
599
 * starting at 0.0.0.1 and incrementing with each instantiation of a router.
600
 *
600
 *
601
 * @see RoutingEnvironment::AllocateRouterId ()
601
 * \see RoutingEnvironment::AllocateRouterId ()
602
 * @returns The Router ID associated with the Global Router.
602
 * \returns The Router ID associated with the Global Router.
603
 */
603
 */
604
  Ipv4Address GetRouterId (void) const;
604
  Ipv4Address GetRouterId (void) const;
605
605
606
/**
606
/**
607
 * @brief Walk the connected channels, discover the adjacent routers and build
607
 * \brief Walk the connected channels, discover the adjacent routers and build
608
 * the associated number of Global Routing Link State Advertisements that 
608
 * the associated number of Global Routing Link State Advertisements that 
609
 * this router can export.
609
 * this router can export.
610
 *
610
 *
 Lines 616-644    Link Here 
616
 * advertisements after a network topology change by calling DiscoverLSAs 
616
 * advertisements after a network topology change by calling DiscoverLSAs 
617
 * and then by reading those advertisements.
617
 * and then by reading those advertisements.
618
 *
618
 *
619
 * @see GlobalRoutingLSA
619
 * \see GlobalRoutingLSA
620
 * @see GlobalRouter::GetLSA ()
620
 * \see GlobalRouter::GetLSA ()
621
 * @returns The number of Global Routing Link State Advertisements.
621
 * \returns The number of Global Routing Link State Advertisements.
622
 */
622
 */
623
  uint32_t DiscoverLSAs (void);
623
  uint32_t DiscoverLSAs (void);
624
624
625
/**
625
/**
626
 * @brief Get the Number of Global Routing Link State Advertisements that this
626
 * \brief Get the Number of Global Routing Link State Advertisements that this
627
 * router can export.
627
 * router can export.
628
 *
628
 *
629
 * To get meaningful information you must have previously called DiscoverLSAs.
629
 * To get meaningful information you must have previously called DiscoverLSAs.
630
 * After you know how many LSAs are present in the router, you may call 
630
 * After you know how many LSAs are present in the router, you may call 
631
 * GetLSA () to retrieve the actual advertisement.
631
 * GetLSA () to retrieve the actual advertisement.
632
 *
632
 *
633
 * @see GlobalRouterLSA
633
 * \see GlobalRouterLSA
634
 * @see GlobalRouting::DiscoverLSAs ()
634
 * \see GlobalRouting::DiscoverLSAs ()
635
 * @see GlobalRouting::GetLSA ()
635
 * \see GlobalRouting::GetLSA ()
636
 * @returns The number of Global Routing Link State Advertisements.
636
 * \returns The number of Global Routing Link State Advertisements.
637
 */
637
 */
638
  uint32_t GetNumLSAs (void) const;
638
  uint32_t GetNumLSAs (void) const;
639
639
640
/**
640
/**
641
 * @brief Get a Global Routing Link State Advertisements that this router has 
641
 * \brief Get a Global Routing Link State Advertisements that this router has 
642
 * said that it can export.
642
 * said that it can export.
643
 *
643
 *
644
 * This is a fairly inexpensive expensive operation in that the hard work
644
 * This is a fairly inexpensive expensive operation in that the hard work
 Lines 651-709    Link Here 
651
 * The parameter n (requested LSA number) must be in the range 0 to 
651
 * The parameter n (requested LSA number) must be in the range 0 to 
652
 * GetNumLSAs() - 1.
652
 * GetNumLSAs() - 1.
653
 *
653
 *
654
 * @see GlobalRoutingLSA
654
 * \see GlobalRoutingLSA
655
 * @see GlobalRouting::GetNumLSAs ()
655
 * \see GlobalRouting::GetNumLSAs ()
656
 * @param n The index number of the LSA you want to read.
656
 * \param n The index number of the LSA you want to read.
657
 * @param lsa The GlobalRoutingLSA class to receive the LSA information.
657
 * \param lsa The GlobalRoutingLSA class to receive the LSA information.
658
 * @returns The number of Global Router Link State Advertisements.
658
 * \returns The number of Global Router Link State Advertisements.
659
 */
659
 */
660
  bool GetLSA (uint32_t n, GlobalRoutingLSA &lsa) const;
660
  bool GetLSA (uint32_t n, GlobalRoutingLSA &lsa) const;
661
661
662
/**
662
/**
663
 * @brief Inject a route to be circulated to other routers as an external
663
 * \brief Inject a route to be circulated to other routers as an external
664
 * route
664
 * route
665
 *
665
 *
666
 * @param network The Network to inject
666
 * \param network The Network to inject
667
 * @param networkMask The Network Mask to inject
667
 * \param networkMask The Network Mask to inject
668
 */
668
 */
669
  void InjectRoute (Ipv4Address network, Ipv4Mask networkMask);
669
  void InjectRoute (Ipv4Address network, Ipv4Mask networkMask);
670
670
671
/**
671
/**
672
 * @brief Get the number of injected routes that have been added
672
 * \brief Get the number of injected routes that have been added
673
 * to the routing table.
673
 * to the routing table.
674
 * @return number of injected routes
674
 * \return number of injected routes
675
 */
675
 */
676
  uint32_t GetNInjectedRoutes (void);
676
  uint32_t GetNInjectedRoutes (void);
677
677
678
/**
678
/**
679
 * @brief Return the injected route indexed by i
679
 * \brief Return the injected route indexed by i
680
 * @param i the index of the route
680
 * \param i the index of the route
681
 * @return a pointer to that Ipv4RoutingTableEntry is returned
681
 * \return a pointer to that Ipv4RoutingTableEntry is returned
682
 *
682
 *
683
 */
683
 */
684
  Ipv4RoutingTableEntry *GetInjectedRoute (uint32_t i);
684
  Ipv4RoutingTableEntry *GetInjectedRoute (uint32_t i);
685
685
686
/**
686
/**
687
 * @brief Withdraw a route from the global unicast routing table.
687
 * \brief Withdraw a route from the global unicast routing table.
688
 *
688
 *
689
 * Calling this function will cause all indexed routes numbered above
689
 * Calling this function will cause all indexed routes numbered above
690
 * index i to have their index decremented.  For instance, it is possible to
690
 * index i to have their index decremented.  For instance, it is possible to
691
 * remove N injected routes by calling RemoveInjectedRoute (0) N times.
691
 * remove N injected routes by calling RemoveInjectedRoute (0) N times.
692
 *
692
 *
693
 * @param i The index (into the injected routing list) of the route to remove.
693
 * \param i The index (into the injected routing list) of the route to remove.
694
 *
694
 *
695
 * @see GlobalRouter::WithdrawRoute ()
695
 * \see GlobalRouter::WithdrawRoute ()
696
 */
696
 */
697
  void RemoveInjectedRoute (uint32_t i);
697
  void RemoveInjectedRoute (uint32_t i);
698
698
699
/**
699
/**
700
 * @brief Withdraw a route from the global unicast routing table.
700
 * \brief Withdraw a route from the global unicast routing table.
701
 *
701
 *
702
 * @param network The Network to withdraw
702
 * \param network The Network to withdraw
703
 * @param networkMask The Network Mask to withdraw
703
 * \param networkMask The Network Mask to withdraw
704
 * @return whether the operation succeeded (will return false if no such route)
704
 * \return whether the operation succeeded (will return false if no such route)
705
 *
705
 *
706
 * @see GlobalRouter::RemoveInjectedRoute ()
706
 * \see GlobalRouter::RemoveInjectedRoute ()
707
 */
707
 */
708
  bool WithdrawRoute (Ipv4Address network, Ipv4Mask networkMask);
708
  bool WithdrawRoute (Ipv4Address network, Ipv4Mask networkMask);
709
709
 Lines 739-750    Link Here 
739
  virtual void DoDispose (void);
739
  virtual void DoDispose (void);
740
740
741
/**
741
/**
742
 * @brief Global Router copy construction is disallowed.
742
 * \brief Global Router copy construction is disallowed.
743
 */
743
 */
744
  GlobalRouter (GlobalRouter& sr);
744
  GlobalRouter (GlobalRouter& sr);
745
745
746
/**
746
/**
747
 * @brief Global Router assignment operator is disallowed.
747
 * \brief Global Router assignment operator is disallowed.
748
 */
748
 */
749
  GlobalRouter& operator= (GlobalRouter& sr);
749
  GlobalRouter& operator= (GlobalRouter& sr);
750
};
750
};
(-)a/src/internet/model/ipv4-header.h (-1 / +1 lines)
 Lines 111-117    Link Here 
111
    }; 
111
    }; 
112
  /**
112
  /**
113
   * \brief Set ECN Field
113
   * \brief Set ECN Field
114
   * \param ECN Type
114
   * \param ecn ECN Type
115
   */
115
   */
116
  void SetEcn (EcnType ecn);
116
  void SetEcn (EcnType ecn);
117
  /**
117
  /**
(-)a/src/internet/model/nsc-tcp-socket-impl.cc (-1 / +1 lines)
 Lines 136-142    Link Here 
136
       * when DeAllocate is called, it will call into
136
       * when DeAllocate is called, it will call into
137
       * Ipv4EndPointDemux::Deallocate which triggers
137
       * Ipv4EndPointDemux::Deallocate which triggers
138
       * a delete of the associated endPoint which triggers
138
       * a delete of the associated endPoint which triggers
139
       * in turn a call to the method ::Destroy below
139
       * in turn a call to the method NscTcpSocketImpl::Destroy below
140
       * will will zero the m_endPoint field.
140
       * will will zero the m_endPoint field.
141
       */
141
       */
142
      NS_ASSERT (m_endPoint != 0);
142
      NS_ASSERT (m_endPoint != 0);
(-)a/src/internet/model/sim_interface.h (-1 / +1 lines)
 Lines 125-131    Link Here 
125
125
126
  /** Simple interface to support sending any textual command to a stack
126
  /** Simple interface to support sending any textual command to a stack
127
   *
127
   *
128
   * @returns 0 on success
128
   * \returns 0 on success
129
   */
129
   */
130
  virtual int cmd (const char *)
130
  virtual int cmd (const char *)
131
  {
131
  {
(-)a/src/internet/model/udp-socket-impl.cc (-1 / +1 lines)
 Lines 84-90    Link Here 
84
       * when DeAllocate is called, it will call into
84
       * when DeAllocate is called, it will call into
85
       * Ipv4EndPointDemux::Deallocate which triggers
85
       * Ipv4EndPointDemux::Deallocate which triggers
86
       * a delete of the associated endPoint which triggers
86
       * a delete of the associated endPoint which triggers
87
       * in turn a call to the method ::Destroy below
87
       * in turn a call to the method UdpSocketImpl::Destroy below
88
       * will will zero the m_endPoint field.
88
       * will will zero the m_endPoint field.
89
       */
89
       */
90
      NS_ASSERT (m_endPoint != 0);
90
      NS_ASSERT (m_endPoint != 0);
(-)a/src/lte/model/lte-propagation-loss-model.h (-4 / +4 lines)
 Lines 67-79    Link Here 
67
67
68
private:
68
private:
69
  /**
69
  /**
70
   * @param txPower set of values vs frequency representing the
70
   * \param txPower set of values vs frequency representing the
71
   * transmission power. See SpectrumChannel for details.
71
   * transmission power. See SpectrumChannel for details.
72
   *
72
   *
73
   * @param a sender mobility
73
   * \param a sender mobility
74
   * @param b receiver mobility
74
   * \param b receiver mobility
75
   *
75
   *
76
   * @return set of values vs frequency representing the received
76
   * \return set of values vs frequency representing the received
77
   * power in the same units used for the txPower parameter.
77
   * power in the same units used for the txPower parameter.
78
   */
78
   */
79
  Ptr<SpectrumValue> DoCalcRxPowerSpectralDensity (Ptr<const SpectrumValue> txPsd,
79
  Ptr<SpectrumValue> DoCalcRxPowerSpectralDensity (Ptr<const SpectrumValue> txPsd,
(-)a/src/lte/model/lte-spectrum-phy.h (-10 / +10 lines)
 Lines 81-87    Link Here 
81
  /**
81
  /**
82
   * Get the SpectrumType used by this PHY
82
   * Get the SpectrumType used by this PHY
83
   *
83
   *
84
   * @return
84
   * \return
85
   */
85
   */
86
  SpectrumType GetSpectrumType ();
86
  SpectrumType GetSpectrumType ();
87
87
 Lines 89-108    Link Here 
89
  /**
89
  /**
90
   * set the Power Spectral Density of outgoing signals in W/Hz.
90
   * set the Power Spectral Density of outgoing signals in W/Hz.
91
   *
91
   *
92
   * @param txPsd
92
   * \param txPsd
93
   */
93
   */
94
  void SetTxPowerSpectralDensity (Ptr<SpectrumValue> txPsd);
94
  void SetTxPowerSpectralDensity (Ptr<SpectrumValue> txPsd);
95
95
96
  /**
96
  /**
97
   * \brief set the noise power spectral density
97
   * \brief set the noise power spectral density
98
   * @param noisePsd the Noise Power Spectral Density in power units
98
   * \param noisePsd the Noise Power Spectral Density in power units
99
   * (Watt, Pascal...) per Hz.
99
   * (Watt, Pascal...) per Hz.
100
   */
100
   */
101
  void SetNoisePowerSpectralDensity (Ptr<const SpectrumValue> noisePsd);
101
  void SetNoisePowerSpectralDensity (Ptr<const SpectrumValue> noisePsd);
102
102
103
  /**
103
  /**
104
   * \brief get the noise power spectral density
104
   * \brief get the noise power spectral density
105
   * @return the Noise Power Spectral Density
105
   * \return the Noise Power Spectral Density
106
   */
106
   */
107
  Ptr<const SpectrumValue> GetNoisePowerSpectralDensity (void);
107
  Ptr<const SpectrumValue> GetNoisePowerSpectralDensity (void);
108
108
 Lines 110-118    Link Here 
110
   * Start a transmission
110
   * Start a transmission
111
   *
111
   *
112
   *
112
   *
113
   * @param pb the burst of packets to be transmitted
113
   * \param pb the burst of packets to be transmitted
114
   *
114
   *
115
   * @return true if an error occurred and the transmission was not
115
   * \return true if an error occurred and the transmission was not
116
   * started, false otherwise.
116
   * started, false otherwise.
117
   */
117
   */
118
  bool StartTx (Ptr<PacketBurst> pb);
118
  bool StartTx (Ptr<PacketBurst> pb);
 Lines 131-137    Link Here 
131
   * set the callback for the end of a TX, as part of the
131
   * set the callback for the end of a TX, as part of the
132
   * interconnections betweenthe PHY and the MAC
132
   * interconnections betweenthe PHY and the MAC
133
   *
133
   *
134
   * @param c the callback
134
   * \param c the callback
135
   */
135
   */
136
  void SetGenericPhyTxEndCallback (GenericPhyTxEndCallback c);
136
  void SetGenericPhyTxEndCallback (GenericPhyTxEndCallback c);
137
137
 Lines 139-145    Link Here 
139
   * set the callback for the start of RX, as part of the
139
   * set the callback for the start of RX, as part of the
140
   * interconnections betweenthe PHY and the MAC
140
   * interconnections betweenthe PHY and the MAC
141
   *
141
   *
142
   * @param c the callback
142
   * \param c the callback
143
   */
143
   */
144
  void SetGenericPhyRxStartCallback (GenericPhyRxStartCallback c);
144
  void SetGenericPhyRxStartCallback (GenericPhyRxStartCallback c);
145
145
 Lines 147-153    Link Here 
147
   * set the callback for the end of a RX in error, as part of the
147
   * set the callback for the end of a RX in error, as part of the
148
   * interconnections betweenthe PHY and the MAC
148
   * interconnections betweenthe PHY and the MAC
149
   *
149
   *
150
   * @param c the callback
150
   * \param c the callback
151
   */
151
   */
152
  void SetGenericPhyRxEndErrorCallback (GenericPhyRxEndErrorCallback c);
152
  void SetGenericPhyRxEndErrorCallback (GenericPhyRxEndErrorCallback c);
153
153
 Lines 155-161    Link Here 
155
   * set the callback for the successful end of a RX, as part of the
155
   * set the callback for the successful end of a RX, as part of the
156
   * interconnections betweenthe PHY and the MAC
156
   * interconnections betweenthe PHY and the MAC
157
   *
157
   *
158
   * @param c the callback
158
   * \param c the callback
159
   */
159
   */
160
  void SetGenericPhyRxEndOkCallback (GenericPhyRxEndOkCallback c);
160
  void SetGenericPhyRxEndOkCallback (GenericPhyRxEndOkCallback c);
161
161
(-)a/src/mesh/helper/mesh-stack-installer.h (-1 / +2 lines)
 Lines 28-34    Link Here 
28
 *
28
 *
29
 * \brief Prototype for class, which helps to install MAC-layer
29
 * \brief Prototype for class, which helps to install MAC-layer
30
 * routing stack to ns3::MeshPointDevice
30
 * routing stack to ns3::MeshPointDevice
31
 * \details You need to create a  MeshPointDevice and attach all
31
 *
32
 * You need to create a MeshPointDevice and attach all
32
 * interfaces to it, than call Install method
33
 * interfaces to it, than call Install method
33
 */
34
 */
34
class MeshStack : public Object
35
class MeshStack : public Object
(-)a/src/mesh/model/dot11s/airtime-metric.h (-7 / +6 lines)
 Lines 26-41    Link Here 
26
/**
26
/**
27
 * \ingroup dot11s
27
 * \ingroup dot11s
28
 *
28
 *
29
 * \brief airtime link metric calculator
29
 * \brief Airtime link metric calculator
30
 *
30
 *
31
 * \details Airtime link metric is defined in 11B.10 of 802.11s Draft D3.0 as:
31
 * Airtime link metric is defined in 11B.10 of 802.11s Draft D3.0 as:
32
 *
32
 *
33
 * airtime = (O + Bt/r)* (1 + average retry counter), where
33
 * airtime = (O + Bt/r)* (1 + average retry counter), where:
34
 *
34
 * - o  -- the PHY dependent channel access which includes frame headers, training sequences,
35
 * o  -- the PHY dependent channel access which includes frame headers, training sequences,
36
 *       access protocol frames, etc.
35
 *       access protocol frames, etc.
37
 * bt -- the test packet length in bits (8192 by default),
36
 * - bt -- the test packet length in bits (8192 by default),
38
 * r  -- the current bitrate of the packet,
37
 * - r  -- the current bitrate of the packet,
39
 *
38
 *
40
 * Final result is expressed in units of 0.01 Time Unit = 10.24 us (as required by 802.11s draft)
39
 * Final result is expressed in units of 0.01 Time Unit = 10.24 us (as required by 802.11s draft)
41
 */
40
 */
(-)a/src/mesh/model/dot11s/hwmp-tag.h (-1 / +1 lines)
 Lines 34-40    Link Here 
34
 * \brief Hwmp tag implements interaction between HWMP
34
 * \brief Hwmp tag implements interaction between HWMP
35
 * protocol and MeshWifiMac
35
 * protocol and MeshWifiMac
36
 *
36
 *
37
 * \details Hwmp tag keeps the following:
37
 * Hwmp tag keeps the following:
38
 * 1. When packet is passed from Hwmp to 11sMAC:
38
 * 1. When packet is passed from Hwmp to 11sMAC:
39
 *  - retransmitter address,
39
 *  - retransmitter address,
40
 *  - TTL value,
40
 *  - TTL value,
(-)a/src/mesh/model/dot11s/peer-link-frame.h (-3 / +3 lines)
34
/**
34
/**
35
 * \ingroup dot11s
35
 * \ingroup dot11s
36
 *
36
 *
37
 * \brief 802.11s Peer link management frame:
37
 * \brief 802.11s Peer link management frame
38
 * \details included the following (see chapters 7.4.12.1-7.4.12.3 of
38
 * 
39
 * 802.11s):
39
 * Peer link management frame included the following (see chapters 7.4.12.1-7.4.12.3 of 802.11s):
40
 * - Subtype field
40
 * - Subtype field
41
 * - Association ID field
41
 * - Association ID field
42
 * - Supported rates
42
 * - Supported rates
(-)a/src/mesh/model/dot11s/peer-link.h (-3 / +3 lines)
 Lines 202-215    Link Here 
202
  PeerLink& operator= (const PeerLink &);
202
  PeerLink& operator= (const PeerLink &);
203
  PeerLink (const PeerLink &);
203
  PeerLink (const PeerLink &);
204
204
205
  ///The number of interface I am associated with
205
  /// The number of interface I am associated with
206
  uint32_t m_interface;
206
  uint32_t m_interface;
207
  /// pointer to MAC plugin, which is responsible for peer management
207
  /// pointer to MAC plugin, which is responsible for peer management
208
  Ptr<PeerManagementProtocolMac> m_macPlugin;
208
  Ptr<PeerManagementProtocolMac> m_macPlugin;
209
  /// Peer address
209
  /// Peer address
210
  Mac48Address m_peerAddress;
210
  Mac48Address m_peerAddress;
211
  /// Mesh point address, equal to peer address in case of single
211
  /// Mesh point address, equal to peer address in case of single
212
  //interface mesh point
212
  /// interface mesh point
213
  Mac48Address m_peerMeshPointAddress;
213
  Mac48Address m_peerMeshPointAddress;
214
  /// My ID of this link
214
  /// My ID of this link
215
  uint16_t m_localLinkId;
215
  uint16_t m_localLinkId;
 Lines 253-259    Link Here 
253
  EventId  m_beaconLossTimer;
253
  EventId  m_beaconLossTimer;
254
  uint16_t m_maxBeaconLoss;
254
  uint16_t m_maxBeaconLoss;
255
  uint16_t m_maxPacketFail;
255
  uint16_t m_maxPacketFail;
256
  //\}
256
  // \}
257
  /// How to report my status change
257
  /// How to report my status change
258
  SignalStatusCallback m_linkStatusCallback;
258
  SignalStatusCallback m_linkStatusCallback;
259
};
259
};
(-)a/src/mesh/model/dot11s/peer-management-protocol-mac.h (-19 / +19 lines)
 Lines 45-70    Link Here 
45
  PeerManagementProtocolMac (uint32_t interface, Ptr<PeerManagementProtocol> protocol);
45
  PeerManagementProtocolMac (uint32_t interface, Ptr<PeerManagementProtocol> protocol);
46
  ~PeerManagementProtocolMac ();
46
  ~PeerManagementProtocolMac ();
47
  ///\name Inherited from plugin abstract class
47
  ///\name Inherited from plugin abstract class
48
  ///\{
48
  // \{
49
  void SetParent (Ptr<MeshWifiInterfaceMac> parent);
49
  void SetParent (Ptr<MeshWifiInterfaceMac> parent);
50
  bool Receive (Ptr<Packet> packet, const WifiMacHeader & header);
50
  bool Receive (Ptr<Packet> packet, const WifiMacHeader & header);
51
  bool UpdateOutcomingFrame (Ptr<Packet> packet, WifiMacHeader & header, Mac48Address from, Mac48Address to);
51
  bool UpdateOutcomingFrame (Ptr<Packet> packet, WifiMacHeader & header, Mac48Address from, Mac48Address to);
52
  void UpdateBeacon (MeshWifiBeacon & beacon) const;
52
  void UpdateBeacon (MeshWifiBeacon & beacon) const;
53
  ///\}
53
  // \}
54
  ///\name Statistics:
54
  ///\name Statistics
55
  ///\{
55
  // \{
56
  void Report (std::ostream &) const;
56
  void Report (std::ostream &) const;
57
  void ResetStats ();
57
  void ResetStats ();
58
  uint32_t GetLinkMetric (Mac48Address peerAddress);
58
  uint32_t GetLinkMetric (Mac48Address peerAddress);
59
  ///\}
59
  // \}
60
private:
60
private:
61
  PeerManagementProtocolMac& operator= (const PeerManagementProtocolMac &);
61
  PeerManagementProtocolMac& operator= (const PeerManagementProtocolMac &);
62
  PeerManagementProtocolMac (const PeerManagementProtocolMac &);
62
  PeerManagementProtocolMac (const PeerManagementProtocolMac &);
63
63
64
  friend class PeerManagementProtocol;
64
  friend class PeerManagementProtocol;
65
  friend class PeerLink;
65
  friend class PeerLink;
66
  ///\name Create peer link management frames:
66
  ///\name Create peer link management frames
67
  ///\{
67
  // \{
68
  /**
69
   * \brief This structure keeps all fields in peer link management frame,
70
   * which are not subclasses of WifiInformationElement
71
   */
68
  struct PlinkFrameStart
72
  struct PlinkFrameStart
69
  {
73
  {
70
    uint8_t subtype;
74
    uint8_t subtype;
 Lines 75-92    Link Here 
75
  Ptr<Packet> CreatePeerLinkOpenFrame ();
79
  Ptr<Packet> CreatePeerLinkOpenFrame ();
76
  Ptr<Packet> CreatePeerLinkConfirmFrame ();
80
  Ptr<Packet> CreatePeerLinkConfirmFrame ();
77
  Ptr<Packet> CreatePeerLinkCloseFrame ();
81
  Ptr<Packet> CreatePeerLinkCloseFrame ();
78
  /**
82
  /// Parses the start of the frame, where no WifiInformationElements exist
79
   * \brief This structure keeps all fields in peer link management frame,
80
   * which are not subclasses of WifiInformationElement
81
   */
82
  /// \name Parses the start of the frame, where there are no
83
  /// WifiInformationElements exist
84
  PlinkFrameStart ParsePlinkFrame (Ptr<const Packet> packet);
83
  PlinkFrameStart ParsePlinkFrame (Ptr<const Packet> packet);
85
  ///\}
84
  // \}
86
  ///// Closes link when a proper number of successive transmissions have failed
85
  ///  Closes link when a proper number of successive transmissions have failed
87
  void TxError (WifiMacHeader const &hdr);
86
  void TxError (WifiMacHeader const &hdr);
88
  void TxOk (WifiMacHeader const &hdr);
87
  void TxOk (WifiMacHeader const &hdr);
89
  ///BCA functionallity:
88
  /// BCA functionality
90
  void SetBeaconShift (Time shift);
89
  void SetBeaconShift (Time shift);
91
  void SetPeerManagerProtcol (Ptr<PeerManagementProtocol> protocol);
90
  void SetPeerManagerProtcol (Ptr<PeerManagementProtocol> protocol);
92
  void SendPeerLinkManagementFrame (
91
  void SendPeerLinkManagementFrame (
 Lines 96-104    Link Here 
96
    IePeerManagement peerElement,
95
    IePeerManagement peerElement,
97
    IeConfiguration meshConfig
96
    IeConfiguration meshConfig
98
    );
97
    );
99
  ///\brief DUBUG only - to print established links
98
  ///\brief debug only, used to print established links
100
  Mac48Address GetAddress () const;
99
  Mac48Address GetAddress () const;
101
  ///\name Statistics
100
  ///\name Statistics
101
  // \{
102
  struct Statistics
102
  struct Statistics
103
  {
103
  {
104
    uint16_t txOpen;
104
    uint16_t txOpen;
 Lines 122-132    Link Here 
122
  struct Statistics m_stats;
122
  struct Statistics m_stats;
123
  ///\}
123
  ///\}
124
  ///\name Information about MAC and protocol:
124
  ///\name Information about MAC and protocol:
125
  ///\{
125
  // \{
126
  Ptr<MeshWifiInterfaceMac> m_parent;
126
  Ptr<MeshWifiInterfaceMac> m_parent;
127
  uint32_t m_ifIndex;
127
  uint32_t m_ifIndex;
128
  Ptr<PeerManagementProtocol> m_protocol;
128
  Ptr<PeerManagementProtocol> m_protocol;
129
  ///\}
129
  // \}
130
};
130
};
131
131
132
} // namespace dot11s
132
} // namespace dot11s
(-)a/src/mesh/model/dot11s/peer-management-protocol.h (-10 / +11 lines)
 Lines 82-88    Link Here 
82
   * \param beaconTiming beacon timing element (needed by BCA)
82
   * \param beaconTiming beacon timing element (needed by BCA)
83
   */
83
   */
84
  void ReceiveBeacon (uint32_t interface, Mac48Address peerAddress, Time beaconInterval, Ptr<IeBeaconTiming> beaconTiming);
84
  void ReceiveBeacon (uint32_t interface, Mac48Address peerAddress, Time beaconInterval, Ptr<IeBeaconTiming> beaconTiming);
85
  //\}
85
  // \}
86
  /**
86
  /**
87
   * \brief Methods that handle Peer link management frames
87
   * \brief Methods that handle Peer link management frames
88
   * interaction:
88
   * interaction:
 Lines 125-133    Link Here 
125
   * \brief Checks if there is established link
125
   * \brief Checks if there is established link
126
   */
126
   */
127
  bool IsActiveLink (uint32_t interface, Mac48Address peerAddress);
127
  bool IsActiveLink (uint32_t interface, Mac48Address peerAddress);
128
  //\}
128
  // \}
129
  ///\name Interface to other protocols (MLME)
129
  ///\name Interface to other protocols (MLME)
130
  //\{
130
  // \{
131
  /// Set peer link status change callback
131
  /// Set peer link status change callback
132
  void SetPeerLinkStatusCallback (Callback<void, Mac48Address, Mac48Address, uint32_t, bool> cb);
132
  void SetPeerLinkStatusCallback (Callback<void, Mac48Address, Mac48Address, uint32_t, bool> cb);
133
  /// Find active peer link by my interface and peer interface MAC
133
  /// Find active peer link by my interface and peer interface MAC
 Lines 150-156    Link Here 
150
  void Report (std::ostream &) const;
150
  void Report (std::ostream &) const;
151
  void ResetStats ();
151
  void ResetStats ();
152
private:
152
private:
153
  /** \name Private structures
153
  /**
154
   * \name Private structures
154
   * \{
155
   * \{
155
   */
156
   */
156
  /// Keeps information about beacon of peer station: beacon interval, association ID, last time we have received a beacon
157
  /// Keeps information about beacon of peer station: beacon interval, association ID, last time we have received a beacon
 Lines 171-177    Link Here 
171
  typedef std::map<uint32_t, BeaconsOnInterface> BeaconInfoMap;
172
  typedef std::map<uint32_t, BeaconsOnInterface> BeaconInfoMap;
172
  ///\brief this vector keeps pointers to MAC-plugins
173
  ///\brief this vector keeps pointers to MAC-plugins
173
  typedef std::map<uint32_t, Ptr<PeerManagementProtocolMac> > PeerManagementProtocolMacMap;
174
  typedef std::map<uint32_t, Ptr<PeerManagementProtocolMac> > PeerManagementProtocolMacMap;
174
  ///\}
175
  // \}
175
private:
176
private:
176
  PeerManagementProtocol& operator= (const PeerManagementProtocol &);
177
  PeerManagementProtocol& operator= (const PeerManagementProtocol &);
177
  PeerManagementProtocol (const PeerManagementProtocol &);
178
  PeerManagementProtocol (const PeerManagementProtocol &);
 Lines 200-206    Link Here 
200
   */
201
   */
201
  Time TuToTime (uint32_t x);
202
  Time TuToTime (uint32_t x);
202
  uint32_t TimeToTu (Time x);
203
  uint32_t TimeToTu (Time x);
203
  ///\}
204
  // \}
204
205
205
  /// Aux. method to register open links
206
  /// Aux. method to register open links
206
  void NotifyLinkOpen (Mac48Address peerMp, Mac48Address peerIface, Mac48Address myIface, uint32_t interface);
207
  void NotifyLinkOpen (Mac48Address peerMp, Mac48Address peerIface, Mac48Address myIface, uint32_t interface);
 Lines 218-226    Link Here 
218
  bool m_enableBca;
219
  bool m_enableBca;
219
  /// Beacon can be shifted at [-m_maxBeaconShift; +m_maxBeaconShift] TUs
220
  /// Beacon can be shifted at [-m_maxBeaconShift; +m_maxBeaconShift] TUs
220