diff --git a/CHANGES.html b/CHANGES.html index 62da83d7a..43ab5de41 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -81,7 +81,7 @@ fragmentation and reassembly.
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 ().
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 (PtrThe above mentioned callbacks are expected to be used to call the following method to write Wifi PCAP traces in promiscuous mode: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;
-+ void WriteWifiMonitorPacket(PtrIn 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 +181,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.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);
-- 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 +242,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 +269,13 @@ proposed IPv4 routing refactoring)
- 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);
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) constSee src/helper/nqos-wifi-mac-helper.h and src/helper/qos-wifi-mac-helper.h for more details. @@ -334,7 +334,7 @@ the regression tests.
-Callbackto:,Ptr ,uint16_t,const Address &> -Callback , Ptr , uint16_t, - const Address &, const Address &, enum PacketType > +Callback<bool,Ptr<NetDevice>,Ptr<Packet>,uint16_t,const Address &> +Callback<bool,Ptr<NetDevice>, Ptr<Packet>, uint16_t, + const Address &, const Address &, enum PacketType >
-Callbackto avoid the kind of bugs reported in bug 273. @@ -648,7 +648,7 @@ public: - void SetPort (uint16_t port); + UdpEchoServerHelper (uint16_t port); + -+ void SetAttribute (std::string name, const AttributeValue &value); ++ void SetAttribute (std::string name, const AttributeValue &value); ApplicationContainer Install (NodeContainer c); class UdpEchoClientHelper @@ -657,8 +657,8 @@ public: - UdpEchoClientHelper (); + UdpEchoClientHelper (Ipv4Address ip, uint16_t port); - void SetRemote (Ipv4Address ip, uint16_t port); -- void SetAppAttribute (std::string name, const AttributeValue &value); -+ void SetAttribute (std::string name, const AttributeValue &value); +- void SetAppAttribute (std::string name, const AttributeValue &value); ++ void SetAttribute (std::string name, const AttributeValue &value); ApplicationContainer Install (NodeContainer c);,Ptr ,uint16_t,const Address &> -Callback , Ptr , uint16_t, - const Address &, const Address &, enum PacketType > +Callback<bool,Ptr<NetDevice>,Ptr<const Packet>,uint16_t,const Address &> +Callback<bool,Ptr<NetDevice>, Ptr<const Packet>, uint16_t, + const Address &, const Address &, enum PacketType >