diff --git a/.hgtags b/.hgtags index 4d7dfea78..164114709 100644 --- a/.hgtags +++ b/.hgtags @@ -35,3 +35,4 @@ dfd0bc16dc991313896f351530a3dc5a25f62e15 ns-3.3-RC4 13a5b15fbe3429a6c3d00c1bccffa2c156a0603b ns-3.5-rc1 8562a42accf6f715d312c037326ec7da48095e13 ns-3.5-rc2 a600c11ff8d40a40e88c2d692acad6512dde70c8 ns-3.5-rc3 +c975274c9707b1f07d94cc51f205c351122131a5 ns-3.5 diff --git a/CHANGES.html b/CHANGES.html index 62da83d7a..fccd13632 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -43,6 +43,39 @@ the cracks, unfortunately. If you, as a user, can suggest improvements to this file based on your experience, please contribute a patch or drop us a note on ns-developers mailing list.

+
+

Changes from ns-3.5 to ns-3.6

+ +

Changes to build system:

+ + +

New API:

+ + +

Changes to existing API:

+ +

Changes from ns-3.4 to ns-3.5

@@ -81,7 +114,24 @@ fragmentation and reassembly.
  • Ipv4Interface::GetMtu () deleted

    The Ipv4Interface API is private to internet-stack module; this method -was just a pass-through to GetDevice ()->GetMtu (). +was just a pass-through to GetDevice ()->GetMtu (). +

    +
  • + +
  • GlobalRouteManager::PopulateRoutingTables () and RecomputeRoutingTables () are deprecated +

    This API has been moved to the helper API and the above functions will +be removed in ns-3.6. The new API is: +

    +Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
    +Ipv4GlobalRoutingHelper::RecomputeRoutingTables ();
    +
    +Additionally, these low-level functions in GlobalRouteManager are now public, +allowing more API flexibility at the low level ns-3 API: +
    +GlobalRouteManager::DeleteGlobalRoutes ();
    +GlobalRouteManager::BuildGlobalRoutingDatabase ();
    +GlobalRouteManager::InitializeRoutes ();
    +

  • @@ -141,16 +191,16 @@ GlobalValue::Bind ("ChecksumEnabled", BooleanValue (true));

    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:

    --  void NotifyPromiscSniff (Ptr packet);
    -+  void NotifyPromiscSniffRx (Ptr packet, uint16_t channelFreqMhz, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm);
    -+  void NotifyPromiscSniffTx (Ptr packet, uint16_t channelFreqMhz, uint32_t rate, bool isShortPreamble);
    --  TracedCallback > m_phyPromiscSnifferTrace;
    -+  TracedCallback, uint16_t, uint32_t, bool, double, double> m_phyPromiscSniffRxTrace;
    -+  TracedCallback, uint16_t, uint32_t, bool> m_phyPromiscSniffTxTrace;
    +-  void NotifyPromiscSniff (Ptr<const Packet> packet);
    ++  void NotifyPromiscSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm);
    ++  void NotifyPromiscSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint32_t rate, bool isShortPreamble);
    +-  TracedCallback<Ptr<const Packet> > m_phyPromiscSnifferTrace;
    ++  TracedCallback<Ptr<const Packet>, uint16_t, uint32_t, bool, double, double> m_phyPromiscSniffRxTrace;
    ++  TracedCallback<Ptr<const Packet>, uint16_t, uint32_t, bool> m_phyPromiscSniffTxTrace;
     
    The above mentioned callbacks are expected to be used to call the following method to write Wifi PCAP traces in promiscuous mode:
    -+  void WriteWifiMonitorPacket(Ptr packet, uint16_t channelFreqMhz, uint32_t rate, bool isShortPreamble, bool isTx, double signalDbm, double noiseDbm);
    ++  void WriteWifiMonitorPacket(Ptr<const Packet> packet, uint16_t channelFreqMhz, uint32_t rate, bool isShortPreamble, bool isTx, double signalDbm, double noiseDbm);
     
    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

    @@ -181,18 +231,18 @@ the general nature of these calls (synchronous routing lookup for locally originated packets, and an asynchronous, callback-based lookup for forwarded packets) is still the same.
    --  typedef Callback<void, bool, const Ipv4Route&, Ptr<Packet>, const Ipv4Header&> RouteReplyCallback;
    -+  typedef Callback<void, Ptr<Ipv4Route>, Ptr<const Packet>, const Ipv4Header &> UnicastForwardCallback;
    -+  typedef Callback<void, Ptr<Ipv4MulticastRoute>, Ptr<const Packet>, const Ipv4Header &> MulticastForwardCallback;
    -+  typedef Callback<void, Ptr<const Packet>, const Ipv4Header &, uint32_t > LocalDeliverCallback;
    -+  typedef Callback<void, Ptr<const Packet>, const Ipv4Header &> ErrorCallback;
    --  virtual bool RequestInterface (Ipv4Address destination, uint32_t& interface) = 0;
    -+  virtual Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &errno) = 0;
    +-  typedef Callback<void, bool, const Ipv4Route&, Ptr<Packet>, const Ipv4Header&> RouteReplyCallback;
    ++  typedef Callback<void, Ptr<Ipv4Route>, Ptr<const Packet>, const Ipv4Header &> UnicastForwardCallback;
    ++  typedef Callback<void, Ptr<Ipv4MulticastRoute>, Ptr<const Packet>, const Ipv4Header &> MulticastForwardCallback;
    ++  typedef Callback<void, Ptr<const Packet>, const Ipv4Header &, uint32_t > LocalDeliverCallback;
    ++  typedef Callback<void, Ptr<const Packet>, const Ipv4Header &> ErrorCallback;
    +-  virtual bool RequestInterface (Ipv4Address destination, uint32_t& interface) = 0;
    ++  virtual Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &errno) = 0;
     -  virtual bool RequestRoute (uint32_t interface,
    --                            const Ipv4Header &ipHeader,
    +-                            const Ipv4Header &ipHeader,
     -                            Ptr<Packet> packet,
     -                            RouteReplyCallback routeReply) = 0;
    -+  virtual bool RouteInput  (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev,
    ++  virtual bool RouteInput  (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev,
     +                             UnicastForwardCallback ucb, MulticastForwardCallback mcb,
     +                             LocalDeliverCallback lcb, ErrorCallback ecb) = 0;
     
    @@ -242,16 +292,16 @@ to an Ipv4 interface are instead named "interface". - static const uint32_t Ipv4RoutingProtocol::IF_INDEX_ANY = 0xffffffff; + static const uint32_t Ipv4RoutingProtocol::INTERFACE_ANY = 0xffffffff; -- bool Ipv4RoutingProtocol::RequestIfIndex (Ipv4Address destination, uint32_t& ifIndex); -+ bool Ipv4RoutingProtocol::RequestInterface (Ipv4Address destination, uint32_t& interface); +- bool Ipv4RoutingProtocol::RequestIfIndex (Ipv4Address destination, uint32_t& ifIndex); ++ bool Ipv4RoutingProtocol::RequestInterface (Ipv4Address destination, uint32_t& interface); (N.B. this particular function is planned to be renamed to RouteOutput() in the proposed IPv4 routing refactoring) - uint32_t Ipv4::GetIfIndexByAddress (Ipv4Address addr, Ipv4Mask mask); + int_32t Ipv4::GetInterfaceForAddress (Ipv4Address address, Ipv4Mask mask) const; -- bool Ipv4::GetIfIndexForDestination (Ipv4Address dest, uint32_t &ifIndex) const; -+ bool Ipv4::GetInterfaceForDestination (Ipv4Address dest, uint32_t &interface) const; +- bool Ipv4::GetIfIndexForDestination (Ipv4Address dest, uint32_t &ifIndex) const; ++ bool Ipv4::GetInterfaceForDestination (Ipv4Address dest, uint32_t &interface) const; (N.B. this function is not needed in the proposed Ipv4 routing refactoring) @@ -269,13 +319,13 @@ proposed IPv4 routing refactoring)
  • Regarding legacy API usage, typically where you once did the following, using the public Ipv4 class interface (e.g.):
    -  ipv4A->SetAddress (ifIndexA, Ipv4Address ("172.16.1.1"));
    -  ipv4A->SetNetworkMask (ifIndexA, Ipv4Mask ("255.255.255.255"));
    +  ipv4A->SetAddress (ifIndexA, Ipv4Address ("172.16.1.1"));
    +  ipv4A->SetNetworkMask (ifIndexA, Ipv4Mask ("255.255.255.255"));
       
    you now do:
       Ipv4InterfaceAddress ipv4IfAddrA = Ipv4InterfaceAddress (Ipv4Address ("172.16.1.1"), Ipv4Mask ("255.255.255.255"));
    -  ipv4A->AddAddress (ifIndexA, ipv4IfAddrA);
    +  ipv4A->AddAddress (ifIndexA, ipv4IfAddrA);
       
  • At the helper API level, one often gets an address from an interface container. We preserve the legacy GetAddress (uint32_t i) but it @@ -293,16 +343,16 @@ Ipv4Address Ipv4InterfaceContainer::GetAddress (uint32_t i)
  • New WifiMacHelper objects

    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.

  • -- void WifiHelper::SetMac (std::string type, std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),...)
    +- void WifiHelper::SetMac (std::string type, std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),...)
     
    -- NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phyHelper, NodeContainer c) const
    -+ NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phyHelper, const WifiMacHelper &macHelper, NodeContainer c) const
    +- NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phyHelper, NodeContainer c) const
    ++ NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phyHelper, const WifiMacHelper &macHelper, NodeContainer c) const
     
    -- NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phy, Ptr<Node> node) const
    -+ NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phy, const WifiMacHelper &mac, Ptr<Node> node) const
    +- NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phy, Ptr<Node> node) const
    ++ NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phy, const WifiMacHelper &mac, Ptr<Node> node) const
     
    -- NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phy, std::string nodeName) const
    -+ NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phy, const WifiMacHelper &mac, std::string nodeName) const
    +- NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phy, std::string nodeName) const
    ++ NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phy, const WifiMacHelper &mac, std::string nodeName) const
       
    See src/helper/nqos-wifi-mac-helper.h and src/helper/qos-wifi-mac-helper.h for more details.

    @@ -334,7 +384,7 @@ the regression tests.

    New API: