From ad3b6a04ccdfd0999a8de4022d3f193ff84790bd Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Mon, 13 Aug 2007 20:53:29 -0700 Subject: [PATCH 1/9] Doxygen cleanup --- src/devices/csma/csma-ipv4-topology.h | 2 +- src/devices/csma/csma-net-device.h | 15 +++++++++++++++ .../point-to-point/point-to-point-net-device.h | 1 - src/node/socket.h | 2 -- .../global-routing/global-router-interface.h | 2 +- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/devices/csma/csma-ipv4-topology.h b/src/devices/csma/csma-ipv4-topology.h index 37f546118..86be99d7a 100644 --- a/src/devices/csma/csma-ipv4-topology.h +++ b/src/devices/csma/csma-ipv4-topology.h @@ -97,7 +97,7 @@ public: * \param n1 Node * \param ndNum NetDevice number with which to associate address * \param addr1 Ipv4 Address for ndNum of n1 - * \param network network mask for ndNum of node n1 + * \param netmask1 network mask for ndNum of node n1 * * Add an Ipv4Address to the Ipv4 interface associated with the * ndNum CsmaIpv4NetDevices on the provided diff --git a/src/devices/csma/csma-net-device.h b/src/devices/csma/csma-net-device.h index 62e07f6fc..441ea04cd 100644 --- a/src/devices/csma/csma-net-device.h +++ b/src/devices/csma/csma-net-device.h @@ -99,8 +99,23 @@ enum CsmaEncapsulationMode { * * \param node the Node to which this device is connected. * \param addr The source MAC address of the net device. + * \param pktType the type of encapsulation */ CsmaNetDevice (Ptr node, Eui48Address addr, CsmaEncapsulationMode pktType); + + /** + * Construct a CsmaNetDevice + * + * This is the constructor for the CsmaNetDevice. It takes as a + * parameter the Node to which this device is connected. Ownership of the + * Node pointer is not implied and the node must not be deleted. + * + * \param node the Node to which this device is connected. + * \param addr The source MAC address of the net device. + * \param pktType the type of encapsulation + * \param sendEnable whether this device is able to send + * \param receiveEnable whether this device is able to receive + */ CsmaNetDevice (Ptr node, Eui48Address addr, CsmaEncapsulationMode pktType, bool sendEnable, bool receiveEnable); diff --git a/src/devices/point-to-point/point-to-point-net-device.h b/src/devices/point-to-point/point-to-point-net-device.h index 6112c7e19..d8d8d3242 100644 --- a/src/devices/point-to-point/point-to-point-net-device.h +++ b/src/devices/point-to-point/point-to-point-net-device.h @@ -175,7 +175,6 @@ protected: virtual Ptr DoGetChannel(void) const; /** * Set a new default data rate - * @param Data rate to set for new default */ static void SetDefaultRate(const DataRate&); diff --git a/src/node/socket.h b/src/node/socket.h index e3365fcd8..c717ec0a5 100644 --- a/src/node/socket.h +++ b/src/node/socket.h @@ -170,7 +170,6 @@ public: /** * \brief Send data (or dummy data) to the remote host * \param p packet to send - * \param dataSent Data sent callback. * \returns -1 in case of error or the number of bytes copied in the * internal buffer and accepted for transmission. */ @@ -180,7 +179,6 @@ public: * \brief Send data to a specified peer. * \param address IP Address of remote host * \param p packet to send - * \param dataSent Data sent callback. * \returns -1 in case of error or the number of bytes copied in the * internal buffer and accepted for transmission. */ diff --git a/src/routing/global-routing/global-router-interface.h b/src/routing/global-routing/global-router-interface.h index 66f0c7543..b6558eb20 100644 --- a/src/routing/global-routing/global-router-interface.h +++ b/src/routing/global-routing/global-router-interface.h @@ -431,7 +431,7 @@ public: /** * @brief Add an attached router to the list in the NetworkLSA * - * @param address The Ipv4Address of the interface on the network link + * @param addr The Ipv4Address of the interface on the network link * @returns The number of addresses in the list. */ uint32_t AddAttachedRouter (Ipv4Address addr); From ad457017909f52aec9643e2901cdc3abc09bee32 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Mon, 13 Aug 2007 22:53:20 -0700 Subject: [PATCH 2/9] restore ns-2 .tr format --- src/internet-node/ascii-trace.cc | 39 ++++++++++++++++++++++++++++---- src/internet-node/ascii-trace.h | 4 +++- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/src/internet-node/ascii-trace.cc b/src/internet-node/ascii-trace.cc index cb48f06fc..0331bb5fd 100644 --- a/src/internet-node/ascii-trace.cc +++ b/src/internet-node/ascii-trace.cc @@ -25,6 +25,7 @@ #include "ns3/simulator.h" #include "ns3/node.h" #include "ns3/packet.h" +#include "ns3/queue.h" namespace ns3 { @@ -40,8 +41,12 @@ void AsciiTrace::TraceAllQueues (void) { Packet::EnableMetadata (); - TraceRoot::Connect ("/nodes/*/devices/*/queue/*", - MakeCallback (&AsciiTrace::LogDevQueue, this)); + TraceRoot::Connect ("/nodes/*/devices/*/queue/enqueue", + MakeCallback (&AsciiTrace::LogDevQueueEnqueue, this)); + TraceRoot::Connect ("/nodes/*/devices/*/queue/dequeue", + MakeCallback (&AsciiTrace::LogDevQueueDequeue, this)); + TraceRoot::Connect ("/nodes/*/devices/*/queue/drop", + MakeCallback (&AsciiTrace::LogDevQueueDrop, this)); } void AsciiTrace::TraceAllNetDeviceRx (void) @@ -52,8 +57,34 @@ AsciiTrace::TraceAllNetDeviceRx (void) } void -AsciiTrace::LogDevQueue (TraceContext const &context, Packet const &packet) +AsciiTrace::LogDevQueueEnqueue (TraceContext const &context, + Packet const &packet) { + m_os << "+ "; + m_os << Simulator::Now ().GetSeconds () << " "; + context.Print (m_os); + m_os << " pkt-uid=" << packet.GetUid () << " "; + packet.Print (m_os); + m_os << std::endl; +} + +void +AsciiTrace::LogDevQueueDequeue (TraceContext const &context, + Packet const &packet) +{ + m_os << "- "; + m_os << Simulator::Now ().GetSeconds () << " "; + context.Print (m_os); + m_os << " pkt-uid=" << packet.GetUid () << " "; + packet.Print (m_os); + m_os << std::endl; +} + +void +AsciiTrace::LogDevQueueDrop (TraceContext const &context, + Packet const &packet) +{ + m_os << "d "; m_os << Simulator::Now ().GetSeconds () << " "; context.Print (m_os); m_os << " pkt-uid=" << packet.GetUid () << " "; @@ -63,7 +94,7 @@ AsciiTrace::LogDevQueue (TraceContext const &context, Packet const &packet) void AsciiTrace::LogDevRx (TraceContext const &context, Packet &p) { - m_os << Simulator::Now ().GetSeconds () << " "; + m_os << "r " << Simulator::Now ().GetSeconds () << " "; context.Print (m_os); m_os << " pkt-uid=" << p.GetUid () << " "; p.Print (m_os); diff --git a/src/internet-node/ascii-trace.h b/src/internet-node/ascii-trace.h index 56b4195cb..e219afc41 100644 --- a/src/internet-node/ascii-trace.h +++ b/src/internet-node/ascii-trace.h @@ -37,7 +37,9 @@ public: void TraceAllQueues (void); void TraceAllNetDeviceRx (void); private: - void LogDevQueue (TraceContext const &context, const Packet &p); + void LogDevQueueEnqueue (TraceContext const &context, const Packet &p); + void LogDevQueueDequeue (TraceContext const &context, const Packet &p); + void LogDevQueueDrop (TraceContext const &context, const Packet &p); void LogDevRx (TraceContext const &context, Packet &p); std::ofstream m_os; }; From 6c2a73ebda2b7d453e01d571e4621b501867ed67 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Mon, 13 Aug 2007 23:06:25 -0700 Subject: [PATCH 3/9] cleanup valgrind errors --- src/routing/global-routing/global-route-manager-impl.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routing/global-routing/global-route-manager-impl.cc b/src/routing/global-routing/global-route-manager-impl.cc index 217513df8..9ede0a134 100644 --- a/src/routing/global-routing/global-route-manager-impl.cc +++ b/src/routing/global-routing/global-route-manager-impl.cc @@ -1586,6 +1586,7 @@ GlobalRouteManagerImplTest::RunTests (void) 1); GlobalRoutingLSA* lsa0 = new GlobalRoutingLSA (); + lsa0->SetLSType (GlobalRoutingLSA::RouterLSA); lsa0->SetLinkStateId ("0.0.0.0"); lsa0->SetAdvertisingRouter ("0.0.0.0"); lsa0->AddLinkRecord (lr0); @@ -1605,6 +1606,7 @@ GlobalRouteManagerImplTest::RunTests (void) 1); GlobalRoutingLSA* lsa1 = new GlobalRoutingLSA (); + lsa1->SetLSType (GlobalRoutingLSA::RouterLSA); lsa1->SetLinkStateId ("0.0.0.1"); lsa1->SetAdvertisingRouter ("0.0.0.1"); lsa1->AddLinkRecord (lr2); @@ -1648,6 +1650,7 @@ GlobalRouteManagerImplTest::RunTests (void) 1); GlobalRoutingLSA* lsa2 = new GlobalRoutingLSA (); + lsa2->SetLSType (GlobalRoutingLSA::RouterLSA); lsa2->SetLinkStateId ("0.0.0.2"); lsa2->SetAdvertisingRouter ("0.0.0.2"); lsa2->AddLinkRecord (lr4); @@ -1671,6 +1674,7 @@ GlobalRouteManagerImplTest::RunTests (void) 1); GlobalRoutingLSA* lsa3 = new GlobalRoutingLSA (); + lsa3->SetLSType (GlobalRoutingLSA::RouterLSA); lsa3->SetLinkStateId ("0.0.0.3"); lsa3->SetAdvertisingRouter ("0.0.0.3"); lsa3->AddLinkRecord (lr10); From 9d2617d9a00b88b6466c5efd5003f4719c9c1e1d Mon Sep 17 00:00:00 2001 From: Craig Dowell Date: Tue, 14 Aug 2007 12:00:03 -0700 Subject: [PATCH 4/9] Fix bug 68. Implement IsMulticast --- src/node/ipv4-address.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/node/ipv4-address.cc b/src/node/ipv4-address.cc index 34b15372d..4e1e344c5 100644 --- a/src/node/ipv4-address.cc +++ b/src/node/ipv4-address.cc @@ -171,8 +171,11 @@ Ipv4Address::IsBroadcast (void) const bool Ipv4Address::IsMulticast (void) const { - // XXX - return false; +// +// Multicast addresses are defined as ranging from 224.0.0.0 through +// 239.255.255.255 (which is E0000000 through EFFFFFFF in hex). +// + return (m_address >= 0xe0000000 && m_address <= 0xefffffff); } uint32_t From 8d5ddc0ddfd8fc9b8211f4cb04f704f65774db84 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Wed, 15 Aug 2007 22:48:40 -0700 Subject: [PATCH 5/9] Release notes updated --- RELEASE_NOTES | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 9b3b40b1b..85a5f2d6e 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -3,12 +3,16 @@ This file contains ns-3 release notes (most recent releases first). -Release 3.0.5 (2007/08/XX) +Release 3.0.5 (2007/08/15) ======================== - - Add CSMA/CD model (Emmanuelle Laprise) - - Modularize ipv4 routing support (Gustavo Carneiro) - - Add mobility framework and basic mobility models + - Refactoring to support win32-based unix environments (Cygwin, mingw) + - "Packet socket" for allowing applications to access NetDevices directly + - Generalized, polymorphic Address class + - Add CSMA NetDevice model (from Emmanuelle Laprise) + - Modularize IPv4 routing support (from Gustavo Carneiro) + - Add mobility framework and basic mobility models + - Global unicast centralized routing Release 3.0.4 (2007/07/15) ======================== From 89758558cfb3649338ff448fed2cca5cd61230e7 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Wed, 15 Aug 2007 22:49:06 -0700 Subject: [PATCH 6/9] bump version number --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b0f2dcb32..eca690e73 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.4 +3.0.5 From 365e662472d04ca9f30d6ab3d99ae7091ec6624e Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Wed, 15 Aug 2007 22:50:31 -0700 Subject: [PATCH 7/9] update release_steps.txt --- doc/release_steps.txt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/doc/release_steps.txt b/doc/release_steps.txt index 689013ce6..5fe843d77 100644 --- a/doc/release_steps.txt +++ b/doc/release_steps.txt @@ -5,23 +5,20 @@ Steps in doing an ns-3 release - revise and check in RELEASE_NOTES - update and check in VERSION to the latest release number 2. make a new "architecture.pdf" document and place it in the doc/ directory -3. add current version of waf script from subversion: - - svn checkout http://waf.googlecode.com/svn/tags/ns3/ waf - - build waf script and put it into top of ns-3-dev -4. cd ns-3-dev; ./waf configure; ./waf dist -5. test tarball on release platforms (run-tests and simple-p2p) -6. tag ns-3-dev with "release ns-3.0.X" +3. cd ns-3-dev; ./waf configure; ./waf dist +4. test tarball on release platforms (waf check and maybe some other scripts) +5. tag ns-3-dev with "release ns-3.0.X" - hg tag "release ns-3.0.x" - hg push -7. clone the tagged ns-3-dev and place it on the repository +6. clone the tagged ns-3-dev and place it on the repository - ssh code.nsnam.org; sudo; su code; - cp -r /home/code/repos/ns-3-dev /home/code/repos/ns-3.0.x - cd /home/code/repos/ns-3.0.x/.hg and edit the hgrc appropriately -8. upload "ns-3.0.x.tar.bz2" to the releases/ directory on the server -9. update web page +7. upload "ns-3.0.x.tar.bz2" to the releases/ directory on the server +8. update web page - add link to news.html - update download.html - update roadmap.html - build and update Doxygen directory on the server - update and upload software architecture document (PDF, HTML) -10. announce to ns-developers, with summary of release notes +9. announce to ns-developers, with summary of release notes From 52de20c3b639e3ce782b4344f51b76b7203c9504 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Wed, 15 Aug 2007 23:03:06 -0700 Subject: [PATCH 8/9] Add Emmanuelle to authors list --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index f36dad9ce..1cb4b0af7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,4 +3,5 @@ Gustavo Carneiro (gjc@inescporto.pt, gjcarneiro@gmail.com) Craig Dowell (craigdo@ee.washington.edu) Tom Henderson (tomhend@u.washington.edu) Mathieu Lacage (mathieu.lacage@sophia.inria.fr) +Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca) George F. Riley (riley@ece.gatech.edu) From bea15392ec3216b26487029825100c6782b85099 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Wed, 15 Aug 2007 23:31:51 -0700 Subject: [PATCH 9/9] Added tag release ns-3.0.5 for changeset 08046b6aef37 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index bff7cf994..aac74dfcf 100644 --- a/.hgtags +++ b/.hgtags @@ -3,3 +3,4 @@ 0dc81e76166c56aaae64da48b673b62155943aad packet-history-working 38099dd26e9467b8f49f8632f22789858149a6e7 release ns-3.0.3 5701e60bf01a8ac1308945e69001e0cc07948faf release ns-3.0.4 +08046b6aef37932507696a2f2f427b42d693781e release ns-3.0.5