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/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/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 (+2 lines)
 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/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/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/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/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/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
  uint16_t m_maxBeaconShift;
221
  uint16_t m_maxBeaconShift;
221
  ///Last beacon at each interface
222
  /// Last beacon at each interface
222
  std::map<uint32_t, Time> m_lastBeacon;
223
  std::map<uint32_t, Time> m_lastBeacon;
223
  ///Beacon interval at each interface
224
  /// Beacon interval at each interface
224
  std::map<uint32_t, Time> m_beaconInterval;
225
  std::map<uint32_t, Time> m_beaconInterval;
225
226
226
  /**
227
  /**
 Lines 248-254    Link Here 
248
  LinkEventCallback m_linkCloseTraceSrc;
249
  LinkEventCallback m_linkCloseTraceSrc;
249
250
250
  ///\name Statistics:
251
  ///\name Statistics:
251
  ///\{
252
  // \{
252
  struct Statistics {
253
  struct Statistics {
253
    uint16_t linksTotal;
254
    uint16_t linksTotal;
254
    uint16_t linksOpened;
255
    uint16_t linksOpened;
 Lines 258-264    Link Here 
258
    void Print (std::ostream & os) const;
259
    void Print (std::ostream & os) const;
259
  };
260
  };
260
  struct Statistics m_stats;
261
  struct Statistics m_stats;
261
  ///\}
262
  // \}
262
};
263
};
263
264
264
} // namespace dot11s
265
} // namespace dot11s
(-)a/src/mesh/model/mesh-wifi-beacon.h (-1 / +1 lines)
 Lines 58-64    Link Here 
58
   * \param mpAddress is mesh point address
58
   * \param mpAddress is mesh point address
59
   */
59
   */
60
  WifiMacHeader CreateHeader (Mac48Address address, Mac48Address mpAddress);
60
  WifiMacHeader CreateHeader (Mac48Address address, Mac48Address mpAddress);
61
  ///Returns a beacon interval of wifi beacon
61
  /// Returns a beacon interval of wifi beacon
62
  Time GetBeaconInterval () const;
62
  Time GetBeaconInterval () const;
63
  /// Create frame = { beacon header + all information elements sorted by ElementId () }
63
  /// Create frame = { beacon header + all information elements sorted by ElementId () }
64
  Ptr<Packet> CreatePacket ();
64
  Ptr<Packet> CreatePacket ();
(-)a/src/mesh/model/mesh-wifi-interface-mac.h (-17 / +17 lines)
 Lines 61-79    Link Here 
61
  virtual ~MeshWifiInterfaceMac ();
61
  virtual ~MeshWifiInterfaceMac ();
62
62
63
  ///\name Inherited from WifiMac
63
  ///\name Inherited from WifiMac
64
  //\{
64
  // \{
65
  virtual void  Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from);
65
  virtual void  Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from);
66
  virtual void  Enqueue (Ptr<const Packet> packet, Mac48Address to);
66
  virtual void  Enqueue (Ptr<const Packet> packet, Mac48Address to);
67
  virtual bool  SupportsSendFrom () const;
67
  virtual bool  SupportsSendFrom () const;
68
  virtual void  SetLinkUpCallback (Callback<void> linkUp);
68
  virtual void  SetLinkUpCallback (Callback<void> linkUp);
69
  //\}
69
  // \}
70
  ///\name Each mesh point interfaces must know the mesh point address
70
  ///\name Each mesh point interfaces must know the mesh point address
71
  //\{
71
  // \{
72
  void SetMeshPointAddress (Mac48Address);
72
  void SetMeshPointAddress (Mac48Address);
73
  Mac48Address GetMeshPointAddress () const;
73
  Mac48Address GetMeshPointAddress () const;
74
  //\}
74
  // \}
75
  ///\name Beacons
75
  ///\name Beacons
76
  //\{
76
  // \{
77
  /// Set maximum initial random delay before first beacon
77
  /// Set maximum initial random delay before first beacon
78
  void SetRandomStartDelay (Time interval);
78
  void SetRandomStartDelay (Time interval);
79
  /// Set interval between two successive beacons
79
  /// Set interval between two successive beacons
 Lines 94-106    Link Here 
94
   * \attention User of ShiftTbtt () must take care to not shift it to the past.
94
   * \attention User of ShiftTbtt () must take care to not shift it to the past.
95
   */
95
   */
96
  void ShiftTbtt (Time shift);
96
  void ShiftTbtt (Time shift);
97
  //\}
97
  // \}
98
98
99
  ///\name Plugins
99
  ///\name Plugins
100
  //\{
100
  // \{
101
  /// Install plugin. TODO return unique ID to allow unregister plugins
101
  /// Install plugin. TODO return unique ID to allow unregister plugins
102
  void InstallPlugin (Ptr<MeshWifiInterfaceMacPlugin> plugin);
102
  void InstallPlugin (Ptr<MeshWifiInterfaceMacPlugin> plugin);
103
  //\}
103
  // \}
104
104
105
  /** \name Channel switching
105
  /** \name Channel switching
106
   *
106
   *
 Lines 109-120    Link Here 
109
   *
109
   *
110
   * Number of channels to use must be limited elsewhere.
110
   * Number of channels to use must be limited elsewhere.
111
   */
111
   */
112
  //\{
112
  // \{
113
  /// Current channel Id
113
  /// Current channel Id
114
  uint16_t GetFrequencyChannel () const;
114
  uint16_t GetFrequencyChannel () const;
115
  /// Switch channel
115
  /// Switch channel
116
  void SwitchFrequencyChannel (uint16_t new_id);
116
  void SwitchFrequencyChannel (uint16_t new_id);
117
  //\}
117
  // \}
118
118
119
  /// To be used by plugins sending management frames.
119
  /// To be used by plugins sending management frames.
120
  void SendManagementFrame (Ptr<Packet> frame, const WifiMacHeader& hdr);
120
  void SendManagementFrame (Ptr<Packet> frame, const WifiMacHeader& hdr);
 Lines 122-132    Link Here 
122
  bool CheckSupportedRates (SupportedRates rates) const;
122
  bool CheckSupportedRates (SupportedRates rates) const;
123
  /// \return list of supported bitrates
123
  /// \return list of supported bitrates
124
  SupportedRates GetSupportedRates () const;
124
  SupportedRates GetSupportedRates () const;
125
  ///\ name Metric Calculation routines:
125
  ///\name Metric Calculation routines:
126
  ///\{
126
  // \{
127
  void SetLinkMetricCallback (Callback<uint32_t, Mac48Address, Ptr<MeshWifiInterfaceMac> > cb);
127
  void SetLinkMetricCallback (Callback<uint32_t, Mac48Address, Ptr<MeshWifiInterfaceMac> > cb);
128
  uint32_t GetLinkMetric (Mac48Address peerAddress);
128
  uint32_t GetLinkMetric (Mac48Address peerAddress);
129
  ///\}
129
  // \}
130
  ///\brief Statistics:
130
  ///\brief Statistics:
131
  void Report (std::ostream &) const;
131
  void Report (std::ostream &) const;
132
  void ResetStats ();
132
  void ResetStats ();
 Lines 152-165    Link Here 
152
  typedef std::vector<Ptr<MeshWifiInterfaceMacPlugin> > PluginList;
152
  typedef std::vector<Ptr<MeshWifiInterfaceMacPlugin> > PluginList;
153
153
154
  ///\name Mesh timing intervals
154
  ///\name Mesh timing intervals
155
  //\{
155
  // \{
156
  /// Beaconing interval.
156
  /// Beaconing interval.
157
  Time m_beaconInterval;
157
  Time m_beaconInterval;
158
  /// Maximum delay before first beacon
158
  /// Maximum delay before first beacon
159
  Time m_randomStart;
159
  Time m_randomStart;
160
  /// Time for the next frame
160
  /// Time for the next frame
161
  Time m_tbtt;
161
  Time m_tbtt;
162
  //\}
162
  // \}
163
163
164
  /// Mesh point address
164
  /// Mesh point address
165
  Mac48Address m_mpAddress;
165
  Mac48Address m_mpAddress;
 Lines 170-176    Link Here 
170
  PluginList m_plugins;
170
  PluginList m_plugins;
171
  Callback<uint32_t, Mac48Address, Ptr<MeshWifiInterfaceMac> > m_linkMetricCallback;
171
  Callback<uint32_t, Mac48Address, Ptr<MeshWifiInterfaceMac> > m_linkMetricCallback;
172
  ///\name Statistics:
172
  ///\name Statistics:
173
  ///\{
173
  // \{
174
  struct Statistics
174
  struct Statistics
175
  {
175
  {
176
    uint16_t recvBeacons;
176
    uint16_t recvBeacons;
 Lines 183-189    Link Here 
183
    Statistics ();
183
    Statistics ();
184
  };
184
  };
185
  Statistics m_stats;
185
  Statistics m_stats;
186
  ///\}
186
  // \}
187
  /// Current PHY standard: needed to configure metric
187
  /// Current PHY standard: needed to configure metric
188
  WifiPhyStandard m_standard;
188
  WifiPhyStandard m_standard;
189
};
189
};
(-)a/src/network/model/packet.h (-3 / +4 lines)
 Lines 168-176    Link Here 
168
 * were serialized in the byte buffer. The maintenance of metadata is
168
 * were serialized in the byte buffer. The maintenance of metadata is
169
 * optional and disabled by default. To enable it, you must call
169
 * optional and disabled by default. To enable it, you must call
170
 * Packet::EnablePrinting and this will allow you to get non-empty
170
 * Packet::EnablePrinting and this will allow you to get non-empty
171
 * output from Packet::Print and Packet::Print. If you wish to only enable
171
 * output from Packet::Print. If you wish to only enable
172
 * checking of metadata, and do not need any printing capability, you can
172
 * checking of metadata, and do not need any printing capability, you can
173
 * call Packet::EnableChecking: its runtime cost is lower than Packet::EnablePrinting.
173
 * call Packet::EnableChecking: its runtime cost is lower than
174
 * Packet::EnablePrinting.
174
 *
175
 *
175
 * - The set of tags contain simulation-specific information which cannot
176
 * - The set of tags contain simulation-specific information which cannot
176
 * be stored in the packet byte buffer because the protocol headers or trailers
177
 * be stored in the packet byte buffer because the protocol headers or trailers
 Lines 415-421    Link Here 
415
  /**
416
  /**
416
   * By default, packets do not keep around enough metadata to
417
   * By default, packets do not keep around enough metadata to
417
   * perform the operations requested by the Print methods. If you
418
   * perform the operations requested by the Print methods. If you
418
   * want to be able to invoke any of the two ::Print methods, 
419
   * want to be able the Packet::Print method, 
419
   * you need to invoke this method at least once during the 
420
   * you need to invoke this method at least once during the 
420
   * simulation setup and before any packet is created.
421
   * simulation setup and before any packet is created.
421
   */
422
   */
(-)a/src/olsr/model/olsr-repositories.h (-2 / +1 lines)
 Lines 21-28    Link Here 
21
 */
21
 */
22
22
23
///
23
///
24
/// \file	olsr-repositories.h
24
/// \brief Here are defined all data structures needed by an OLSR node.
25
/// \brief	Here are defined all data structures needed by an OLSR node.
26
///
25
///
27
26
28
#ifndef OLSR_REPOSITORIES_H
27
#ifndef OLSR_REPOSITORIES_H
(-)a/src/olsr/model/olsr-routing-protocol.cc (-66 / +63 lines)
 Lines 22-29    Link Here 
22
22
23
23
24
///
24
///
25
/// \file	OLSR.cc
25
/// \brief Implementation of OLSR agent and related classes.
26
/// \brief	Implementation of OLSR agent and related classes.
27
///
26
///
28
/// This is the main file of this software because %OLSR's behaviour is
27
/// This is the main file of this software because %OLSR's behaviour is
29
/// implemented here.
28
/// implemented here.
 Lines 499-505    Link Here 
499
                              receiverIfaceAddr, inetSourceAddr.GetIpv4 ());
498
                              receiverIfaceAddr, inetSourceAddr.GetIpv4 ());
500
            }
499
            }
501
        }
500
        }
502
	
503
    }
501
    }
504
502
505
  // After processing all OLSR messages, we must recompute the routing table
503
  // After processing all OLSR messages, we must recompute the routing table
 Lines 573-579    Link Here 
573
  // MPR computation should be done for each interface. See section 8.3.1
571
  // MPR computation should be done for each interface. See section 8.3.1
574
  // (RFC 3626) for details.
572
  // (RFC 3626) for details.
575
  MprSet mprSet;
573
  MprSet mprSet;
576
	
577
574
578
  // N is the subset of neighbors of the node, which are
575
  // N is the subset of neighbors of the node, which are
579
  // neighbor "of the interface I"
576
  // neighbor "of the interface I"
 Lines 586-592    Link Here 
586
          N.push_back (*neighbor);
583
          N.push_back (*neighbor);
587
        }
584
        }
588
    }
585
    }
589
	
586
590
  // N2 is the set of 2-hop neighbors reachable from "the interface
587
  // N2 is the set of 2-hop neighbors reachable from "the interface
591
  // I", excluding:
588
  // I", excluding:
592
  // (i)   the nodes only reachable by members of N with willingness WILL_NEVER
589
  // (i)   the nodes only reachable by members of N with willingness WILL_NEVER
 Lines 681-687    Link Here 
681
678
682
  // 2. Calculate D(y), where y is a member of N, for all nodes in N.
679
  // 2. Calculate D(y), where y is a member of N, for all nodes in N.
683
  // (we do this later)
680
  // (we do this later)
684
	
681
685
  // 3. Add to the MPR set those nodes in N, which are the *only*
682
  // 3. Add to the MPR set those nodes in N, which are the *only*
686
  // nodes to provide reachability to a node in N2.
683
  // nodes to provide reachability to a node in N2.
687
  std::set<Ipv4Address> coveredTwoHopNeighbors;
684
  std::set<Ipv4Address> coveredTwoHopNeighbors;
 Lines 734-740    Link Here 
734
          twoHopNeigh++;
731
          twoHopNeigh++;
735
        }
732
        }
736
    }
733
    }
737
	
734
738
  // 4. While there exist nodes in N2 which are not covered by at
735
  // 4. While there exist nodes in N2 which are not covered by at
739
  // least one node in the MPR set:
736
  // least one node in the MPR set:
740
  while (N2.begin () != N2.end ())
737
  while (N2.begin () != N2.end ())
 Lines 882-888    Link Here 
882
879
883
  // 1. All the entries from the routing table are removed.
880
  // 1. All the entries from the routing table are removed.
884
  Clear ();
881
  Clear ();
885
	
882
886
  // 2. The new routing entries are added starting with the
883
  // 2. The new routing entries are added starting with the
887
  // symmetric neighbors (h=1) as the destination nodes.
884
  // symmetric neighbors (h=1) as the destination nodes.
888
  const NeighborSet &neighborSet = m_state.GetNeighbors ();
885
  const NeighborSet &neighborSet = m_state.GetNeighbors ();
 Lines 1080-1088    Link Here 
1080
1077
1081
  // 4. For each entry in the multiple interface association base
1078
  // 4. For each entry in the multiple interface association base
1082
  // where there exists a routing entry such that:
1079
  // where there exists a routing entry such that:
1083
  //	R_dest_addr  == I_main_addr  (of the multiple interface association entry)
1080
  // R_dest_addr == I_main_addr (of the multiple interface association entry)
1084
  // AND there is no routing entry such that:
1081
  // AND there is no routing entry such that:
1085
  //	R_dest_addr  == I_iface_addr
1082
  // R_dest_addr == I_iface_addr
1086
  const IfaceAssocSet &ifaceAssocSet = m_state.GetIfaceAssocSet ();
1083
  const IfaceAssocSet &ifaceAssocSet = m_state.GetIfaceAssocSet ();
1087
  for (IfaceAssocSet::const_iterator it = ifaceAssocSet.begin ();
1084
  for (IfaceAssocSet::const_iterator it = ifaceAssocSet.begin ();
1088
       it != ifaceAssocSet.end (); it++)
1085
       it != ifaceAssocSet.end (); it++)
 Lines 1268-1280    Link Here 
1268
{
1265
{
1269
  const olsr::MessageHeader::Tc &tc = msg.GetTc ();
1266
  const olsr::MessageHeader::Tc &tc = msg.GetTc ();
1270
  Time now = Simulator::Now ();
1267
  Time now = Simulator::Now ();
1271
	
1268
1272
  // 1. If the sender interface of this message is not in the symmetric
1269
  // 1. If the sender interface of this message is not in the symmetric
1273
  // 1-hop neighborhood of this node, the message MUST be discarded.
1270
  // 1-hop neighborhood of this node, the message MUST be discarded.
1274
  const LinkTuple *link_tuple = m_state.FindSymLinkTuple (senderIface, now);
1271
  const LinkTuple *link_tuple = m_state.FindSymLinkTuple (senderIface, now);
1275
  if (link_tuple == NULL)
1272
  if (link_tuple == NULL)
1276
    return;
1273
    return;
1277
	
1274
1278
  // 2. If there exist some tuple in the topology set where:
1275
  // 2. If there exist some tuple in the topology set where:
1279
  //    T_last_addr == originator address AND
1276
  //    T_last_addr == originator address AND
1280
  //    T_seq       >  ANSN,
1277
  //    T_seq       >  ANSN,
 Lines 1284-1293    Link Here 
1284
    m_state.FindNewerTopologyTuple (msg.GetOriginatorAddress (), tc.ansn);
1281
    m_state.FindNewerTopologyTuple (msg.GetOriginatorAddress (), tc.ansn);
1285
  if (topologyTuple != NULL)
1282
  if (topologyTuple != NULL)
1286
    return;
1283
    return;
1287
	
1284
1288
  // 3. All tuples in the topology set where:
1285
  // 3. All tuples in the topology set where:
1289
  //	T_last_addr == originator address AND
1286
  //    T_last_addr == originator address AND
1290
  //	T_seq       <  ANSN
1287
  //    T_seq       <  ANSN
1291
  // MUST be removed from the topology set.
1288
  // MUST be removed from the topology set.
1292
  m_state.EraseOlderTopologyTuples (msg.GetOriginatorAddress (), tc.ansn);
1289
  m_state.EraseOlderTopologyTuples (msg.GetOriginatorAddress (), tc.ansn);
1293
1290
 Lines 1298-1307    Link Here 
1298
    {
1295
    {
1299
      const Ipv4Address &addr = *i;
1296
      const Ipv4Address &addr = *i;
1300
      // 4.1. If there exist some tuple in the topology set where:
1297
      // 4.1. If there exist some tuple in the topology set where:
1301
      //        T_dest_addr == advertised neighbor main address, AND
1298
      //      T_dest_addr == advertised neighbor main address, AND
1302
      //        T_last_addr == originator address,
1299
      //      T_last_addr == originator address,
1303
      // then the holding time of that tuple MUST be set to:
1300
      // then the holding time of that tuple MUST be set to:
1304
      //        T_time      =  current time + validity time.
1301
      //      T_time      =  current time + validity time.
1305
      TopologyTuple *topologyTuple =
1302
      TopologyTuple *topologyTuple =
1306
        m_state.FindTopologyTuple (addr, msg.GetOriginatorAddress ());
1303
        m_state.FindTopologyTuple (addr, msg.GetOriginatorAddress ());
1307
1304
 Lines 1313-1322    Link Here 
1313
        {
1310
        {
1314
          // 4.2. Otherwise, a new tuple MUST be recorded in the topology
1311
          // 4.2. Otherwise, a new tuple MUST be recorded in the topology
1315
          // set where:
1312
          // set where:
1316
          //	T_dest_addr = advertised neighbor main address,
1313
          //      T_dest_addr = advertised neighbor main address,
1317
          //	T_last_addr = originator address,
1314
          //      T_last_addr = originator address,
1318
          //	T_seq       = ANSN,
1315
          //      T_seq       = ANSN,
1319
          //	T_time      = current time + validity time.
1316
          //      T_time      = current time + validity time.
1320
          TopologyTuple topologyTuple;;
1317
          TopologyTuple topologyTuple;;
1321
          topologyTuple.destAddr = addr;
1318
          topologyTuple.destAddr = addr;
1322
          topologyTuple.lastAddr = msg.GetOriginatorAddress ();
1319
          topologyTuple.lastAddr = msg.GetOriginatorAddress ();
 Lines 1376-1382    Link Here 
1376
                    " the message MUST be discarded.");
1373
                    " the message MUST be discarded.");
1377
      return;
1374
      return;
1378
    }
1375
    }
1379
	
1376
1380
  // 2. For each interface address listed in the MID message
1377
  // 2. For each interface address listed in the MID message
1381
  for (std::vector<Ipv4Address>::const_iterator i = mid.interfaceAddresses.begin ();
1378
  for (std::vector<Ipv4Address>::const_iterator i = mid.interfaceAddresses.begin ();
1382
       i != mid.interfaceAddresses.end (); i++)
1379
       i != mid.interfaceAddresses.end (); i++)
 Lines 1526-1532    Link Here 
1526
                    " from " << olsrMessage.GetOriginatorAddress () << " because it is duplicated");
1523
                    " from " << olsrMessage.GetOriginatorAddress () << " because it is duplicated");
1527
      return;
1524
      return;
1528
    }
1525
    }
1529
	
1526
1530
  // If the sender interface address is an interface address
1527
  // If the sender interface address is an interface address
1531
  // of a MPR selector of this node and ttl is greater than 1,
1528
  // of a MPR selector of this node and ttl is greater than 1,
1532
  // the message must be retransmitted
1529
  // the message must be retransmitted
 Lines 1545-1551    Link Here 
1545
          retransmitted = true;
1542
          retransmitted = true;
1546
        }
1543
        }
1547
    }
1544
    }
1548
	
1545
1549
  // Update duplicate tuple...
1546
  // Update duplicate tuple...
1550
  if (duplicated != NULL)
1547
  if (duplicated != NULL)
1551
    {
1548
    {
 Lines 1680-1686    Link Here 
1680
1677
1681
  std::vector<olsr::MessageHeader::Hello::LinkMessage>
1678
  std::vector<olsr::MessageHeader::Hello::LinkMessage>
1682
  &linkMessages = hello.linkMessages;
1679
  &linkMessages = hello.linkMessages;
1683
	
1680
1684
  const LinkSet &links = m_state.GetLinks ();
1681
  const LinkSet &links = m_state.GetLinks ();
1685
  for (LinkSet::const_iterator link_tuple = links.begin ();
1682
  for (LinkSet::const_iterator link_tuple = links.begin ();
1686
       link_tuple != links.end (); link_tuple++)
1683
       link_tuple != links.end (); link_tuple++)
 Lines 1921-1927    Link Here 
1921
///        in HNA messages sent by the node.
1918
///        in HNA messages sent by the node.
1922
///        If this method is called more than once, entries from the old
1919
///        If this method is called more than once, entries from the old
1923
///        association are deleted before entries from the new one are added.
1920
///        association are deleted before entries from the new one are added.
1924
/// \param the Ipv4StaticRouting routing table to be associated.
1921
/// \param routingTable the Ipv4StaticRouting routing table to be associated.
1925
///
1922
///
1926
void
1923
void
1927
RoutingProtocol::SetRoutingTableAssociation (Ptr<Ipv4StaticRouting> routingTable)
1924
RoutingProtocol::SetRoutingTableAssociation (Ptr<Ipv4StaticRouting> routingTable)
 Lines 1983-1990    Link Here 
1983
}
1980
}
1984
1981
1985
///
1982
///
1986
/// \brief	Updates Link Set according to a new received HELLO message (following RFC 3626
1983
/// \brief Updates Link Set according to a new received HELLO message
1987
///		specification). Neighbor Set is also updated if needed.
1984
/// (following RFC 3626 specification). Neighbor Set is also updated if needed.
1988
void
1985
void
1989
RoutingProtocol::LinkSensing (const olsr::MessageHeader &msg,
1986
RoutingProtocol::LinkSensing (const olsr::MessageHeader &msg,
1990
                              const olsr::MessageHeader::Hello &hello,
1987
                              const olsr::MessageHeader::Hello &hello,
 Lines 1997-2003    Link Here 
1997
  NS_LOG_DEBUG ("@" << now.GetSeconds () << ": Olsr node " << m_mainAddress
1994
  NS_LOG_DEBUG ("@" << now.GetSeconds () << ": Olsr node " << m_mainAddress
1998
                    << ": LinkSensing(receiverIface=" << receiverIface
1995
                    << ": LinkSensing(receiverIface=" << receiverIface
1999
                    << ", senderIface=" << senderIface << ") BEGIN");
1996
                    << ", senderIface=" << senderIface << ") BEGIN");
2000
	
1997
2001
  NS_ASSERT (msg.GetVTime () > Seconds (0));
1998
  NS_ASSERT (msg.GetVTime () > Seconds (0));
2002
  LinkTuple *link_tuple = m_state.FindLinkTuple (senderIface);
1999
  LinkTuple *link_tuple = m_state.FindLinkTuple (senderIface);
2003
  if (link_tuple == NULL)
2000
  if (link_tuple == NULL)
 Lines 2017-2023    Link Here 
2017
      NS_LOG_LOGIC ("Existing link tuple already exists => will update it");
2014
      NS_LOG_LOGIC ("Existing link tuple already exists => will update it");
2018
      updated = true;
2015
      updated = true;
2019
    }
2016
    }
2020
	
2017
2021
  link_tuple->asymTime = now + msg.GetVTime ();
2018
  link_tuple->asymTime = now + msg.GetVTime ();
2022
  for (std::vector<olsr::MessageHeader::Hello::LinkMessage>::const_iterator linkMessage =
2019
  for (std::vector<olsr::MessageHeader::Hello::LinkMessage>::const_iterator linkMessage =
2023
         hello.linkMessages.begin ();
2020
         hello.linkMessages.begin ();
 Lines 2118-2125    Link Here 
2118
}
2115
}
2119
2116
2120
///
2117
///
2121
/// \brief	Updates the Neighbor Set according to the information contained in a new received
2118
/// \brief Updates the Neighbor Set according to the information contained in
2122
///		HELLO message (following RFC 3626).
2119
/// a new received HELLO message (following RFC 3626).
2123
void
2120
void
2124
RoutingProtocol::PopulateNeighborSet (const olsr::MessageHeader &msg,
2121
RoutingProtocol::PopulateNeighborSet (const olsr::MessageHeader &msg,
2125
                                      const olsr::MessageHeader::Hello &hello)
2122
                                      const olsr::MessageHeader::Hello &hello)
 Lines 2133-2140    Link Here 
2133
2130
2134
2131
2135
///
2132
///
2136
/// \brief	Updates the 2-hop Neighbor Set according to the information contained in a new
2133
/// \brief Updates the 2-hop Neighbor Set according to the information contained
2137
///		received HELLO message (following RFC 3626).
2134
/// in a new received HELLO message (following RFC 3626).
2138
void
2135
void
2139
RoutingProtocol::PopulateTwoHopNeighborSet (const olsr::MessageHeader &msg,
2136
RoutingProtocol::PopulateTwoHopNeighborSet (const olsr::MessageHeader &msg,
2140
                                            const olsr::MessageHeader::Hello &hello)
2137
                                            const olsr::MessageHeader::Hello &hello)
 Lines 2142-2148    Link Here 
2142
  Time now = Simulator::Now ();
2139
  Time now = Simulator::Now ();
2143
2140
2144
  NS_LOG_DEBUG ("Olsr node " << m_mainAddress << ": PopulateTwoHopNeighborSet BEGIN");
2141
  NS_LOG_DEBUG ("Olsr node " << m_mainAddress << ": PopulateTwoHopNeighborSet BEGIN");
2145
	
2142
2146
  for (LinkSet::const_iterator link_tuple = m_state.GetLinks ().begin ();
2143
  for (LinkSet::const_iterator link_tuple = m_state.GetLinks ().begin ();
2147
       link_tuple != m_state.GetLinks ().end (); link_tuple++)
2144
       link_tuple != m_state.GetLinks ().end (); link_tuple++)
2148
    {
2145
    {
 Lines 2245-2252    Link Here 
2245
2242
2246
2243
2247
///
2244
///
2248
/// \brief	Updates the MPR Selector Set according to the information contained in a new
2245
/// \brief Updates the MPR Selector Set according to the information contained in
2249
///		received HELLO message (following RFC 3626).
2246
/// a new received HELLO message (following RFC 3626).
2250
void
2247
void
2251
RoutingProtocol::PopulateMprSelectorSet (const olsr::MessageHeader &msg,
2248
RoutingProtocol::PopulateMprSelectorSet (const olsr::MessageHeader &msg,
2252
                                         const olsr::MessageHeader::Hello &hello)
2249
                                         const olsr::MessageHeader::Hello &hello)
 Lines 2254-2260    Link Here 
2254
  NS_LOG_FUNCTION (this);
2251
  NS_LOG_FUNCTION (this);
2255
2252
2256
  Time now = Simulator::Now ();
2253
  Time now = Simulator::Now ();
2257
	
2254
2258
  typedef std::vector<olsr::MessageHeader::Hello::LinkMessage> LinkMessageVec;
2255
  typedef std::vector<olsr::MessageHeader::Hello::LinkMessage> LinkMessageVec;
2259
  for (LinkMessageVec::const_iterator linkMessage = hello.linkMessages.begin ();
2256
  for (LinkMessageVec::const_iterator linkMessage = hello.linkMessages.begin ();
2260
       linkMessage != hello.linkMessages.end ();
2257
       linkMessage != hello.linkMessages.end ();
 Lines 2305-2313    Link Here 
2305
2302
2306
#if 0
2303
#if 0
2307
///
2304
///
2308
/// \brief	Drops a given packet because it couldn't be delivered to the corresponding
2305
/// \brief Drops a given packet because it couldn't be delivered to the corresponding
2309
///		destination by the MAC layer. This may cause a neighbor loss, and appropiate
2306
/// destination by the MAC layer. This may cause a neighbor loss, and appropiate
2310
///		actions are then taken.
2307
/// actions are then taken.
2311
///
2308
///
2312
/// \param p the packet which couldn't be delivered by the MAC layer.
2309
/// \param p the packet which couldn't be delivered by the MAC layer.
2313
///
2310
///
 Lines 2316-2332    Link Here 
2316
  double now              = Simulator::Now ();
2313
  double now              = Simulator::Now ();
2317
  struct hdr_ip* ih       = HDR_IP (p);
2314
  struct hdr_ip* ih       = HDR_IP (p);
2318
  struct hdr_cmn* ch      = HDR_CMN (p);
2315
  struct hdr_cmn* ch      = HDR_CMN (p);
2319
	
2316
2320
  debug ("%f: Node %d MAC Layer detects a breakage on link to %d\n",
2317
  debug ("%f: Node %d MAC Layer detects a breakage on link to %d\n",
2321
         now,
2318
         now,
2322
         OLSR::node_id (ra_addr ()),
2319
         OLSR::node_id (ra_addr ()),
2323
         OLSR::node_id (ch->next_hop ()));
2320
         OLSR::node_id (ch->next_hop ()));
2324
	
2321
2325
  if ((u_int32_t)ih->daddr () == IP_BROADCAST) {
2322
  if ((u_int32_t)ih->daddr () == IP_BROADCAST) {
2326
      drop (p, DROP_RTR_MAC_CALLBACK);
2323
      drop (p, DROP_RTR_MAC_CALLBACK);
2327
      return;
2324
      return;
2328
    }
2325
    }
2329
	
2326
2330
  OLSR_link_tuple* link_tuple = state_.find_link_tuple (ch->next_hop ());
2327
  OLSR_link_tuple* link_tuple = state_.find_link_tuple (ch->next_hop ());
2331
  if (link_tuple != NULL) {
2328
  if (link_tuple != NULL) {
2332
      link_tuple->lost_time () = now + OLSR_NEIGHB_HOLD_TIME;
2329
      link_tuple->lost_time () = now + OLSR_NEIGHB_HOLD_TIME;
 Lines 2431-2438    Link Here 
2431
}
2428
}
2432
2429
2433
///
2430
///
2434
/// \brief	This function is invoked when a link tuple is updated. Its aim is to
2431
/// \brief This function is invoked when a link tuple is updated. Its aim is to
2435
///		also update the corresponding neighbor tuple if it is needed.
2432
/// also update the corresponding neighbor tuple if it is needed.
2436
///
2433
///
2437
/// \param tuple the link tuple which has been updated.
2434
/// \param tuple the link tuple which has been updated.
2438
///
2435
///
 Lines 2525-2531    Link Here 
2525
//         OLSR::node_id(ra_addr()),
2522
//         OLSR::node_id(ra_addr()),
2526
//         OLSR::node_id(tuple->neighborMainAddr),
2523
//         OLSR::node_id(tuple->neighborMainAddr),
2527
//         ((tuple->status() == OLSR_STATUS_SYM) ? "sym" : "not_sym"));
2524
//         ((tuple->status() == OLSR_STATUS_SYM) ? "sym" : "not_sym"));
2528
	
2525
2529
  m_state.EraseNeighborTuple (tuple);
2526
  m_state.EraseNeighborTuple (tuple);
2530
  IncrementAnsn ();
2527
  IncrementAnsn ();
2531
}
2528
}
 Lines 2987-2993    Link Here 
2987
2984
2988
///
2985
///
2989
/// \brief Deletes the entry whose destination address is given.
2986
/// \brief Deletes the entry whose destination address is given.
2990
/// \param dest	address of the destination node.
2987
/// \param dest address of the destination node.
2991
///
2988
///
2992
void
2989
void
2993
RoutingProtocol::RemoveEntry (Ipv4Address const &dest)
2990
RoutingProtocol::RemoveEntry (Ipv4Address const &dest)
 Lines 2997-3005    Link Here 
2997
2994
2998
///
2995
///
2999
/// \brief Looks up an entry for the specified destination address.
2996
/// \brief Looks up an entry for the specified destination address.
3000
/// \param dest	destination address.
2997
/// \param dest destination address.
3001
/// \param outEntry output parameter to hold the routing entry result, if fuond
2998
/// \param outEntry output parameter to hold the routing entry result, if fuond
3002
/// \return	true if found, false if not found
2999
/// \return true if found, false if not found
3003
///
3000
///
3004
bool
3001
bool
3005
RoutingProtocol::Lookup (Ipv4Address const &dest,
3002
RoutingProtocol::Lookup (Ipv4Address const &dest,
 Lines 3016-3023    Link Here 
3016
}
3013
}
3017
3014
3018
///
3015
///
3019
/// \brief	Finds the appropiate entry which must be used in order to forward
3016
/// \brief Finds the appropiate entry which must be used in order to forward
3020
///		a data packet to a next hop (given a destination).
3017
/// a data packet to a next hop (given a destination).
3021
///
3018
///
3022
/// Imagine a routing table like this: [A,B] [B,C] [C,C]; being each pair of the
3019
/// Imagine a routing table like this: [A,B] [B,C] [C,C]; being each pair of the
3023
/// form [dest addr,next-hop addr]. In this case, if this function is invoked with
3020
/// form [dest addr,next-hop addr]. In this case, if this function is invoked with
 Lines 3025-3035    Link Here 
3025
/// to forward a data packet destined to A. That is, C is a neighbor of this node,
3022
/// to forward a data packet destined to A. That is, C is a neighbor of this node,
3026
/// but B isn't. This function finds the appropiate neighbor for forwarding a packet.
3023
/// but B isn't. This function finds the appropiate neighbor for forwarding a packet.
3027
///
3024
///
3028
/// \param entry	the routing table entry which indicates the destination node
3025
/// \param entry the routing table entry which indicates the destination node
3029
///			we are interested in.
3026
/// we are interested in.
3030
/// \return		the appropiate routing table entry which indicates the next
3027
/// \return the appropiate routing table entry which indicates the next
3031
///			hop which must be used for forwarding a data packet, or NULL
3028
/// hop which must be used for forwarding a data packet, or NULL
3032
///			if there is no such entry.
3029
/// if there is no such entry.
3033
///
3030
///
3034
bool
3031
bool
3035
RoutingProtocol::FindSendEntry (RoutingTableEntry const &entry,
3032
RoutingProtocol::FindSendEntry (RoutingTableEntry const &entry,
 Lines 3239-3248    Link Here 
3239
///
3236
///
3240
/// If an entry for the given destination existed, it is deleted and freed.
3237
/// If an entry for the given destination existed, it is deleted and freed.
3241
///
3238
///
3242
/// \param dest		address of the destination node.
3239
/// \param dest address of the destination node.
3243
/// \param next		address of the next hop node.
3240
/// \param next address of the next hop node.
3244
/// \param iface	address of the local interface.
3241
/// \param iface address of the local interface.
3245
/// \param dist		distance to the destination node.
3242
/// \param dist distance to the destination node.
3246
///
3243
///
3247
void
3244
void
3248
RoutingProtocol::AddEntry (Ipv4Address const &dest,
3245
RoutingProtocol::AddEntry (Ipv4Address const &dest,
 Lines 3348-3354    Link Here 
3348
#endif  //NS3_LOG_ENABLE
3345
#endif  //NS3_LOG_ENABLE
3349
}
3346
}
3350
3347
3351
}
3348
} // namespace olsr
3352
}  // namespace olsr, ns3
3349
} // namespace ns3
3353
3350
3354
3351
(-)a/src/olsr/model/olsr-state.cc (-1 / +1 lines)
 Lines 21-27    Link Here 
21
 */
21
 */
22
22
23
///
23
///
24
/// \file	OlsrState.cc
24
/// \file	olsr-state.cc
25
/// \brief	Implementation of all functions needed for manipulating the internal
25
/// \brief	Implementation of all functions needed for manipulating the internal
26
///		state of an OLSR node.
26
///		state of an OLSR node.
27
///
27
///
(-)a/src/propagation/model/propagation-loss-model.h (-3 / +3 lines)
 Lines 56-62    Link Here 
56
56
57
  /**
57
  /**
58
   * \brief Enables a chain of loss models to act on the signal
58
   * \brief Enables a chain of loss models to act on the signal
59
   * \param The next PropagationLossModel to add to the chain
59
   * \param next The next PropagationLossModel to add to the chain
60
   *
60
   *
61
   * This method of chaining propagation loss models only works commutatively
61
   * This method of chaining propagation loss models only works commutatively
62
   * if the propagation loss of all models in the chain are independent
62
   * if the propagation loss of all models in the chain are independent
 Lines 516-523    Link Here 
516
   * \brief Set loss (in dB, positive) between pair of ns-3 objects
516
   * \brief Set loss (in dB, positive) between pair of ns-3 objects
517
   * (typically, nodes).
517
   * (typically, nodes).
518
   * 
518
   * 
519
   * \param ma          Source mobility model
519
   * \param a ma          Source mobility model
520
   * \param mb          Destination mobility model
520
   * \param b mb          Destination mobility model
521
   * \param loss        a -> b path loss, positive in dB
521
   * \param loss        a -> b path loss, positive in dB
522
   * \param symmetric   If true (default), both a->b and b->a paths will be affected
522
   * \param symmetric   If true (default), both a->b and b->a paths will be affected
523
   */ 
523
   */ 
(-)a/src/spectrum/helper/adhoc-aloha-noack-ideal-phy-helper.h (-5 / +1 lines)
 Lines 37-47    Link Here 
37
37
38
/**
38
/**
39
 * \ingroup spectrum
39
 * \ingroup spectrum
40
 *
40
 * \brief create the AlohaNoackNetDevice
41
 *
42
 * create the NetDevice depicted in the figure
43
 * @image html HdOfdmAlohaNoAck.png
44
 *
45
 */
41
 */
46
class AdhocAlohaNoackIdealPhyHelper
42
class AdhocAlohaNoackIdealPhyHelper
47
{
43
{
(-)a/src/spectrum/model/spectrum-value.h (-11 / +11 lines)
 Lines 434-456    Link Here 
434
  /**
434
  /**
435
   *
435
   *
436
   *
436
   *
437
   * @param base the base
437
   * @param lhs the base
438
   * @param exp  the exponent
438
   * @param rhs the exponent
439
   *
439
   *
440
   * @return each value in base raised to the exponent
440
   * @return each value in base raised to the exponent
441
   */
441
   */
442
  friend SpectrumValue Pow (const SpectrumValue& base, double exp);
442
  friend SpectrumValue Pow (const SpectrumValue& lhs, double rhs);
443
443
444
444
445
  /**
445
  /**
446
   *
446
   *
447
   *
447
   *
448
   * @param base the base
448
   * @param lhs the base
449
   * @param exp  the exponent
449
   * @param rhs the exponent
450
   *
450
   *
451
   * @return the value in base raised to each value in the exponent
451
   * @return the value in base raised to each value in the exponent
452
   */
452
   */
453
  friend SpectrumValue Pow (double base, const SpectrumValue& exp);
453
  friend SpectrumValue Pow (double lhs, const SpectrumValue& rhs);
454
454
455
  /**
455
  /**
456
   *
456
   *
 Lines 526-536    Link Here 
526
double Norm (const SpectrumValue& x);
526
double Norm (const SpectrumValue& x);
527
double Sum (const SpectrumValue& x);
527
double Sum (const SpectrumValue& x);
528
double Prod (const SpectrumValue& x);
528
double Prod (const SpectrumValue& x);
529
SpectrumValue Pow (const SpectrumValue& base, double exp);
529
SpectrumValue Pow (const SpectrumValue& lhs, double rhs);
530
SpectrumValue Pow (double base, const SpectrumValue& exp);
530
SpectrumValue Pow (double lhs, const SpectrumValue& rhs);
531
SpectrumValue Log10 (const SpectrumValue&  arg);
531
SpectrumValue Log10 (const SpectrumValue& arg);
532
SpectrumValue Log2 (const SpectrumValue&  arg);
532
SpectrumValue Log2 (const SpectrumValue& arg);
533
SpectrumValue Log (const SpectrumValue&  arg);
533
SpectrumValue Log (const SpectrumValue& arg);
534
534
535
535
536
} // namespace ns3
536
} // namespace ns3
(-)a/src/uan/helper/uan-helper.h (-1 / +2 lines)
 Lines 188-195    Link Here 
188
188
189
  NetDeviceContainer Install (NodeContainer c) const;
189
  NetDeviceContainer Install (NodeContainer c) const;
190
  /**
190
  /**
191
   * \param c a set of nodes
191
   * \param channel a channel to use
192
   * \param channel a channel to use
192
   * \param c a set of nodes
193
   *
193
   *
194
   * For each of the input nodes, a new ns3::UanNetDevice is attached
194
   * For each of the input nodes, a new ns3::UanNetDevice is attached
195
   * to the shared input channel. Each ns3::UanNetDevice is also
195
   * to the shared input channel. Each ns3::UanNetDevice is also
 Lines 202-207    Link Here 
202
202
203
  /**
203
  /**
204
   * \param node a node where to install the uan components
204
   * \param node a node where to install the uan components
205
   * \param channel a channel to use
205
   *
206
   *
206
   * Create a default uan stack with:
207
   * Create a default uan stack with:
207
   * - default channel, ideal propagation and default noise model
208
   * - default channel, ideal propagation and default noise model
(-)a/src/uan/model/uan-phy.h (-1 / +1 lines)
 Lines 169-175    Link Here 
169
public:
169
public:
170
  static TypeId GetTypeId (void);
170
  static TypeId GetTypeId (void);
171
171
172
  // / Enum defining possible Phy states
172
  /// Enum defining possible Phy states
173
  enum State
173
  enum State
174
  {
174
  {
175
    IDLE, CCABUSY, RX, TX, SLEEP
175
    IDLE, CCABUSY, RX, TX, SLEEP
(-)a/src/uan/model/uan-tx-mode.h (-1 / +1 lines)
 Lines 200-206    Link Here 
200
 */
200
 */
201
std::istream &operator >> (std::istream &is, UanModesList &ml);
201
std::istream &operator >> (std::istream &is, UanModesList &ml);
202
202
203
///UanModesList is attribute value
203
/// UanModesList is attribute value
204
ATTRIBUTE_HELPER_HEADER (UanModesList);
204
ATTRIBUTE_HELPER_HEADER (UanModesList);
205
205
206
} // namespace ns3
206
} // namespace ns3
(-)a/src/wifi/model/interference-helper.h (-1 / +1 lines)
 Lines 121-127    Link Here 
121
121
122
  double m_noiseFigure; /**< noise figure (linear) */
122
  double m_noiseFigure; /**< noise figure (linear) */
123
  Ptr<ErrorRateModel> m_errorRateModel;
123
  Ptr<ErrorRateModel> m_errorRateModel;
124
  ///Experimental: needed for energy duration calculation
124
  /// Experimental: needed for energy duration calculation
125
  NiChanges m_niChanges;
125
  NiChanges m_niChanges;
126
  double m_firstPower;
126
  double m_firstPower;
127
  bool m_rxing;
127
  bool m_rxing;
(-)a/src/wifi/model/wifi-information-element-vector.h (-1 / +1 lines)
 Lines 46-52    Link Here 
46
  WifiInformationElementVector ();
46
  WifiInformationElementVector ();
47
  ~WifiInformationElementVector ();
47
  ~WifiInformationElementVector ();
48
  ///\name Inherited from Header
48
  ///\name Inherited from Header
49
  //\{
49
  // \{
50
  static TypeId GetTypeId ();
50
  static TypeId GetTypeId ();
51
  TypeId GetInstanceTypeId () const;
51
  TypeId GetInstanceTypeId () const;
52
  virtual uint32_t GetSerializedSize () const;
52
  virtual uint32_t GetSerializedSize () const;
(-)a/src/wifi/model/wifi-phy.h (-5 / +3 lines)
 Lines 252-262    Link Here 
252
   */
252
   */
253
  static WifiMode GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble);
253
  static WifiMode GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble);
254
254
255
  /** 
255
  /**
256
   * 
257
   * 
258
   * \param payloadMode the WifiMode use for the transmission of the payload
256
   * \param payloadMode the WifiMode use for the transmission of the payload
259
   * \param preamble the type of preamble 
257
   * \param preamble the type of preamble
260
   * 
258
   * 
261
   * \return the duration of the PLCP header in microseconds
259
   * \return the duration of the PLCP header in microseconds
262
   */
260
   */
 Lines 271-278    Link Here 
271
  static uint32_t GetPlcpPreambleDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble);
269
  static uint32_t GetPlcpPreambleDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble);
272
270
273
  /** 
271
  /** 
272
   * \param size the number of bytes in the packet to send
274
   * \param payloadMode the WifiMode use for the transmission of the payload
273
   * \param payloadMode the WifiMode use for the transmission of the payload
275
   * \param preamble the type of preamble 
276
   * 
274
   * 
277
   * \return the duration of the payload in microseconds
275
   * \return the duration of the payload in microseconds
278
   */
276
   */
(-)a/src/wifi/model/wifi-remote-station-manager.h (-3 / +3 lines)
 Lines 64-80    Link Here 
64
   * because it resets time of last update.
64
   * because it resets time of last update.
65
   */
65
   */
66
  double CalculateAveragingCoefficient ();
66
  double CalculateAveragingCoefficient ();
67
  ///averaging coefficient depends on the memory time
67
  /// averaging coefficient depends on the memory time
68
  Time m_memoryTime;
68
  Time m_memoryTime;
69
  ///when last update has occured
69
  /// when last update has occured
70
  Time m_lastUpdate;
70
  Time m_lastUpdate;
71
  /// moving percentage of failed frames
71
  /// moving percentage of failed frames
72
  double m_failAvg;
72
  double m_failAvg;
73
};
73
};
74
74
75
/**
75
/**
76
 * \ingroup wifi
76
 * \brief hold a list of per-remote-station state.
77
 * \brief hold a list of per-remote-station state.
77
 * \ingroup wifi
78
 *
78
 *
79
 * \sa ns3::WifiRemoteStation.
79
 * \sa ns3::WifiRemoteStation.
80
 */
80
 */
(-)a/src/wimax/model/bs-scheduler-rtps.cc (-14 / +14 lines)
 Lines 110-132    Link Here 
110
  m_downlinkBursts->push_back (std::make_pair (dlMapIe, burst));
110
  m_downlinkBursts->push_back (std::make_pair (dlMapIe, burst));
111
}
111
}
112
112
113
/**
114
 * \brief A DownLink Scheduler for rtPS Flows
115
 *
116
 * The DL Scheduler assigns the available bandwidth in the following order:
117
 * - IR Connections
118
 * - Broadcast Connections
119
 * - Basic and Primary Connections
120
 * - UGS Connections
121
 * - rtPS Connections
122
 * - nrtPS Connections
123
 * - BE Connections
124
 * All rtPS flows that have packets in the queue can transmit at least one
125
 * packet, according to the available bandwidth.
126
 */
113
void
127
void
114
BSSchedulerRtps::Schedule (void)
128
BSSchedulerRtps::Schedule (void)
115
{
129
{
116
  /**
117
   * \brief  A DownLink Scheduler for rtPS Flows
118
   *
119
   * The DL Scheduler assigns the available bandwidth in the following order:
120
   *         - IR Connections
121
   *         - Broadcast Connections
122
   *         - Basic and Primary Connections
123
   *         - UGS Connections
124
   * - rtPS Connections
125
   *         - nrtPS Connections
126
   *         - BE Connections
127
   * All rtPS flows that have packets in the queue can transmit at least one
128
   * packet, according to the available bandwidth.
129
   */
130
130
131
  uint32_t availableSymbols = GetBs ()->GetNrDlSymbols ();
131
  uint32_t availableSymbols = GetBs ()->GetNrDlSymbols ();
132
132

Return to bug 938