CHANGES.html
author Guillaume Seguin <guillaume@segu.in>
Thu Nov 12 13:19:35 2009 +0100 (2009-11-12)
changeset 5507 915abd2b907b
parent 5497 d8b1b591839b
child 5526 d70ac1951ae4
permissions -rw-r--r--
Simulator::SetScheduler now takes an ObjectFactory
     1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
     2 <html>
     3 <head>
     4    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     5    <title>ns-3 Change Log</title>
     6 </head>
     7 <body>
     8 
     9 <h1>
    10 ns-3: API and model change history</h1>
    11 <!--
    12 This ChangeLog is updated in the reverse order 
    13 with the most recent changes coming first.  Date format:  DD-MM-YYYY
    14 -->
    15 <p>
    16 ns-3 is an evolving system and there will be API or behavioral changes
    17 from time to time.   Users who try to use scripts or models across
    18 versions of ns-3 may encounter problems at compile time, run time, or
    19 may see the simulation output change.  </p>
    20 <p>
    21 We have adopted the development policy that we are going to try to ease
    22 the impact of these changes on users by documenting these changes in a
    23 single place (this file), and not by providing a temporary or permanent
    24 backward-compatibility software layer.  </p>
    25 <p>
    26 The goal is that users who encounter a problem when trying to use older
    27 code with newer code should be able to consult this file to find
    28 guidance as to how to fix the problem.  For instance, if a method name
    29 or signature has changed, it should be stated what the new replacement
    30 name is. </p>
    31 <p>
    32 Note that users who upgrade the simulator across versions, or who work
    33 directly out of the development tree, may find that simulation output
    34 changes even when the compilation doesn't break, such as when a
    35 simulator default value is changed.  Therefore, it is good practice for
    36 _anyone_ using code across multiple ns-3 releases to consult this file,
    37 as well as the RELEASE_NOTES, to understand what has changed over time.
    38 </p>
    39 <p>
    40 This file is a best-effort approach to solving this issue; we will do
    41 our best but can guarantee that there will be things that fall through
    42 the cracks, unfortunately.  If you, as a user, can suggest improvements
    43 to this file based on your experience, please contribute a patch or drop
    44 us a note on ns-developers mailing list.  </p>
    45 
    46 <hr>
    47 <h1>Changes from ns-3.6 to ns-3.7</h1>
    48 
    49 <h2>Changes to build system:</h2>
    50 
    51 <h2>New API:</h2>
    52 
    53 <h2>Changes to existing API:</h2>
    54 
    55 <h2>Changed behavior:</h2>
    56 <ul>
    57 <li> Changed default value of YansWifiPhy::EnergyDetectionThreshold from
    58 -140.0 dBm to -96.0 dBm.  Changed default value of 
    59 YansWifiPhy::CcaModelThreshold from -140.0 dBm to -99.0 dBm.  Rationale
    60 can be found <a href="http://www.nsnam.org/bugzilla/show_bug.cgi?id=689"> 
    61 here</a>.
    62 </ul>
    63 
    64 <hr>
    65 <h1>Changes from ns-3.6 to ns-3.7</h1>
    66 
    67 <h2>Changes to existing API:</h2>
    68 <ul>
    69 <li><b>Simulator::SetScheduler</b>: this method now takes an ObjectFactory
    70 instead of an object pointer directly. Existing callers can trivially be
    71 updated to use this new method.<br>
    72 Before:
    73 <pre>
    74 Ptr&lt;Scheduler&gt; sched = CreateObject&lt;ListScheduler&gt; ();
    75 Simulator::SetScheduler (sched);
    76 </pre>
    77 After:
    78 <pre>
    79 ObjectFactory sched;
    80 sched.SetTypeId ("ns3::ListScheduler");
    81 Simulator::SetScheduler (sched);
    82 </pre>
    83 
    84 </ul>
    85 
    86 <hr>
    87 <h1>Changes from ns-3.5 to ns-3.6</h1>
    88 
    89 <h2>Changes to build system:</h2>
    90 <ul>
    91 <li><b>A new test framework is provided with ns-3.6 that primarilay runs outside waf</b>
    92 <p>"./waf check" now runs the new unit tests of the core part of ns-3.6.  
    93 In order to run the complete test package, use "./test.py" which is 
    94 documented in a new manual -- find it in ./doc/testing.  "./waf check"
    95 no longer generates the introspected Doxygen.  Now use "./waf doxygen"
    96 to do this and generate the Doxygen documentation in one step.
    97 </p>
    98 </ul>
    99 
   100 <h2>New API:</h2>
   101 <ul>
   102 <li><b>Longest prefix match, support for metrics, for Ipv4StaticRouting and Ipv6StaticRouting</b>
   103 <p>When performing route lookup, first match for longest prefix, and then
   104 based on metrics (default metric = 0).  If metrics are equal, most recent
   105 addition is picked.  Extends API for support of metrics but preserves
   106 backward compatibility.  One small change is that the default route
   107 is no longer stored as index 0 route in the host route table so 
   108 GetDefaultRoute () must be used.
   109 </p>
   110 </li>
   111 <li><b>Route injection for global routing</b>
   112 <p>Add ability to inject and withdraw routes to Ipv4GlobalRouting.  This
   113 allows a user to insert a route and have it redistributed like an OSPF
   114 external LSA to the rest of the topology.
   115 </p>
   116 </li>
   117 
   118 <li><b>Athstats</b>
   119 <p>New classes AthstatsWifiTraceSink and AthstatsHelper.
   120 </p>
   121 </li>
   122 <li><b>WifiRemoteStationManager </b>
   123 <p>New trace sources exported by WifiRemoteStationManager: MacTxRtsFailed, MacTxDataFailed, MacTxFinalRtsFailed and MacTxFinalDataFailed.
   124 </p>
   125 </li>
   126 
   127 <li><b> IPv6 additions</b>
   128 <p> Add an IPv6 protocol and ICMPv6 capability.
   129 <ul>
   130 <li> new classes Ipv6, Ipv6Interface, Ipv6L3Protocol, Ipv6L4Protocol
   131 <li> Ipv6RawSocket (no UDP or TCP capability yet)
   132 <li> a set of classes to implement Icmpv6, including neighbor discovery,
   133 router solicitation, DAD
   134 <li> new applications Ping6 and Radvd
   135 <li> routing objects Ipv6Route and Ipv6MulticastRoute
   136 <li> routing protocols Ipv6ListRouting and Ipv6StaticRouting
   137 <li> examples: icmpv6-redirect.cc, ping6.cc, radvd.cc, radvd-two-prefix.cc, simple-routing-ping6.cc
   138 </ul>
   139 </p>
   140 </li> 
   141 
   142 <li><b>Wireless Mesh Networking models</b>
   143 <ul>
   144 <p>
   145 <li> General multi-interface mesh stack infrastructure (devices/mesh module).
   146 <li> IEEE 802.11s (Draft 3.0) model including Peering Management Protocol and HWMP.
   147 <li> Forwarding Layer for Meshing (FLAME) protocol.
   148 </ul>
   149 </p>
   150 </li>
   151 
   152 <li><b>802.11 enhancements</b>
   153 <p>
   154 <ul>
   155 <li> 10MHz and 5MHz channel width supported by 802.11a model (Ramon Bauza and Kirill Andreev).
   156 </ul>
   157 <ul>
   158 <li> Channel switching support. YansWifiPhy can now switch among different channels (Ramon Bauza and Pavel Boyko).
   159 </ul>
   160 </p>
   161 </li>
   162 
   163 <li><b> Nix-vector Routing</b>
   164 <p> Add nix-vector routing protocol
   165 <ul>
   166 <li> new helper class Ipv4NixVectorHelper
   167 </ul>
   168 <ul>
   169 <li> examples: nix-simple.cc, nms-p2p-nix.cc
   170 </ul> 
   171 </p>
   172 </li>
   173 
   174 <li><b>New Test Framework</b>
   175 <p> Add TestCase, TestSuite classes
   176 <ul>
   177 <li> examples: src/core/names-test-suite.cc, src/core/random-number-test-suite.cc, src/test/ns3tcp/ns3tcp-cwnd-test-suite.cc
   178 </ul> 
   179 </p>
   180 </li>
   181 
   182 </ul>
   183 
   184 <h2>Changes to existing API:</h2>
   185 <ul>
   186 <li><b>InterferenceHelper</b>
   187 <p>The method InterferenceHelper::CalculateTxDuration (uint32_t size, WifiMode payloadMode, WifiPreamble preamble) has been made static, so that the frame duration depends only on the characteristics of the frame (i.e., the function parameters) and not on the particular standard which is used by the receiving PHY. This makes it now possible to correctly calculate the duration of incoming frames in scenarios in which devices using different PHY configurations coexist in the same channel (e.g., a BSS using short preamble and another BSS using long preamble). </p>
   188 <p> The following member methods have been added to InterferenceHelper:</p>
   189 <pre>
   190   static WifiMode GetPlcpHeaderMode (WifiMode, WifiPreamble);
   191   static uint32_t GetPlcpHeaderDurationMicroSeconds (WifiMode, WifiPreamble);
   192   static uint32_t GetPlcpPreambleDurationMicroSeconds (WifiMode, WifiPreamble);
   193   static uint32_t GetPayloadDurationMicroSeconds (size, WifiMode); </pre>
   194 <p> The following member methods have been removed from InterferenceHelper:</p>
   195 <pre>
   196   void Configure80211aParameters (void);
   197   void Configure80211bParameters (void);
   198   void Configure80211_10MhzParameters (void);
   199   void Configure80211_5MhzParameters (void);</pre>
   200 </li>
   201 <li><b>WifiMode</b>
   202 <p>WifiMode now has a WifiPhyStandard attribute which identifies the standard the WifiMode belongs to. To properly set this attribute when creating a new WifiMode, it is now required to explicitly pass a WifiPhyStandard parameter to all WifiModeFactory::CreateXXXX() methods. The WifiPhyStandard value of an existing WifiMode can be retrieved using the new method WifiMode::GetStandard().</p>
   203 </li>
   204 <li><b>NetDevice</b>
   205 <p>In order to have multiple link change callback in NetDevice (i.e. to flush ARP and IPv6 neighbor discovery caches), the following member method has been renamed:</p>
   206 <pre>
   207 - virtual void SetLinkChangeCallback (Callback&lt;void&gt; callback);
   208 + virtual void AddLinkChangeCallback (Callback&lt;void&gt; callback);</pre>
   209 Now each NetDevice subclasses have a TracedCallback&lt;&gt; object (list of callbacks) instead of Callback&lt;void&gt; ones.
   210 </li>
   211 </ul>
   212 
   213 <hr>
   214 <h1>Changes from ns-3.4 to ns-3.5</h1>
   215 
   216 <h2>Changes to build system:</h2>
   217 <ul>
   218 </ul>
   219 
   220 <h2>New API:</h2>
   221 
   222 <ul>
   223 <li><b>YansWifiPhyHelper supporting radiotap and prism PCAP output</b>
   224 <p>The newly supported pcap formats can be adopted by calling the following new method of YansWifiPhyHelper:</p>
   225 <pre>
   226  +  void SetPcapFormat (enum PcapFormat format);
   227 </pre>
   228 where format is one of PCAP_FORMAT_80211_RADIOTAP, PCAP_FORMAT_80211_PRISM or  PCAP_FORMAT_80211. By default, PCAP_FORMAT_80211 is used, so the default PCAP format is the same as before.</p>
   229 </li>
   230 
   231 <li> <b>attributes for class Ipv4</b>
   232 <p> class Ipv4 now contains attributes in ipv4.cc; the first one
   233 is called "IpForward" that will enable/disable Ipv4 forwarding.  
   234 </li>
   235 
   236 <li> <b>packet tags</b>
   237 <p>class Packet now contains AddPacketTag, RemovePacketTag and PeekPacketTag 
   238 which can be used to attach a tag to a packet, as opposed to the old 
   239 AddTag method which attached a tag to a set of bytes. The main 
   240 semantic difference is in how these tags behave in the presence of 
   241 fragmentation and reassembly.
   242 </li>
   243 
   244 </ul>
   245 
   246 <h2>Changes to existing API:</h2>
   247 <ul>
   248 
   249 <li><b>Ipv4Interface::GetMtu () deleted</b>
   250   <p>The Ipv4Interface API is private to internet-stack module; this method
   251 was just a pass-through to GetDevice ()-&gt;GetMtu ().
   252   </p>
   253 </li>
   254 
   255 <li><b>GlobalRouteManager::PopulateRoutingTables () and RecomputeRoutingTables () are deprecated </b>
   256   <p>This API has been moved to the helper API and the above functions will
   257 be removed in ns-3.6.  The new API is:
   258 <pre>
   259 Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
   260 Ipv4GlobalRoutingHelper::RecomputeRoutingTables ();
   261 </pre>
   262 Additionally, these low-level functions in GlobalRouteManager are now public,
   263 allowing more API flexibility at the low level ns-3 API:
   264 <pre>
   265 GlobalRouteManager::DeleteGlobalRoutes ();
   266 GlobalRouteManager::BuildGlobalRoutingDatabase ();
   267 GlobalRouteManager::InitializeRoutes ();
   268 </pre>
   269   </p>
   270 </li>
   271 
   272 <li><b>CalcChecksum attribute changes</b>
   273   <p>Four IPv4 CalcChecksum attributes (which enable the computation of 
   274 checksums that are disabled by default) have been collapsed into one global 
   275 value in class Node.  These four calls: 
   276 <pre>
   277 Config::SetDefault ("ns3::Ipv4L3Protocol::CalcChecksum", BooleanValue (true)); 
   278 Config::SetDefault ("ns3::Icmpv4L4Protocol::CalcChecksum", BooleanValue (true));
   279 Config::SetDefault ("ns3::TcpL4Protocol::CalcChecksum", BooleanValue (true));
   280 Config::SetDefault ("ns3::UdpL4Protocol::CalcChecksum", BooleanValue (true));
   281 </pre>
   282 are replaced by one call to:
   283 <pre>
   284 GlobalValue::Bind ("ChecksumEnabled", BooleanValue (true));
   285 </pre>
   286   </p>
   287 </li>
   288 
   289 <li><b>CreateObject changes</b>
   290   <p>CreateObject is now able to construct objects with a non-default constructor.
   291    If you used to pass attribute lists to CreateObject, you must now use CreateObjectWithAttributes.
   292   </p>
   293 </li>
   294 
   295 <li> <b>packet byte tags renaming</b>
   296   <ul>
   297   <li>Packet::AddTag to Packet::AddByteTag</li>
   298   <li>Packet::FindFirstMatchingTag to Packet::FindFirstMatchingByteTag</li>
   299   <li>Packet::RemoveAllTags to Packet::RemoveAllByteTags</li>
   300   <li>Packet::PrintTags to Packet::PrintByteTags</li>
   301   <li>Packet::GetTagIterator to Packet::GetByteTagIterator</li>
   302   </ul>
   303 </li>
   304 
   305 <li><b>YansWifiPhyHelper::EnablePcap* methods not static any more</b>
   306 <p>To accommodate the possibility of configuring the PCAP format used for wifi promiscuous mode traces, several methods of YansWifiPhyHelper had to be made non-static:
   307 <pre>
   308 -  static void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid);
   309 +         void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid);
   310 -  static void EnablePcap (std::string filename, Ptr<NetDevice> nd);
   311 +         void EnablePcap (std::string filename, Ptr<NetDevice> nd);
   312 -  static void EnablePcap (std::string filename, std::string ndName);
   313 +         void EnablePcap (std::string filename, std::string ndName);
   314 -  static void EnablePcap (std::string filename, NetDeviceContainer d);
   315 +         void EnablePcap (std::string filename, NetDeviceContainer d);
   316 -  static void EnablePcap (std::string filename, NodeContainer n);
   317 +         void EnablePcap (std::string filename, NodeContainer n);
   318 -  static void EnablePcapAll (std::string filename);
   319 +         void EnablePcapAll (std::string filename);
   320 </pre>
   321 </p>
   322 </li>
   323 
   324 <li><b>Wifi Promisc Sniff interface modified </b>
   325 <p> 
   326 To accommodate support for the radiotap and prism headers in PCAP traces, the interface for promiscuos mode sniff in the wifi device was changed. The new implementation was heavily inspired by the way the madwifi driver handles monitor mode. A distinction between TX and RX events is introduced, to account for the fact that different information is to be put in the radiotap/prism header (e.g., RSSI and noise make sense only for RX packets). The following are the relevant modifications to the WifiPhy class:
   327 <pre>
   328 -  void NotifyPromiscSniff (Ptr&lt;const Packet&gt; packet);
   329 +  void NotifyPromiscSniffRx (Ptr&lt;const Packet&gt; packet, uint16_t channelFreqMhz, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm);
   330 +  void NotifyPromiscSniffTx (Ptr&lt;const Packet&gt; packet, uint16_t channelFreqMhz, uint32_t rate, bool isShortPreamble);
   331 -  TracedCallback&lt;Ptr&lt;const Packet&gt; &gt; m_phyPromiscSnifferTrace;
   332 +  TracedCallback&lt;Ptr&lt;const Packet&gt;, uint16_t, uint32_t, bool, double, double&gt; m_phyPromiscSniffRxTrace;
   333 +  TracedCallback&lt;Ptr&lt;const Packet&gt;, uint16_t, uint32_t, bool&gt; m_phyPromiscSniffTxTrace;
   334 </pre>
   335 The above mentioned callbacks are expected to be used to call the following method to write Wifi PCAP traces in promiscuous mode:
   336 <pre>
   337 +  void WriteWifiMonitorPacket(Ptr&lt;const Packet&gt; packet, uint16_t channelFreqMhz, uint32_t rate, bool isShortPreamble, bool isTx, double signalDbm, double noiseDbm);
   338 </pre>
   339 In the above method, the isTx parameter is to be used to differentiate between TX and RX packets. For an example of how to implement these callbacks, see the implementation of PcapSniffTxEvent and PcapSniffRxEvent in src/helper/yans-wifi-helper.cc
   340 </p>
   341 </li>
   342 
   343 <li><b> Routing decoupled from class Ipv4</b>
   344 <p> All calls of the form "Ipv4::AddHostRouteTo ()" etc. (i.e. to 
   345 add static routes, both unicast and multicast) have been moved to a new 
   346 class Ipv4StaticRouting.  In addition, class Ipv4 now holds only
   347 one possible routing protocol; the previous way to add routing protocols
   348 (by ordered list of priority) has been moved to a new class Ipv4ListRouting.
   349 Class Ipv4 has a new minimal routing API (just to set and get the routing
   350 protocol):
   351 <pre>
   352 -  virtual void AddRoutingProtocol (Ptr&lt;Ipv4RoutingProtocol&gt; routingProtocol, int16_t priority) = 0;
   353 +  virtual void SetRoutingProtocol (Ptr&lt;Ipv4RoutingProtocol&gt; routingProtocol) = 0;
   354 +  virtual Ptr&lt;Ipv4RoutingProtocol&gt; GetRoutingProtocol (void) const = 0;
   355 </pre>
   356 </li>
   357 
   358 <li><b> class Ipv4RoutingProtocol is refactored</b>
   359 <p> The abstract base class Ipv4RoutingProtocol has been refactored to
   360 align with corresponding Linux Ipv4 routing architecture, and has been
   361 moved from ipv4.h to a new file ipv4-routing-protocol.h.  The new
   362 methods (RouteOutput () and RouteInput ()) are aligned with Linux 
   363 ip_route_output() and ip_route_input().  However,
   364 the general nature of these calls (synchronous routing lookup for
   365 locally originated packets, and an asynchronous, callback-based lookup
   366 for forwarded packets) is still the same.
   367 <pre>
   368 -  typedef Callback&lt;void, bool, const Ipv4Route&amp;, Ptr&lt;Packet&gt;, const Ipv4Header&amp;&gt; RouteReplyCallback;
   369 +  typedef Callback&lt;void, Ptr&lt;Ipv4Route&gt;, Ptr&lt;const Packet&gt;, const Ipv4Header &amp;&gt; UnicastForwardCallback;
   370 +  typedef Callback&lt;void, Ptr&lt;Ipv4MulticastRoute&gt;, Ptr&lt;const Packet&gt;, const Ipv4Header &amp;&gt; MulticastForwardCallback;
   371 +  typedef Callback&lt;void, Ptr&lt;const Packet&gt;, const Ipv4Header &amp;, uint32_t &gt; LocalDeliverCallback;
   372 +  typedef Callback&lt;void, Ptr&lt;const Packet&gt;, const Ipv4Header &amp;&gt; ErrorCallback;
   373 -  virtual bool RequestInterface (Ipv4Address destination, uint32_t&amp; interface) = 0;
   374 +  virtual Ptr&lt;Ipv4Route&gt; RouteOutput (Ptr&lt;Packet&gt; p, const Ipv4Header &amp;header, uint32_t oif, Socket::SocketErrno &amp;errno) = 0;
   375 -  virtual bool RequestRoute (uint32_t interface,
   376 -                            const Ipv4Header &amp;ipHeader,
   377 -                            Ptr&lt;Packet&gt; packet,
   378 -                            RouteReplyCallback routeReply) = 0;
   379 +  virtual bool RouteInput  (Ptr&lt;const Packet&gt; p, const Ipv4Header &amp;header, Ptr&lt;const NetDevice&gt; idev,
   380 +                             UnicastForwardCallback ucb, MulticastForwardCallback mcb,
   381 +                             LocalDeliverCallback lcb, ErrorCallback ecb) = 0;
   382 </pre>
   383 
   384 </li>
   385 <li><b> previous class Ipv4Route, Ipv4MulticastRoute renamed; new classes with
   386 those same names added</b>
   387 <p> The previous class Ipv4Route and Ipv4MulticastRoute are used by 
   388 Ipv4StaticRouting and Ipv4GlobalRouting to record internal routing table
   389 entries, so they were renamed to class Ipv4RoutingTableEntry and
   390 Ipv4MulticastRoutingTableEntry, respectively.  In their place, new
   391 class Ipv4Route and class Ipv4MulticastRoute have been added.  These
   392 are reference-counted objects that are analogous to Linux struct
   393 rtable and struct mfc_cache, respectively, to achieve better compatibility
   394 with Linux routing architecture in the future.  
   395 
   396 <li><b> class Ipv4 address-to-interface mapping functions changed</b>
   397 <p>  There was some general cleanup of functions that involve mappings
   398 from Ipv4Address to either NetDevice or Ipv4 interface index.  
   399 <pre>
   400 -  virtual uint32_t FindInterfaceForAddr (Ipv4Address addr) const = 0;
   401 -  virtual uint32_t FindInterfaceForAddr (Ipv4Address addr, Ipv4Mask mask) const = 0;
   402 +  virtual int32_t GetInterfaceForAddress (Ipv4Address address) const = 0;
   403 +  virtual int32_t GetInterfaceForPrefix (Ipv4Address address, Ipv4Mask mask) const = 0;
   404 -  virtual int32_t FindInterfaceForDevice(Ptr&lt;NetDevice&gt; nd) const = 0;
   405 +  virtual int32_t GetInterfaceForDevice (Ptr&lt;const NetDevice&gt; device) const = 0;
   406 -  virtual Ipv4Address GetSourceAddress (Ipv4Address destination) const = 0;
   407 -  virtual bool GetInterfaceForDestination (Ipv4Address dest,
   408 -  virtual uint32_t GetInterfaceByAddress (Ipv4Address addr, Ipv4Mask mask = Ipv4Mask("255.255.255.255"));
   409 </pre>
   410 
   411 <li><b> class Ipv4 multicast join API deleted</b>
   412 <p> The following methods are not really used in present form since IGMP
   413 is not being generated, so they have been removed (planned to be replaced
   414 by multicast socket-based calls in the future):
   415 
   416 <pre>
   417 - virtual void JoinMulticastGroup (Ipv4Address origin, Ipv4Address group) = 0;
   418 - virtual void LeaveMulticastGroup (Ipv4Address origin, Ipv4Address group) = 0;
   419 </pre>
   420 
   421 
   422 <li><b>Deconflict NetDevice::ifIndex and Ipv4::ifIndex (bug 85).</b>
   423 <p>All function parameters named "ifIndex" that refer 
   424 to an Ipv4 interface are instead named "interface".
   425 <pre>
   426 - static const uint32_t Ipv4RoutingProtocol::IF_INDEX_ANY = 0xffffffff;
   427 + static const uint32_t Ipv4RoutingProtocol::INTERFACE_ANY = 0xffffffff;
   428 
   429 - bool Ipv4RoutingProtocol::RequestIfIndex (Ipv4Address destination, uint32_t&amp; ifIndex);
   430 + bool Ipv4RoutingProtocol::RequestInterface (Ipv4Address destination, uint32_t&amp; interface);
   431 (N.B. this particular function is planned to be renamed to RouteOutput() in the
   432 proposed IPv4 routing refactoring)
   433 
   434 - uint32_t Ipv4::GetIfIndexByAddress (Ipv4Address addr, Ipv4Mask mask);
   435 + int_32t Ipv4::GetInterfaceForAddress (Ipv4Address address, Ipv4Mask mask) const;
   436 
   437 - bool Ipv4::GetIfIndexForDestination (Ipv4Address dest, uint32_t &amp;ifIndex) const;
   438 + bool Ipv4::GetInterfaceForDestination (Ipv4Address dest, uint32_t &amp;interface) const;
   439 (N.B. this function is not needed in the proposed Ipv4 routing refactoring)
   440 </pre>
   441 
   442 
   443 <li><b>Allow multiple IPv4 addresses to be assigned to an interface (bug 188)</b>
   444   <ul>
   445   <li> Add class Ipv4InterfaceAddress:  
   446   This is a new class to resemble Linux's struct in_ifaddr.  It holds IP addressing information, including mask,
   447   broadcast address, scope, whether primary or secondary, etc.
   448   <pre>
   449 +  virtual uint32_t AddAddress (uint32_t interface, Ipv4InterfaceAddress address) = 0;
   450 +  virtual Ipv4InterfaceAddress GetAddress (uint32_t interface, uint32_t addressIndex) const = 0;
   451 +  virtual uint32_t GetNAddresses (uint32_t interface) const = 0;
   452   </pre>
   453   <li>Regarding legacy API usage, typically where you once did the following,
   454   using the public Ipv4 class interface (e.g.):
   455   <pre>
   456   ipv4A-&gt;SetAddress (ifIndexA, Ipv4Address ("172.16.1.1"));
   457   ipv4A-&gt;SetNetworkMask (ifIndexA, Ipv4Mask ("255.255.255.255"));
   458   </pre>
   459   you now do:
   460   <pre>
   461   Ipv4InterfaceAddress ipv4IfAddrA = Ipv4InterfaceAddress (Ipv4Address ("172.16.1.1"), Ipv4Mask ("255.255.255.255"));
   462   ipv4A-&gt;AddAddress (ifIndexA, ipv4IfAddrA);
   463   </pre>
   464   <li> At the helper API level, one often gets an address from an interface
   465   container.  We preserve the legacy GetAddress (uint32_t i) but it
   466   is documented that this will return only the first (address index 0)
   467   address on the interface, if there are multiple such addresses. 
   468   We provide also an overloaded variant for the multi-address case: 
   469 
   470   <pre>
   471 Ipv4Address Ipv4InterfaceContainer::GetAddress (uint32_t i)
   472 + Ipv4Address Ipv4InterfaceContainer::GetAddress (uint32_t i, uint32_t j)
   473   </pre>
   474 
   475   </ul>
   476 
   477 <li><b>New WifiMacHelper objects</b>
   478 <p>The type of wifi MAC is now set by two new specific helpers, NqosWifiMacHelper for non QoS MACs and QosWifiMacHelper for Qos MACs. They are passed as argument to WifiHelper::Install methods.</li>
   479   <pre>
   480 - void WifiHelper::SetMac (std::string type, std::string n0 = "", const AttributeValue &amp;v0 = EmptyAttributeValue (),...)
   481 
   482 - NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &amp;phyHelper, NodeContainer c) const
   483 + NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &amp;phyHelper, const WifiMacHelper &amp;macHelper, NodeContainer c) const
   484 
   485 - NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &amp;phy, Ptr&lt;Node&gt; node) const
   486 + NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &amp;phy, const WifiMacHelper &amp;mac, Ptr&lt;Node&gt; node) const
   487 
   488 - NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &amp;phy, std::string nodeName) const
   489 + NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &amp;phy, const WifiMacHelper &amp;mac, std::string nodeName) const
   490   </pre>
   491   See src/helper/nqos-wifi-mac-helper.h and src/helper/qos-wifi-mac-helper.h for more details.
   492   </p>
   493 
   494 <li><b>Remove Mac48Address::IsMulticast</b>
   495   <p>This method was considered buggy and unsafe to call. Its replacement is Mac48Address::IsGroup.
   496   </li>
   497 
   498 </ul>
   499 
   500 <h2>Changed behavior:</h2>
   501 <ul>
   502 </ul>
   503 
   504 <hr>
   505 <h1>Changes from ns-3.3 to ns-3.4</h1>
   506 
   507 <h2>Changes to build system:</h2>
   508 <ul>
   509 <li>A major option regarding the downloading and building of ns-3 has been
   510 added for ns-3.4 -- the ns-3-allinone feature.  This allows a user to
   511 get the most common options for ns-3 downloaded and built with a minimum
   512 amount of trouble.  See the ns-3 tutorial for a detailed explanation of
   513 how to use this new feature.</li>
   514 
   515 <li>The build system now runs build items in parallel by default.  This includes
   516 the regression tests.</li>
   517 </ul>
   518 
   519 <h2>New API:</h2>
   520 <ul>
   521 <li>XML support has been added to the ConfigStore in src/contrib/config-store.cc</li>
   522 
   523 <li>The ns-2 calendar queue scheduler option has been ported to src/simulator</li>
   524 
   525 <li>A ThreeLogDistancePropagationLossModel has been added to src/devices/wifi</li>
   526 
   527 <li>ConstantAccelerationMobilityModel in src/mobility/constant-acceleration-mobility-model.h</li>
   528 
   529 <li>A new emulation mode is supported with the TapBridge net device (see
   530 src/devices/tap-bridge)</li>
   531 
   532 <li>A new facility for naming ns-3 Objects is included (see
   533 src/core/names.{cc,h})</li>
   534 
   535 <li>Wifi multicast support has been added in src/devices/wifi</li>
   536 </ul>
   537 
   538 <h2>Changes to existing API:</h2>
   539 
   540 <ul>
   541 <li>Some fairly significant changes have been made to the API of the
   542 random variable code.  Please see the ns-3 manual and src/core/random-variable.cc
   543 for details.</li>
   544 
   545 <li>The trace sources in the various NetDevice classes has been completely
   546 reworked to allow for a consistent set of trace sources across the
   547 devices.  The names of the trace sources have been changed to provide
   548 some context with respect to the level at which the trace occurred.
   549 A new set of trace sources has been added which emulates the behavior
   550 of packet sniffers.  These sources have been used to implement tcpdump-
   551 like functionality and are plumbed up into the helper classes.  The 
   552 user-visible changes are the trace source name changes and the ability
   553 to do promiscuous-mode pcap tracing via helpers.  For further information
   554 regarding these changes, please see the ns-3 manual</li>
   555 
   556 <li>StaticMobilityModel has been renamed ConstantPositionMobilityModel
   557 StaticSpeedMobilityModel has been renamed ConstantVelocityMobilityModel</li>
   558 
   559 <li>The Callback templates have been extended to support more parameters.
   560 See src/core/callback.h</li>
   561 
   562 <li>Many helper API have been changed to allow passing Object-based parameters
   563 as string names to ease working with the object name service.</li>
   564 
   565 <li>The Config APIs now accept path segments that are names defined by the
   566 object name service.</li>
   567 
   568 <li>Minor changes were made to make the system build under the Intel C++ compiler.</li>
   569 
   570 <li>Trace hooks for association and deassociation to/from an access point were
   571 added to src/devices/wifi/nqsta-wifi-mac.cc</li>
   572 </ul>
   573 
   574 <h2>Changed behavior:</h2>
   575 
   576 <ul>
   577 <li>The tracing system rework has introduced some significant changes in the
   578 behavior of some trace sources, specifically in the positioning of trace sources
   579 in the device code.  For example, there were cases where the packet transmit 
   580 trace source was hit before the packet was enqueued on the device transmit quueue.
   581 This now happens just before the packet is transmitted over the channel medium.
   582 The scope of the changes is too large to be included here.  If you have concerns
   583 regarding trace semantics, please consult the net device documentation for details.
   584 As is usual, the ultimate source for documentation is the net device source code.</li>
   585 </ul>
   586 
   587 <hr>
   588 <h1>Changes from ns-3.2 to ns-3.3</h1>
   589 
   590 <h2>New API:</h2>
   591 <ul>
   592 <li>
   593 ns-3 ABORT macros in src/core/abort.h
   594 Config::MatchContainer
   595 ConstCast and DynamicCast helper functions for Ptr casting
   596 StarTopology added to several topology helpers
   597 NetDevice::IsBridge () 
   598 </li>
   599 
   600 <li>17-11-2008; changeset 
   601 <a href="http://code.nsnam.org/ns-3-dev/rev/4c1c3f6bcd03">4c1c3f6bcd03</a></li>
   602 <ul>
   603 <li>
   604 The PppHeader previously defined in the point-to-point-net-device code has been 
   605 made public.
   606 </li>
   607 </ul>
   608 
   609 <li>17-11-2008; changeset 
   610 <a href="http://code.nsnam.org/ns-3-dev/rev/16c2970a0344">16c2970a0344</a></li>
   611 <ul>
   612 <li>
   613 An emulated net device has been added as enabling technology for ns-3 emulation
   614 scenarios.  See src/devices/emu and examples/emu-udp-echo.cc for details.
   615 </li>
   616 </ul>
   617 
   618 <li>17-11-2008; changeset 
   619 <a href="http://code.nsnam.org/ns-3-dev/rev/4222173d1e6d">4222173d1e6d</a></li>
   620 <ul>
   621 <li>
   622 Added method InternetStackHelper::EnableAsciiChange to allow allow a user to 
   623 hook ascii trace to the drop trace events in Ipv4L3Protocol and ArpL3Protocol.
   624 </li>
   625 </ul>
   626 
   627 </ul>
   628 <h2>Changes to existing API:</h2>
   629 <ul>
   630 
   631 <li> NetDevice::MakeMulticastAddress() was renamed to NetDevice::GetMulticast()
   632 and the original GetMulticast() removed </li>
   633 
   634 <li> Socket API changes:
   635 <ul>
   636 <li> return type of SetDataSentCallback () changed from bool to void </li>
   637 <li> Socket::Listen() no longer takes a queueLimit argument</li>
   638 </ul>
   639 
   640 <li> As part of the Wifi Phy rework, there have been several API changes
   641 at the low level and helper API level.  </li>
   642 <ul>
   643 <li>  At the helper API level, the WifiHelper was split to three classes: 
   644 a WifiHelper, a YansWifiChannel helper, and a YansWifiPhy helper.  Some
   645 functions like Ascii and Pcap tracing functions were moved from class
   646 WifiHelper to class YansWifiPhyHelper. 
   647 <li>  At the low-level API, there have been a number of changes to
   648 make the Phy more modular:</li>
   649 <ul>
   650 <li> composite-propagation-loss-model.h is removed</li>
   651 <li> DcfManager::NotifyCcaBusyStartNow() has changed name</li>
   652 <li> fragmentation related functions (e.g. DcaTxop::GetNFragments()) have
   653 changed API to account for some implementation changes</li>
   654 <li> Interference helper and error rate model added </li>
   655 <li> JakesPropagationLossModel::GetLoss() moved to PropagationLoss() class</li>
   656 <li> base class WifiChannel made abstract </li>
   657 <li> WifiNetDevice::SetChannel() removed </li>
   658 <li> a WifiPhyState helper class added </li>
   659 <li> addition of the YansWifiChannel and YansWifiPhy classes </li>
   660 </ul>
   661 </ul>
   662 
   663 <li>17-11-2008; changeset 
   664 <a href="http://code.nsnam.org/ns-3-dev/rev/dacfd1f07538">dacfd1f07538</a></li>
   665 <ul>
   666 <li>
   667 Change attribute "RxErrorModel" to "ReceiveErrorModel" in CsmaNetDevice for 
   668 consistency between devices.
   669 </li>
   670 </ul>
   671 
   672 </ul>
   673 <h2>changed behavior:</h2>
   674 <ul>
   675 
   676 <li>17-11-2008; changeset 
   677 <a href="http://code.nsnam.org/ns-3-dev/rev/ed0dfce40459">ed0dfce40459</a></li>
   678 <ul>
   679 <li>
   680 Relax reasonableness testing in Ipv4AddressHelper::SetBase to allow the 
   681 assignment of /32 addresses.
   682 </li>
   683 </ul>
   684 
   685 <li>17-11-2008; changeset 
   686 <a href="http://code.nsnam.org/ns-3-dev/rev/756887a9bbea">756887a9bbea</a></li>
   687 <ul>
   688 <li>
   689 Global routing supports bridge devices.
   690 </li>
   691 </ul>
   692 </ul>
   693 
   694 <hr>
   695 <h1>Changes from ns-3.1 to ns-3.2</h1>
   696 
   697 <h2>New API:</h2>
   698 <ul>
   699 
   700 <li>26-08-2008; changeset 
   701 <a href="http://code.nsnam.org/ns-3-dev/rev/5aa65b1ea001">5aa65b1ea001</a></li>
   702 <ul>
   703 <li>
   704 Add multithreaded and real-time simulator implementation.  Allows for emulated
   705 net devices running in threads other than the main simulation thread to schedule
   706 events.  Allows for pacing the simulation clock at 1x real-time.
   707 </li>
   708 </ul>
   709 
   710 
   711 <li>26-08-2008; changeset 
   712 <a href="http://code.nsnam.org/ns-3-dev/rev/c69779f5e51e">c69779f5e51e</a></li>
   713 <ul>
   714 <li>
   715 Add threading and synchronization primitives.  Enabling technology for 
   716 multithreaded simulator implementation.
   717 </li>
   718 </ul>
   719 
   720 </ul>
   721 <h2>New API in existing classes:</h2>
   722 <ul>
   723 
   724 <li>01-08-2008; changeset 
   725 <a href="http://code.nsnam.org/ns-3-dev/rev/a18520551cdf">a18520551cdf</a></li>
   726 <ul>
   727 <li>class ArpCache has two new attributes:  MaxRetries 
   728 and a Drop trace.  It also has some new public methods but these are 
   729 mostly for internal use.
   730 </ul>
   731 </li>
   732 
   733 </ul>
   734 <h2>Changes to existing API:</h2>
   735 <ul>
   736 
   737 <li>05-09-2008; changeset 
   738 <a href="http://code.nsnam.org/ns-3-dev/rev/aa1fb0f43571">aa1fb0f43571</a></li>
   739 <ul>
   740 <li>
   741 Change naming of MTU and packet size attributes in CSMA and Point-to-Point devices<br>
   742 After much discussion it was decided that the preferred way to think about 
   743 the different senses of transmission units and encapsulations was to call the 
   744 MAC MTU simply MTU and to use the overall packet size as the PHY-level attribute
   745 of interest.  See the Doxygen of CsmaNetDevice::SetFrameSize and 
   746 PointToPointNetDevice::SetFrameSize for a detailed description.
   747 </li>
   748 </ul>
   749 
   750 <li>25-08-2008; changeset 
   751 <a href="http://code.nsnam.org/ns-3-dev/rev/e5ab96db540e">e5ab96db540e</a></li>
   752 <ul>
   753 <li>
   754 bug 273: constify packet pointers.<br>
   755 The normal and the promiscuous receive callbacks of the NetDevice API
   756 have been changed from:
   757 <pre>
   758 Callback&lt;bool,Ptr&lt;NetDevice&gt;,Ptr&lt;Packet&gt;,uint16_t,const Address &amp;&gt;
   759 Callback&lt;bool,Ptr&lt;NetDevice&gt;, Ptr&lt;Packet&gt;, uint16_t,
   760          const Address &amp;, const Address &amp;, enum PacketType &gt;
   761 </pre>
   762 to:
   763 <pre>
   764 Callback&lt;bool,Ptr&lt;NetDevice&gt;,Ptr&lt;const Packet&gt;,uint16_t,const Address &amp;&gt;
   765 Callback&lt;bool,Ptr&lt;NetDevice&gt;, Ptr&lt;const Packet&gt;, uint16_t,
   766          const Address &amp;, const Address &amp;, enum PacketType &gt;
   767 </pre>
   768 to avoid the kind of bugs reported in 
   769 <a href="http://www.nsnam.org/bugzilla/show_bug.cgi?id=273">bug 273</a>.
   770 Users who implement a subclass of the NetDevice base class need to change the signature
   771 of their SetReceiveCallback and SetPromiscReceiveCallback methods.
   772 </li>
   773 </ul>
   774 
   775 
   776 <li>04-08-2008; changeset 
   777 <a href="http://code.nsnam.org/ns-3-dev/rev/cba7b2b80fe8">cba7b2b80fe8</a></li>
   778 <ul>
   779 <li>
   780 Cleanup of MTU confusion and initialization in CsmaNetDevice<br>
   781 The MTU of the CsmaNetDevice defaulted to 65535.  This did not correspond with
   782 the expected MTU found in Ethernet-like devices.  Also there was not clear 
   783 documentation regarding which MTU was being set.  There are two MTU here, one
   784 at the MAC level and one at the PHY level.  We split out the MTU setting to make
   785 this more clear and set the default PHY level MTU to 1500 to be more like
   786 Ethernet.  The encapsulation mode defaults to LLC/SNAP which then puts the
   787 MAC level MTU at 1492 by default.  We allow users to now set the encapsulation
   788 mode, MAC MTU and PHY MTU while keeping the three values consistent.  See the
   789 Doxygen of CsmaNetDevice::SetMaxPayloadLength for a detailed description of the
   790 issues and solution.
   791 </li>
   792 </ul>
   793 
   794 <li>21-07-2008; changeset 
   795 <a href="
   796 http://code.nsnam.org/ns-3-dev/rev/99698bc858e8">99698bc858e8</a></li>
   797 <ul>
   798 <li> class NetDevice has added a pure virtual method that
   799 must be implemented by all subclasses:
   800 <pre>
   801 virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb) = 0;
   802 </pre>
   803 All NetDevices must support this method, and must call this callback
   804 when processing packets in the receive direction (the appropriate place
   805 to call this is device-dependent).  An approach to stub this out
   806 temporarily, if you do not care about immediately enabling this
   807 functionality, would be to add this to your device:
   808 <pre>
   809 void
   810 ExampleNetDevice::SetPromiscReceiveCallback
   811 (NetDevice::PromiscReceiveCallback cb)
   812 { 
   813   NS_ASSERT_MSG (false, "No implementation yet for
   814 SetPromiscReceiveCallback");
   815 }
   816 </pre>
   817 To implement this properly, consult the CsmaNetDevice for examples of
   818 when the m_promiscRxCallback is called.
   819 </li>
   820 </ul>
   821 
   822 <li>03-07-2008; changeset 
   823 <a href="http://code.nsnam.org/ns-3-dev/rev/d5f8e5fae1c6">d5f8e5fae1c6</a></li>
   824 <ul>
   825 <li>
   826 Miscellaneous cleanup of Udp Helper API, to fix bug 234
   827 <pre>
   828 class UdpEchoServerHelper
   829 {
   830 public:
   831 - UdpEchoServerHelper ();
   832 - void SetPort (uint16_t port); 
   833 + UdpEchoServerHelper (uint16_t port);
   834 + 
   835 + void SetAttribute (std::string name, const AttributeValue &amp;value);
   836 ApplicationContainer Install (NodeContainer c);
   837 
   838 class UdpEchoClientHelper
   839 {
   840 public:
   841 - UdpEchoClientHelper ();
   842 + UdpEchoClientHelper (Ipv4Address ip, uint16_t port);
   843 - void SetRemote (Ipv4Address ip, uint16_t port);
   844 - void SetAppAttribute (std::string name, const AttributeValue &amp;value);
   845 + void SetAttribute (std::string name, const AttributeValue &amp;value);
   846 ApplicationContainer Install (NodeContainer c);
   847 </pre>
   848 </li>
   849 </ul>
   850 
   851 <li>03-07-2008; changeset 
   852 <a href="
   853 http://code.nsnam.org/ns-3-dev/rev/3cdd9d60f7c7">3cdd9d60f7c7</a></li>
   854 <ul>
   855 <li>
   856 Rename all instances method names using "Set..Parameter" to "Set..Attribute"
   857 (bug 232)
   858 </li>
   859 <li> How to fix your code:  Any use of helper API that was using a method
   860 "Set...Parameter()" should be changed to read "Set...Attribute()".  e.g.
   861 <pre>
   862 - csma.SetChannelParameter ("DataRate", DataRateValue (5000000));
   863 - csma.SetChannelParameter ("Delay", TimeValue (MilliSeconds (2)));
   864 + csma.SetChannelAttribute ("DataRate", DataRateValue (5000000));
   865 + csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
   866 </pre>
   867 </li>
   868 </ul>
   869 </li>
   870 
   871 </ul>
   872 <h2>Changed behavior:</h2>
   873 <ul>
   874 
   875 <li>07-09-2008; changeset 
   876 <a href="http://code.nsnam.org/ns-3-dev/rev/5d836ab1523b">5d836ab1523b</a></li>
   877 <ul>
   878 
   879 <li>
   880 Implement a finite receive buffer for TCP<br>
   881 The native TCP model in TcpSocketImpl did not support a finite receive buffer.
   882 This changeset adds the following functionality in this regard:
   883 <ul>
   884 <li>
   885 Being able to set the receiver buffer size through the attributes system.
   886 </li>
   887 <li>
   888 This receiver buffer size is now correctly exported in the TCP header as the
   889 advertised window.  Prior to this changeset, the TCP header advertised window
   890 was set to the maximum size of 2^16 bytes.
   891 window
   892 </li>
   893 <li>
   894 The aforementioned window size is correctly used for flow control, i.e. the
   895 sending TCP will not send more data than available space in the receiver's
   896 buffer.
   897 </li>
   898 <li>
   899 In the case of a receiver window collapse, when a advertised zero-window
   900 packet is received, the sender enters the persist probing state in which
   901 it sends probe packets with one payload byte at exponentially backed-off
   902 intervals up to 60s.  The reciever will continue to send advertised 
   903 zero-window ACKs of the old data so long as the receiver buffer remains full.
   904 When the receiver window clears up due to an application read, the TCP
   905 will finally ACK the probe byte, and update its advertised window appropriately.
   906 </li>
   907 </ul>
   908 See 
   909 <a href="http://www.nsnam.org/bugzilla/show_bug.cgi?id=239"> bug 239 </a> for
   910 more.
   911 </li>
   912 </ul>
   913 
   914 <li>07-09-2008; changeset 
   915 <a href="http://code.nsnam.org/ns-3-dev/rev/7afa66c2b291">7afa66c2b291</a></li>
   916 <ul>
   917 <li>
   918 Add correct FIN exchange behavior during TCP closedown<br>
   919 The behavior of the native TcpSocketImpl TCP model was such that the final
   920 FIN exchange was not correct, i.e. calling Socket::Close didn't send a FIN
   921 packet, and even if it had, the ACK never came back, and even if it had, the
   922 ACK would have incorrect sequence number.  All these various problems have been
   923 addressed by this changeset.  See 
   924 <a href="http://www.nsnam.org/bugzilla/show_bug.cgi?id=242"> bug 242 </a> for
   925 more.
   926 </li>
   927 </ul>
   928 
   929 <li> 28-07-2008; changeset 
   930 <a href="http://code.nsnam.org/ns-3-dev/rev/6f68f1044df1">6f68f1044df1</a>
   931 <ul>
   932 <li>
   933 OLSR: HELLO messages hold time changed to 3*hello
   934 interval from hello interval.  This is an important bug fix as
   935 hold time == refresh time was never intentional, as it leads to
   936 instability in neighbor detection.
   937 </ul>
   938 </li>
   939 
   940 </ul>
   941 
   942 </body>
   943 </html>