From 46a5e35038472a153897202a5640aaf96953ec9d Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Thu, 2 Jul 2009 22:10:38 -0700 Subject: [PATCH 01/14] fix internet-stack figures --- doc/manual/figures/internet-node-recv.dia | Bin 3427 -> 3597 bytes doc/manual/figures/internet-node-send.dia | Bin 3352 -> 3206 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/doc/manual/figures/internet-node-recv.dia b/doc/manual/figures/internet-node-recv.dia index 9343476177461ffab68b06c5faf4057e79638d25..5f9bdfc2f3e0760804ab5829a481e38718448a16 100644 GIT binary patch literal 3597 zcmV+o4)XCIiwFP!000001MOXHbK5o&{;praac6Gq83iT)f&}e4H@(aCnwdP^5;W?YJNAx8E*ES#OjriG&h0aFfQOKszT^evz^YeB8DX8 z(`+NjmVEI4OKIv<1tdzxZ-4m7`=KgQ{a}$-Q$e?al+!35$LS^xv`tbq1S66$28|&? z8M=WN(0QBe4>ve2Tyk8v{J3y&aXZWMGLPbN6LOGciHgz+wao9;;W))GN+Jurn5Lb&gKNfFYK3g@Uo|Z2>it_~Qw2Cf=Z*764s+q3S&T2w zl@Cxo;?d37f85npTCW%62?V&&OtWkuOO%8G5BpRQSFYE8lRdV93!`tW`b#Uy*YZBV*j z*C_UGtD<~L)H;Al@26Gn-Ug>N&Tf0PUlPx5Cs`ifFYqAK!fd7X4U8rD|YM+Ll2%3Hl!Kg+cPrv9q1~5H<6xCyg>AQ zLfZkY+Cw{z+CzY%Bp#YID-XMX?4&)wL_CV}5gKARo;NiJ)>eb? zh+LJu&J_qmfN57;OF{ukeEXdD(`=SNAD7V5mi|oB--ZDG70AyuKz{Ab4c^||@R{g` z#N|c}4gvF_B%uV8g8?3;#Fu8xj&{|uhKDsgtl?n|kJB?e`qU+!w1$T@JoYs_y!M6% zg=rq-PjI8g2cm?iOh^(i4S1-7AU&AL8Vg~HJkK}5fuk+6#?(yn6G7O}R7wMDEga(cE1(4I#mx5kJyM)oyE{PxBO z4=VYSMvaj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y#iqaYhO%=h_?>)M|0`gk1HIc(MNZOi%;BB{O$S=h_ zQkAjFtyG2RHS)k4$9F#$*%UraWi`p760^koYC#u}CVH4opVh}p>mJfB-BhD?TZVyQD$A3Mfu;vX(V&N6krh;l3FKBvT;1J?m_iW?|$pS&tk}5 zBGZtwYM$@pYl;dbpJtD;Zcg}>HGwJwouCs!cG>5$_mHdaa#_5&PqHWM@@QeeGQ$c~ ze450g2^KL+B{s}7gMzNqYh80?udLv!2!m>&c{dKGwk}YmFOUEXs4PZS7)8ZEz00$r z8uTJrR?S287N1^X8&(TjDOd7csadNwLMSD)ea~$ge{qH2N=3Y%)x*FVP2}iv+589N z&P9B`T&Y^)t{5_Sr%`5^#}MH7vc16@BatF@4Z&U F004S#f~Nog diff --git a/doc/manual/figures/internet-node-send.dia b/doc/manual/figures/internet-node-send.dia index 602a4bf31b71b110e796f3c156eff33174c391cd..3ab41e6547314435cb9a23783eae6a9fbef35d36 100644 GIT binary patch literal 3206 zcmV;140-b(iwFP!000001MOYkbK5o&e%D`tQD4#-l_mj#KkO!*+~qp;OzxVwB+njL zf+b!kl1D;z)Q9`qZx^I2OQLK^6x1k%XVNJt5FZxUUF^pNz@LBlI!(#FEUP5XUiUr6 z?Gu>|^HGwGU-v(M`t_%%|I3@+&!a?K!oP7TrUahID!h8#pD0yaUR*ppJUHpR5-Km9 zG?_V-y!f9;Q*i->F8XhJggmWaB$U8=&0V2XncU8lB$=4X*Zo^D{4y@{SvKm|rJ8cX zJk3jTFVffjAMW&D|DvhpVx^vE>Mq1s-j-5)*CqWScn9H)-7w)QKpi&>1|AVmI_d zZ_y|F!`+@1E@PzO2so0_>;CWVYTv9& z12uu$+vuDkf7Br6gah9R_`1NG?qXa0x3}xnm(Y5VjZ?XR2smO~#SR;U4m%7=rgC~S z%*$*u7&w|Z8bdpcO_3H3gFD=hpZrB}2ds%q#uK$2j5<7C`3nvMgDFYAB$(@X?&_b{ z0Sv8wwlPxcA*1Ua26309=?)O90q=eg)g*toX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(ua`}G*?>FVMi%+lU(vq5- zU}SRo5o-RwT=fTj|`dN(IxqKRSn&)?wGcO=kO8IE|?Zb_;UR+53D-&>F z)%WG%OdeQY0q2ak1eG2HBjMj-Igf+-qRDpz%K_$@ydn@u)x0S3QdGT*vKYVxdJdOJ zkI!mY2O6xR=?MWNS#9LAfmHGv@eQy?40Co9Ll})x2;ZTjIpIMLrbtG0D6e(hgLnWo z5%rhU<(GrjS713=@~i*2`0K*|oa9#aq=v1n0V$7oo^`s From f1d5f90af775142356a42907ec0c8dd8f5ce82b4 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Fri, 3 Jul 2009 09:08:01 +0200 Subject: [PATCH 02/14] tweak doxygen --- src/helper/ipv4-list-routing-helper.h | 3 +++ src/helper/ipv4-routing-helper.h | 2 +- src/helper/ipv4-static-routing-helper.h | 3 +++ src/helper/nqos-wifi-mac-helper.h | 4 ++++ src/helper/olsr-helper.h | 3 +++ src/helper/qos-wifi-mac-helper.h | 4 ++++ 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/helper/ipv4-list-routing-helper.h b/src/helper/ipv4-list-routing-helper.h index 5849c6840..ef34068c7 100644 --- a/src/helper/ipv4-list-routing-helper.h +++ b/src/helper/ipv4-list-routing-helper.h @@ -28,6 +28,9 @@ namespace ns3 { /** * \brief Helper class that adds ns3::Ipv4ListRouting objects + * + * This class is expected to be used in conjunction with + * ns3::InternetStackHelper::SetRoutingHelper */ class Ipv4ListRoutingHelper : public Ipv4RoutingHelper { diff --git a/src/helper/ipv4-routing-helper.h b/src/helper/ipv4-routing-helper.h index 170052a6e..9c8a28233 100644 --- a/src/helper/ipv4-routing-helper.h +++ b/src/helper/ipv4-routing-helper.h @@ -33,7 +33,7 @@ class Node; * For each new routing protocol created as a subclass of * ns3::Ipv4RoutingProtocol, you need to create a subclass of * ns3::Ipv4RoutingHelper which can be used by - * ns3::InternetStackHelper::SetRoutingProtocol and + * ns3::InternetStackHelper::SetRoutingHelper and * ns3::InternetStackHelper::Install. */ class Ipv4RoutingHelper diff --git a/src/helper/ipv4-static-routing-helper.h b/src/helper/ipv4-static-routing-helper.h index 24a885e31..2092900e4 100644 --- a/src/helper/ipv4-static-routing-helper.h +++ b/src/helper/ipv4-static-routing-helper.h @@ -33,6 +33,9 @@ namespace ns3 { /** * \brief Helper class that adds ns3::Ipv4StaticRouting objects + * + * This class is expected to be used in conjunction with + * ns3::InternetStackHelper::SetRoutingHelper */ class Ipv4StaticRoutingHelper : public Ipv4RoutingHelper { diff --git a/src/helper/nqos-wifi-mac-helper.h b/src/helper/nqos-wifi-mac-helper.h index 9800b6082..ae67b1922 100644 --- a/src/helper/nqos-wifi-mac-helper.h +++ b/src/helper/nqos-wifi-mac-helper.h @@ -24,6 +24,10 @@ namespace ns3 { +/** + * \brief create non-qos MAC layers for a ns3::WifiNetDevice. + * This class can create MACs of type ns3::NqapWifiMac, ns3::NqstaWifiMac, and, ns3::AdhocWifiMac + */ class NqosWifiMacHelper : public WifiMacHelper { public: diff --git a/src/helper/olsr-helper.h b/src/helper/olsr-helper.h index 0856abf97..7a40044d7 100644 --- a/src/helper/olsr-helper.h +++ b/src/helper/olsr-helper.h @@ -29,6 +29,9 @@ namespace ns3 { /** * \brief Helper class that adds OLSR routing to nodes. + * + * This class is expected to be used in conjunction with + * ns3::InternetStackHelper::SetRoutingHelper */ class OlsrHelper : public Ipv4RoutingHelper { diff --git a/src/helper/qos-wifi-mac-helper.h b/src/helper/qos-wifi-mac-helper.h index ea2c6fdcc..32537283a 100644 --- a/src/helper/qos-wifi-mac-helper.h +++ b/src/helper/qos-wifi-mac-helper.h @@ -27,6 +27,10 @@ namespace ns3 { +/** + * \brief create qos MAC layers for a ns3::WifiNetDevice. + * This class can create MACs of type ns3::QapWifiMac, ns3::QstaWifiMac, and, ns3::QadhocWifiMac + */ class QosWifiMacHelper : public WifiMacHelper { public: From 4884b6da1f8dbd55063d827ae2de60a60e1d2dba Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Fri, 3 Jul 2009 11:17:38 +0100 Subject: [PATCH 03/14] =?UTF-8?q?Fix=20the=20virtual-net-device.cc=20examp?= =?UTF-8?q?le;=20thanks=20Antti=20M=C3=A4kel=C3=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/virtual-net-device.cc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/examples/virtual-net-device.cc b/examples/virtual-net-device.cc index aa65a13bf..cde18bc7e 100644 --- a/examples/virtual-net-device.cc +++ b/examples/virtual-net-device.cc @@ -78,23 +78,29 @@ class Tunnel bool - N0N1VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) + N0VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) { - m_n3Socket->SendTo (packet, 0, InetSocketAddress (m_n3Address, 667)); + m_n0Socket->SendTo (packet, 0, InetSocketAddress (m_n3Address, 667)); + return true; + } + + bool + N1VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) + { + m_n1Socket->SendTo (packet, 0, InetSocketAddress (m_n3Address, 667)); return true; } bool N3VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) { - if (m_rng.GetValue () < 0.25) { - m_n0Socket->SendTo (packet, 0, InetSocketAddress (m_n0Address, 667)); + m_n3Socket->SendTo (packet, 0, InetSocketAddress (m_n0Address, 667)); } else { - m_n1Socket->SendTo (packet, 0, InetSocketAddress (m_n1Address, 667)); + m_n3Socket->SendTo (packet, 0, InetSocketAddress (m_n1Address, 667)); } return true; } @@ -144,7 +150,7 @@ public: // n0 tap device m_n0Tap = CreateObject (); m_n0Tap->SetAddress (Mac48Address ("11:00:01:02:03:01")); - m_n0Tap->SetSendCallback (MakeCallback (&Tunnel::N0N1VirtualSend, this)); + m_n0Tap->SetSendCallback (MakeCallback (&Tunnel::N0VirtualSend, this)); n0->AddDevice (m_n0Tap); Ptr ipv4 = n0->GetObject (); uint32_t i = ipv4->AddInterface (m_n0Tap); @@ -154,7 +160,7 @@ public: // n1 tap device m_n1Tap = CreateObject (); m_n1Tap->SetAddress (Mac48Address ("11:00:01:02:03:02")); - m_n1Tap->SetSendCallback (MakeCallback (&Tunnel::N0N1VirtualSend, this)); + m_n1Tap->SetSendCallback (MakeCallback (&Tunnel::N1VirtualSend, this)); n1->AddDevice (m_n1Tap); ipv4 = n1->GetObject (); i = ipv4->AddInterface (m_n1Tap); From 41a77b945e0b4cfa615346a85b2dc5cf2c268b60 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Fri, 3 Jul 2009 14:12:28 +0100 Subject: [PATCH 04/14] Add doxygen for BridgeHelper --- src/helper/bridge-helper.h | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/helper/bridge-helper.h b/src/helper/bridge-helper.h index 8a4bbb859..8ebc8f65a 100644 --- a/src/helper/bridge-helper.h +++ b/src/helper/bridge-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + * Author: Gustavo Carneiro + */ #ifndef BRIDGE_HELPER_H #define BRIDGE_HELPER_H @@ -10,12 +30,42 @@ namespace ns3 { class Node; class AttributeValue; +/** + * \brief Add capability to bridge multiple LAN segments (IEEE 802.1D bridging) + */ class BridgeHelper { public: BridgeHelper (); + /** + * \param n1 the name of the attribute to set + * \param v1 the value of the attribute to set + * + * Set an attribute on each ns3::BridgeNetDevice created by + * BridgeHelper::Install + */ void SetDeviceAttribute (std::string n1, const AttributeValue &v1); + /** + * This method creates an ns3::BridgeNetDevice with the attributes + * configured by BridgeHelper::SetDeviceAttribute, adds the device + * to the node, and attaches the given NetDevices as ports of the + * bridge. + * + * \param node The node to install the device in + * \param c Container of NetDevices to add as bridge ports + * \returns A containter holding the added net device. + */ NetDeviceContainer Install (Ptr node, NetDeviceContainer c); + /** + * This method creates an ns3::BridgeNetDevice with the attributes + * configured by BridgeHelper::SetDeviceAttribute, adds the device + * to the node, and attaches the given NetDevices as ports of the + * bridge. + * + * \param nodeName The name of the node to install the device in + * \param c Container of NetDevices to add as bridge ports + * \returns A containter holding the added net device. + */ NetDeviceContainer Install (std::string nodeName, NetDeviceContainer c); private: ObjectFactory m_deviceFactory; From 1d0f46f3a373379bbcebb37ba28f0e54576421d7 Mon Sep 17 00:00:00 2001 From: Craig Dowell Date: Fri, 3 Jul 2009 08:26:52 -0700 Subject: [PATCH 05/14] updates to manual for 3.5 --- doc/manual/attributes.texi | 115 ++++++++++++++++++++++++++++++------- 1 file changed, 94 insertions(+), 21 deletions(-) diff --git a/doc/manual/attributes.texi b/doc/manual/attributes.texi index db7dcb61b..91a7340bd 100644 --- a/doc/manual/attributes.texi +++ b/doc/manual/attributes.texi @@ -114,6 +114,7 @@ example: @code{class ns3::Node}. The public header file node.h has a declaration that includes a static GetTypeId function call: + @verbatim class Node : public Object { @@ -123,21 +124,72 @@ public: @end verbatim This is defined in the node.cc file as follows: + @verbatim TypeId Node::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Node") .SetParent () + .AddConstructor () + .AddAttribute ("DeviceList", "The list of devices associated to this Node.", + ObjectVectorValue (), + MakeObjectVectorAccessor (&Node::m_devices), + MakeObjectVectorChecker ()) + .AddAttribute ("ApplicationList", "The list of applications associated to this Node.", + ObjectVectorValue (), + MakeObjectVectorAccessor (&Node::m_applications), + MakeObjectVectorChecker ()) + .AddAttribute ("Id", "The id (unique integer) of this Node.", + TypeId::ATTR_GET, // allow only getting it. + UintegerValue (0), + MakeUintegerAccessor (&Node::m_id), + MakeUintegerChecker ()) ; return tid; } @end verbatim -Finally, when users want to create Nodes, they call: + +Look at the TypeId of an ns-3 @code{Object} class as an extended form of run +time type information (RTTI). The C++ language includes simple kind of RTTI +in order to support @code{dynamic_cast} and @code{typeid} operators. + +The ``@code{.SetParent ()}'' call in the declaration above is used in +conjunction with our object aggregation mechanisms to allow safe up- and +down-casing in inheritance trees during @code{GetObject}. + +The ``@code{.AddConstructor ()}'' call is used in conjunction with our +abstract object factory mechanisms to allow us to construct C++ objects without +forcing a user to know the concrete class of the object she is building. + +The three calls to ``@code{.AddAttribute}'' associate a given string with a +strongly typed value in the class. Notice that you must provide a help string +which may be displayed, for example, via command line processors. Each +@code{Attribute} is associated with mechanisms for accessing the underlying +member variable in the object (for example, @code{MakeUintegerAccessor} tells +the generic @code{Attribute} code how to get to the node ID above). There are +also ``Checker'' methods which are used to validate values. + +When users want to create Nodes, they will usually call some form of +@code{CreateObject}, + @verbatim Ptr n = CreateObject (); @end verbatim +or more abstractly, using an object factory, you can create a @code{Node} object +without even knowing the concrete C++ type + +@verbatim + ObjectFactory factory; + const std::string typeId = "ns3::Node''; + factory.SetTypeId(typeId); + Ptr node = factory.Create (); +@end verbatim + +Both of these methods result in fully initialized attributes being available +in the resulting @code{Object} instances. + We next discuss how attributes (values associated with member variables or functions of the class) are plumbed into the above TypeId. @@ -206,6 +258,7 @@ and some type of global default value. In the ns-3 attribute system, these value definitions and accessor functions are moved into the TypeId class; e.g.: + @verbatim NS_OBJECT_ENSURE_REGISTERED (DropTailQueue); @@ -358,11 +411,11 @@ Now, let's set it to another value (60 packets) @subsubsection Namespace-based access -An alternative way to get at the attribute is to use the configuration -namespace. Here, this attribute resides on a known path in this -namespace; this approach is useful if one doesn't have access to -the underlying pointers and would like to configure a specific -attribute with a single statement. +An alternative way to get at the attribute is to use the configuration namespace. +Here, this attribute resides on a known path in this namespace; this approach +is useful if one doesn't have access to the underlying pointers and would like +to configure a specific attribute with a single statement. + @verbatim Config::Set ("/NodeList/0/DeviceList/0/TxQueue/MaxPackets", UintegerValue (25)); txQueue->GetAttribute ("MaxPackets", limit); @@ -370,9 +423,8 @@ attribute with a single statement. limit.Get () << " packets"); @end verbatim -We could have also used wildcards to set this value for all nodes -and all net devices (which in this simple example has the same -effect as the previous Set()) +We could have also used wildcards to set this value for all nodes and all net +devices (which in this simple example has the same effect as the previous Set()) @verbatim Config::Set ("/NodeList/*/DeviceList/*/TxQueue/MaxPackets", UintegerValue (15)); txQueue->GetAttribute ("MaxPackets", limit); @@ -380,6 +432,22 @@ effect as the previous Set()) limit.Get () << " packets"); @end verbatim +@subsubsection Object Name Service-based access + +Another way to get at the attribute is to use the object name service facility. +Here, this attribute is found using a name string. This approach is useful if +one doesn't have access to the underlying pointers and it is difficult to +determine the required concrete configuration namespaced path. + +@verbatim + Names::Add ("server", serverNode); + Names::Add ("server/eth0", serverDevice); + + ... + + Config::Set ("/Names/server/eth0/TxQueue/MaxPackets", UintegerValue (25)); +@end verbatim + @subsection Setting through constructors helper classes Arbitrary combinations of attributes can be set and fetched from @@ -438,13 +506,13 @@ Consider this variable in class TcpSocket: Suppose that someone working with Tcp wanted to get or set the value of that variable using the metadata system. If it were not already provided by ns-3, the user could declare the following addition -in the metadata system (to the TypeId declaration for TcpSocket): +in the runtime metadata system (to the TypeId declaration for TcpSocket): @verbatim - .AddParameter ("Congestion window", + .AddAttribute ("Congestion window", "Tcp congestion window (bytes)", - Uinteger (1), + UintegerValue (1), MakeUintegerAccessor (&TcpSocket::m_cWnd), - MakeUintegerChecker ()); + MakeUintegerChecker ()) @end verbatim @@ -511,21 +579,26 @@ wants to hook it in to the attribute system, there is mainly the matter of writing the conversions to/from strings and attribute values. Most of this can be copy/pasted with macro-ized code. For instance, consider class -Rectangle in the @code{src/mobility/} directory: +delcaration for Rectangle in the @code{src/mobility/} directory: -One line is added to the class declaration: @verbatim /** * \brief a 2d rectangle */ class Rectangle { -... + ... + double xMin; + double xMax; + double yMin; + double yMax; }; @end verbatim -One macro call and two operators, are added below the class declaration: +One macro call and two operators, must be added below the class declaration +in order to turn a Rectangle into a value usable by the @code{Attribute} +system: @verbatim std::ostream &operator << (std::ostream &os, const Rectangle &rectangle); @@ -534,7 +607,7 @@ std::istream &operator >> (std::istream &is, Rectangle &rectangle); ATTRIBUTE_HELPER_HEADER (Rectangle); @end verbatim -In the class definition, the code looks like this: +In the class definition (@code{.cc} file), the code looks like this: @verbatim ATTRIBUTE_HELPER_CPP (Rectangle); @@ -568,9 +641,9 @@ of an instance of the new class. @node ConfigStore @section ConfigStore -@strong{Feedback requested:} This is an experimental feature of ns-3. -It is not in the main tree. If you like this feature and would like -to provide feedback on it, please email us. +@strong{Feedback requested:} This is an experimental feature of ns-3. It is +found in @code{src/contrib} and not in the main tree. If you like this feature +and would like to provide feedback on it, please email us. Values for ns-3 attributes can be stored in an ascii text file and loaded into a future simulation. This feature is known as the From ebc34d951b64a3176830e7b27ee243e331367e24 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Fri, 3 Jul 2009 11:17:38 +0100 Subject: [PATCH 06/14] =?UTF-8?q?Fix=20the=20virtual-net-device.cc=20examp?= =?UTF-8?q?le;=20thanks=20Antti=20M=C3=A4kel=C3=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/virtual-net-device.cc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/examples/virtual-net-device.cc b/examples/virtual-net-device.cc index aa65a13bf..cde18bc7e 100644 --- a/examples/virtual-net-device.cc +++ b/examples/virtual-net-device.cc @@ -78,23 +78,29 @@ class Tunnel bool - N0N1VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) + N0VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) { - m_n3Socket->SendTo (packet, 0, InetSocketAddress (m_n3Address, 667)); + m_n0Socket->SendTo (packet, 0, InetSocketAddress (m_n3Address, 667)); + return true; + } + + bool + N1VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) + { + m_n1Socket->SendTo (packet, 0, InetSocketAddress (m_n3Address, 667)); return true; } bool N3VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) { - if (m_rng.GetValue () < 0.25) { - m_n0Socket->SendTo (packet, 0, InetSocketAddress (m_n0Address, 667)); + m_n3Socket->SendTo (packet, 0, InetSocketAddress (m_n0Address, 667)); } else { - m_n1Socket->SendTo (packet, 0, InetSocketAddress (m_n1Address, 667)); + m_n3Socket->SendTo (packet, 0, InetSocketAddress (m_n1Address, 667)); } return true; } @@ -144,7 +150,7 @@ public: // n0 tap device m_n0Tap = CreateObject (); m_n0Tap->SetAddress (Mac48Address ("11:00:01:02:03:01")); - m_n0Tap->SetSendCallback (MakeCallback (&Tunnel::N0N1VirtualSend, this)); + m_n0Tap->SetSendCallback (MakeCallback (&Tunnel::N0VirtualSend, this)); n0->AddDevice (m_n0Tap); Ptr ipv4 = n0->GetObject (); uint32_t i = ipv4->AddInterface (m_n0Tap); @@ -154,7 +160,7 @@ public: // n1 tap device m_n1Tap = CreateObject (); m_n1Tap->SetAddress (Mac48Address ("11:00:01:02:03:02")); - m_n1Tap->SetSendCallback (MakeCallback (&Tunnel::N0N1VirtualSend, this)); + m_n1Tap->SetSendCallback (MakeCallback (&Tunnel::N1VirtualSend, this)); n1->AddDevice (m_n1Tap); ipv4 = n1->GetObject (); i = ipv4->AddInterface (m_n1Tap); From 6bdfdc8dc53be254b9ccf99218ad97c0029e3e86 Mon Sep 17 00:00:00 2001 From: Nicola Baldo Date: Fri, 3 Jul 2009 13:43:43 +0200 Subject: [PATCH 07/14] implemented GlobalValue::GetValueByName () --- src/core/global-value.cc | 24 ++++++++++++++++++++++++ src/core/global-value.h | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/src/core/global-value.cc b/src/core/global-value.cc index 70a226e55..506fb11b8 100644 --- a/src/core/global-value.cc +++ b/src/core/global-value.cc @@ -174,6 +174,30 @@ GlobalValue::End (void) { return GetVector ()->end (); } + +bool +GlobalValue::GetValueByNameFailSafe (std::string name, AttributeValue &value) +{ + for (GlobalValue::Iterator gvit = GlobalValue::Begin (); gvit != GlobalValue::End (); ++gvit) + { + if ((*gvit)->GetName () == name) + { + (*gvit)->GetValue (value); + return true; + } + } + return false; // not found +} + +void +GlobalValue::GetValueByName (std::string name, AttributeValue &value) +{ + if (! GetValueByNameFailSafe (name, value)) + { + NS_FATAL_ERROR ("Could not find GlobalValue named \"" << name << "\""); + } +} + GlobalValue::Vector * GlobalValue::GetVector (void) { diff --git a/src/core/global-value.h b/src/core/global-value.h index a40d2244f..c744247dd 100644 --- a/src/core/global-value.h +++ b/src/core/global-value.h @@ -114,6 +114,30 @@ public: * \returns an iterator which represents a pointer to the last GlobalValue registered. */ static Iterator End (void); + + + /** + * finds the GlobalValue with the given name and returns its value + * + * @param name the name of the GlobalValue to be found + * @param value where to store the value of the found GlobalValue + * + * @return true if the GlobalValue was found, false otherwise + */ + static bool GetValueByNameFailSafe (std::string name, AttributeValue &value); + + /** + * finds the GlobalValue with the given name and returns its + * value. This method cannot fail, i.e., it will trigger a + * NS_FATAL_ERROR if the requested GlobalValue is not found. + * + * @param name the name of the GlobalValue to be found + * @param value where to store the value of the found GlobalValue + * + */ + static void GetValueByName (std::string name, AttributeValue &value); + + private: friend class GlobalValueTests; static Vector *GetVector (void); From e53734ed32facf2672cb104dacbb9ecffd5f50f6 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Fri, 3 Jul 2009 14:12:28 +0100 Subject: [PATCH 08/14] Add doxygen for BridgeHelper --- src/helper/bridge-helper.h | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/helper/bridge-helper.h b/src/helper/bridge-helper.h index 8a4bbb859..8ebc8f65a 100644 --- a/src/helper/bridge-helper.h +++ b/src/helper/bridge-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + * Author: Gustavo Carneiro + */ #ifndef BRIDGE_HELPER_H #define BRIDGE_HELPER_H @@ -10,12 +30,42 @@ namespace ns3 { class Node; class AttributeValue; +/** + * \brief Add capability to bridge multiple LAN segments (IEEE 802.1D bridging) + */ class BridgeHelper { public: BridgeHelper (); + /** + * \param n1 the name of the attribute to set + * \param v1 the value of the attribute to set + * + * Set an attribute on each ns3::BridgeNetDevice created by + * BridgeHelper::Install + */ void SetDeviceAttribute (std::string n1, const AttributeValue &v1); + /** + * This method creates an ns3::BridgeNetDevice with the attributes + * configured by BridgeHelper::SetDeviceAttribute, adds the device + * to the node, and attaches the given NetDevices as ports of the + * bridge. + * + * \param node The node to install the device in + * \param c Container of NetDevices to add as bridge ports + * \returns A containter holding the added net device. + */ NetDeviceContainer Install (Ptr node, NetDeviceContainer c); + /** + * This method creates an ns3::BridgeNetDevice with the attributes + * configured by BridgeHelper::SetDeviceAttribute, adds the device + * to the node, and attaches the given NetDevices as ports of the + * bridge. + * + * \param nodeName The name of the node to install the device in + * \param c Container of NetDevices to add as bridge ports + * \returns A containter holding the added net device. + */ NetDeviceContainer Install (std::string nodeName, NetDeviceContainer c); private: ObjectFactory m_deviceFactory; From 3b71ecc23c715a1bd885f45683e60f7d4833b37a Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Fri, 3 Jul 2009 16:15:06 +0100 Subject: [PATCH 09/14] More virtual-net-device.cc bug fixes --- examples/virtual-net-device.cc | 15 ++++++++++++--- src/internet-stack/ipv4-interface.cc | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/virtual-net-device.cc b/examples/virtual-net-device.cc index cde18bc7e..96a60bc20 100644 --- a/examples/virtual-net-device.cc +++ b/examples/virtual-net-device.cc @@ -80,6 +80,7 @@ class Tunnel bool N0VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) { + NS_LOG_DEBUG ("Send to " << m_n3Address << ": " << *packet); m_n0Socket->SendTo (packet, 0, InetSocketAddress (m_n3Address, 667)); return true; } @@ -87,6 +88,7 @@ class Tunnel bool N1VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) { + NS_LOG_DEBUG ("Send to " << m_n3Address << ": " << *packet); m_n1Socket->SendTo (packet, 0, InetSocketAddress (m_n3Address, 667)); return true; } @@ -96,10 +98,12 @@ class Tunnel { if (m_rng.GetValue () < 0.25) { + NS_LOG_DEBUG ("Send to " << m_n0Address << ": " << *packet); m_n3Socket->SendTo (packet, 0, InetSocketAddress (m_n0Address, 667)); } else { + NS_LOG_DEBUG ("Send to " << m_n1Address << ": " << *packet); m_n3Socket->SendTo (packet, 0, InetSocketAddress (m_n1Address, 667)); } return true; @@ -108,6 +112,7 @@ class Tunnel void N3SocketRecv (Ptr socket) { Ptr packet = socket->Recv (65535, 0); + NS_LOG_DEBUG ("N3SocketRecv: " << *packet); SocketAddressTag socketAddressTag; packet->RemovePacketTag (socketAddressTag); m_n3Tap->Receive (packet, 0x0800, m_n3Tap->GetAddress (), m_n3Tap->GetAddress (), NetDevice::PACKET_HOST); @@ -116,6 +121,7 @@ class Tunnel void N0SocketRecv (Ptr socket) { Ptr packet = socket->Recv (65535, 0); + NS_LOG_DEBUG ("N0SocketRecv: " << *packet); SocketAddressTag socketAddressTag; packet->RemovePacketTag (socketAddressTag); m_n0Tap->Receive (packet, 0x0800, m_n0Tap->GetAddress (), m_n0Tap->GetAddress (), NetDevice::PACKET_HOST); @@ -124,6 +130,7 @@ class Tunnel void N1SocketRecv (Ptr socket) { Ptr packet = socket->Recv (65535, 0); + NS_LOG_DEBUG ("N1SocketRecv: " << *packet); SocketAddressTag socketAddressTag; packet->RemovePacketTag (socketAddressTag); m_n1Tap->Receive (packet, 0x0800, m_n1Tap->GetAddress (), m_n1Tap->GetAddress (), NetDevice::PACKET_HOST); @@ -192,6 +199,8 @@ main (int argc, char *argv[]) #if 0 LogComponentEnable ("VirtualNetDeviceExample", LOG_LEVEL_INFO); #endif + Packet::EnablePrinting (); + // Set up some default values for the simulation. Use the Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210)); @@ -266,11 +275,11 @@ main (int argc, char *argv[]) Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (c.Get (3)); apps.Start (Seconds (1.0)); - apps.Stop (Seconds (10.0)); + //apps.Stop (Seconds (10.0)); // Create a similar flow from n3 to n1, starting at time 1.1 seconds onoff.SetAttribute ("Remote", - AddressValue (InetSocketAddress (Ipv4Address ("11.0.0.2"), port))); + AddressValue (InetSocketAddress (Ipv4Address ("11.0.0.1"), port))); apps = onoff.Install (c.Get (3)); apps.Start (Seconds (1.1)); apps.Stop (Seconds (10.0)); @@ -278,7 +287,7 @@ main (int argc, char *argv[]) // Create a packet sink to receive these packets apps = sink.Install (c.Get (1)); apps.Start (Seconds (1.1)); - apps.Stop (Seconds (10.0)); + //apps.Stop (Seconds (10.0)); std::ofstream ascii; ascii.open ("virtual-net-device.tr"); diff --git a/src/internet-stack/ipv4-interface.cc b/src/internet-stack/ipv4-interface.cc index 3d1779fce..67754a114 100644 --- a/src/internet-stack/ipv4-interface.cc +++ b/src/internet-stack/ipv4-interface.cc @@ -178,7 +178,7 @@ Ipv4Interface::SetForwarding (bool val) void Ipv4Interface::Send (Ptr p, Ipv4Address dest) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (dest << *p); if (!IsUp()) { return; From fefc37fb3227e6249c262acc6f3378f8377d3aee Mon Sep 17 00:00:00 2001 From: Craig Dowell Date: Fri, 3 Jul 2009 08:26:52 -0700 Subject: [PATCH 10/14] updates to manual for 3.5 --- doc/manual/attributes.texi | 115 ++++++++++++++++++++++++++++++------- 1 file changed, 94 insertions(+), 21 deletions(-) diff --git a/doc/manual/attributes.texi b/doc/manual/attributes.texi index db7dcb61b..91a7340bd 100644 --- a/doc/manual/attributes.texi +++ b/doc/manual/attributes.texi @@ -114,6 +114,7 @@ example: @code{class ns3::Node}. The public header file node.h has a declaration that includes a static GetTypeId function call: + @verbatim class Node : public Object { @@ -123,21 +124,72 @@ public: @end verbatim This is defined in the node.cc file as follows: + @verbatim TypeId Node::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Node") .SetParent () + .AddConstructor () + .AddAttribute ("DeviceList", "The list of devices associated to this Node.", + ObjectVectorValue (), + MakeObjectVectorAccessor (&Node::m_devices), + MakeObjectVectorChecker ()) + .AddAttribute ("ApplicationList", "The list of applications associated to this Node.", + ObjectVectorValue (), + MakeObjectVectorAccessor (&Node::m_applications), + MakeObjectVectorChecker ()) + .AddAttribute ("Id", "The id (unique integer) of this Node.", + TypeId::ATTR_GET, // allow only getting it. + UintegerValue (0), + MakeUintegerAccessor (&Node::m_id), + MakeUintegerChecker ()) ; return tid; } @end verbatim -Finally, when users want to create Nodes, they call: + +Look at the TypeId of an ns-3 @code{Object} class as an extended form of run +time type information (RTTI). The C++ language includes simple kind of RTTI +in order to support @code{dynamic_cast} and @code{typeid} operators. + +The ``@code{.SetParent ()}'' call in the declaration above is used in +conjunction with our object aggregation mechanisms to allow safe up- and +down-casing in inheritance trees during @code{GetObject}. + +The ``@code{.AddConstructor ()}'' call is used in conjunction with our +abstract object factory mechanisms to allow us to construct C++ objects without +forcing a user to know the concrete class of the object she is building. + +The three calls to ``@code{.AddAttribute}'' associate a given string with a +strongly typed value in the class. Notice that you must provide a help string +which may be displayed, for example, via command line processors. Each +@code{Attribute} is associated with mechanisms for accessing the underlying +member variable in the object (for example, @code{MakeUintegerAccessor} tells +the generic @code{Attribute} code how to get to the node ID above). There are +also ``Checker'' methods which are used to validate values. + +When users want to create Nodes, they will usually call some form of +@code{CreateObject}, + @verbatim Ptr n = CreateObject (); @end verbatim +or more abstractly, using an object factory, you can create a @code{Node} object +without even knowing the concrete C++ type + +@verbatim + ObjectFactory factory; + const std::string typeId = "ns3::Node''; + factory.SetTypeId(typeId); + Ptr node = factory.Create (); +@end verbatim + +Both of these methods result in fully initialized attributes being available +in the resulting @code{Object} instances. + We next discuss how attributes (values associated with member variables or functions of the class) are plumbed into the above TypeId. @@ -206,6 +258,7 @@ and some type of global default value. In the ns-3 attribute system, these value definitions and accessor functions are moved into the TypeId class; e.g.: + @verbatim NS_OBJECT_ENSURE_REGISTERED (DropTailQueue); @@ -358,11 +411,11 @@ Now, let's set it to another value (60 packets) @subsubsection Namespace-based access -An alternative way to get at the attribute is to use the configuration -namespace. Here, this attribute resides on a known path in this -namespace; this approach is useful if one doesn't have access to -the underlying pointers and would like to configure a specific -attribute with a single statement. +An alternative way to get at the attribute is to use the configuration namespace. +Here, this attribute resides on a known path in this namespace; this approach +is useful if one doesn't have access to the underlying pointers and would like +to configure a specific attribute with a single statement. + @verbatim Config::Set ("/NodeList/0/DeviceList/0/TxQueue/MaxPackets", UintegerValue (25)); txQueue->GetAttribute ("MaxPackets", limit); @@ -370,9 +423,8 @@ attribute with a single statement. limit.Get () << " packets"); @end verbatim -We could have also used wildcards to set this value for all nodes -and all net devices (which in this simple example has the same -effect as the previous Set()) +We could have also used wildcards to set this value for all nodes and all net +devices (which in this simple example has the same effect as the previous Set()) @verbatim Config::Set ("/NodeList/*/DeviceList/*/TxQueue/MaxPackets", UintegerValue (15)); txQueue->GetAttribute ("MaxPackets", limit); @@ -380,6 +432,22 @@ effect as the previous Set()) limit.Get () << " packets"); @end verbatim +@subsubsection Object Name Service-based access + +Another way to get at the attribute is to use the object name service facility. +Here, this attribute is found using a name string. This approach is useful if +one doesn't have access to the underlying pointers and it is difficult to +determine the required concrete configuration namespaced path. + +@verbatim + Names::Add ("server", serverNode); + Names::Add ("server/eth0", serverDevice); + + ... + + Config::Set ("/Names/server/eth0/TxQueue/MaxPackets", UintegerValue (25)); +@end verbatim + @subsection Setting through constructors helper classes Arbitrary combinations of attributes can be set and fetched from @@ -438,13 +506,13 @@ Consider this variable in class TcpSocket: Suppose that someone working with Tcp wanted to get or set the value of that variable using the metadata system. If it were not already provided by ns-3, the user could declare the following addition -in the metadata system (to the TypeId declaration for TcpSocket): +in the runtime metadata system (to the TypeId declaration for TcpSocket): @verbatim - .AddParameter ("Congestion window", + .AddAttribute ("Congestion window", "Tcp congestion window (bytes)", - Uinteger (1), + UintegerValue (1), MakeUintegerAccessor (&TcpSocket::m_cWnd), - MakeUintegerChecker ()); + MakeUintegerChecker ()) @end verbatim @@ -511,21 +579,26 @@ wants to hook it in to the attribute system, there is mainly the matter of writing the conversions to/from strings and attribute values. Most of this can be copy/pasted with macro-ized code. For instance, consider class -Rectangle in the @code{src/mobility/} directory: +delcaration for Rectangle in the @code{src/mobility/} directory: -One line is added to the class declaration: @verbatim /** * \brief a 2d rectangle */ class Rectangle { -... + ... + double xMin; + double xMax; + double yMin; + double yMax; }; @end verbatim -One macro call and two operators, are added below the class declaration: +One macro call and two operators, must be added below the class declaration +in order to turn a Rectangle into a value usable by the @code{Attribute} +system: @verbatim std::ostream &operator << (std::ostream &os, const Rectangle &rectangle); @@ -534,7 +607,7 @@ std::istream &operator >> (std::istream &is, Rectangle &rectangle); ATTRIBUTE_HELPER_HEADER (Rectangle); @end verbatim -In the class definition, the code looks like this: +In the class definition (@code{.cc} file), the code looks like this: @verbatim ATTRIBUTE_HELPER_CPP (Rectangle); @@ -568,9 +641,9 @@ of an instance of the new class. @node ConfigStore @section ConfigStore -@strong{Feedback requested:} This is an experimental feature of ns-3. -It is not in the main tree. If you like this feature and would like -to provide feedback on it, please email us. +@strong{Feedback requested:} This is an experimental feature of ns-3. It is +found in @code{src/contrib} and not in the main tree. If you like this feature +and would like to provide feedback on it, please email us. Values for ns-3 attributes can be stored in an ascii text file and loaded into a future simulation. This feature is known as the From c07a0c51168691aa54b895eb42a8fee34c60552e Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Sat, 4 Jul 2009 08:14:38 +0200 Subject: [PATCH 11/14] tweaks --- RELEASE_NOTES | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 4264e8903..79f4dbce8 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -4,9 +4,7 @@ This file contains ns-3 release notes (most recent releases first). All of the ns-3 documentation is accessible from the ns-3 website: -http://www.nsnam.org -including tutorials: -http://www.nsnam.org/tutorials.html +http://www.nsnam.org including tutorials: http://www.nsnam.org/tutorials.html Release 3.5 =========== @@ -64,8 +62,8 @@ Future releases --------------- Our next release, which is expected to happen in 2 to 4 months from now, will feature the merging of some of our projects currently in development including -fuller IPv6 support, and some smaller features such as a new Global ARP package -and possibly a new Testing and Validation suite. +fuller IPv6 support, some smaller features such as a new Global ARP +package, and possibly a new Testing and Validation suite. Release 3.4 =========== From a5e2a675640e2db08f4c212c7c44ce2c765a9973 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Sat, 4 Jul 2009 08:14:57 +0200 Subject: [PATCH 12/14] bump version number --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1b8ef0972..5a958026d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3-dev +3.5 From e3015a9df682912333a577fc8093bf09ef40c425 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Sat, 4 Jul 2009 08:15:48 +0200 Subject: [PATCH 13/14] Added tag ns-3.5 for changeset c975274c9707 --- .hgtags | 1 + 1 file changed, 1 insertion(+) 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 From 9d5557f7b95eb65d18c70e420abd9a4daccad02c Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Sat, 4 Jul 2009 08:53:44 +0200 Subject: [PATCH 14/14] bring back the -dev version number --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 5a958026d..1b8ef0972 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.5 +3-dev