diff -Naur ns-3.26/AUTHORS ns-3.27/AUTHORS
--- ns-3.26/AUTHORS 2016-10-03 19:49:01.455389084 -0700
+++ ns-3.27/AUTHORS 2017-10-11 21:45:51.444599194 -0700
@@ -1,7 +1,10 @@
John Abraham (john.abraham.in@gmail.com)
+Danilo Abrignani (dabrignani@gmail.com)
Alexander Afanasyev (alexander.afanasyev@ucla.edu)
Rohit Agarwal (mindprince@gmail.com)
Piyush Aggarwal (piyush8311@gmail.com)
+Zoraze Ali (zoraze.ali@cttc.es)
+Robert Ammon (ammo6818@vandals.uidaho.edu)
Kirill Andreev (andreev@iitp.ru)
Dean Armstrong (deanarm@gmail.com)
Stefano Avallone (stefano.avallone@unina.it)
@@ -27,6 +30,7 @@
Tiago Cerqueira (tiago.miguel43@gmail.com)
Egemen K. Cetinkaya (ekc@iitc.ku.edu)
Angelos Chatzipapas (chatzipa@ceid.upatras.gr)
+Luciano Jerez Chaves (ljerezchaves@gmail.com)
Eugene Chemeritskiy (echemeritskiy@arccn.ru)
Yufei Cheng (yfcheng@ittc.ku.edu)
Andrey Churin (aachurin@gmail.com)
@@ -38,6 +42,7 @@
Alexander D'souza (moijes12@gmail.com)
Ankit Deepak (adadeepak8@gmail.com)
Sébastien Deronne (sebastien.deronne@gmail.com)
+Christoph Döpmann (doepmanc@informatik.hu-berlin.de)
Craig Dowell (craigdo@ee.washington.edu)
Gilaras Drakeson (gilaras@gmail.com)
Christian Facchini (c.facchini@gmail.com)
@@ -53,11 +58,13 @@
Thomas Geithner (thomas.geithner@dai-labor.de)
Ashim Ghosh (ashim.atiit@gmail.com)
Martin Giachino (martin.giachino@gmail.com,giachino@fing.edu.uy)
+Nichit Bodhak Goel (nichit93@gmail.com)
Tom Goff (tgoff@tgoff.net)
Mohit Goyal (mohit.bits@gmail.com)
Juan C. Granda (jcgranda@uniovi.es)
David Gross (gdavid.devel@gmail.com)
Maja Grubišić (maja.grubisic@live.com)
+Federico Guerra (federico@guerra-tlc.com)
Charline Taibi Guguen (charline.guguen@gmail.com)
Daniel Halperin (daniel@halper.in)
Bruno Haick (bghaick@hotmail.com)
@@ -73,8 +80,10 @@
Pasquale Imputato (p.imputato@gmail.com)
ishan (ishan.chhabra@gmail.com)
Mohamed Amine Ismail (amine.ismail@inria.fr, iamine@udcast.com)
+Toshio Ito (debug.ito@gmail.com)
Jared Ivey (j.ivey@gatech.edu)
Atishay Jain (atishayjain25@gmail.com)
+Sourabh Jain (jainsourabh679@gmail.com)
Sascha Alexander Jopen (jopen@informatik.uni-bonn.de)
Sam Jansen (sam.jansen@gmail.com)
Liu Jian (liujatp@gmail.com)
@@ -83,6 +92,7 @@
Tanmay Kathpalia (tanmay.kathpalia@landisgyr.com)
Konstantinos Katsaros (dinos.katsaros@gmail.com)
Morteza Kheirkhah (m.kheirkhah@sussex.ac.uk)
+Shravya Ks (shravya.ks0@gmail.com)
Flavio Kubota (flaviokubota@gmail.com)
Joe Kopena (tjkopena@cs.drexel.edu)
Christopher Kosecki (christopher.l.kosecki.ctr@mail.mil)
@@ -98,6 +108,7 @@
Timo Lindhorst (tlnd@online.de)
Erwan Livolant (erwan.livolant@inria.fr)
Andrea Lupia (alupia@dimes.unical.it)
+Radu Lupu (rlupu@elcom.pub.ro)
Keith Ma (keith.nwsuaf@gmail.com)
Federico Maguolo (maguolof@dei.unipd.it)
Antti Makela (zarhan@cc.hut.fi)
@@ -107,6 +118,7 @@
Andrey Mazo (mazo@iitp.ru)
Jonathan McCrohan (jmccroha@tcd.ie)
Andrew McGregor (andrewmcgr@gmail.com)
+Miralem Mehic (miralemmehic@gmail.com)
Vedran Miletić (rivanvx@gmail.com)
Saswat Mishra (clicksaswat@gmail.com)
Jens Mittag (jens.mittag@kit.edu)
@@ -129,6 +141,7 @@
Duy Nguyen (duy@soe.ucsc.edu)
Luis Pacheco (luisbelem@gmail.com)
Lluís Parcerisa (parcerisa@gmail.com)
+Mingyu Park (darkpmg@naver.com)
Natale Patriciello (natale.patriciello@gmail.com)
Tommaso Pecorella (tommaso.pecorella@unifi.it)
Guangyu Pei (guangyu.pei@boeing.com)
@@ -139,17 +152,22 @@
Giuseppe Piro (g.piro@poliba.it)
Randall Plate (rplate@spawar.navy.mil)
Yana Podkosova (yanapdk@rambler.ru)
+Michele Polese (michele.polese@gmail.com)
Ovidiu Poncea (ovidiu.poncea@cs.pub.ro)
Vikas Pushkar (vikaskupushkar@gmail.com)
Andrea Ranieri (andreran@uno.it)
Bruno Ranieri (Yrrsinn@googlemail.com)
+Deepti Rajagopal (deeptir96@gmail.com)
+Varun Reddy (varunamarreddy@gmail.com)
Ken Renard (kenneth.renard@arl.army.mil)
+Getachew Redieteab (redieteab.orange@gmail.com)
Manuel Requena (mrequena@cttc.es)
Matias Richart (mrichart@fing.edu.uy)
George F. Riley (riley@ece.gatech.edu)
Juergen Rinas (jrinas@gmx.de)
Sebastian Rohde (sebastian.rohde@tu-dortmund.de)
Karsten Roscher (sfx@rocktale.de)
+Ali Rostami (a.rostami@rutgers.edu)
Bill Roome (wdr@bell-labs.com)
David (david.rua@gmail.com)
Andrea Sacco (andrea.sacco85@gmail.com)
@@ -157,6 +175,7 @@
Providence Salumu Munga (Providence.Salumu@gmail.com, Providence.Salumu_Munga@it-sudparis.eu)
Francisco Javier Sánchez-Roselly (fnavarro@ujaen.es)
Siddharth Santurkar (siddharth.santurkar@ieee.org)
+Gaurav Sathe (gaurav.sathe@tcs.com)
Robert R. Schmidt (rschmi@gmx.net)
Florian Schmidt (Florian.Schmidt@cs.rwth-aachen.de)
Guillaume Seguin (guillaume.seguin@inria.fr)
@@ -169,12 +188,16 @@
Pedro Silva (pmms@inesctec.pt)
Anirudh Sivaraman (sk.anirudh@gmail.com)
Steven Smith (smith84@llnl.gov)
+Izydor Sokoler (Izydor.sokoler@gmail.com)
+Lauri Sormunen (lauri.sormunen@magister.fi)
+Akin Soysal (akinsoysal@gmail.com)
Andrew Stanton (acstanton515@gmail.com)
Ewgenij Starostin (estar@cs.tu-berlin.de)
YunQiang Su (wzssyqa@gmail.com)
Brian Swenson (bswenson3@gatech.edu)
Lalith Suresh (suresh.lalith@gmail.com)
Mohit P. Tahiliani (tahiliani.nitk@gmail.com)
+Rohit P. Tahiliani (tahiliar@tcd.ie)
Dave Taht (dave.taht@bufferbloat.net)
Marcos Talau (talau@users.sourceforge.net)
Adrian S. W. Tam (adrian.sw.tam@gmail.com)
@@ -193,6 +216,5 @@
Florian Westphal (fw@strlen.de)
He Wu (mdzz@u.washington.edu)
Yoshihiko Yazawa (yoshiyaz@gmail.com)
+Menglei Zhang (menglei@nyu.edu)
Dizhi Zhou (dizhi.zhou@gmail.com)
-Gaurav Sathe (gaurav.sathe@tcs.com)
-Ali Rostami (a.rostami@rutgers.edu)
diff -Naur ns-3.26/bindings/python/ns3modulegen_core_customizations.py ns-3.27/bindings/python/ns3modulegen_core_customizations.py
--- ns-3.26/bindings/python/ns3modulegen_core_customizations.py 2016-10-03 19:49:01.481388890 -0700
+++ ns-3.27/bindings/python/ns3modulegen_core_customizations.py 2017-10-11 21:45:51.478599305 -0700
@@ -71,7 +71,7 @@
args = tuple([correct_ctype] + list(args[1:]))
handler = type_handler(*args, **kwargs)
- handler.set_tranformation(self, orig_ctype)
+ handler.set_transformation(self, orig_ctype)
return handler
def untransform(self, type_handler, declarations, code_block, expression):
diff -Naur ns-3.26/bindings/python/ns3modulescan-modular.py ns-3.27/bindings/python/ns3modulescan-modular.py
--- ns-3.26/bindings/python/ns3modulescan-modular.py 2016-10-03 19:49:01.482388883 -0700
+++ ns-3.27/bindings/python/ns3modulescan-modular.py 2017-10-11 21:45:51.479599308 -0700
@@ -4,20 +4,21 @@
import os.path
import pybindgen.settings
-from pybindgen.gccxmlparser import ModuleParser, PygenClassifier, PygenSection, WrapperWarning, find_declaration_from_name
+from pybindgen.castxmlparser import ModuleParser, PygenClassifier, PygenSection, WrapperWarning, find_declaration_from_name
from pybindgen.typehandlers.codesink import FileCodeSink
from pygccxml.declarations import templates
from pygccxml.declarations.enumeration import enumeration_t
from pygccxml.declarations.class_declaration import class_t
-from pygccxml.declarations.calldef import free_function_t, member_function_t, constructor_t, calldef_t
-
+from pygccxml.declarations.free_calldef import free_function_t
+from pygccxml.declarations.calldef_members import constructor_t, member_function_t
+from pygccxml.declarations.calldef import calldef_t
## we need the smart pointer type transformation to be active even
-## during gccxml scanning.
+## during castxml scanning.
import ns3modulegen_core_customizations
-## silence gccxmlparser errors; we only want error handling in the
+## silence castxmlparser errors; we only want error handling in the
## generated python script, not while scanning.
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, dummy_wrapper, dummy_exception, dummy_traceback_):
@@ -34,6 +35,8 @@
def get_ns3_relative_path(path):
l = []
head = path
+ if not path:
+ return
while head:
new_head, tail = os.path.split(head)
if new_head == head:
@@ -58,7 +61,8 @@
ns3_header = get_ns3_relative_path(pygccxml_definition.location.file_name)
except ValueError: # the header is not from ns3
return # ignore the definition, it's not ns-3 def.
-
+ if not ns3_header:
+ return
definition_module = self.headers_map[ns3_header]
## Note: we don't include line numbers in the comments because
@@ -78,7 +82,7 @@
if isinstance(pygccxml_definition, member_function_t) \
and pygccxml_definition.parent.name == 'Object' \
and pygccxml_definition.name == 'GetObject':
- template_args = templates.args(pygccxml_definition.demangled_name)
+ template_args = templates.args(str(pygccxml_definition))
if template_args == ['ns3::Object']:
global_annotations['template_instance_names'] = 'ns3::Object=>GetObject'
@@ -227,13 +231,13 @@
module_parser.add_pre_scan_hook(PreScanHook(headers_map, module_name))
#module_parser.add_post_scan_hook(post_scan_hook)
- gccxml_options = dict(
+ castxml_options = dict(
include_paths=[top_builddir],
define_symbols={
#'NS3_ASSERT_ENABLE': None,
#'NS3_LOG_ENABLE': None,
},
- cflags=('--gccxml-cxxflags "%s -DPYTHON_SCAN"' % cflags)
+ cflags=('-std=c++14 %s' % cflags)
)
try:
@@ -255,9 +259,8 @@
module_parser.parse_init([scan_header],
None, whitelist_paths=[top_builddir],
- #includes=['"ns3/everything.h"'],
pygen_sink=output_sink,
- gccxml_options=gccxml_options)
+ castxml_options=castxml_options)
module_parser.scan_types()
callback_classes_file = open(os.path.join(os.path.dirname(output_file_name), "callbacks_list.py"), "wt")
diff -Naur ns-3.26/bindings/python/ns3modulescan.py ns-3.27/bindings/python/ns3modulescan.py
--- ns-3.26/bindings/python/ns3modulescan.py 2016-10-03 19:49:01.483388875 -0700
+++ ns-3.27/bindings/python/ns3modulescan.py 2017-10-11 21:45:51.480599311 -0700
@@ -8,7 +8,9 @@
from pybindgen.typehandlers.codesink import FileCodeSink
from pygccxml.declarations import templates
from pygccxml.declarations.class_declaration import class_t
-from pygccxml.declarations.calldef import free_function_t, member_function_t, constructor_t, calldef_t
+from pygccxml.declarations.free_calldef import free_function_t
+from pygccxml.declarations.calldef_members import constructor_t, member_function_t
+from pygccxml.declarations.calldef import calldef_t
## we need the smart pointer type transformation to be active even
diff -Naur ns-3.26/bindings/python/wscript ns-3.27/bindings/python/wscript
--- ns-3.26/bindings/python/wscript 2016-10-03 19:49:01.486388853 -0700
+++ ns-3.27/bindings/python/wscript 2017-10-11 21:45:51.799600345 -0700
@@ -14,8 +14,9 @@
# after = TaskGen.after
# https://github.com/gjcarneiro/pybindgen
-REQUIRED_PYBINDGEN_VERSION = '0.17.0.post57+nga6376f2'
-REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
+REQUIRED_PYBINDGEN_VERSION = '0.17.0.post58+ngcf00cc0'
+REQUIRED_PYGCCXML_VERSION = (1, 9, 0)
+REQUIRED_CASTXML_VERSION = '0.1'
RUN_ME=-3
@@ -51,7 +52,7 @@
dest='python_disable')
opt.add_option('--apiscan',
help=("Rescan the API for the indicated module(s), for Python bindings. "
- "Needs working GCCXML / pygccxml environment. "
+ "Needs working CastXML / pygccxml environment. "
"The metamodule 'all' expands to all available ns-3 modules."),
default=None, dest='apiscan', metavar="MODULE[,MODULE...]")
opt.add_option('--with-pybindgen',
@@ -67,6 +68,17 @@
dest='no32bit_scan')
+def split_version(version):
+ if (re.search ('post', version)):
+ # Version format such as '0.17.0.post58+ngcf00cc0'
+ ver = re.split('[.+]', version)[:4]
+ return (int(ver[0]), int(ver[1]), int(ver[2]), int(ver[3].split('post')[1]))
+ else:
+ # Version format such as '0.18.0'
+ ver = re.split('[.]', version)[:3]
+ return (int(ver[0]), int(ver[1]), int(ver[2]), 0)
+
+
def configure(conf):
conf.env['ENABLE_PYTHON_BINDINGS'] = False
if Options.options.python_disable:
@@ -183,7 +195,7 @@
stdout=subprocess.PIPE).communicate()[0]
pybindgen_version = maybe_decode(out.strip())
conf.msg('Checking for pybindgen version', pybindgen_version)
- if not (pybindgen_version == REQUIRED_PYBINDGEN_VERSION):
+ if not (split_version(pybindgen_version) >= split_version(REQUIRED_PYBINDGEN_VERSION)):
Logs.warn("pybindgen (found %r), (need %r)" %
(pybindgen_version, REQUIRED_PYBINDGEN_VERSION))
conf.report_optional_feature("python", "Python Bindings", False,
@@ -257,7 +269,7 @@
try:
conf.check_python_module('pygccxml')
except Errors.ConfigurationError:
- conf.report_optional_feature("pygccxml", "Python API Scanning Support", False,
+ conf.report_optional_feature("castxml", "Python API Scanning Support", False,
"Missing 'pygccxml' Python module")
return
@@ -274,40 +286,43 @@
"automatic scanning of API definitions will not be possible" %
(pygccxml_version_str,
'.'.join([str(x) for x in REQUIRED_PYGCCXML_VERSION])))
- conf.report_optional_feature("pygccxml", "Python API Scanning Support", False,
- "pygccxml too old")
+ conf.report_optional_feature("castxml", "Python API Scanning Support", False,
+ "pygccxml Python module too old")
return
- ## Check gccxml version
+ ## Check castxml version
try:
- gccxml = conf.find_program('gccxml', var='GCCXML')
+ castxml = conf.find_program('castxml', var='CASTXML')
except WafError:
- gccxml = None
- if not gccxml:
- Logs.warn("gccxml missing; automatic scanning of API definitions will not be possible")
- conf.report_optional_feature("pygccxml", "Python API Scanning Support", False,
- "gccxml missing")
+ castxml = None
+ if not castxml:
+ Logs.warn("castxml missing; automatic scanning of API definitions will not be possible")
+ conf.report_optional_feature("castxml", "Python API Scanning Support", False,
+ "castxml missing")
return
- gccxml_version_line = os.popen(gccxml[0] + " --version").readline().strip()
- m = re.match( "^GCC-XML version (\d\.\d(\.\d)?)$", gccxml_version_line)
+ out = subprocess.Popen([castxml[0], '--version'],
+ stdout=subprocess.PIPE).communicate()[0]
+ castxml_version_line = maybe_decode(out).split('\n', 1)[0].strip()
+ ## Expecting version string such as 'castxml version 0.1-gfab9c47'
+ m = re.match( "^castxml version (\d\.\d)(-)?(\w+)?", castxml_version_line)
try:
- gccxml_version = m.group(1)
- gccxml_version_ok = ([int(s) for s in gccxml_version.split('.')] >= [0, 9])
+ castxml_version = m.group(1)
+ castxml_version_ok = castxml_version >= REQUIRED_CASTXML_VERSION
except AttributeError:
- gccxml_version = gccxml_version_line
- gccxml_version_ok = False
- conf.msg('Checking for gccxml version', gccxml_version)
- if not gccxml_version_ok:
- Logs.warn("gccxml version unknown or too old, need version >= 0.9; automatic scanning of API definitions will not be possible")
- conf.report_optional_feature("pygccxml", "Python API Scanning Support", False,
- "gccxml too old")
+ castxml_version = castxml_version_line
+ castxml_version_ok = False
+ conf.msg('Checking for castxml version', castxml_version)
+ if not castxml_version_ok:
+ Logs.warn("castxml version unknown or too old, need version >= %s; automatic scanning of API definitions will not be possible" % REQUIRED_CASTXML_VERSION)
+ conf.report_optional_feature("castxml", "Python API Scanning Support", False,
+ "castxml too old")
return
## If we reached
conf.env['ENABLE_PYTHON_SCANNING'] = True
- conf.report_optional_feature("pygccxml", "Python API Scanning Support", True, None)
+ conf.report_optional_feature("castxml", "Python API Scanning Support", True, None)
# ---------------------
@@ -331,7 +346,7 @@
return ns3headers.path.abspath()
class apiscan_task(Task.Task):
- """Uses gccxml to scan the file 'everything.h' and extract API definitions.
+ """Uses castxml to scan the file 'everything.h' and extract API definitions.
"""
after = 'gen_ns3_module_header ns3header'
before = 'cxx command'
diff -Naur ns-3.26/CHANGES.html ns-3.27/CHANGES.html
--- ns-3.26/CHANGES.html 2016-10-03 19:49:01.461389039 -0700
+++ ns-3.27/CHANGES.html 2017-10-11 21:45:51.452599220 -0700
@@ -51,6 +51,176 @@
us a note on ns-developers mailing list.
+Changes from ns-3.26 to ns-3.27
+New API:
+
+- Added
Vector{2,3}D.GetLength ().
+- Overloaded
operator+ and operator- for Vector{2,3}D.
+- Added iterator version of WifiHelper::Install() to install Wi-Fi devices on range of nodes.
+- Added a new attribute in TcpSocketBase to track the advertised window.
+- Included the model of TCP Ledbat.
+- Included the TCP SACK-based loss recovery algorithm outlined in RFC 6675.
+- Added TCP SACK and the SACK emulation. Added an Attribute to TcpSocketBase class,
+ called "Sack", to enable or disable the SACK option usage.
+- In 'src/wifi', several changes were made to enable partial 802.11ax High Effiency (HE) support:
+
+ - A new standard value has been added that enables the new 11ax data rates.
+ - A new 11ax preamble has been added.
+ - A new attribute was added to configure the guard interval duration for High Efficiency (HE) PHY entities. This attribute can be set using the YansWifiPhyHelper.
+ - A new information element has been added: HeCapabilities. This information element is added to the MAC frame header if the node is a HE node. This HeCapabilites information element is used to advertise the HE capabilites of the node to other nodes in the network.
+
+
+- A new class were added for the RRPAA WiFi rate control mechanism.
+- Included carrier aggregation feature in LTE module
+
+ - LTE model is extended to support carrier aggregation feature according to 3GPP Release 10, for up to 5 component
+ carriers.
+ - InstallSingleEnbDevice and InstalSingeUeDevice functions of LteHelper are now constructing LteEnbDevice and LteUeDevice
+ according to CA architecture. Each device, UE and eNodeB contains an instance of component carrier manager, and may
+ have several component carrier instances.
+ - SAP interfaces are extended to include CA message exchange funtionality.
+ - RRC connection procedure is extended to allow RRC connection reconfiguration for the configuration of the secondary carriers.
+ - RRC measurement reporting is extended to allow measurement reporting from the secondary carriers.
+ - LTE traces are extended to include component carrier id.
+
+
+- Function PrintRoutingTable has been extended to add an optional Time::Units
+ parameter to specify the time units used on the report. The new parameter is
+ optional and if not specified defaults to the previous behavior (Time::S).
+
+- TxopTrace: new trace source exported by EdcaTxopN.
+- A GetDscpCounts method is added to Ipv4FlowClassifier and Ipv6FlowClassifier
+ which returns a vector of pairs (dscp,count), each of which indicates how many packets with the
+ associated dscp value have been classified for a given flow.
+
+- MqQueueDisc, a multi-queue aware queue disc modelled after the mq qdisc in Linux, has been introduced.
+
+- Two new methods, QueueDisc::DropBeforeEnqueue() and QueueDisc::DropAfterDequeue() have
+ been introduced to replace QueueDisc::Drop(). These new methods require the caller to specify the
+ reason why a packet was dropped. Correspondingly, two new trace sources ("DropBeforeEnqueue" and
+ "DropAfterDequeue") have been added to the QueueDisc class, providing both the items that were dropped
+ and the reason why they were dropped.
+
+- Added QueueDisc::GetStats() which returns detailed statistics about the operations of
+ a queue disc. Statistics can be accessed through the member variables of the returned object and
+ by calling the GetNDroppedPackets(), GetNDroppedBytes(), GetNMarkedPackets() and GetNMarkedBytes() methods on the returned object. Such methods return the number of packets/bytes
+ dropped/marked for the specified reason (passed as argument). Consequently:
+
+ - A number of methods of the QueueDisc class have been removed: GetTotalReceivedPackets(),
+ GetTotalReceivedBytes(), GetTotalDroppedPackets(), GetTotalDroppedBytes(),
+ GetTotalRequeuedPackets(), GetTotalRequeuedBytes().
+ - The Stats struct and the GetStats() method of RedQueueDisc and PieQueueDisc have been removed and replaced by those of the QueueDisc base class.
+ - The GetDropOverLimit and GetDropCount methods of CoDelQueueDisc have been removed.
+ The values they returned can be obtained by calling, respectively,
+ GetStats ().GetNDroppedPackets (CoDelQueueDisc::OVERLIMIT_DROP) and
+ GetStats ().GetNDroppedPackets (CoDelQueueDisc::TARGET_EXCEEDED_DROP). The "DropCount" trace of
+ CoDelQueueDisc has been removed as well. Packets dropped because the target is exceeded can
+ be obtained through the new "DropAfterDequeue" trace of the QueueDisc class.
+
+
+- The new QueueDisc::Mark() method has been introduced to allow subclasses to request to mark a packet.
+ The caller must specify the reason why the packet must be marked. Correspondingly, a new trace source ("Mark")
+ has been added to the QueueDisc class, providing both the items that were marked and the reason why they
+ were marked.
+
+- A new trace source, SojournTime, is exported by the QueueDisc base class to provide the
+ sojourn time of every packet dequeued from a queue disc. This has been made possible by adding a
+ timestamp to QueueDiscItem objects, which can be set/get through the new GetTimeStamp() and
+ SetTimeStamp() methods of the QueueDiscItem class. The CoDel queue disc now makes use of such feature of the base class, hence its Sojourn trace source and the CoDelTimestampTag class
+ have been removed.
+
+
+Changes to existing API:
+
+- ParetoRandomVariable "Mean" attribute has been deprecated,
+ the "Scale" Attribute have to be used instead.
+ Changing the Mean attribute has no more an effect on the distribution.
+ See the documentation for the relationship between Mean, Scale and Shape.
+
+- The default logging timestamp precision has been changed from 6 digits
+ to 9 digits, with a fixed format to ensure that 9 digits to the right of
+ the decimal point are always printed. Previously, default C++ iostream
+ precision and formatting was used.
+
+- Abstract base class WifiChannel has been removed. As a result, a Channel type instead of a WifiChannel type
+is now exported by WifiNetDevice.
+- The GetPacketSize method of QueueItem has been renamed GetSize
+
+- The DequeueAll method of Queue has been renamed Flush
+
+- The attributes WifiPhy::TxAntennas and WifiPhy::RxAntennas,
+ and the related accessor methods, were replaced by WifiPhy::MaxSupportedTxSpatialStreams
+ and WifiPhy::MaxSupportedRxSpatialStreams. A new attribute WifiPhy::Antennas
+ was added to allow users to define the number of physical antennas on the device.
+
+- Sockets do not receive anymore broadcast packets, unless they are bound to an "Any" address (0.0.0.0)
+ or to a subnet-directed broadcast packet (e.g., x.y.z.0 for a /24 noterok).
+ As in Linux, the following rules are now enforced:
+
+ - A socket bound to 0.0.0.0 will receive everything.
+ - A socket bound to x.y.z.0/24 will receive subnet-directed broadcast (x.y.z.255) and unicast packets.
+ - A socket bound to x.y.z.w will only receive unicast packets.
+
+ Previously, a socket bound to an unicast address received also subnet-directed broadcast packets.
+ This is not anymore possible.
+
+- You can now Bind as many socket as you want to an address/port, provided that they are bound to different NetDevices.
+ Moreover, BindToNetDevice does not anymore call Bind. In other terms, Bind and BindToNetDevice can be called
+ in any order.
+ However, it is suggested to use BindToNetDevice before Bind in order to avoid conflicts.
+
+
+Changes to build system:
+
+- The API scanning process for Python bindings now relies on CastXML, and only 64-bit scans are presently supported (Linux 64-bit systems). Generation of 32-bit scans is documented in the Python chapter of the ns-3 manual.
+
+- Modules can now be located in the 'contrib/' directory in addition to 'src/'
+
+- Behavior for running Python programs was aligned with that of C++ programs; the list of modules built is no longer printed out.
+
+
+Changed behavior:
+
+- MultiModelSpectrumChannel does not call StartRx for receivers that
+ operate on subbands orthogonal to transmitter subbands. Models that depend
+ on receiving signals with zero power spectral density from orthogonal bands
+ may change their behavior.
+ See bug 2467
+ for discussion.
+
+- Packet Tag objects are no longer constrained to fit within 21
+ bytes; a maximum size is no longer enforced.
+
+ - The default value of the TxGain and RxGain attributes in WifiPhy was changed from 1 dB to 0 dB.
+
+ - The reported SNR by WifiPhy::MonitorSnifferRx did not include the RxNoiseFigure, but now does; see bug 2783 for discussion.
+
+- Queue has been redesigned as a template class object, where the type parameter
+ specifies the type of items to be stored in the queue. As a consequence:
+
+ - Being a subclass of Queue, DropTailQueue is a template class as well.
+
- Network devices such as SimpleNetDevice, PointToPointNetDevice and CsmaNetDevice
+ use a queue of type Queue<Packet> to store the packets to transmit. The SetQueue
+ method of their helpers, however, can still be invoked as, e.g.,
+ SetQueue ("ns3::DropTailQueue") instead of, e.g., SetQueue
+ ("ns3::DropTailQueue<Packet>").
+ - The attributes Mode, MaxPackets and MaxBytes are now
+ defined by the QueueBase class (which Queue is derived from).
+
+
+- Queue discs that can operate both in packet mode and byte mode (Red, CoDel, Pie) define their own
+ enum QueueDiscMode instead of using QueueBase::QueueMode.
+
+- The CoDel, PIE and RED queue discs require that the size of the internal queue is the same as
+ the queue disc limit (previously, it was allowed to be greater than or equal).
+
+ - The default value of the EnableBeaconJitter attribute in ApWifiMac was changed from false to true.
+
+ - The NormalClose() callback of a TcpSocket object used to fire upon leaving TIME_WAIT state (2*MSL after FINs have been exchanged). It now fires upon entering TIME_WAIT state. Timing of the callback for the other path to state CLOSED (through LAST_ACK) has not been changed.
+
+
+
+
Changes from ns-3.25 to ns-3.26
New API:
@@ -689,8 +859,8 @@
tutorial has been extended to illustrate basic functionality.
- In 'src/wifi', several changes were made to enable partial 802.11n support:
- - A new helper (HtWifiMacHelper) was added to set up a high throughput (HT) MAC entity
- - New attributes were added to help the user setup a high throughpt (HT) PHY entity. These attributes can be set using the YansWifiPhyHelper
+ - A new helper (HtWifiMacHelper) was added to set up a High Throughput (HT) MAC entity
+ - New attributes were added to help the user setup a High Throughput (HT) PHY entity. These attributes can be set using the YansWifiPhyHelper
- A new standard value has been added that enables the new 11n data rates.
- New 11n preambles has been added (Mixed format and greenfield). To be able to change Tx duration according to the preamble used, a new class TxVector has been added to carry the transmission parameters (mode, preamble, stbc,..). Several functions have been updated to allow the passage of TxVector instead of WifiMode in MacLow, WifiRemoteStationManager, WifiPhy, YansWifiPhy,..
- A new information element has been added: HTCapabilities. This information element is added to the MAC frame header if the node is an HT node. This HTCapabilites information element is used to advertise the HT capabilites of the node to other nodes in the network
diff -Naur ns-3.26/contrib/wscript ns-3.27/contrib/wscript
--- ns-3.26/contrib/wscript 1969-12-31 16:00:00.000000000 -0800
+++ ns-3.27/contrib/wscript 2017-10-11 21:45:51.800600349 -0700
@@ -0,0 +1,752 @@
+
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+from __future__ import print_function
+import os, os.path
+import sys
+import shutil
+import types
+import warnings
+
+from waflib import TaskGen, Task, Options, Build, Utils
+from waflib.Errors import WafError
+import wutils
+
+try:
+ set
+except NameError:
+ from sets import Set as set # Python 2.3 fallback
+
+
+
+all_modules = []
+for dirname in os.listdir('contrib'):
+ if dirname.startswith('.') or dirname == 'CVS':
+ continue
+ path = os.path.join('contrib', dirname)
+ if not os.path.isdir(path):
+ continue
+ if os.path.exists(os.path.join(path, 'wscript')):
+ all_modules.append(dirname)
+all_modules.sort()
+
+
+
+def options(opt):
+ opt.add_option('--enable-rpath',
+ help=("Link programs with rpath"
+ " (normally not needed, see "
+ " --run and --shell; moreover, only works in some"
+ " specific platforms, such as Linux and Solaris)"),
+ action="store_true", dest='enable_rpath', default=False)
+
+ opt.add_option('--enable-modules',
+ help=("Build only these modules (and dependencies)"),
+ dest='enable_modules')
+
+ opt.load('boost', tooldir=['waf-tools'])
+
+ for module in all_modules:
+ opt.recurse(module, mandatory=False)
+
+def configure(conf):
+ conf.env['REQUIRED_BOOST_LIBS'] = []
+ for module in all_modules:
+ conf.recurse (module, name="required_boost_libs", mandatory=False)
+
+ if conf.env['REQUIRED_BOOST_LIBS'] is not []:
+ conf.load('boost')
+ conf.check_boost(lib=' '.join (conf.env['REQUIRED_BOOST_LIBS']), mandatory=False)
+ if not conf.env['LIB_BOOST']:
+ conf.check_boost(lib=' '.join (conf.env['REQUIRED_BOOST_LIBS']), libpath="/usr/lib64", mandatory=False)
+ if not conf.env['LIB_BOOST']:
+ conf.env['LIB_BOOST'] = []
+
+ # Append blddir to the module path before recursing into modules
+ blddir = os.path.abspath(os.path.join(conf.bldnode.abspath(), conf.variant))
+ conf.env.append_value('NS3_MODULE_PATH', blddir)
+
+ for module in all_modules:
+ conf.recurse(module, mandatory=False)
+
+ # Remove duplicate path items
+ conf.env['NS3_MODULE_PATH'] = wutils.uniquify_list(conf.env['NS3_MODULE_PATH'])
+
+ if Options.options.enable_rpath:
+ conf.env.append_value('RPATH', '-Wl,-rpath,%s' % (os.path.join(blddir),))
+
+ ## Used to link the 'test-runner' program with all of ns-3 code
+ conf.env['NS3_CONTRIBUTED_MODULES'] = ['ns3-' + module.split('/')[-1] for module in all_modules]
+
+
+
+# we need the 'ns3module' waf "feature" to be created because code
+# elsewhere looks for it to find the ns3 module objects.
+@TaskGen.feature('ns3module')
+def _add_test_code(module):
+ pass
+
+def create_ns3_module(bld, name, dependencies=(), test=False):
+ static = bool(bld.env.ENABLE_STATIC_NS3)
+ # Create a separate library for this module.
+ if static:
+ module = bld(features='cxx cxxstlib ns3module')
+ else:
+ module = bld(features='cxx cxxshlib ns3module')
+ module.target = '%s/ns%s-%s%s' % (bld.srcnode.path_from(module.path), wutils.VERSION,
+ name, bld.env.BUILD_SUFFIX)
+ linkflags = []
+ cxxflags = []
+ ccflags = []
+ if not static:
+ cxxflags = module.env['shlib_CXXFLAGS']
+ ccflags = module.env['shlib_CXXFLAGS']
+ # Turn on the link flags for shared libraries if we have the
+ # proper compiler and platform.
+ if module.env['CXX_NAME'] in ['gcc', 'icc'] and module.env['WL_SONAME_SUPPORTED']:
+ # Get the module library name without any relative paths
+ # at its beginning because all of the libraries will end
+ # up in the same directory.
+ module_library_name = module.env.cshlib_PATTERN % (os.path.basename(module.target),)
+ linkflags = '-Wl,--soname=' + module_library_name
+ cxxdefines = ["NS3_MODULE_COMPILATION"]
+ ccdefines = ["NS3_MODULE_COMPILATION"]
+
+ module.env.append_value('CXXFLAGS', cxxflags)
+ module.env.append_value('CCFLAGS', ccflags)
+ module.env.append_value('LINKFLAGS', linkflags)
+ module.env.append_value('CXXDEFINES', cxxdefines)
+ module.env.append_value('CCDEFINES', ccdefines)
+
+ module.is_static = static
+ module.vnum = wutils.VNUM
+ # Add the proper path to the module's name.
+ # Set the libraries this module depends on.
+ module.module_deps = list(dependencies)
+
+ module.install_path = "${LIBDIR}"
+
+ module.name = "ns3-" + name
+ module.dependencies = dependencies
+ # Initially create an empty value for this because the pcfile
+ # writing task assumes every module has a uselib attribute.
+ module.uselib = ''
+ module.use = ['ns3-' + dep for dep in dependencies]
+ module.test = test
+ module.is_ns3_module = True
+ module.ns3_dir_location = bld.path.path_from(bld.srcnode)
+
+ module.env.append_value("INCLUDES", '#')
+
+ module.pcfilegen = bld(features='ns3pcfile')
+ module.pcfilegen.module = module.name
+
+ return module
+
+@TaskGen.feature("ns3testlib")
+@TaskGen.before_method("apply_incpaths")
+def apply_incpaths_ns3testlib(self):
+ if not self.source:
+ return
+ testdir = self.source[-1].parent.path_from(self.bld.srcnode)
+ self.env.append_value("DEFINES", 'NS_TEST_SOURCEDIR="%s"' % (testdir,))
+
+
+def create_ns3_module_test_library(bld, name):
+ # Create an ns3 module for the test library that depends only on
+ # the module being tested.
+ library_name = name + "-test"
+ library = bld.create_ns3_module(library_name, [name], test=True)
+ library.features += " ns3testlib"
+
+ # Modify attributes for the test library that are different from a
+ # normal module.
+ del library.is_ns3_module
+ library.is_ns3_module_test_library = True
+ library.module_name = 'ns3-' + name
+
+ # Add this module and test library to the list.
+ bld.env.append_value('NS3_MODULES_WITH_TEST_LIBRARIES', [(library.module_name, library.name)])
+
+ # Set the include path from the build directory to modules.
+ relative_path_from_build_to_here = bld.path.path_from(bld.bldnode)
+ include_flag = '-I' + relative_path_from_build_to_here
+ library.env.append_value('CXXFLAGS', include_flag)
+ library.env.append_value('CCFLAGS', include_flag)
+
+ return library
+
+def create_obj(bld, *args):
+ warnings.warn("(in %s) Use bld(...) call now, instead of bld.create_obj(...)" % str(bld.path),
+ DeprecationWarning, stacklevel=2)
+ return bld(*args)
+
+
+def ns3_python_bindings(bld):
+
+ # this method is called from a module wscript, so remember bld.path is not bindings/python!
+ module_abs_src_path = bld.path.abspath()
+ module = os.path.basename(module_abs_src_path)
+ env = bld.env
+ env.append_value("MODULAR_BINDINGS_MODULES", "ns3-"+module)
+
+ if Options.options.apiscan:
+ return
+
+ if not env['ENABLE_PYTHON_BINDINGS']:
+ return
+
+ bindings_dir = bld.path.find_dir("bindings")
+ if bindings_dir is None or not os.path.exists(bindings_dir.abspath()):
+ warnings.warn("(in %s) Requested to build modular python bindings, but apidefs dir not found "
+ "=> skipped the bindings." % str(bld.path),
+ Warning, stacklevel=2)
+ return
+
+ if ("ns3-%s" % (module,)) not in env.NS3_ENABLED_MODULES:
+ #print "bindings for module %s which is not enabled, skip" % module
+ return
+
+ env.append_value('PYTHON_MODULES_BUILT', module)
+ try:
+ apidefs = env['PYTHON_BINDINGS_APIDEFS'].replace("-", "_")
+ except AttributeError:
+ # we likely got an empty list for env['PYTHON_BINDINGS_APIDEFS']
+ return
+
+ #debug = ('PYBINDGEN_DEBUG' in os.environ)
+ debug = True # XXX
+ source = [bld.srcnode.find_resource('bindings/python/ns3modulegen-modular.py'),
+ bld.path.find_resource("bindings/modulegen__%s.py" % apidefs)]
+
+ modulegen_customizations = bindings_dir.find_resource("modulegen_customizations.py")
+ if modulegen_customizations is not None:
+ source.append(modulegen_customizations)
+
+ modulegen_local = bld.path.find_resource("bindings/modulegen_local.py")
+ # the local customization file may or not exist
+ if modulegen_local is not None:
+ source.append("bindings/modulegen_local.py")
+
+ module_py_name = module.replace('-', '_')
+ module_target_dir = bld.srcnode.find_dir("bindings/python/ns").path_from(bld.path)
+
+ # if bindings/.py exists, it becomes the module frontend, and the C extension befomes _
+ if bld.path.find_resource("bindings/%s.py" % (module_py_name,)) is not None:
+ bld(features='copy',
+ source=("bindings/%s.py" % (module_py_name,)),
+ target=('%s/%s.py' % (module_target_dir, module_py_name)))
+ extension_name = '_%s' % (module_py_name,)
+ bld.install_files('${PYTHONARCHDIR}/ns', ["bindings/%s.py" % (module_py_name,)])
+ else:
+ extension_name = module_py_name
+
+ target = ['bindings/ns3module.cc', 'bindings/ns3module.h', 'bindings/ns3modulegen.log']
+ #if not debug:
+ # target.append('ns3modulegen.log')
+
+ argv = ['NS3_ENABLED_FEATURES=${FEATURES}',
+ 'GCC_RTTI_ABI_COMPLETE=${GCC_RTTI_ABI_COMPLETE}',
+ '${PYTHON}']
+ #if debug:
+ # argv.extend(["-m", "pdb"])
+
+ argv.extend(['${SRC[0]}', module_abs_src_path, apidefs, extension_name, '${TGT[0]}'])
+
+ argv.extend(['2>', '${TGT[2]}']) # 2> ns3modulegen.log
+
+ features = []
+ for (name, caption, was_enabled, reason_not_enabled) in env['NS3_OPTIONAL_FEATURES']:
+ if was_enabled:
+ features.append(name)
+
+ bindgen = bld(features='command', source=source, target=target, command=argv)
+ bindgen.env['FEATURES'] = ','.join(features)
+ bindgen.dep_vars = ['FEATURES', "GCC_RTTI_ABI_COMPLETE"]
+ bindgen.before = 'cxx'
+ bindgen.after = 'gen_ns3_module_header'
+ bindgen.name = "pybindgen(ns3 module %s)" % module
+ bindgen.install_path = None
+
+ # generate the extension module
+ pymod = bld(features='cxx cxxshlib pyext')
+ pymod.source = ['bindings/ns3module.cc']
+ pymod.target = '%s/%s' % (module_target_dir, extension_name)
+ pymod.name = 'ns3module_%s' % module
+ pymod.use = ["%s" % mod for mod in pymod.env['NS3_ENABLED_MODULES']] # Should be '"ns3-"+module', but see bug 1117
+ if pymod.env['ENABLE_STATIC_NS3']:
+ if sys.platform == 'darwin':
+ pymod.env.append_value('LINKFLAGS', '-Wl,-all_load')
+ for mod in pymod.usel:
+ #mod = mod.split("--lib")[0]
+ pymod.env.append_value('LINKFLAGS', '-l' + mod)
+ else:
+ pymod.env.append_value('LINKFLAGS', '-Wl,--whole-archive,-Bstatic')
+ for mod in pymod.use:
+ #mod = mod.split("--lib")[0]
+ pymod.env.append_value('LINKFLAGS', '-l' + mod)
+ pymod.env.append_value('LINKFLAGS', '-Wl,-Bdynamic,--no-whole-archive')
+ defines = list(pymod.env['DEFINES'])
+ defines.extend(['NS_DEPRECATED=', 'NS3_DEPRECATED_H'])
+ if Options.platform == 'win32':
+ try:
+ defines.remove('_DEBUG') # causes undefined symbols on win32
+ except ValueError:
+ pass
+ pymod.env['DEFINES'] = defines
+ pymod.includes = '# bindings'
+ pymod.install_path = '${PYTHONARCHDIR}/ns'
+
+ # Workaround to a WAF bug, remove this when ns-3 upgrades to WAF > 1.6.10
+ # https://www.nsnam.org/bugzilla/show_bug.cgi?id=1335
+ # http://code.google.com/p/waf/issues/detail?id=1098
+ if Utils.unversioned_sys_platform() == 'darwin':
+ pymod.mac_bundle = True
+
+ return pymod
+
+
+def build(bld):
+ bld.create_ns3_module = types.MethodType(create_ns3_module, bld)
+ bld.create_ns3_module_test_library = types.MethodType(create_ns3_module_test_library, bld)
+ bld.create_obj = types.MethodType(create_obj, bld)
+ bld.ns3_python_bindings = types.MethodType(ns3_python_bindings, bld)
+
+ # Remove these modules from the list of all modules.
+ for not_built in bld.env['MODULES_NOT_BUILT']:
+
+ # XXX Because these modules are located in subdirectories of
+ # test, their names in the all_modules list include the extra
+ # relative path "test/". If these modules are moved into the
+ # src directory, then this if block should be removed.
+ if not_built == 'ns3tcp' or not_built == 'ns3wifi':
+ not_built = 'test/' + not_built
+
+ if not_built in all_modules:
+ all_modules.remove(not_built)
+
+ bld.recurse(list(all_modules))
+
+ for module in all_modules:
+ modheader = bld(features='ns3moduleheader')
+ modheader.module = module.split('/')[-1]
+
+class ns3pcfile_task(Task.Task):
+ after = 'cxx'
+
+ def __str__(self):
+ "string to display to the user"
+ tgt_str = ' '.join([a.bldpath() for a in self.outputs])
+ return 'pcfile: %s\n' % (tgt_str)
+
+ def runnable_status(self):
+ return super(ns3pcfile_task, self).runnable_status()
+
+ def _self_libs(self, env, name, libdir):
+ if env['ENABLE_STATIC_NS3']:
+ path_st = 'STLIBPATH_ST'
+ lib_st = 'STLIB_ST'
+ lib_marker = 'STLIB_MARKER'
+ else:
+ path_st = 'LIBPATH_ST'
+ lib_st = 'LIB_ST'
+ lib_marker = 'SHLIB_MARKER'
+ retval = [env[path_st] % libdir]
+ if env[lib_marker]:
+ retval.append(env[lib_marker])
+ retval.append(env[lib_st] % name)
+ return retval
+
+ def _lib(self, env, dep):
+ libpath = env['LIBPATH_%s' % dep]
+ linkflags = env['LINKFLAGS_%s' % dep]
+ libs = env['LIB_%s' % dep]
+ retval = []
+ for path in libpath:
+ retval.append(env['LIBPATH_ST'] % path)
+ retval = retval + linkflags
+ for lib in libs:
+ retval.append(env['LIB_ST'] % lib)
+ return retval
+
+ def _listify(self, v):
+ if isinstance(v, list):
+ return v
+ else:
+ return [v]
+
+ def _cflags(self, dep):
+ flags = self.env['CFLAGS_%s' % dep]
+ return self._listify(flags)
+
+ def _cxxflags(self, dep):
+ return self._listify(self.env['CXXFLAGS_%s' % dep])
+
+ def _defines(self, dep):
+ return [self.env['DEFINES_ST'] % define for define in self.env['DEFINES_%s' % dep]]
+
+ def _includes(self, dep):
+ includes = self.env['INCLUDES_%s' % dep]
+ return [self.env['CPPPATH_ST'] % include for include in includes]
+
+ def _generate_pcfile(self, name, use, env, outfilename):
+ outfile = open(outfilename, 'wt')
+ prefix = env.PREFIX
+ includedir = Utils.subst_vars('${INCLUDEDIR}/%s%s' % (wutils.APPNAME, wutils.VERSION), env)
+ libdir = env.LIBDIR
+ libs = self._self_libs(env, "%s%s-%s%s" % (wutils.APPNAME, wutils.VERSION, name[4:], env.BUILD_SUFFIX), '${libdir}')
+ for dep in use:
+ libs += self._lib(env, dep)
+ for dep in env.LIBS:
+ libs += self.env['LIB_ST'] % dep
+ cflags = [self.env['CPPPATH_ST'] % '${includedir}']
+ requires = []
+ for dep in use:
+ cflags = cflags + self._cflags(dep) + self._cxxflags(dep) + \
+ self._defines(dep) + self._includes(dep)
+ if dep.startswith('ns3-'):
+ dep_name = dep[4:]
+ requires.append("libns%s-%s%s" % (wutils.VERSION, dep_name, env.BUILD_SUFFIX))
+ print("""\
+prefix=%s
+libdir=%s
+includedir=%s
+
+Name: lib%s
+Description: ns-3 module %s
+Version: %s
+Libs: %s
+Cflags: %s
+Requires: %s\
+""" % (prefix, libdir, includedir,
+ name, name, wutils.VERSION, ' '.join(libs), ' '.join(cflags), ' '.join(requires)), file=outfile)
+ outfile.close()
+
+ def run(self):
+ output_filename = self.outputs[0].abspath()
+ self._generate_pcfile(self.module.name,
+ self.module.to_list(self.module.use),
+ self.env, output_filename)
+
+
+@TaskGen.feature('ns3pcfile')
+@TaskGen.after_method('process_rule')
+def apply(self):
+ module = self.bld.find_ns3_module(self.module)
+ output_filename = 'lib%s.pc' % os.path.basename(module.target)
+ output_node = self.path.find_or_declare(output_filename)
+ assert output_node is not None, str(self)
+ task = self.create_task('ns3pcfile')
+ self.bld.install_files('${LIBDIR}/pkgconfig', output_node)
+ task.set_outputs([output_node])
+ task.module = module
+
+
+
+@TaskGen.feature('ns3header')
+@TaskGen.after_method('process_rule')
+def apply_ns3header(self):
+ if self.module is None:
+ raise WafError("'module' missing on ns3headers object %s" % self)
+ ns3_dir_node = self.bld.path.find_or_declare("ns3")
+ for filename in set(self.to_list(self.source)):
+ src_node = self.path.find_resource(filename)
+ if src_node is None:
+ raise WafError("source ns3 header file %s not found" % (filename,))
+ dst_node = ns3_dir_node.find_or_declare(src_node.name)
+ assert dst_node is not None
+ task = self.create_task('ns3header')
+ task.mode = getattr(self, 'mode', 'install')
+ if task.mode == 'install':
+ self.bld.install_files('${INCLUDEDIR}/%s%s/ns3' % (wutils.APPNAME, wutils.VERSION), [src_node])
+ task.set_inputs([src_node])
+ task.set_outputs([dst_node])
+ else:
+ task.header_to_remove = dst_node
+ self.headers = set(self.to_list(self.source))
+ self.source = '' # tell WAF not to process these files further
+
+
+class ns3header_task(Task.Task):
+ before = 'cxx gen_ns3_module_header'
+ color = 'BLUE'
+
+ def __str__(self):
+ "string to display to the user"
+ env = self.env
+ src_str = ' '.join([a.bldpath() for a in self.inputs])
+ tgt_str = ' '.join([a.bldpath() for a in self.outputs])
+ if self.outputs: sep = ' -> '
+ else: sep = ''
+ if self.mode == 'remove':
+ return 'rm-ns3-header %s' % (self.header_to_remove.abspath(),)
+ return 'install-ns3-header: %s' % (tgt_str)
+
+ def __repr__(self):
+ return str(self)
+
+ def uid(self):
+ try:
+ return self.uid_
+ except AttributeError:
+ m = Utils.md5()
+ up = m.update
+ up(self.__class__.__name__.encode())
+ for x in self.inputs + self.outputs:
+ up(x.abspath().encode())
+ up(self.mode.encode())
+ if self.mode == 'remove':
+ up(self.header_to_remove.abspath().encode())
+ self.uid_ = m.digest()
+ return self.uid_
+
+ def runnable_status(self):
+ if self.mode == 'remove':
+ if os.path.exists(self.header_to_remove.abspath()):
+ return Task.RUN_ME
+ else:
+ return Task.SKIP_ME
+ else:
+ return super(ns3header_task, self).runnable_status()
+
+ def run(self):
+ if self.mode == 'install':
+ assert len(self.inputs) == len(self.outputs)
+ inputs = [node.abspath() for node in self.inputs]
+ outputs = [node.abspath() for node in self.outputs]
+ for src, dst in zip(inputs, outputs):
+ try:
+ os.chmod(dst, 0o600)
+ except OSError:
+ pass
+ shutil.copy2(src, dst)
+ ## make the headers in builddir read-only, to prevent
+ ## accidental modification
+ os.chmod(dst, 0o400)
+ return 0
+ else:
+ assert len(self.inputs) == 0
+ assert len(self.outputs) == 0
+ out_file_name = self.header_to_remove.abspath()
+ try:
+ os.unlink(out_file_name)
+ except OSError as ex:
+ if ex.errno != 2:
+ raise
+ return 0
+
+
+@TaskGen.feature('ns3privateheader')
+@TaskGen.after_method('process_rule')
+def apply_ns3privateheader(self):
+ if self.module is None:
+ raise WafError("'module' missing on ns3headers object %s" % self)
+ ns3_dir_node = self.bld.path.find_or_declare("ns3/private")
+ for filename in set(self.to_list(self.source)):
+ src_node = self.path.find_resource(filename)
+ if src_node is None:
+ raise WafError("source ns3 header file %s not found" % (filename,))
+ dst_node = ns3_dir_node.find_or_declare(src_node.name)
+ assert dst_node is not None
+ task = self.create_task('ns3privateheader')
+ task.mode = getattr(self, 'mode', 'install')
+ if task.mode == 'install':
+ task.set_inputs([src_node])
+ task.set_outputs([dst_node])
+ else:
+ task.header_to_remove = dst_node
+ self.headers = set(self.to_list(self.source))
+ self.source = '' # tell WAF not to process these files further
+
+class ns3privateheader_task(Task.Task):
+ before = 'cxx gen_ns3_module_header'
+ after = 'ns3header'
+ color = 'BLUE'
+
+ def __str__(self):
+ "string to display to the user"
+ env = self.env
+ src_str = ' '.join([a.bldpath() for a in self.inputs])
+ tgt_str = ' '.join([a.bldpath() for a in self.outputs])
+ if self.outputs: sep = ' -> '
+ else: sep = ''
+ if self.mode == 'remove':
+ return 'rm-ns3-header %s' % (self.header_to_remove.abspath(),)
+ return 'install-ns3-header: %s' % (tgt_str)
+
+ def __repr__(self):
+ return str(self)
+
+ def uid(self):
+ try:
+ return self.uid_
+ except AttributeError:
+ m = Utils.md5()
+ up = m.update
+ up(self.__class__.__name__.encode())
+ for x in self.inputs + self.outputs:
+ up(x.abspath().encode())
+ up(self.mode.encode())
+ if self.mode == 'remove':
+ up(self.header_to_remove.abspath().encode())
+ self.uid_ = m.digest()
+ return self.uid_
+
+ def runnable_status(self):
+ if self.mode == 'remove':
+ if os.path.exists(self.header_to_remove.abspath()):
+ return Task.RUN_ME
+ else:
+ return Task.SKIP_ME
+ else:
+ return super(ns3privateheader_task, self).runnable_status()
+
+ def run(self):
+ if self.mode == 'install':
+ assert len(self.inputs) == len(self.outputs)
+ inputs = [node.abspath() for node in self.inputs]
+ outputs = [node.abspath() for node in self.outputs]
+ for src, dst in zip(inputs, outputs):
+ try:
+ os.chmod(dst, 0o600)
+ except OSError:
+ pass
+ shutil.copy2(src, dst)
+ ## make the headers in builddir read-only, to prevent
+ ## accidental modification
+ os.chmod(dst, 0o400)
+ return 0
+ else:
+ assert len(self.inputs) == 0
+ assert len(self.outputs) == 0
+ out_file_name = self.header_to_remove.abspath()
+ try:
+ os.unlink(out_file_name)
+ except OSError as ex:
+ if ex.errno != 2:
+ raise
+ return 0
+
+
+class gen_ns3_module_header_task(Task.Task):
+ before = 'cxx'
+ after = 'ns3header'
+ color = 'BLUE'
+
+ def runnable_status(self):
+ if self.mode == 'remove':
+ if os.path.exists(self.header_to_remove.abspath()):
+ return Task.RUN_ME
+ else:
+ return Task.SKIP_ME
+ else:
+ return super(gen_ns3_module_header_task, self).runnable_status()
+
+ def __str__(self):
+ "string to display to the user"
+ env = self.env
+ src_str = ' '.join([a.bldpath() for a in self.inputs])
+ tgt_str = ' '.join([a.bldpath() for a in self.outputs])
+ if self.outputs: sep = ' -> '
+ else: sep = ''
+ if self.mode == 'remove':
+ return 'rm-module-header %s' % (self.header_to_remove.abspath(),)
+ return 'gen-module-header: %s' % (tgt_str)
+
+ def run(self):
+ if self.mode == 'remove':
+ assert len(self.inputs) == 0
+ assert len(self.outputs) == 0
+ out_file_name = self.header_to_remove.abspath()
+ try:
+ os.unlink(out_file_name)
+ except OSError as ex:
+ if ex.errno != 2:
+ raise
+ return 0
+ assert len(self.outputs) == 1
+ out_file_name = self.outputs[0].get_bld().abspath()#self.env)
+ header_files = [os.path.basename(node.abspath()) for node in self.inputs]
+ outfile = open(out_file_name, "w")
+ header_files.sort()
+
+ print("""
+#ifdef NS3_MODULE_COMPILATION
+# error "Do not include ns3 module aggregator headers from other modules; these are meant only for end user scripts."
+#endif
+
+#ifndef NS3_MODULE_%s
+ """ % (self.module.upper().replace('-', '_'),), file=outfile)
+
+ # if self.module_deps:
+ # print >> outfile, "// Module dependencies:"
+ # for dep in self.module_deps:
+ # print >> outfile, "#include \"%s-module.h\"" % dep
+
+ print(file=outfile)
+ print("// Module headers:", file=outfile)
+ for header in header_files:
+ print("#include \"%s\"" % (header,), file=outfile)
+
+ print("#endif", file=outfile)
+
+ outfile.close()
+ return 0
+
+ def sig_explicit_deps(self):
+ self.m.update('\n'.join(sorted([node.abspath() for node in self.inputs])).encode('utf-8'))
+ return self.m.digest()
+
+ def unique_id(self):
+ try:
+ return self.uid
+ except AttributeError:
+ "this is not a real hot zone, but we want to avoid surprizes here"
+ m = Utils.md5()
+ m.update("ns-3-module-header-%s" % self.module)
+ self.uid = m.digest()
+ return self.uid
+
+
+# Generates a 'ns3/foo-module.h' header file that includes all public
+# ns3 headers of a certain module.
+@TaskGen.feature('ns3moduleheader')
+@TaskGen.after_method('process_rule')
+def apply_ns3moduleheader(self):
+ ## get all of the ns3 headers
+ ns3_dir_node = self.bld.path.find_or_declare("ns3")
+ all_headers_inputs = []
+ found_the_module = False
+ for ns3headers in self.bld.all_task_gen:
+ if 'ns3header' in getattr(ns3headers, "features", []):
+ if ns3headers.module != self.module:
+ continue
+ found_the_module = True
+ for source in sorted(ns3headers.headers):
+ source = os.path.basename(source)
+ node = ns3_dir_node.find_or_declare(os.path.basename(source))
+ if node is None:
+ fatal("missing header file %s" % (source,))
+ all_headers_inputs.append(node)
+ if not found_the_module:
+ raise WafError("error finding headers for module %s" % self.module)
+ if not all_headers_inputs:
+ return
+
+ try:
+ module_obj = self.bld.get_tgen_by_name("ns3-" + self.module)
+ except WafError: # maybe the module was disabled, and therefore removed
+ return
+
+ all_headers_outputs = [ns3_dir_node.find_or_declare("%s-module.h" % self.module)]
+ task = self.create_task('gen_ns3_module_header')
+ task.module = self.module
+ task.mode = getattr(self, "mode", "install")
+ if task.mode == 'install':
+ assert module_obj is not None, self.module
+ self.bld.install_files('${INCLUDEDIR}/%s%s/ns3' % (wutils.APPNAME, wutils.VERSION),
+ ns3_dir_node.find_or_declare("%s-module.h" % self.module))
+ task.set_inputs(all_headers_inputs)
+ task.set_outputs(all_headers_outputs)
+ task.module_deps = module_obj.module_deps
+ else:
+ task.header_to_remove = all_headers_outputs[0]
diff -Naur ns-3.26/doc/build.txt ns-3.27/doc/build.txt
--- ns-3.26/doc/build.txt 2016-10-03 19:49:01.487388845 -0700
+++ ns-3.27/doc/build.txt 2017-10-11 21:45:51.801600352 -0700
@@ -48,7 +48,7 @@
4. ./waf --run "program [args]"
Run a ns3 program, given its target name, with the given
- arguments. This takes care of automatically modifying the the
+ arguments. This takes care of automatically modifying the
path for finding the ns3 dynamic libraries in the environment
before running the program. Note: the "program [args]" string is
parsed using POSIX shell rules.
diff -Naur ns-3.26/doc/doxygen.conf ns-3.27/doc/doxygen.conf
--- ns-3.26/doc/doxygen.conf 2016-10-03 19:49:01.492388808 -0700
+++ ns-3.27/doc/doxygen.conf 2017-10-11 21:45:51.806600369 -0700
@@ -788,7 +788,8 @@
doc/introspected-doxygen.h \
examples \
utils \
- src
+ src \
+ contrib
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -860,42 +861,10 @@
# that contain example code fragments that are included (see the \include
# command).
-EXAMPLE_PATH = src/aodv/examples \
- src/bridge/examples \
- src/brite/examples \
- src/buildings/examples \
- src/click/examples \
- src/config-store/examples \
- src/core/examples \
- src/core/doc \
- src/csma/examples \
- src/csma-layout/examples \
- src/dsdv/examples \
- src/dsr/examples \
- src/energy/examples \
- src/fd-net-device/examples \
- src/flow-monitor/examples \
- src/internet/examples \
- src/lte/examples \
- src/mesh/examples \
- src/mobility/examples \
- src/mpi/examples \
- src/netanim/examples \
- src/network/examples \
- src/nix-vector-routing/examples \
- src/olsr/examples \
- src/openflow/examples \
- src/point-to-point/examples \
- src/propagation/examples \
- src/spectrum/examples \
- src/stats/examples \
- src/tap-bridge/examples \
- src/topology-read/examples \
- src/uan/examples \
- src/virtual-net-device/examples \
- src/visualizer/examples \
- src/wifi/examples \
- src/wimax/examples
+EXAMPLE_PATH = examples \
+ utils \
+ src \
+ contrib
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@@ -2075,13 +2044,19 @@
PREDEFINED = NS3_ASSERT_ENABLE \
NS3_LOG_ENABLE \
+ NS_ABORT_MSG_UNLESS()=1 \
NS_LOG_COMPONENT_DEFINE()=1 \
NS_LOG_COMPONENT_DEFINE_MASK()=1 \
NS_OBJECT_ENSURE_REGISTERED()=1 \
+ NS_OBJECT_TEMPLATE_CLASS_DEFINE()=1 \
NS3_BUILD_PROFILE_DEBUG \
NS3_BUILD_PROFILE_RELEASE \
- NS3_BUILD_PROFILE_OPTIMIZED
-
+ NS3_BUILD_PROFILE_OPTIMIZED \
+ INT64X64_USE_CAIRO \
+ INT64X64_USE_DOUBLE \
+ INT64X64_USE_CAIRO \
+
+
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
# macro definition that is found in the sources will be used. Use the PREDEFINED
@@ -2205,7 +2180,7 @@
# set to NO
# The default value is: NO.
-HAVE_DOT = YES
+HAVE_DOT = yes
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
# to run in parallel. When set to 0 doxygen will base this on the number of
diff -Naur ns-3.26/doc/doxygen.warnings.report.sh ns-3.27/doc/doxygen.warnings.report.sh
--- ns-3.26/doc/doxygen.warnings.report.sh 2016-10-03 19:49:01.493388800 -0700
+++ ns-3.27/doc/doxygen.warnings.report.sh 2017-10-11 21:45:51.807600372 -0700
@@ -6,7 +6,7 @@
me=$(basename $0)
DIR="$(dirname $0)"
# Trick to get the absolute path, since doxygen prefixes errors that way
-ROOT=$(cd "$DIR/.."; pwd)
+ROOT=$(cd "$DIR/.."; pwd -P)
# Known log files
STANDARDLOGFILE=doxygen.log
@@ -25,7 +25,7 @@
{
cat <<-EOF
- Usage: $me [-eithv] [-s | -l | -w] [-m ] [-f ] [-F ]
+ Usage: $me [-beithv] [-s | -l | -w] [-m ] [-f ] [-F ]
Run doxygen to generate all errors; report error counts
by module and file.
@@ -35,14 +35,15 @@
-s Skip doxygen run; use existing .
-w Skip doxygen run; use existing warnings log doc/$WARNINGSLOGFILE
-l Skip doxygen run; use the normal doxygen log doc/$STANDARDLOGFILE
-
+
+ -b Omit the blacklist filter of files whose warnings we ignore
-e Filter out warnings from */examples/*
-t Filter out warnings from */test/*
-m Only include files matching src/
-f Only include files matching the
-F Exclude files matching the
- -v Show the doxygen run output
+ -v Show detailed output from each step. Multiple allowed.
-h Print this usage message
The default behavior is to modify doxygen.conf temporarily to
@@ -118,6 +119,7 @@
skip_intro=0
# Filtering flags
+filter_blacklist=1
filter_examples=0
filter_test=0
filter_module=""
@@ -127,9 +129,10 @@
echo
echo "$me:"
-while getopts :ef:F:hilm:s:tvw option ; do
+while getopts :bef:F:hilm:s:tvw option ; do
case $option in
+ (b) filter_blacklist=0 ;;
(e) filter_examples=1 ;;
@@ -196,9 +199,13 @@
verbose "" "Skipping ./waf build and print-introspected-doxygen."
else
# Run introspection, which may require a build
- verbose -n "Building and running print-introspected-doxygen..."
- (cd "$ROOT" && ./waf --run print-introspected-doxygen >doc/introspected-doxygen.h >&6 2>&6 )
+ verbose -n "Building..."
+ (cd "$ROOT" && ./waf build >&6 2>&6 )
status_report $? "./waf build"
+ verbose -n "Running print-introspected-doxygen..."
+ (cd "$ROOT" && ./waf --run print-introspected-doxygen >doc/introspected-doxygen.h >&6 2>&6 )
+ status_report $? "./waf --run print-introspected-doxygen"
+
fi
# Modify doxygen.conf to generate all the warnings
@@ -206,7 +213,7 @@
conf=$DIR/doxygen.conf
- sed -i.bak -E '/^EXTRACT_ALL |^HAVE_DOT |^WARNINGS /s/YES/no/' $conf
+ sed -i.bak -E '/^(EXTRACT_ALL|HAVE_DOT|CLASS_DIAGRAMS|WARNINGS|SOURCE_BROWSER) /s/YES/no/;/^HTML_OUTPUT /s/html/html-warn/' $conf
verbose -n "Rebuilding doxygen (v$(doxygen --version)) docs with full errors..."
(cd "$ROOT" && ./waf --doxygen-no-build >&6 2>&6 )
@@ -224,25 +231,52 @@
# Log filters --------------------------
#
+# Append a regular expression to a parameter
+# with '\|' alternation operator if the parameter wasn't empty to begin with.
+function REappend
+{
+ local param="$1"
+ local token="$2"
+
+ eval "${param}=\"${!param:-}${!param:+\\|}$token\""
+}
+
# Filter in regular expression for -m and -f
filter_inRE=""
if [ "$filter_module" != "" ] ; then
- filter_inRE="${filter_inRE:-}${filter_inRE:+\\|}src/$filter_module"
+ REappend filter_inRE src/$filter_module
fi
if [ "$filter_in" != "" ] ; then
- filter_inRE="${filter_inRE:-}${filter_inRE:+\\|}$filter_in"
+ REappend filter_inRE "$filter_in"
fi
-# Filter out regular expression for -e, -t and -F
+# Blacklist filter of files whose warnings we ignore
+filter_blacklistRE=""
+
+# External files: adding our own doxygen makes diffs with upstream very hard
+# cairo-wideint
+REappend filter_blacklistRE "cairo-wideint"
+
+# Functions with varying numbers of arguments
+# This is temporary until we move to C++-14
+REappend filter_blacklistRE "Schedule(Time"
+REappend filter_blacklistRE "ScheduleWithContext(uint32_t"
+REappend filter_blacklistRE "Schedule\\(Now\\|Destroy\\)(\\(MEM\\|void\\)"
+
filter_outRE=""
+if [ $filter_blacklist -eq 1 ]; then
+ echo "Filtering out blacklist: \"$filter_blacklistRE\""
+ REappend filter_outRE "$filter_blacklistRE"
+fi
+# Filter out regular expression for -e, -t and -F
if [ $filter_examples -eq 1 ]; then
- filter_outRE="${filter_outRE:-}${filter_outRE:+\\|}/examples/"
+ REappend filter_outRE "/examples/"
fi
if [ $filter_test -eq 1 ]; then
- filter_outRE="${filter_outRE:-}${filter_outRE:+\\|}/test/"
+ REappend filter_outRE "/test/"
fi
if [ "$filter_out" != "" ] ; then
- filter_outRE="${filter_outRE:-}${filter_outRE:+\\|}$filter_out"
+ REappend filter_outRE "$filter_out"
fi
# Show the resulting filters
@@ -252,7 +286,6 @@
if [ "${filter_outRE:-}" != "" ] ; then
echo "Filtering out \"$filter_outRE\""
fi
-echo
# Filter log file
function filter_log
@@ -279,6 +312,7 @@
# Analyze the log ----------------------
#
+verbose -n "Filtering the doxygen log..."
# List of module directories (e.g, "src/core/model")
undocmods=$( \
@@ -346,6 +380,8 @@
)
fi
+status_report 0 "Filter"
+echo
# Summarize the log --------------------
diff -Naur ns-3.26/doc/main.h ns-3.27/doc/main.h
--- ns-3.26/doc/main.h 2016-10-03 19:49:01.493388800 -0700
+++ ns-3.27/doc/main.h 2017-10-11 21:45:51.808600376 -0700
@@ -1,4 +1,8 @@
/**
+ * \file
+ * Main page of the Doxygen-generated documentation.
+ */
+/**
* \mainpage ns-3 Documentation
*
* \section intro-sec Introduction
@@ -71,10 +75,15 @@
* ns3 namespace.
*/
-// Macros defined by the build system.
-//
-// These have to be visible for doxygen to document them,
-// so we put them here in a file only seen by doxygen, not the compiler.
+
+/**
+ * \name Macros defined by the build system.
+ *
+ * These have to be visible for doxygen to document them,
+ * so we put them here in a file only seen by doxygen, not the compiler.
+ *
+ * @{
+ */
/**
* \ingroup assert
*
@@ -96,3 +105,5 @@
* This is normally set by `./waf configure --build-profile=debug`.
*/
#define NS3_LOG_ENABLE
+
+/**@}*/
diff -Naur ns-3.26/doc/manual/source/conf.py ns-3.27/doc/manual/source/conf.py
--- ns-3.26/doc/manual/source/conf.py 2016-10-03 19:49:01.499388756 -0700
+++ ns-3.27/doc/manual/source/conf.py 2017-10-11 21:45:51.813600392 -0700
@@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
-version = 'ns-3.26'
+version = 'ns-3.27'
# The full version, including alpha/beta/rc tags.
-release = 'ns-3.26'
+release = 'ns-3.27'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff -Naur ns-3.26/doc/manual/source/documentation.rst ns-3.27/doc/manual/source/documentation.rst
--- ns-3.26/doc/manual/source/documentation.rst 2016-10-03 19:49:01.499388756 -0700
+++ ns-3.27/doc/manual/source/documentation.rst 2017-10-11 21:45:51.814600396 -0700
@@ -259,22 +259,22 @@
We use Doxygen_ to generate browsable_ API documentation. Doxygen
provides a number of useful features:
- * Summary table of all class members.
- * Graphs of inheritance and collaboration for all classes.
- * Links to the source code implementing each function.
- * Links to every place a member is used.
- * Links to every object used in implementing a function.
- * Grouping of related classes, such as all the classes related to
- a specific protocol.
+* Summary table of all class members.
+* Graphs of inheritance and collaboration for all classes.
+* Links to the source code implementing each function.
+* Links to every place a member is used.
+* Links to every object used in implementing a function.
+* Grouping of related classes, such as all the classes related to
+ a specific protocol.
In addition, we use the ``TypeId`` system to add to the documentation
for every class
- * The ``Config`` paths by which such objects can be reached.
- * Documentation for any ``Attributes``, including ``Attributes``
- defined in parent classes.
- * Documentation for any ``Trace`` sources defined by the class.
- * The memory footprint for each class.
+* The ``Config`` paths by which such objects can be reached.
+* Documentation for any ``Attributes``, including ``Attributes``
+ defined in parent classes.
+* Documentation for any ``Trace`` sources defined by the class.
+* The memory footprint for each class.
Doxygen operates by scaning the source code, looking for
specially marked comments. It also creates a cross reference,
@@ -333,9 +333,9 @@
Some items to note:
- * Use sentence case, including the initial capital.
- * Use punctuation, especially \`.'s at the end of sentences or phrases.
- * The ``\brief`` tag is not needed; the first sentence will be
+* Use sentence case, including the initial capital.
+* Use punctuation, especially \`.'s at the end of sentences or phrases.
+* The ``\brief`` tag is not needed; the first sentence will be
used as the brief description.
Every class, method, typedef, member variable, function argument
@@ -606,8 +606,9 @@
be done for function arguments.
* Use ``\tparam T \explicit`` because the type ``T`` can't be deduced;
- it must be given explicitly at the invocation site.
-
+ it must be given explicitly at the invocation site, as in
+ ``Create (...)``
+
* ``\internal`` should be used only to set off a discussion of implementation
details, not to mark ``private`` functions (they are already marked,
as ``private``!)
@@ -616,32 +617,31 @@
even in test suites. These cause all instances of the class name
literal \`A' to be rendered as links.
-
As noted above, static functions don't inherit the documentation
of the same functions in the parent class. |ns3| uses a few static
functions ubiquitously; the suggested documentation block for these
cases is:
- * Default constructor/destructor::
+* Default constructor/destructor::
- MyClass (); //!< Default constructor
- ~MyClass (); //!< Destructor
+ MyClass (); //!< Default constructor
+ ~MyClass (); //!< Destructor
- * Dummy destructor and DoDispose::
+* Dummy destructor and DoDispose::
- /** Dummy destructor, see DoDispose. */
- ~MyClass ();
+ /** Dummy destructor, see DoDispose. */
+ ~MyClass ();
- /** Destructor implementation */
- virtual void DoDispose ();
+ /** Destructor implementation */
+ virtual void DoDispose ();
- * GetTypeId::
+* GetTypeId::
- /**
- * Register this type.
- * \return The object TypeId.
- */
- static TypeId GetTypeId (void);
+ /**
+ * Register this type.
+ * \return The object TypeId.
+ */
+ static TypeId GetTypeId (void);
diff -Naur ns-3.26/doc/manual/source/enable-modules.rst ns-3.27/doc/manual/source/enable-modules.rst
--- ns-3.26/doc/manual/source/enable-modules.rst 2016-10-03 19:49:01.500388748 -0700
+++ ns-3.27/doc/manual/source/enable-modules.rst 2017-10-11 21:45:51.814600396 -0700
@@ -6,7 +6,7 @@
As with most software projects, |ns3| is ever growing larger in terms of number of modules, lines of code, and memory footprint. Users, however, may only use a few of those modules at a time. For this reason, users may want to explicitly enable only the subset of the possible |ns3| modules that they actually need for their research.
-This chapter discusses how to enable only the |ns3| modules that you are intersted in using.
+This chapter discusses how to enable only the |ns3| modules that you are interested in using.
How to enable a subset of |ns3|'s modules
*****************************************
diff -Naur ns-3.26/doc/manual/source/events.rst ns-3.27/doc/manual/source/events.rst
--- ns-3.26/doc/manual/source/events.rst 2016-10-03 19:49:01.500388748 -0700
+++ ns-3.27/doc/manual/source/events.rst 2017-10-11 21:45:51.815600399 -0700
@@ -168,7 +168,7 @@
Notes:
* Users need to be careful to propagate DoInitialize methods across objects
- by calling Initialize explicitely on their member objects
+ by calling Initialize explicitly on their member objects
* The context id associated with each ScheduleWithContext method has
other uses beyond logging: it is used by an experimental branch of ns-3
to perform parallel simulation on multicore systems using
diff -Naur ns-3.26/doc/manual/source/gnuplot.rst ns-3.27/doc/manual/source/gnuplot.rst
--- ns-3.26/doc/manual/source/gnuplot.rst 2016-10-03 19:49:01.503388726 -0700
+++ ns-3.27/doc/manual/source/gnuplot.rst 2017-10-11 21:45:51.817600406 -0700
@@ -36,11 +36,9 @@
.. sourcecode:: bash
- $ ./waf shell
- $ cd build/debug/src/stats/examples
- $ ./gnuplot-example
+ $ ./waf --run src/stats/examples/gnuplot-example
-This should produce the following gnuplot control files in the directory where the example is located:
+This should produce the following gnuplot control files:
.. sourcecode:: text
@@ -56,7 +54,7 @@
$ gnuplot plot-2d-with-error-bars.plt
$ gnuplot plot-3d.plt
-This should produce the following graphics files in the directory where the example is located:
+This should produce the following graphics files:
.. sourcecode:: text
diff -Naur ns-3.26/doc/manual/source/helpers.rst ns-3.27/doc/manual/source/helpers.rst
--- ns-3.26/doc/manual/source/helpers.rst 2016-10-03 19:49:01.503388726 -0700
+++ ns-3.27/doc/manual/source/helpers.rst 2017-10-11 21:45:51.818600409 -0700
@@ -7,7 +7,7 @@
The above chapters introduced you to various |ns3| programming concepts such as
smart pointers for reference-counted memory management, attributes, namespaces,
callbacks, etc. Users who work at this low-level API can interconnect |ns3|
-objects with fine granulariy. However, a simulation program written entirely
+objects with fine granularity. However, a simulation program written entirely
using the low-level API would be quite long and tedious to code. For this
reason, a separate so-called "helper API" has been overlaid on the core |ns3|
API. If you have read the |ns3| tutorial, you will already be familiar with the
diff -Naur ns-3.26/doc/manual/source/logging.rst ns-3.27/doc/manual/source/logging.rst
--- ns-3.26/doc/manual/source/logging.rst 2016-10-03 19:49:01.505388711 -0700
+++ ns-3.27/doc/manual/source/logging.rst 2017-10-11 21:45:51.820600416 -0700
@@ -342,6 +342,88 @@
2. Add logging statements (macro calls) to your functions and function bodies.
+In case you want to add logging statements to the methods of your template class
+(which are defined in an header file):
+
+1. Invoke the ``NS_LOG_TEMPLATE_DECLARE;`` macro in the private section of
+ your class declaration. For instance:
+
+ ::
+
+ template
+ class Queue : public QueueBase
+ {
+ ...
+ private:
+ std::list > m_packets; //!< the items in the queue
+ NS_LOG_TEMPLATE_DECLARE; //!< the log component
+ };
+
+ This requires you to perform these steps for all the subclasses of your class.
+
+2. Invoke the ``NS_LOG_TEMPLATE_DEFINE (...);`` macro in the constructor of
+ your class by providing the name of a log component registered by calling
+ the ``NS_LOG_COMPONENT_DEFINE (...);`` macro in some module. For instance:
+
+ ::
+
+ template
+ Queue- ::Queue ()
+ : NS_LOG_TEMPLATE_DEFINE ("Queue")
+ {
+ }
+
+3. Add logging statements (macro calls) to the methods of your class.
+
+In case you want to add logging statements to a static member template
+(which is defined in an header file):
+
+1. Invoke the ``NS_LOG_STATIC_TEMPLATE_DEFINE (...);`` macro in your static
+ method by providing the name of a log component registered by calling
+ the ``NS_LOG_COMPONENT_DEFINE (...);`` macro in some module. For instance:
+
+ ::
+
+ template
+ void
+ NetDeviceQueue::PacketEnqueued (Ptr > queue,
+ Ptr ndqi,
+ uint8_t txq, Ptr item)
+ {
+
+ NS_LOG_STATIC_TEMPLATE_DEFINE ("NetDeviceQueueInterface");
+ ...
+
+2. Add logging statements (macro calls) to your static method.
+
+Controlling timestamp precision
+*******************************
+
+Timestamps are printed out in units of seconds. When used with the default
+|ns3| time resolution of nanoseconds, the default timestamp precision is 9
+digits, with fixed format, to allow for 9 digits to be consistently printed
+to the right of the decimal point. Example:
+
+::
+
+ +0.000123456s RandomVariableStream:SetAntithetic(0x805040, 0)
+
+When the |ns3| simulation uses higher time resolution such as picoseconds
+or femtoseconds, the precision is expanded accordingly; e.g. for picosecond:
+
+::
+
+ +0.000123456789s RandomVariableStream:SetAntithetic(0x805040, 0)
+
+When the |ns3| simulation uses a time resolution lower than microseconds,
+the default C++ precision is used.
+
+An example program at ``src\core\examples\sample-log-time-format.cc``
+demonstrates how to change the timestamp formatting.
+
+The maximum useful precision is 20 decimal digits, since Time is signed 64
+bits.
+
Logging Macros
==============
diff -Naur ns-3.26/doc/manual/source/python.rst ns-3.27/doc/manual/source/python.rst
--- ns-3.26/doc/manual/source/python.rst 2016-10-03 19:49:01.508388689 -0700
+++ ns-3.27/doc/manual/source/python.rst 2017-10-11 21:45:51.823600426 -0700
@@ -18,7 +18,22 @@
The intent is not to provide a different language choice to author new
|ns3| models implemented in Python.
-Python bindings for |ns3| use a tool called PyBindGen (https://github.com/gjcarneiro/pybindgen).
+Python bindings for |ns3| use a tool called PyBindGen (https://github.com/gjcarneiro/pybindgen) to create Python modules from the C++ libraries built by
+Waf. The Python bindings that PyBindGen uses are maintained in a
+``bindings`` directory in each module, and must be maintained to match the
+C++ API of that ns-3 module. If the C++ API changes, the Python bindings file
+must either be modified by hand accordingly, or the bindings must be
+regenerated by an automated scanning process.
+
+If a user is not interested in Python, he or she may disable the use of
+Python bindings at Waf configure time. In this case, changes to the C++
+API of a provided module will not cause the module to fail to compile.
+
+The process for automatically generating Python bindings relies on a toolchain
+involving a development installation of the Clang compiler, a program called
+CastXML (https://github.com/CastXML/CastXML), and a program called
+pygccxml (https://github.com/gccxml/pygccxml). The toolchain can be installed
+using the ns-3 ``bake`` build tool.
An Example Python Script that Runs |ns3|
****************************************
@@ -113,7 +128,7 @@
#. some of the APIs involve pointers, which require knowledge of what kind of memory passing semantics (who owns what memory). Such knowledge is not part of the function signatures, and is either documented or sometimes not even documented. Annotations are needed to bind those functions;
#. Sometimes a unusual fundamental data type or C++ construct is used which is not yet supported by PyBindGen;
-#. GCC-XML does not report template based classes unless they are instantiated.
+#. GCC-XML does not report template based classes unless they are instantiated. (Note: Need to confirm this limitation still exists with CastXML)
Most of the missing APIs can be wrapped, given enough time, patience, and expertise, and will likely be wrapped if bug reports are submitted. However, don't file a bug report saying "bindings are incomplete", because we do not have manpower to complete 100% of the bindings.
@@ -166,7 +181,7 @@
Pcap file writing is supported via the normal API.
-Ascii tracing is supported since |ns3|.4 via the normal C++ API translated to Python. However, ascii tracing requires the creation of an ostream object to pass into the ascii tracing methods. In Python, the C++ std::ofstream has been minimally wrapped to allow this. For example:
+ASCII tracing is supported since |ns3|.4 via the normal C++ API translated to Python. However, ASCII tracing requires the creation of an ostream object to pass into the ASCII tracing methods. In Python, the C++ std::ofstream has been minimally wrapped to allow this. For example:
::
@@ -178,22 +193,6 @@
There is one caveat: you must not allow the file object to be garbage collected while |ns3| is still using it. That means that the 'ascii' variable above must not be allowed to go out of scope or else the program will crash.
-Cygwin limitation
-+++++++++++++++++
-
-Python bindings do not work on Cygwin. This is due to a gccxml bug.
-
-You might get away with it by re-scanning API definitions from within the
-cygwin environment (./waf --apiscan=all). However the most likely solution
-will probably have to be that we disable python bindings in CygWin.
-
-If you really care about Python bindings on Windows, try building with mingw and native
-python instead. Or else, to build without python bindings, disable python bindings in the configuration stage:
-
-.. sourcecode:: bash
-
- $ ./waf configure --disable-python
-
Working with Python Bindings
****************************
@@ -204,7 +203,7 @@
The process by which Python bindings are handled is the following:
-#. Periodically a developer uses a GCC-XML (http://www.gccxml.org) based API scanning script, which saves the scanned API definition as ``bindings/python/ns3_module_*.py`` files or as Python files in each modules' ``bindings`` directory. These files are kept under version control in the main |ns3| repository;
+#. Periodically a developer uses a CastXML (https://github.com/CastXML/CastXML) based API scanning script, which saves the scanned API definition as ``bindings/python/ns3_module_*.py`` files or as Python files in each modules' ``bindings`` directory. These files are kept under version control in the main |ns3| repository;
#. Other developers clone the repository and use the already scanned API definitions;
#. When configuring |ns3|, pybindgen will be automatically downloaded if not already installed. Released |ns3| tarballs will ship a copy of pybindgen.
@@ -251,7 +250,7 @@
breaks the compilation of the existing Python bindings.
There are two steps. First, the bindings toolchain must be enabled in
-the |ns3| build. This requires that the gccxml and pygccxml tools be
+the |ns3| build. This requires that the castxml and pygccxml tools be
installed on the system or using the bake build tool. Second, Waf
can be used to update the bindings.
@@ -268,8 +267,8 @@
Python API Scanning Support : not enabled (Missing 'pygccxml' Python module)
-In this case, the user must take steps to install gccxml and pygccxml;
-gccxml binary must be in the shell's path, and pygccxml must be in the
+In this case, the user must take steps to install castxml and pygccxml;
+castxml binary must be in the shell's path, and pygccxml must be in the
Python path.
An automated setup for this is provided by the `bake` build system, if the
@@ -278,28 +277,24 @@
::
- ./bake.py configure -e ns-allinone-3.26
+ ./bake.py configure -e ns-allinone-3.27
./bake.py download
./bake.py build
-At present, this toolchain is only supported for gcc version 4; gcc-5
-and gcc-6 are not supported due to the gccxml project stopping maintenance
-a few years ago. clang compiler is also not supported. The |ns3| project
-plans to convert to the CastXML project to replace gccxml in the future,
-in which case newer versions of gcc as well as clang will be supported.
-
Once API scanning support is enabled, to scan the modular Python bindings
for the core module, for example, do the following:
.. sourcecode:: bash
- $ ./waf --apiscan=core
+ $ ./waf --apiscan=core --no32bit-scan
To scan the modular Python bindings for all of the modules, do the following:
.. sourcecode:: bash
- $ ./waf --apiscan=all
+ $ ./waf --apiscan=all --no32bit-scan
+
+The ``--no32bit-scan`` flag is described below.
Adding Modular Bindings To A Existing or New Module
+++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -310,6 +305,46 @@
bld.ns3_python_bindings()
+One must also provide the bindings files (usually by running the scanning
+framework).
+
+Differences between MacOS and Linux bindings
+++++++++++++++++++++++++++++++++++++++++++++
+
+Linux (64-bit, as most modern installations use) and MacOS use different
+data models, as explained here: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.cbcpx01/datatypesize64.htm
+
+Linux uses the LP64 model, and MacOS (as well as 32-bit Linux) use the ILP32
+model. Users will note that there are two versions of bindings files in
+each ns-3 module directory; one with an ILP32.py suffix and one with
+an LP64.py suffix. Only one is used on any given platform. The main
+difference is in the representation of the 64 bit integer type as either
+a 'long' (LP64) or 'long long' (ILP32).
+
+As of ns-3.27, the CastXML framework can generate LP64 bindings by passing
+the ``--no32bit-scan`` flag. However, the framework does not automatically
+generate 32bit scans at the moment. Instead, users must manually generate
+the ILP32.py equivalents by taking all instances of 'unsigned long' in the
+bindings file and converting them to 'unsigned long long', such as:
+
+::
+
+ - cls.add_instance_attribute('nMarkedBytes', 'std::map< std::string, unsigned long >', is_const=False)
+ + cls.add_instance_attribute('nMarkedBytes', 'std::map< std::string, unsigned long long >', is_const=False)
+
+In summary, to generate LP64 bindings for Linux 64-bit systems, it is
+sufficient to call:
+
+::
+
+ $ ./waf --apiscan=core --no32bit-scan
+
+To generate ILP32 bindings, one first must generate the LP64.py file as above,
+and then copy the file to be named with an ILP32.py suffix, and then
+hand-edit that file, replacing all instances of 'unsigned long' with
+'unsigned long long'. |ns3| maintainers are working to better automate
+this process for future releases.
+
Organization of the Modular Python Bindings
+++++++++++++++++++++++++++++++++++++++++++
diff -Naur ns-3.26/doc/manual/source/random-variables.rst ns-3.27/doc/manual/source/random-variables.rst
--- ns-3.26/doc/manual/source/random-variables.rst 2016-10-03 19:49:01.508388689 -0700
+++ ns-3.27/doc/manual/source/random-variables.rst 2017-10-11 21:45:51.823600426 -0700
@@ -355,7 +355,7 @@
When you publish simulation results, a key piece of configuration
information that you should always state is how you used the
-the random number generator.
+random number generator.
* what seeds you used,
* what RNG you used if not the default,
diff -Naur ns-3.26/doc/manual/source/tracing.rst ns-3.27/doc/manual/source/tracing.rst
--- ns-3.26/doc/manual/source/tracing.rst 2016-10-03 19:49:01.512388659 -0700
+++ ns-3.27/doc/manual/source/tracing.rst 2017-10-11 21:45:51.827600439 -0700
@@ -521,32 +521,32 @@
Ascii Tracing Device Helpers
++++++++++++++++++++++++++++
-The behavior of the ascii trace helper ``mixin`` is substantially similar to
+The behavior of the ASCII trace helper ``mixin`` is substantially similar to
the pcap version. Take a look at ``src/network/helper/trace-helper.h`` if you want to
follow the discussion while looking at real code.
The class ``AsciiTraceHelperForDevice`` adds the high level functionality for
-using ascii tracing to a device helper class. As in the pcap case, every device
-must implement a single virtual method inherited from the ascii trace
+using ASCII tracing to a device helper class. As in the pcap case, every device
+must implement a single virtual method inherited from the ASCII trace
``mixin``.::
virtual void EnableAsciiInternal (Ptr stream, std::string prefix, Ptr nd) = 0;
The signature of this method reflects the device-centric view of the situation
at this level; and also the fact that the helper may be writing to a shared
-output stream. All of the public ascii-trace-related methods inherited from
+output stream. All of the public ASCII-trace-related methods inherited from
class ``AsciiTraceHelperForDevice`` reduce to calling this single device-
-dependent implementation method. For example, the lowest level ascii trace
+dependent implementation method. For example, the lowest level ASCII trace
methods,::
void EnableAscii (std::string prefix, Ptr nd);
void EnableAscii (Ptr stream, Ptr nd);
will call the device implementation of ``EnableAsciiInternal`` directly,
-providing either a valid prefix or stream. All other public ascii tracing
+providing either a valid prefix or stream. All other public ASCII tracing
methods will build on these low-level functions to provide additional user-level
functionality. What this means to the user is that all device helpers in the
-system will have all of the ascii trace methods available; and these methods
+system will have all of the ASCII trace methods available; and these methods
will all work in the same way across devices if the devices implement
``EnablAsciiInternal`` correctly.
@@ -576,7 +576,7 @@
You are encouraged to peruse the Doxygen for class ``TraceHelperForDevice`` to
find the details of these methods; but to summarize ...
-There are twice as many methods available for ascii tracing as there were for
+There are twice as many methods available for ASCII tracing as there were for
pcap tracing. This is because, in addition to the pcap-style model where traces
from each unique node/device pair are written to a unique file, we support a
model in which trace information for many node/device pairs is written to a
@@ -584,7 +584,7 @@
mechanism is replaced by a mechanism to refer to a common file; and the number
of API methods is doubled to allow all combinations.
-Just as in pcap tracing, you can enable ascii tracing on a particular
+Just as in pcap tracing, you can enable ASCII tracing on a particular
node/net-device pair by providing a ``Ptr`` to an ``EnableAscii``
method. The ``Ptr`` is implicit since the net device must belong to
exactly one ``Node``. For example,::
@@ -593,12 +593,12 @@
...
helper.EnableAscii ("prefix", nd);
-In this case, no trace contexts are written to the ascii trace file since they
+In this case, no trace contexts are written to the ASCII trace file since they
would be redundant. The system will pick the file name to be created using the
same rules as described in the pcap section, except that the file will have the
suffix ".tr" instead of ".pcap".
-If you want to enable ascii tracing on more than one net device and have all
+If you want to enable ASCII tracing on more than one net device and have all
traces sent to a single file, you can do that as well by using an object to
refer to a single file::
@@ -610,12 +610,12 @@
helper.EnableAscii (stream, nd1);
helper.EnableAscii (stream, nd2);
-In this case, trace contexts are written to the ascii trace file since they
+In this case, trace contexts are written to the ASCII trace file since they
are required to disambiguate traces from the two devices. Note that since the
user is completely specifying the file name, the string should include the ".tr"
for consistency.
-You can enable ascii tracing on a particular node/net-device pair by providing a
+You can enable ASCII tracing on a particular node/net-device pair by providing a
``std::string`` representing an object name service string to an
``EnablePcap`` method. The ``Ptr`` is looked up from the name
string. Again, the ```` is implicit since the named net device must
@@ -648,7 +648,7 @@
contains all of the trace events for both devices. The events would be
disambiguated by trace context strings.
-You can enable ascii tracing on a collection of node/net-device pairs by
+You can enable ASCII tracing on a collection of node/net-device pairs by
providing a ``NetDeviceContainer``. For each ``NetDevice`` in the container the
type is checked. For each device of the proper type (the same type as is managed
by the device helper), tracing is enabled. Again, the ```` is implicit
@@ -658,7 +658,7 @@
...
helper.EnableAscii ("prefix", d);
-This would result in a number of ascii trace files being created, each of which
+This would result in a number of ASCII trace files being created, each of which
follows the --.tr convention. Combining all of the
traces into a single file is accomplished similarly to the examples above::
@@ -679,7 +679,7 @@
...
helper.EnableAscii ("prefix", n);
-This would result in a number of ascii trace files being created, each of which
+This would result in a number of ASCII trace files being created, each of which
follows the --.tr convention. Combining all of the
traces into a single file is accomplished similarly to the examples above:
@@ -696,7 +696,7 @@
helper.EnableAsciiAll ("prefix");
-This would result in a number of ascii trace files being created, one for
+This would result in a number of ASCII trace files being created, one for
every device in the system of the type managed by the helper. All of these
files will follow the --.tr convention. Combining
all of the traces into a single file is accomplished similarly to the examples
@@ -706,20 +706,20 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Implicit in the prefix-style method descriptions above is the construction of
-the complete filenames by the implementation method. By convention, ascii traces
+the complete filenames by the implementation method. By convention, ASCII traces
in the |ns3| system are of the form ``--.tr``.
As previously mentioned, every node in the system will have a system-assigned
node id; and every device will have an interface index (also called a device id)
-relative to its node. By default, then, an ascii trace file created as a result
+relative to its node. By default, then, an ASCII trace file created as a result
of enabling tracing on the first device of node 21, using the prefix "prefix",
would be ``prefix-21-1.tr``.
You can always use the |ns3| object name service to make this more clear. For
example, if you use the object name service to assign the name "server" to node
-21, the resulting ascii trace file name will automatically become,
+21, the resulting ASCII trace file name will automatically become,
``prefix-server-1.tr`` and if you also assign the name "eth0" to the device,
-your ascii trace file name will automatically pick this up and be called
+your ASCII trace file name will automatically pick this up and be called
``prefix-server-eth0.tr``.
Pcap Tracing Protocol Helpers
@@ -864,7 +864,7 @@
Ascii Tracing Protocol Helpers
++++++++++++++++++++++++++++++
-The behavior of the ascii trace helpers is substantially similar to the pcap
+The behavior of the ASCII trace helpers is substantially similar to the pcap
case. Take a look at ``src/network/helper/trace-helper.h`` if you want to follow the
discussion while looking at real code.
@@ -874,7 +874,7 @@
and call ``EnableAsciiIpv6`` instead of ``EnableAsciiIpv4``.
The class ``AsciiTraceHelperForIpv4`` adds the high level functionality for
-using ascii tracing to a protocol helper. Each protocol that enables these
+using ASCII tracing to a protocol helper. Each protocol that enables these
methods must implement a single virtual method inherited from this class.::
virtual void EnableAsciiIpv4Internal (Ptr stream, std::string prefix,
@@ -924,7 +924,7 @@
You are encouraged to peruse the Doxygen for class ``PcapAndAsciiHelperForIpv4``
to find the details of these methods; but to summarize ...
-There are twice as many methods available for ascii tracing as there were for
+There are twice as many methods available for ASCII tracing as there were for
pcap tracing. This is because, in addition to the pcap-style model where traces
from each unique protocol/interface pair are written to a unique file, we
support a model in which trace information for many protocol/interface pairs is
@@ -932,7 +932,7 @@
file name generation mechanism is replaced by a mechanism to refer to a common
file; and the number of API methods is doubled to allow all combinations.
-Just as in pcap tracing, you can enable ascii tracing on a particular
+Just as in pcap tracing, you can enable ASCII tracing on a particular
protocol/interface pair by providing a ``Ptr`` and an ``interface`` to an
``EnableAscii`` method. For example,::
@@ -940,12 +940,12 @@
...
helper.EnableAsciiIpv4 ("prefix", ipv4, 1);
-In this case, no trace contexts are written to the ascii trace file since they
+In this case, no trace contexts are written to the ASCII trace file since they
would be redundant. The system will pick the file name to be created using the
same rules as described in the pcap section, except that the file will have the
suffix ".tr" instead of ".pcap".
-If you want to enable ascii tracing on more than one interface and have all
+If you want to enable ASCII tracing on more than one interface and have all
traces sent to a single file, you can do that as well by using an object to
refer to a single file. We have already something similar to this in the "cwnd"
example above::
@@ -958,12 +958,12 @@
helper.EnableAsciiIpv4 (stream, protocol1, 1);
helper.EnableAsciiIpv4 (stream, protocol2, 1);
-In this case, trace contexts are written to the ascii trace file since they are
+In this case, trace contexts are written to the ASCII trace file since they are
required to disambiguate traces from the two interfaces. Note that since the
user is completely specifying the file name, the string should include the ".tr"
for consistency.
-You can enable ascii tracing on a particular protocol by providing a
+You can enable ASCII tracing on a particular protocol by providing a
``std::string`` representing an object name service string to an ``EnablePcap``
method. The ``Ptr`` is looked up from the name string. The ```` in
the resulting filenames is implicit since there is a one-to-one correspondence
@@ -992,7 +992,7 @@
contains all of the trace events for both interfaces. The events would be
disambiguated by trace context strings.
-You can enable ascii tracing on a collection of protocol/interface pairs by
+You can enable ASCII tracing on a collection of protocol/interface pairs by
providing an ``Ipv4InterfaceContainer``. For each protocol of the proper type
(the same type as is managed by the device helper), tracing is enabled for the
corresponding interface. Again, the ```` is implicit since there is a
@@ -1009,7 +1009,7 @@
...
helper.EnableAsciiIpv4 ("prefix", interfaces);
-This would result in a number of ascii trace files being created, each of which
+This would result in a number of ASCII trace files being created, each of which
follows the -n-i.tr convention. Combining all of the
traces into a single file is accomplished similarly to the examples above::
@@ -1025,7 +1025,7 @@
...
helper.EnableAsciiIpv4 (stream, interfaces);
-You can enable ascii tracing on a collection of protocol/interface pairs by
+You can enable ASCII tracing on a collection of protocol/interface pairs by
providing a ``NodeContainer``. For each ``Node`` in the ``NodeContainer`` the
appropriate protocol is found. For each protocol, its interfaces are enumerated
and tracing is enabled on the resulting pairs. For example,::
@@ -1034,7 +1034,7 @@
...
helper.EnableAsciiIpv4 ("prefix", n);
-This would result in a number of ascii trace files being created, each of which
+This would result in a number of ASCII trace files being created, each of which
follows the --.tr convention. Combining all of the
traces into a single file is accomplished similarly to the examples above:
@@ -1047,12 +1047,12 @@
Of course, the traces can be combined into a single file as shown above.
-Finally, you can enable ascii tracing for all interfaces in the system, with
+Finally, you can enable ASCII tracing for all interfaces in the system, with
associated protocol being the same type as that managed by the device helper.::
helper.EnableAsciiIpv4All ("prefix");
-This would result in a number of ascii trace files being created, one for
+This would result in a number of ASCII trace files being created, one for
every interface in the system related to a protocol of the type managed by the
helper. All of these files will follow the -n-i--.tr."
As previously mentioned, every node in the system will have a system-assigned
node id. Since there is a one-to-one correspondence between protocols and nodes
we use to node-id to identify the protocol identity. Every interface on a given
protocol will have an interface index (also called simply an interface) relative
-to its protocol. By default, then, an ascii trace file created as a result of
+to its protocol. By default, then, an ASCII trace file created as a result of
enabling tracing on the first device of node 21, using the prefix "prefix",
would be "prefix-n21-i1.tr". Use the prefix to disambiguate multiple protocols
per node.
You can always use the |ns3| object name service to make this more clear.
For example, if you use the object name service to assign the name "serverIpv4"
-to the protocol on node 21, and also specify interface one, the resulting ascii
+to the protocol on node 21, and also specify interface one, the resulting ASCII
trace file name will automatically become, "prefix-nserverIpv4-1.tr".
Tracing implementation details
diff -Naur ns-3.26/doc/models/Makefile ns-3.27/doc/models/Makefile
--- ns-3.26/doc/models/Makefile 2016-10-03 19:49:01.514388644 -0700
+++ ns-3.27/doc/models/Makefile 2017-10-11 21:45:51.829600446 -0700
@@ -58,6 +58,7 @@
$(SRC)/network/doc/simple.rst \
$(SRC)/network/doc/queue.rst \
$(SRC)/network/doc/queue-limits.rst \
+ $(SRC)/nix-vector-routing/doc/nix-vector-routing.rst \
$(SRC)/internet/doc/internet-stack.rst \
$(SRC)/internet/doc/ipv4.rst \
$(SRC)/internet/doc/ipv6.rst \
@@ -83,6 +84,7 @@
$(SRC)/traffic-control/doc/codel.rst \
$(SRC)/traffic-control/doc/fq-codel.rst \
$(SRC)/traffic-control/doc/pie.rst \
+ $(SRC)/traffic-control/doc/mq.rst \
$(SRC)/spectrum/doc/spectrum.rst \
$(SRC)/stats/doc/adaptor.rst \
$(SRC)/stats/doc/aggregator.rst \
@@ -121,6 +123,9 @@
$(SRC)/wifi/doc/source/figures/snir.dia \
$(SRC)/wifi/doc/source/figures/clear-channel.eps \
$(SRC)/wifi/doc/source/figures/nist-frame-success-rate.eps \
+ $(SRC)/wifi/doc/source/figures/nist-frame-success-rate-n.eps \
+ $(SRC)/wifi/doc/source/figures/nist-frame-success-rate-ac.eps \
+ $(SRC)/wifi/doc/source/figures/nist-frame-success-rate-ax.eps \
$(SRC)/wimax/doc/WimaxArchitecture.dia \
$(SRC)/lte/doc/source/figures/epc-ctrl-arch.dia \
$(SRC)/lte/doc/source/figures/epc-data-flow-dl.dia \
@@ -168,6 +173,13 @@
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-ul.dia \
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-ul.dia \
$(SRC)/lte/doc/source/figures/lte-epc-x2-entity-saps.dia \
+ $(SRC)/lte/doc/source/figures/ca-rrc-reconf.dia \
+ $(SRC)/lte/doc/source/figures/ca-lte-enb-net-device-changes.dia \
+ $(SRC)/lte/doc/source/figures/ca-lte-ue-net-device-changes.dia \
+ $(SRC)/lte/doc/source/figures/ca-enb-data-plane.dia \
+ $(SRC)/lte/doc/source/figures/ca-enb-ctrl-plane.dia \
+ $(SRC)/lte/doc/source/figures/ca-ue-data-plane.dia \
+ $(SRC)/lte/doc/source/figures/ca-ue-ctrl-plane.dia \
$(SRC)/lte/doc/source/figures/lte-strongest-cell-handover-algorithm.eps \
$(SRC)/lte/doc/source/figures/lte-phy-interference.pdf \
$(SRC)/lte/doc/source/figures/lte-phy-interference.png \
@@ -185,6 +197,10 @@
$(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration-handover.png \
$(SRC)/lte/doc/source/figures/nas-attach.pdf \
$(SRC)/lte/doc/source/figures/nas-attach.png \
+ $(SRC)/lte/doc/source/figures/ca-downlink-bsr.pdf \
+ $(SRC)/lte/doc/source/figures/ca-downlink-bsr.png \
+ $(SRC)/lte/doc/source/figures/ca-setup-radio-bearer.pdf \
+ $(SRC)/lte/doc/source/figures/ca-setup-radio-bearer.png \
$(SRC)/lte/doc/source/figures/lte-enb-rrc-states.pdf \
$(SRC)/lte/doc/source/figures/lte-enb-rrc-states.png \
$(SRC)/lte/doc/source/figures/lte-ue-rrc-states.pdf \
@@ -237,6 +253,16 @@
$(SRC)/lte/doc/source/figures/MCS_16_test.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.png \
+ $(SRC)/lte/doc/source/figures/carrier-aggregation-impact.pdf \
+ $(SRC)/lte/doc/source/figures/carrier-aggregation-impact.png \
+ $(SRC)/lte/doc/source/figures/carrier-aggregation-mac-impact.pdf \
+ $(SRC)/lte/doc/source/figures/carrier-aggregation-mac-impact.png \
+ $(SRC)/lte/doc/source/figures/ca-uplink-bsr.pdf \
+ $(SRC)/lte/doc/source/figures/ca-uplink-bsr.png \
+ $(SRC)/lte/doc/source/figures/ca-test-example-ul.pdf \
+ $(SRC)/lte/doc/source/figures/ca-test-example-ul.png \
+ $(SRC)/lte/doc/source/figures/ca-test-example-dl.pdf \
+ $(SRC)/lte/doc/source/figures/ca-test-example-dl.png \
$(SRC)/lte/doc/source/figures/lte-dl-power-control.dia \
$(SRC)/lte/doc/source/figures/lte-ffr-scheduling.dia \
$(SRC)/lte/doc/source/figures/lte-handover-campaign-rem.pdf \
@@ -370,7 +396,17 @@
$(FIGURES)/802-15-4-per-sens.eps \
$(FIGURES)/802-15-4-psr-distance.eps \
$(FIGURES)/clear-channel.eps \
- $(FIGURES)/nist-frame-success-rate.eps
+ $(FIGURES)/nist-frame-success-rate.eps \
+ $(FIGURES)/nist-frame-success-rate-n.eps \
+ $(FIGURES)/nist-frame-success-rate-ac.eps \
+ $(FIGURES)/nist-frame-success-rate-ax.eps \
+ $(FIGURES)/ca-rrc-reconf.eps \
+ $(FIGURES)/ca-lte-enb-net-device-changes.eps \
+ $(FIGURES)/ca-lte-ue-net-device-changes.eps \
+ $(FIGURES)/ca-enb-data-plane.eps \
+ $(FIGURES)/ca-enb-ctrl-plane.eps \
+ $(FIGURES)/ca-ue-data-plane.eps \
+ $(FIGURES)/ca-ue-ctrl-plane.eps \
# rescale pdf figures as necessary
$(FIGURES)/testbed.pdf_width = 5in
@@ -425,6 +461,9 @@
$(FIGURES)/lr-wpan-arch.pdf_width = 2in
$(FIGURES)/clear-channel.pdf_width = 12cm
$(FIGURES)/nist-frame-success-rate.pdf_width = 12cm
+$(FIGURES)/nist-frame-success-rate-n.pdf_width = 12cm
+$(FIGURES)/nist-frame-success-rate-ac.pdf_width = 12cm
+$(FIGURES)/nist-frame-success-rate-ax.pdf_width = 12cm
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf}
diff -Naur ns-3.26/doc/models/source/conf.py ns-3.27/doc/models/source/conf.py
--- ns-3.26/doc/models/source/conf.py 2016-10-03 19:49:01.516388629 -0700
+++ ns-3.27/doc/models/source/conf.py 2017-10-11 21:45:51.831600453 -0700
@@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
-version = 'ns-3.26'
+version = 'ns-3.27'
# The full version, including alpha/beta/rc tags.
-release = 'ns-3.26'
+release = 'ns-3.27'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff -Naur ns-3.26/doc/models/source/index.rst ns-3.27/doc/models/source/index.rst
--- ns-3.26/doc/models/source/index.rst 2016-10-03 19:49:01.516388629 -0700
+++ ns-3.27/doc/models/source/index.rst 2017-10-11 21:45:51.832600456 -0700
@@ -40,6 +40,7 @@
distributed
mobility
network
+ nix-vector-routing
olsr
openflow-switch
point-to-point
diff -Naur ns-3.26/doc/models/source/traffic-control.rst ns-3.27/doc/models/source/traffic-control.rst
--- ns-3.26/doc/models/source/traffic-control.rst 2016-10-03 19:49:01.518388614 -0700
+++ ns-3.27/doc/models/source/traffic-control.rst 2017-10-11 21:45:51.833600459 -0700
@@ -10,3 +10,4 @@
codel
fq-codel
pie
+ mq
diff -Naur ns-3.26/doc/modules ns-3.27/doc/modules
--- ns-3.26/doc/modules 2016-10-03 19:49:01.518388614 -0700
+++ ns-3.27/doc/modules 2017-10-11 21:45:51.833600459 -0700
@@ -1,4 +1,10 @@
/**
+ * @file
+ * @ingroup utils
+ * @brief Definition of support modules Constants, Utils, Example programs and
+ * Test suites.
+ */
+/**
* @anchor modules_anchor
*
* @defgroup constants Constants
@@ -7,36 +13,10 @@
* @defgroup utils Utils
* @brief The utils directory is for various programs and scripts related
* to code coverage, test suites, style checking, and benchmarking.
- */
-/**
- * @defgroup core Core
- * \brief The "core" module contains:
- * - a time management class to hold a time and convert between various
- * time units: ns3::Time
- * - a scheduler base class used to implement new simulation event
- * schedulers:
- * ns3::Scheduler and ns3::SchedulerFactory
- * - a simulator class used to create, schedule and cancel events:
- * ns3::Simulator
- * - a Functor class: ns3::Callback
- * - an os-independent interface to get access to the elapsed wall clock
- * time: ns3::SystemWallClockMs
- * - a class to register regression tests with the test manager: ns3::Test
- * and ns3::TestManager
- * - debugging facilities: \ref debugging
- * - \ref randomvariable
- * - a base class for objects which need to support per-instance
- * "attributes" and trace sources: ns3::ObjectBase
- * - a base class for objects which need to support reference counting
- * and dynamic object aggregation: ns3::Object
- * - a smart-pointer class ns3::Ptr designed to work together with
- * ns3::Object
- * - a configuration class used to set and control all attributes and
- * trace sources in a simulation: ns3::Config.
- */
-/**
- * @ingroup core
- * @defgroup debugging Debugging tools
*
- * @brief Assertions, breakpoints, logging, and abnormal program termination
+ * @defgroup examples Example programs
+ * @brief All example programs
+ *
+ * @defgroup tests Test suites
+ * @brief All test suites
*/
diff -Naur ns-3.26/doc/tutorial/source/building-topologies.rst ns-3.27/doc/tutorial/source/building-topologies.rst
--- ns-3.26/doc/tutorial/source/building-topologies.rst 2016-10-03 19:49:01.546388406 -0700
+++ ns-3.27/doc/tutorial/source/building-topologies.rst 2017-10-11 21:45:51.862600553 -0700
@@ -785,7 +785,7 @@
helpers should look quite familiar to you.
We provide an example script in our ``examples/tutorial`` directory. This script
-builds on the ``second.cc`` script and adds a Wifi network. Go ahead and
+builds on the ``second.cc`` script and adds a Wi-Fi network. Go ahead and
open ``examples/tutorial/third.cc`` in your favorite editor. You will have already
seen enough |ns3| code to understand most of what is going on in
this example, but there are a few new things, so we will go over the entire
@@ -808,7 +808,7 @@
The code begins by loading module include files just as was done in the
``second.cc`` example. There are a couple of new includes corresponding
-to the Wifi module and the mobility module which we will discuss below.
+to the wifi module and the mobility module which we will discuss below.
::
@@ -925,7 +925,7 @@
NetDeviceContainer csmaDevices;
csmaDevices = csma.Install (csmaNodes);
-Next, we are going to create the nodes that will be part of the Wifi network.
+Next, we are going to create the nodes that will be part of the Wi-Fi network.
We are going to create a number of "station" nodes as specified by the
command line argument, and we are going to use the "leftmost" node of the
point-to-point link as the node for the access point.
@@ -959,14 +959,14 @@
phy.SetChannel (channel.Create ());
Once the PHY helper is configured, we can focus on the MAC layer. Here we choose to
-work with non-Qos MACs so we use a NqosWifiMacHelper object to set MAC parameters.
+work with non-Qos MACs. WifiMacHelper object is used to set MAC parameters.
::
- WifiHelper wifi = WifiHelper::Default ();
+ WifiHelper wifi;
wifi.SetRemoteStationManager ("ns3::AarfWifiManager");
- NqosWifiMacHelper mac = NqosWifiMacHelper::Default ();
+ WifiMacHelper mac;
The ``SetRemoteStationManager`` method tells the helper the type of
rate control algorithm to use. Here, it is asking the helper to use the AARF
@@ -986,9 +986,8 @@
that will be used to set the value of the "Ssid" ``Attribute`` of
the MAC layer implementation. The particular kind of MAC layer that
will be created by the helper is specified by ``Attribute`` as
-being of the "ns3::StaWifiMac" type. The use of
-``NqosWifiMacHelper`` will ensure that the "QosSupported"
-``Attribute`` for created MAC objects is set false. The combination
+being of the "ns3::StaWifiMac" type. "QosSupported" ``Attribute`` is
+set to false by default for ``WifiMacHelper`` objects. The combination
of these two configurations means that the MAC instance next created
will be a non-QoS non-AP station (STA) in an infrastructure BSS (i.e.,
a BSS with an AP). Finally, the "ActiveProbing" ``Attribute`` is
@@ -997,16 +996,16 @@
Once all the station-specific parameters are fully configured, both at the
MAC and PHY layers, we can invoke our now-familiar ``Install`` method to
-create the wifi devices of these stations:
+create the Wi-Fi devices of these stations:
::
NetDeviceContainer staDevices;
staDevices = wifi.Install (phy, mac, wifiStaNodes);
-We have configured Wifi for all of our STA nodes, and now we need to
+We have configured Wi-Fi for all of our STA nodes, and now we need to
configure the AP (access point) node. We begin this process by changing
-the default ``Attributes`` of the ``NqosWifiMacHelper`` to reflect the
+the default ``Attributes`` of the ``WifiMacHelper`` to reflect the
requirements of the AP.
::
@@ -1014,10 +1013,10 @@
mac.SetType ("ns3::ApWifiMac",
"Ssid", SsidValue (ssid));
-In this case, the ``NqosWifiMacHelper`` is going to create MAC
+In this case, the ``WifiMacHelper`` is going to create MAC
layers of the "ns3::ApWifiMac", the latter specifying that a MAC
-instance configured as an AP should be created, with the helper type
-implying that the "QosSupported" ``Attribute`` should be set to
+instance configured as an AP should be created. We do not change
+the default setting of "QosSupported" ``Attribute``, so it remains
false - disabling 802.11e/WMM-style QoS support at created APs.
The next lines create the single AP which shares the same set of PHY-level
@@ -1077,7 +1076,7 @@
mobility.Install (wifiApNode);
We now have our nodes, devices and channels created, and mobility models
-chosen for the Wifi nodes, but we have no protocol stacks present. Just as
+chosen for the Wi-Fi nodes, but we have no protocol stacks present. Just as
we have done previously many times, we will use the ``InternetStackHelper``
to install these stacks.
@@ -1167,7 +1166,7 @@
These three lines of code will start pcap tracing on both of the point-to-point
nodes that serves as our backbone, will start a promiscuous (monitor) mode
-trace on the Wifi network, and will start a promiscuous trace on the CSMA
+trace on the Wi-Fi network, and will start a promiscuous trace on the CSMA
network. This will let us see all of the traffic with a minimum number of
trace files.
@@ -1223,11 +1222,11 @@
zero -- the left side of the "backbone". The file "third-1-0.pcap"
corresponds to the point-to-point device on node one -- the right side of the
"backbone". The file "third-0-1.pcap" will be the promiscuous (monitor
-mode) trace from the Wifi network and the file "third-1-1.pcap" will be the
+mode) trace from the Wi-Fi network and the file "third-1-1.pcap" will be the
promiscuous trace from the CSMA network. Can you verify this by inspecting
the code?
-Since the echo client is on the Wifi network, let's start there. Let's take
+Since the echo client is on the Wi-Fi network, let's start there. Let's take
a look at the promiscuous (monitor mode) trace we captured on that network.
.. sourcecode:: bash
@@ -1275,7 +1274,7 @@
2.008151 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.026758 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
-This is the echo packet going from left to right (from Wifi to CSMA) and back
+This is the echo packet going from left to right (from Wi-Fi to CSMA) and back
again across the point-to-point link.
Now, look at the pcap file of the right side of the point-to-point link,
@@ -1292,7 +1291,7 @@
2.011837 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.023072 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
-This is also the echo packet going from left to right (from Wifi to CSMA) and
+This is also the echo packet going from left to right (from Wi-Fi to CSMA) and
back again across the point-to-point link with slightly different timings
as you might expect.
diff -Naur ns-3.26/doc/tutorial/source/conceptual-overview.rst ns-3.27/doc/tutorial/source/conceptual-overview.rst
--- ns-3.26/doc/tutorial/source/conceptual-overview.rst 2016-10-03 19:49:01.547388398 -0700
+++ ns-3.27/doc/tutorial/source/conceptual-overview.rst 2017-10-11 21:45:51.863600557 -0700
@@ -797,7 +797,7 @@
return 0;
}
-The above wil not actually change the behavior of this program, since
+The above will not actually change the behavior of this program, since
this particular simulation naturally ends after 10 seconds. But if you
were to change the stop time in the above statement from 11 seconds to 1
second, you would notice that the simulation stops before any output is
diff -Naur ns-3.26/doc/tutorial/source/conf.py ns-3.27/doc/tutorial/source/conf.py
--- ns-3.26/doc/tutorial/source/conf.py 2016-10-03 19:49:01.548388391 -0700
+++ ns-3.27/doc/tutorial/source/conf.py 2017-10-11 21:45:51.864600560 -0700
@@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
-version = 'ns-3.26'
+version = 'ns-3.27'
# The full version, including alpha/beta/rc tags.
-release = 'ns-3.26'
+release = 'ns-3.27'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff -Naur ns-3.26/doc/tutorial/source/getting-started.rst ns-3.27/doc/tutorial/source/getting-started.rst
--- ns-3.26/doc/tutorial/source/getting-started.rst 2016-10-03 19:49:01.550388376 -0700
+++ ns-3.27/doc/tutorial/source/getting-started.rst 2017-10-11 21:45:51.866600566 -0700
@@ -96,17 +96,17 @@
$ cd
$ mkdir workspace
$ cd workspace
- $ wget http://www.nsnam.org/release/ns-allinone-3.26.tar.bz2
- $ tar xjf ns-allinone-3.26.tar.bz2
+ $ wget http://www.nsnam.org/release/ns-allinone-3.27.tar.bz2
+ $ tar xjf ns-allinone-3.27.tar.bz2
-If you change into the directory ``ns-allinone-3.26`` you should see a
+If you change into the directory ``ns-allinone-3.27`` you should see a
number of files and directories:
::
$ ls
- bake constants.py ns-3.26 README
- build.py netanim-3.107 pybindgen-0.17.0.post57+nga6376f2 util.py
+ bake constants.py ns-3.27 README
+ build.py netanim-3.108 pybindgen-0.17.0.post58+ngcf00cc0 util.py
You are now ready to build the base |ns3| distribution and may skip ahead
to the section on building |ns3|.
@@ -166,10 +166,10 @@
There are a few configuration targets available:
-1. ``ns-3.26``: the module corresponding to the release; it will download
+1. ``ns-3.27``: the module corresponding to the release; it will download
components similar to the release tarball.
2. ``ns-3-dev``: a similar module but using the development code tree
-3. ``ns-allinone-3.26``: the module that includes other optional features
+3. ``ns-allinone-3.27``: the module that includes other optional features
such as click routing, openflow for |ns3|, and the Network Simulation
Cradle
4. ``ns-3-allinone``: similar to the released version of the allinone
@@ -187,7 +187,7 @@
`"ns-3 Releases"
`_
web page and clicking on the latest release link. We'll proceed in
-this tutorial example with ``ns-3.26``.
+this tutorial example with ``ns-3.27``.
We are now going to use the bake tool to pull down the various pieces of
|ns3| you will be using. First, we'll say a word about running bake.
@@ -213,9 +213,9 @@
Step into the workspace directory and type the following into your shell::
- $ ./bake.py configure -e ns-3.26
+ $ ./bake.py configure -e ns-3.27
-Next, we'l ask bake to check whether we have enough tools to download
+Next, we'll ask bake to check whether we have enough tools to download
various components. Type::
$ ./bake.py check
@@ -241,8 +241,7 @@
> autoreconf tool - OK
> Path searched for tools: /usr/lib64/qt-3.3/bin /usr/lib64/ccache
- /usr/local/bin /bin /usr/bin /usr/local/sbin /usr/sbin /sbin
- /home/tomh/bin bin
+ /usr/local/bin /bin /usr/bin /usr/local/sbin /usr/sbin /sbin bin
In particular, download tools such as Mercurial, CVS, GIT, and Bazaar
are our principal concerns at this point, since they allow us to fetch
@@ -256,23 +255,32 @@
should yield something like::
- >> Downloading gccxml-ns3 (target directory:gccxml) - OK
- >> Searching for system dependency python-dev - OK
- >> Searching for system dependency pygraphviz - OK
- >> Searching for system dependency pygoocanvas - OK
>> Searching for system dependency setuptools - OK
- >> Searching for system dependency g++ - OK
+ >> Searching for system dependency pygoocanvas - OK
+ >> Searching for system dependency pygraphviz - OK
+ >> Searching for system dependency python-dev - OK
+ >> Searching for system dependency libxml2-dev - OK
+ >> Searching for system dependency clang-dev - OK
+ >> Downloading click-ns-3.25 - OK
+ >> Downloading BRITE - OK
>> Searching for system dependency qt4 - OK
+ >> Downloading nsc-0.5.3 - OK
+ >> Searching for system dependency g++ - OK
+ >> Downloading castxml - OK
+ >> Downloading openflow-ns-3.25 - OK
+ >> Downloading netanim-3.108 - OK
+ >> Downloading pygccxml-1.9.1 - OK
>> Downloading pygccxml - OK
- >> Downloading netanim-3.107 - OK
- >> Downloading pybindgen-0.17.0.post57+nga6376f2 (target directory:pybindgen) - OK
- >> Downloading ns-3.26 - OK
+ >> Downloading pybindgen-ns3.27-castxml (target directory:pybindgen) - OK
+ >> Downloading ns-3.27 - OK
-The above suggests that five sources have been downloaded. Check the
+The above suggests that seven sources have been downloaded. Check the
``source`` directory now and type ``ls``; one should see::
$ ls
- gccxml netanim-3.107 ns-3.26 pybindgen pygccxml pygccxml-1.0.0.zip
+ BRITE netanim-3.108 openflow-ns-3.25 pygccxml-1.9.1
+ castxml ns-3.27 pybindgen v1.9.1.tar.gz
+ click-ns-3.25 nsc-0.5.3 pygccxml
You are now ready to build the |ns3| distribution.
@@ -291,7 +299,7 @@
If you downloaded
using a tarball you should have a directory called something like
-``ns-allinone-3.26`` under your ``~/workspace`` directory.
+``ns-allinone-3.27`` under your ``~/workspace`` directory.
Type the following::
$ ./build.py --enable-examples --enable-tests
@@ -307,7 +315,7 @@
script builds the various pieces you downloaded. Eventually you should see the
following::
- Waf: Leaving directory `/path/to/workspace/ns-allinone-3.26/ns-3.26/build'
+ Waf: Leaving directory `/path/to/workspace/ns-allinone-3.27/ns-3.27/build'
'build' finished successfully (6m25.032s)
Modules built:
@@ -352,14 +360,30 @@
and you should see something like::
- >> Building gccxml-ns3 - OK
- >> Building pygccxml - OK
- >> Building netanim-3.107 - OK
- >> Building pybindgen-0.17.0.post57+nga6376f2 - OK
- >> Building ns-3.26 - OK
+ >> Building BRITE - OK
+ >> Building nsc-0.5.3 - OK
+ >> Building click-ns-3.25 - OK
+ ...
+ >> Building ns-3.27 - OK
*Hint: you can also perform both steps, download and build, by calling ``bake.py deploy``.*
+There may be failures to build all components, but the build will proceed
+anyway if the component is optional. For example, a common issue at the
+moment is that castxml may not build via the bake build tool on all
+platforms; in this case, the line will show::
+
+ >> Building castxml - Problem
+ > Problem: Optional dependency, module "castxml" failed
+ This may reduce the functionality of the final build.
+ However, bake will continue since "castxml" is not an essential dependency.
+ For more information call bake with -v or -vvv, for full verbose mode.
+
+However, castxml is only needed if one wants to generate updated Python
+bindings, and most users do not need to do so (or to do so until they are
+more involved with ns-3 changes), so such warnings might be safely ignored
+for now.
+
If there happens to be a failure, please have a look at what the following
command tells you; it may give a hint as to a missing dependency::
@@ -507,7 +531,7 @@
for an already configured project::
$ ./waf --check-profile
- Waf: Entering directory \`/path/to/ns-3-allinone/ns-3.26/build'
+ Waf: Entering directory \`/path/to/ns-3-allinone/ns-3.27/build'
Build profile: debug
The build.py script discussed above supports also the ``--enable-examples``
@@ -883,7 +907,7 @@
Notice that the |ns3| program name goes with the ``--run`` argument,
and the control utility (here ``gdb``) is the first token
-in the ``--commmand-template`` argument. The ``--args`` tells ``gdb``
+in the ``--command-template`` argument. The ``--args`` tells ``gdb``
that the remainder of the command line belongs to the "inferior" program.
(Some ``gdb``'s don't understand the ``--args`` feature. In this case,
omit the program arguments from the ``--command-template``,
diff -Naur ns-3.26/doc/tutorial/source/introduction.rst ns-3.27/doc/tutorial/source/introduction.rst
--- ns-3.26/doc/tutorial/source/introduction.rst 2016-10-03 19:49:01.551388368 -0700
+++ ns-3.27/doc/tutorial/source/introduction.rst 2017-10-11 21:45:51.867600570 -0700
@@ -41,7 +41,7 @@
simulation engine for users to conduct simulation experiments. Some of the
reasons to use |ns3| include to perform studies that are more difficult
or not possible to perform with real systems, to study system behavior in
-a highly controllled, reproducible environment, and to learn about how
+a highly controlled, reproducible environment, and to learn about how
networks work. Users will note that the available model set in |ns3|
focuses on modeling how Internet protocols and networks work, but
|ns3| is not limited to Internet systems; several users are using
diff -Naur ns-3.26/doc/tutorial/source/tracing.rst ns-3.27/doc/tutorial/source/tracing.rst
--- ns-3.26/doc/tutorial/source/tracing.rst 2016-10-03 19:49:01.554388346 -0700
+++ ns-3.27/doc/tutorial/source/tracing.rst 2017-10-11 21:45:51.871600582 -0700
@@ -107,34 +107,36 @@
Let's pick a random example. If you wanted to add more logging to the
|ns3| TCP socket (``tcp-socket-base.cc``) you could just add a new
message down in the implementation. Notice that in
-``TcpSocketBase::ReceivedAck()`` there is no log message for the no ACK
-case. You could simply add one, changing the code. Here is the original::
+``TcpSocketBase::ProcessEstablished ()`` there is no log message for the
+reception of a SYN+ACK in ESTABLISHED state.
+You could simply add one, changing the code. Here is the original::
- /** Process the newly received ACK */
+ /* Received a packet upon ESTABLISHED state. This function is mimicking the
+ role of tcp_rcv_established() in tcp_input.c in Linux kernel. */
void
- TcpSocketBase::ReceivedAck (Ptr packet, const TcpHeader& tcpHeader)
+ TcpSocketBase::ProcessEstablished (Ptr packet, const TcpHeader& tcpHeader)
{
NS_LOG_FUNCTION (this << tcpHeader);
+ ...
- // Received ACK. Compare the ACK number against highest unacked seqno
- if (0 == (tcpHeader.GetFlags () & TcpHeader::ACK))
- { // Ignore if no ACK flag
+ else if (tcpflags == (TcpHeader::SYN | TcpHeader::ACK))
+ { // No action for received SYN+ACK, it is probably a duplicated packet
}
...
-To log the no ACK case, you can add a new ``NS_LOG_LOGIC`` in the
+To log the SYN+ACK case, you can add a new ``NS_LOG_LOGIC`` in the
``if`` statement body::
- /** Process the newly received ACK */
+ /* Received a packet upon ESTABLISHED state. This function is mimicking the
+ role of tcp_rcv_established() in tcp_input.c in Linux kernel. */
void
- TcpSocketBase::ReceivedAck (Ptr packet, const TcpHeader& tcpHeader)
+ TcpSocketBase::ProcessEstablished (Ptr packet, const TcpHeader& tcpHeader)
{
NS_LOG_FUNCTION (this << tcpHeader);
-
- // Received ACK. Compare the ACK number against highest unacked seqno
- if (0 == (tcpHeader.GetFlags () & TcpHeader::ACK))
- { // Ignore if no ACK flag
- NS_LOG_LOGIC ("TcpSocketBase " << this << " no ACK flag");
+ ...
+ else if (tcpflags == (TcpHeader::SYN | TcpHeader::ACK))
+ { // No action for received SYN+ACK, it is probably a duplicated packet
+ NS_LOG_LOGIC ("TcpSocketBase " << this << " ignoring SYN+ACK");
}
...
@@ -1104,7 +1106,7 @@
This class template implements the Functor Design Pattern. It is used to declare the type of a **Callback**:
* the first non-optional template argument represents the return type of the callback.
- * the reminaining (optional) template arguments represent the type of the subsequent arguments to the callback.
+ * the remaining (optional) template arguments represent the type of the subsequent arguments to the callback.
* up to nine arguments are supported.
We are trying to figure out what the
@@ -1247,7 +1249,7 @@
found in the |ns3| API Documentation. If you scroll through the list,
you will eventually find:
- **ns3::TcpNewReno**
+ **ns3::TcpSocketBase**
* **CongestionWindow**: The TCP connection's congestion window
* **SlowStartThreshold**: TCP slow start threshold (bytes)
@@ -1255,7 +1257,7 @@
It turns out that the |ns3| TCP implementation lives (mostly) in the
file ``src/internet/model/tcp-socket-base.cc`` while congestion
control variants are in files such as
-``src/internet/model/tcp-newreno.cc``. If you don't know this *a
+``src/internet/model/tcp-bic.cc``. If you don't know this *a
priori*, you can use the recursive ``grep`` trick:
.. sourcecode:: bash
@@ -1265,12 +1267,12 @@
You will find page after page of instances of tcp pointing you to that
file.
-Bringing up the class documentation for ``TcpNewReno`` and skipping to
+Bringing up the class documentation for ``TcpSocketBase`` and skipping to
the list of TraceSources you will find
**TraceSources**
- * **CongestionWindow**: The TCP connnection's congestion window
+ * **CongestionWindow**: The TCP connection's congestion window
Callback signature: **ns3::TracedValueCallback::Uint32**
@@ -1280,7 +1282,7 @@
typedef void(* ns3::TracedValueCallback::Int32)(int32_t oldValue, int32_t newValue)
You should now understand this code completely. If we have a pointer
-to the ``TcpNewReno``, we can ``TraceConnect`` to the
+to the ``TcpSocketBase`` object, we can ``TraceConnect`` to the
"CongestionWindow" trace source if we provide an appropriate callback
target. This is the same kind of trace source that we saw in the
simple example at the start of this section, except that we are
@@ -1316,7 +1318,7 @@
MakeCallback (&Ns3TcpCwndTestCase1::CwndChange, this));
This should look very familiar to you. We mentioned above that if we
-had a pointer to the ``TcpNewReno``, we could ``TraceConnect`` to the
+had a pointer to the ``TcpSocketBase``, we could ``TraceConnect`` to the
"CongestionWindow" trace source. That's exactly what we have here; so
it turns out that this line of code does exactly what we want. Let's
go ahead and extract the code we need from this function
@@ -1367,7 +1369,7 @@
configuration phase you can't connect a trace source to a trace sink
if one of them is created dynamically during the simulation.
-The two solutions to this connundrum are
+The two solutions to this conundrum are
#. Create a simulator event that is run after the dynamic object is
created and hook the trace when that event is executed; or
@@ -1454,7 +1456,7 @@
// ===========================================================================
//
-This should also be self-explanatory.
+This should also be self-explanatory.
The next part is the declaration of the ``MyApp`` ``Application`` that
we put together to allow the ``Socket`` to be created at configuration
@@ -1692,7 +1694,7 @@
is the ``Ptr socket`` which we needed to provide to the
application during configuration time. Recall that we are going to
create the ``Socket`` as a ``TcpSocket`` (which is implemented by
-``TcpNewReno``) and hook its "CongestionWindow" trace source before
+``TcpSocketBase``) and hook its "CongestionWindow" trace source before
passing it to the ``Setup`` method.
::
@@ -2214,7 +2216,7 @@
that the new file is truncated (contents deleted) if an existing file
with that name is found. The final parameter is the "data link type"
of the new PCAP file. These are the same as the PCAP library data
-link types defined in ``bpf.h`` if you are familar with PCAP. In this
+link types defined in ``bpf.h`` if you are familiar with PCAP. In this
case, ``DLT_PPP`` indicates that the PCAP file is going to contain
packets prefixed with point to point headers. This is true since the
packets are coming from our point-to-point device driver. Other
diff -Naur ns-3.26/doc/tutorial-pt-br/source/conf.py ns-3.27/doc/tutorial-pt-br/source/conf.py
--- ns-3.26/doc/tutorial-pt-br/source/conf.py 2016-10-03 19:49:01.535388488 -0700
+++ ns-3.27/doc/tutorial-pt-br/source/conf.py 2017-10-11 21:45:51.850600514 -0700
@@ -50,9 +50,9 @@
# built documents.
#
# The short X.Y version.
-version = 'ns-3.26'
+version = 'ns-3.27'
# The full version, including alpha/beta/rc tags.
-release = 'ns-3.26'
+release = 'ns-3.27'
# The language for content autogenerated by . Refer to babel documentation
# for a list of supported languages.
diff -Naur ns-3.26/examples/routing/global-injection-slash32.cc ns-3.27/examples/routing/global-injection-slash32.cc
--- ns-3.26/examples/routing/global-injection-slash32.cc 2016-10-03 19:49:01.567388249 -0700
+++ ns-3.27/examples/routing/global-injection-slash32.cc 2017-10-11 21:45:51.885600628 -0700
@@ -83,10 +83,12 @@
Ptr deviceA = CreateObject ();
deviceA->SetAddress (Mac48Address::Allocate ());
nA->AddDevice (deviceA);
+ deviceA->SetQueue (CreateObject > ());
Ptr deviceC = CreateObject ();
deviceC->SetAddress (Mac48Address::Allocate ());
nC->AddDevice (deviceC);
+ deviceC->SetQueue (CreateObject > ());
// Later, we add IP addresses.
Ipv4AddressHelper ipv4;
diff -Naur ns-3.26/examples/routing/global-routing-slash32.cc ns-3.27/examples/routing/global-routing-slash32.cc
--- ns-3.26/examples/routing/global-routing-slash32.cc 2016-10-03 19:49:01.568388242 -0700
+++ ns-3.27/examples/routing/global-routing-slash32.cc 2017-10-11 21:45:51.886600631 -0700
@@ -69,10 +69,12 @@
Ptr deviceA = CreateObject ();
deviceA->SetAddress (Mac48Address::Allocate ());
nA->AddDevice (deviceA);
+ deviceA->SetQueue (CreateObject > ());
Ptr deviceC = CreateObject ();
deviceC->SetAddress (Mac48Address::Allocate ());
nC->AddDevice (deviceC);
+ deviceC->SetQueue (CreateObject > ());
// Later, we add IP addresses.
Ipv4AddressHelper ipv4;
diff -Naur ns-3.26/examples/routing/manet-routing-compare.cc ns-3.27/examples/routing/manet-routing-compare.cc
--- ns-3.26/examples/routing/manet-routing-compare.cc 2016-10-03 19:49:01.569388234 -0700
+++ ns-3.27/examples/routing/manet-routing-compare.cc 2017-10-11 21:45:51.886600631 -0700
@@ -289,6 +289,7 @@
mobilityAdhoc.SetPositionAllocator (taPositionAlloc);
mobilityAdhoc.Install (adhocNodes);
streamIndex += mobilityAdhoc.AssignStreams (adhocNodes, streamIndex);
+ NS_UNUSED (streamIndex); // From this point, streamIndex is unused
AodvHelper aodv;
OlsrHelper olsr;
diff -Naur ns-3.26/examples/routing/static-routing-slash32.cc ns-3.27/examples/routing/static-routing-slash32.cc
--- ns-3.26/examples/routing/static-routing-slash32.cc 2016-10-03 19:49:01.572388212 -0700
+++ ns-3.27/examples/routing/static-routing-slash32.cc 2017-10-11 21:45:51.890600644 -0700
@@ -69,10 +69,12 @@
Ptr deviceA = CreateObject ();
deviceA->SetAddress (Mac48Address::Allocate ());
nA->AddDevice (deviceA);
+ deviceA->SetQueue (CreateObject > ());
Ptr deviceC = CreateObject ();
deviceC->SetAddress (Mac48Address::Allocate ());
nC->AddDevice (deviceC);
+ deviceC->SetQueue (CreateObject > ());
// Later, we add IP addresses.
Ipv4AddressHelper ipv4;
diff -Naur ns-3.26/examples/tcp/tcp-variants-comparison.cc ns-3.27/examples/tcp/tcp-variants-comparison.cc
--- ns-3.26/examples/tcp/tcp-variants-comparison.cc 2016-10-03 19:49:01.582388137 -0700
+++ ns-3.27/examples/tcp/tcp-variants-comparison.cc 2017-10-11 21:45:51.942600813 -0700
@@ -218,13 +218,14 @@
uint32_t run = 0;
bool flow_monitor = false;
bool pcap = false;
+ bool sack = true;
std::string queue_disc_type = "ns3::PfifoFastQueueDisc";
CommandLine cmd;
cmd.AddValue ("transport_prot", "Transport protocol to use: TcpNewReno, "
"TcpHybla, TcpHighSpeed, TcpHtcp, TcpVegas, TcpScalable, TcpVeno, "
- "TcpBic, TcpYeah, TcpIllinois, TcpWestwood, TcpWestwoodPlus ", transport_prot);
+ "TcpBic, TcpYeah, TcpIllinois, TcpWestwood, TcpWestwoodPlus, TcpLedbat ", transport_prot);
cmd.AddValue ("error_p", "Packet error rate", error_p);
cmd.AddValue ("bandwidth", "Bottleneck bandwidth", bandwidth);
cmd.AddValue ("delay", "Bottleneck delay", delay);
@@ -240,8 +241,11 @@
cmd.AddValue ("flow_monitor", "Enable flow monitor", flow_monitor);
cmd.AddValue ("pcap_tracing", "Enable or disable PCAP tracing", pcap);
cmd.AddValue ("queue_disc_type", "Queue disc type for gateway (e.g. ns3::CoDelQueueDisc)", queue_disc_type);
+ cmd.AddValue ("sack", "Enable or disable SACK option", sack);
cmd.Parse (argc, argv);
+ transport_prot = std::string ("ns3::") + transport_prot;
+
SeedManager::SetSeed (1);
SeedManager::SetRun (run);
@@ -269,63 +273,21 @@
// 4 MB of TCP buffer
Config::SetDefault ("ns3::TcpSocket::RcvBufSize", UintegerValue (1 << 21));
Config::SetDefault ("ns3::TcpSocket::SndBufSize", UintegerValue (1 << 21));
+ Config::SetDefault ("ns3::TcpSocketBase::Sack", BooleanValue (sack));
// Select TCP variant
- if (transport_prot.compare ("TcpNewReno") == 0)
- {
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpNewReno::GetTypeId ()));
- }
- else if (transport_prot.compare ("TcpHybla") == 0)
- {
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpHybla::GetTypeId ()));
- }
- else if (transport_prot.compare ("TcpHighSpeed") == 0)
- {
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpHighSpeed::GetTypeId ()));
- }
- else if (transport_prot.compare ("TcpVegas") == 0)
- {
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpVegas::GetTypeId ()));
- }
- else if (transport_prot.compare ("TcpScalable") == 0)
- {
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpScalable::GetTypeId ()));
- }
- else if (transport_prot.compare ("TcpHtcp") == 0)
- {
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpHtcp::GetTypeId ()));
- }
- else if (transport_prot.compare ("TcpVeno") == 0)
- {
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpVeno::GetTypeId ()));
- }
- else if (transport_prot.compare ("TcpBic") == 0)
- {
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpBic::GetTypeId ()));
- }
- else if (transport_prot.compare ("TcpYeah") == 0)
- {
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpYeah::GetTypeId ()));
- }
- else if (transport_prot.compare ("TcpIllinois") == 0)
- {
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpIllinois::GetTypeId ()));
- }
- else if (transport_prot.compare ("TcpWestwood") == 0)
- { // the default protocol type in ns3::TcpWestwood is WESTWOOD
- Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId ()));
- Config::SetDefault ("ns3::TcpWestwood::FilterType", EnumValue (TcpWestwood::TUSTIN));
- }
- else if (transport_prot.compare ("TcpWestwoodPlus") == 0)
- {
+ if (transport_prot.compare ("ns3::TcpWestwoodPlus") == 0)
+ {
+ // TcpWestwoodPlus is not an actual TypeId name; we need TcpWestwood here
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId ()));
+ // the default protocol type in ns3::TcpWestwood is WESTWOOD
Config::SetDefault ("ns3::TcpWestwood::ProtocolType", EnumValue (TcpWestwood::WESTWOODPLUS));
- Config::SetDefault ("ns3::TcpWestwood::FilterType", EnumValue (TcpWestwood::TUSTIN));
}
else
{
- NS_LOG_DEBUG ("Invalid TCP version");
- exit (1);
+ TypeId tcpTid;
+ NS_ABORT_MSG_UNLESS (TypeId::LookupByNameFailSafe (transport_prot, &tcpTid), "TypeId " << transport_prot << " not found");
+ Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TypeId::LookupByName (transport_prot)));
}
// Create gateways, sources, and sinks
@@ -376,7 +338,7 @@
Time access_d (access_delay);
Time bottle_d (delay);
- Config::SetDefault ("ns3::CoDelQueueDisc::Mode", EnumValue (Queue::QUEUE_MODE_BYTES));
+ Config::SetDefault ("ns3::CoDelQueueDisc::Mode", EnumValue (CoDelQueueDisc::QUEUE_DISC_MODE_BYTES));
uint32_t size = (std::min (access_b, bottle_b).GetBitRate () / 8) *
((access_d + bottle_d) * 2).GetSeconds ();
@@ -420,40 +382,20 @@
for (uint16_t i = 0; i < sources.GetN (); i++)
{
AddressValue remoteAddress (InetSocketAddress (sink_interfaces.GetAddress (i, 0), port));
-
- if (transport_prot.compare ("TcpNewReno") == 0
- || transport_prot.compare ("TcpWestwood") == 0
- || transport_prot.compare ("TcpWestwoodPlus") == 0
- || transport_prot.compare ("TcpHybla") == 0
- || transport_prot.compare ("TcpHighSpeed") == 0
- || transport_prot.compare ("TcpHtcp") == 0
- || transport_prot.compare ("TcpVegas") == 0
- || transport_prot.compare ("TcpVeno") == 0
- || transport_prot.compare ("TcpBic") == 0
- || transport_prot.compare ("TcpScalable") == 0
- || transport_prot.compare ("TcpYeah") == 0
- || transport_prot.compare ("TcpIllinois") == 0)
- {
- Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (tcp_adu_size));
- BulkSendHelper ftp ("ns3::TcpSocketFactory", Address ());
- ftp.SetAttribute ("Remote", remoteAddress);
- ftp.SetAttribute ("SendSize", UintegerValue (tcp_adu_size));
- ftp.SetAttribute ("MaxBytes", UintegerValue (int(data_mbytes * 1000000)));
-
- ApplicationContainer sourceApp = ftp.Install (sources.Get (i));
- sourceApp.Start (Seconds (start_time * i));
- sourceApp.Stop (Seconds (stop_time - 3));
-
- sinkHelper.SetAttribute ("Protocol", TypeIdValue (TcpSocketFactory::GetTypeId ()));
- ApplicationContainer sinkApp = sinkHelper.Install (sinks);
- sinkApp.Start (Seconds (start_time * i));
- sinkApp.Stop (Seconds (stop_time));
- }
- else
- {
- NS_LOG_DEBUG ("Invalid transport protocol " << transport_prot << " specified");
- exit (1);
- }
+ Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (tcp_adu_size));
+ BulkSendHelper ftp ("ns3::TcpSocketFactory", Address ());
+ ftp.SetAttribute ("Remote", remoteAddress);
+ ftp.SetAttribute ("SendSize", UintegerValue (tcp_adu_size));
+ ftp.SetAttribute ("MaxBytes", UintegerValue (int(data_mbytes * 1000000)));
+
+ ApplicationContainer sourceApp = ftp.Install (sources.Get (i));
+ sourceApp.Start (Seconds (start_time * i));
+ sourceApp.Stop (Seconds (stop_time - 3));
+
+ sinkHelper.SetAttribute ("Protocol", TypeIdValue (TcpSocketFactory::GetTypeId ()));
+ ApplicationContainer sinkApp = sinkHelper.Install (sinks);
+ sinkApp.Start (Seconds (start_time * i));
+ sinkApp.Stop (Seconds (stop_time));
}
// Set up tracing if enabled
diff -Naur ns-3.26/examples/traffic-control/queue-discs-benchmark.cc ns-3.27/examples/traffic-control/queue-discs-benchmark.cc
--- ns-3.26/examples/traffic-control/queue-discs-benchmark.cc 2016-10-03 19:49:01.583388130 -0700
+++ ns-3.27/examples/traffic-control/queue-discs-benchmark.cc 2017-10-11 21:45:51.943600816 -0700
@@ -145,7 +145,7 @@
// Access link traffic control configuration
TrafficControlHelper tchPfifoFastAccess;
- uint32_t handle = tchPfifoFastAccess.SetRootQueueDisc ("ns3::PfifoFastQueueDisc", "Limit", UintegerValue (1000));
+ tchPfifoFastAccess.SetRootQueueDisc ("ns3::PfifoFastQueueDisc", "Limit", UintegerValue (1000));
// Bottleneck link traffic control configuration
TrafficControlHelper tchBottleneck;
@@ -156,28 +156,28 @@
}
else if (queueDiscType.compare ("ARED") == 0)
{
- handle = tchBottleneck.SetRootQueueDisc ("ns3::RedQueueDisc");
+ tchBottleneck.SetRootQueueDisc ("ns3::RedQueueDisc");
Config::SetDefault ("ns3::RedQueueDisc::ARED", BooleanValue (true));
- Config::SetDefault ("ns3::RedQueueDisc::Mode", EnumValue (Queue::QUEUE_MODE_PACKETS));
+ Config::SetDefault ("ns3::RedQueueDisc::Mode", EnumValue (RedQueueDisc::QUEUE_DISC_MODE_PACKETS));
Config::SetDefault ("ns3::RedQueueDisc::QueueLimit", UintegerValue (queueDiscSize));
}
else if (queueDiscType.compare ("CoDel") == 0)
{
- handle = tchBottleneck.SetRootQueueDisc ("ns3::CoDelQueueDisc");
- Config::SetDefault ("ns3::CoDelQueueDisc::Mode", EnumValue (Queue::QUEUE_MODE_PACKETS));
+ tchBottleneck.SetRootQueueDisc ("ns3::CoDelQueueDisc");
+ Config::SetDefault ("ns3::CoDelQueueDisc::Mode", EnumValue (CoDelQueueDisc::QUEUE_DISC_MODE_PACKETS));
Config::SetDefault ("ns3::CoDelQueueDisc::MaxPackets", UintegerValue (queueDiscSize));
}
else if (queueDiscType.compare ("FqCoDel") == 0)
{
- handle = tchBottleneck.SetRootQueueDisc ("ns3::FqCoDelQueueDisc");
- Config::SetDefault ("ns3::FqCoDelQueueDisc::Packet limit", UintegerValue (queueDiscSize));
+ uint32_t handle = tchBottleneck.SetRootQueueDisc ("ns3::FqCoDelQueueDisc");
+ Config::SetDefault ("ns3::FqCoDelQueueDisc::PacketLimit", UintegerValue (queueDiscSize));
tchBottleneck.AddPacketFilter (handle, "ns3::FqCoDelIpv4PacketFilter");
tchBottleneck.AddPacketFilter (handle, "ns3::FqCoDelIpv6PacketFilter");
}
else if (queueDiscType.compare ("PIE") == 0)
{
- handle = tchBottleneck.SetRootQueueDisc ("ns3::PieQueueDisc");
- Config::SetDefault ("ns3::PieQueueDisc::Mode", EnumValue (Queue::QUEUE_MODE_PACKETS));
+ tchBottleneck.SetRootQueueDisc ("ns3::PieQueueDisc");
+ Config::SetDefault ("ns3::PieQueueDisc::Mode", EnumValue (PieQueueDisc::QUEUE_DISC_MODE_PACKETS));
Config::SetDefault ("ns3::PieQueueDisc::QueueLimit", UintegerValue (queueDiscSize));
}
else
@@ -190,8 +190,8 @@
tchBottleneck.SetQueueLimits ("ns3::DynamicQueueLimits");
}
- Config::SetDefault ("ns3::Queue::Mode", StringValue ("QUEUE_MODE_PACKETS"));
- Config::SetDefault ("ns3::Queue::MaxPackets", UintegerValue (100));
+ Config::SetDefault ("ns3::QueueBase::Mode", StringValue ("QUEUE_MODE_PACKETS"));
+ Config::SetDefault ("ns3::QueueBase::MaxPackets", UintegerValue (100));
NetDeviceContainer devicesAccessLink = accessLink.Install (n1.Get (0), n2.Get (0));
tchPfifoFastAccess.Install (devicesAccessLink);
@@ -200,7 +200,7 @@
address.NewNetwork ();
Ipv4InterfaceContainer interfacesAccess = address.Assign (devicesAccessLink);
- Config::SetDefault ("ns3::Queue::MaxPackets", UintegerValue (netdevicesQueueSize));
+ Config::SetDefault ("ns3::QueueBase::MaxPackets", UintegerValue (netdevicesQueueSize));
NetDeviceContainer devicesBottleneckLink = bottleneckLink.Install (n2.Get (0), n3.Get (0));
QueueDiscContainer qdiscs;
@@ -220,7 +220,7 @@
Ptr streamLimits = ascii.CreateFileStream (queueDiscType + "-limits.txt");
queueLimits->TraceConnectWithoutContext ("Limit",MakeBoundCallback (&LimitsTrace, streamLimits));
}
- Ptr queue = StaticCast (devicesBottleneckLink.Get (0))->GetQueue ();
+ Ptr > queue = StaticCast (devicesBottleneckLink.Get (0))->GetQueue ();
Ptr streamBytesInQueue = ascii.CreateFileStream (queueDiscType + "-bytesInQueue.txt");
queue->TraceConnectWithoutContext ("BytesInQueue",MakeBoundCallback (&BytesInQueueTrace, streamBytesInQueue));
diff -Naur ns-3.26/examples/traffic-control/red-vs-fengadaptive.cc ns-3.27/examples/traffic-control/red-vs-fengadaptive.cc
--- ns-3.26/examples/traffic-control/red-vs-fengadaptive.cc 1969-12-31 16:00:00.000000000 -0800
+++ ns-3.27/examples/traffic-control/red-vs-fengadaptive.cc 2017-10-11 21:45:51.944600820 -0700
@@ -0,0 +1,188 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2016 NITK Surathkal
+ *
+ * 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: Sourabh Jain
+ * Mohit P. Tahiliani
+ */
+
+#include "ns3/core-module.h"
+#include "ns3/network-module.h"
+#include "ns3/internet-module.h"
+#include "ns3/point-to-point-module.h"
+#include "ns3/applications-module.h"
+#include "ns3/point-to-point-layout-module.h"
+#include "ns3/traffic-control-module.h"
+
+#include
+#include
+#include