<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.nsnam.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pdbarnes</id>
	<title>Nsnam - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.nsnam.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pdbarnes"/>
	<link rel="alternate" type="text/html" href="https://www.nsnam.org/wiki/Special:Contributions/Pdbarnes"/>
	<updated>2026-04-19T04:51:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Local_Clocks&amp;diff=11434</id>
		<title>Local Clocks</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Local_Clocks&amp;diff=11434"/>
		<updated>2019-02-01T18:58:55Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: Created page with &amp;quot;''This is a continuation of the local clocks/per-node clock discussion from GSOC2015MpTcpImplementation#On_the_per_node_clock'''  == Developer List Discussion 2019-01 ==...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This is a continuation of the local clocks/per-node clock discussion from [[GSOC2015MpTcpImplementation#On_the_per_node_clock']]''&lt;br /&gt;
&lt;br /&gt;
== Developer List Discussion 2019-01 ==&lt;br /&gt;
&lt;br /&gt;
On 24/01/19 at 09:15, Tommaso Pecorella wrote:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Hi all,&lt;br /&gt;
&lt;br /&gt;
there's an unused and yet potentially very interesting feature in ns-3: Node::GetLocalTime.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On 25 Jan 2019, at 02:55, Natale Patriciello &lt;br /&gt;
&amp;lt;blockquote&amp;gt;Matt was working on that as part of his GSoC 4 years ago.&lt;br /&gt;
[[GSOC2015MpTcpImplementation#On_the_per_node_clock]]&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Feb 1, 2019, at 9:15 AM, Barnes, Peter D. &amp;lt;barnes26@llnl.gov&amp;gt; wrote:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;I worked with Matt on this GSoC (gosh was it 4 years ago already?).  This turned out to be more complex than we expected:&lt;br /&gt;
&lt;br /&gt;
1.  (should have been the easy part) Finding code to simulate noisy clocks.  The simple thing would be to just sum samples from a Gaussian (or Poisson) for the actual tick size, but this would give an unrealistic Allen variance (just the noise portion, not the drift, which is typically more significant.)&lt;br /&gt;
&lt;br /&gt;
2.  Each Node has to support it’s own Scheduler, in local time.  (This is so you don’t have to predict accumulated variation over long times, which makes #1 harder.[1])&lt;br /&gt;
&lt;br /&gt;
3.a  For every Now() call you have to decide if it should be GetLocalTime()&lt;br /&gt;
3.b  For every Schedule() call you have to decide if it should be in local time or absolute time.&lt;br /&gt;
&lt;br /&gt;
Happy to talk more,&lt;br /&gt;
Peter&lt;br /&gt;
&lt;br /&gt;
[1]  Longer explanation:&lt;br /&gt;
&lt;br /&gt;
Suppose we’re at time 100 (absolute: 100_a), and want to schedule an event A for +100 (local: +100_l), which will end up at ~200_a.  We could look up the Allan deviation for tau=100 (or equivalently the time deviation), and sample from that to determine the absolute delay to schedule the event.&lt;br /&gt;
&lt;br /&gt;
Now the simulation proceeds and at time 110_a needs to schedule an event B for +80_l, which will end up ~190_a, so we follow the same process.  The difficulty is that each event inserted before A subdivides the original interval, but the shorter intervals will no longer result in the intended Allan deviation. In this example we sampled at tau = 100_l, then tau = 80_l, leaving a gap of 10_l *which we didn’t sample from the full Allan deviation*&lt;br /&gt;
&lt;br /&gt;
I think (but since I don’t understand#1 above it’s more like conjecture) that the right way is to store the events in a local-time schedule, then as we prepare to execute the next event E @ t_E,l, sample the noisy clock for t_E,l - t’_l (where t’_l is the local time of the previous event), in order to compute t_E,a, the absolute time of event E.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Possibly Relevant Literature ==&lt;br /&gt;
&lt;br /&gt;
=== Series on the Dynamic Allan Variance ===&lt;br /&gt;
* &amp;quot;The Dynamic Allan Variance,&amp;quot; L. Galleani, 2009. ([https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=4816055 pdf])&lt;br /&gt;
* &amp;quot;The Dynamic Allan Variance II: A Fast Computational Algorithm,&amp;quot; L. Galleani, 2019. ([https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=5361540 pdf])&lt;br /&gt;
* &amp;quot;The Dynamic Allan Variance III: Confidence and Detection Surfaces,&amp;quot; L. Galleani, 2019. ([https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=5995212 pdf])&lt;br /&gt;
* &amp;quot;The Dynamic Allan VarianceIV: Characterization of Atomic Clock Anomalies,&amp;quot; L. Galleani, 2009. ([https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=7103519 pdf])&lt;br /&gt;
* &amp;quot;The Dynamic Allan VarianceV: Recent Advances in Dynamic Stability Analysis,&amp;quot; L. Galleani, 2009. ([https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=7339453 pdf])&lt;br /&gt;
&lt;br /&gt;
=== Simulation of Noisy Clocks ===&lt;br /&gt;
* &amp;quot;Discrete Simulation Of Power Law Noise,&amp;quot; N.Jeremy Kasdin and Todd Walter, 1992. ([http://www.crya.unam.mx/radiolab/recursos/Allan/Kasdin-Walter.pdf pdf])&amp;lt;br/&amp;gt;Includes C source code.&lt;br /&gt;
* &amp;quot;Discrete Simulation of Power Law Noise,&amp;quot; Neil Ashby, 2011. ([https://arxiv.org/pdf/1103.5062.pdf pdf])&lt;br /&gt;
* colorednoise,&amp;quot; Julia Leute, 2018. ([https://github.com/jleute/colorednoise colorednoise Github Python repo], now merged into next reference)&lt;br /&gt;
* &amp;quot;allantools,&amp;quot; Anders Wallin, 2018. ([https://github.com/aewallin/allantools allantools Github Python repo])&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2015MpTcpImplementation&amp;diff=11433</id>
		<title>GSOC2015MpTcpImplementation</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2015MpTcpImplementation&amp;diff=11433"/>
		<updated>2019-02-01T18:37:30Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* On the per node clock */ Link to Local Clocks page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.&lt;br /&gt;
== Project overview ==&lt;br /&gt;
* '''Project:''' Implementation of MPTCP (Multipath TCP) + Implementation of per-node clocks&lt;br /&gt;
* '''Student:'''  Matthieu Coudron&lt;br /&gt;
* '''Mentors:'''  [mailto:tomh@tomh.org Tom Henderson], Vedran Miletic, Tommaso Pecarolla, Peter Barnes&lt;br /&gt;
* '''Code:''' https://github.com/teto/ns-3-dev-git/tree/master (check out the different branches)&lt;br /&gt;
* '''About me:''' I am a PhD student working on multipath communications. I have a background in network and system security.&lt;br /&gt;
&lt;br /&gt;
== On the MPTCP subject ==&lt;br /&gt;
&lt;br /&gt;
Thanks to last year TCP option gsoc, it is possible to implement multipath TCP - an extension to TCP that is more and more popular (used in Apple voice recognition system &amp;quot;SIRI&amp;quot;, embedded in yosemite, some Citrix products, soon to be embedded in Proximus products) - in a clean way.&lt;br /&gt;
MPTCP is available in some (possibly out of branch) kernels - Linux, Mac OS, FreeBSD - and work even with adversary middleboxes (Contrary to SCTP), which was an important challenge.&lt;br /&gt;
The 2nd challenge is still pending, ie, how to make the best usage of the path diversity ? How to be better than TCP without being more aggressive than TCP at bottlenecks ? I hope that being able to run MPTCP in a simulator could foster research on that peculiar subject since doing it with kernel code or creating a multihomed (3G/wired) setup can be complex (MPTCP kernel code is being refactored, and implementation is quite time consuming). There is no solution in the literature that answers this in a robust way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
Here is a diff file of the beginning of one mptcp incomplete implementation based on ns3.19: http://downloads.tuxfamily.org/bluecosmos/ns3/final.patch. It was generated through this kind of&lt;br /&gt;
command (I just discovered the filterdiff utility, pretty cool):&lt;br /&gt;
diff -ENwbur ~/ns3off/src/internet src/internet &amp;gt; test.patch&lt;br /&gt;
cat test.patch | filterdiff -p0 -X toexclude.txt &amp;gt; final.patch&lt;br /&gt;
&lt;br /&gt;
To help reviewers focus on the architecture, I removed some unnecessary files (but this is still a huge diff) and I add some comments in the following about MPTCP and the code.&lt;br /&gt;
To sum up, the main files to check are mptcp-socket-base.* and mptcp-subflow.* and the modifications made to tcp-socket-base.* .&lt;br /&gt;
&lt;br /&gt;
1/ First of all, MPTCP doesn't require modifications to be modified, so does this implementation, it just appears as another TCP variant so the MPTCP socket works with all the code that can work with a TcpSocket.&lt;br /&gt;
2/ MPTCP is a TCP extension, all the signaling is done through TCP options&lt;br /&gt;
3/ The application sees a *fake* TCP socket usually called the &amp;quot;meta socket&amp;quot;. This socket then dispatches the data to send among the different TCP connections of the MPTCP connection (usually called subflows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TcpSocketBase&lt;br /&gt;
|-MpTcpSocketBase (this is the &amp;quot;meta socket&amp;quot;, a logical socket that dispatches the send buffer between the different MpTcpSubflows, and reorder the segments received on the different subflows for the application to see)&lt;br /&gt;
|&lt;br /&gt;
|-MpTcpSubflow (This is a copy/paste of TcpNewReno except that it handles MPTCP logic, add/pop options when necessary)&lt;br /&gt;
&lt;br /&gt;
4/ the standard demands that MPTCP should not be more greedy than TCP so there are congestion control algorithms specific to MPTCP. In the diff you just mptcp-cc-uncoupled. the way it's implemented, you subclass both MpTcpSocketBase and MpTcpSubflow into MpTcpSocketBaseUncoupled and MpTcpSubflowUncoupled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5/ the path management files/classes are not used in the implementation and they don't have the same meaning as in the linux kernel, these classes are meant to attribute the unique IDs for each possible subflow (as required by the standard). In the linux kernel, path management modules implement policies as to yes or no should the meta establishes a new subflow.&lt;br /&gt;
&lt;br /&gt;
6/ MPTCP has a global sequence number (to reassemble packets in order at the receiver) that is conveyed through a TCP option. Every TCP sequence number should be mapped to an &amp;quot;MPTCP sequence number&amp;quot;. There are strict rules concerning these mappings: once a mapping is sent, it can't be changed, the data has to be sent, resent even if it was received on another subflow etc... the mapping is responsible for much complexity of the code. It means a mapping can't be removed as long as the whole data has not been received, and the data can not be passed to the upper layer because there may be a checksum covering the whole mapping.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Features required from ns3:&lt;br /&gt;
- Need to decorralate Tcp sender unacknowledged head (SND.UNA) from TcpTxBuffer&lt;br /&gt;
- MPTCP demultiplexing is not done on the 5 tuple but on the key&lt;br /&gt;
embedded in the MPTCP capable option&lt;br /&gt;
- it should be possible to set a memory size for the Meta buffer and&lt;br /&gt;
to share this space with subflows, ie it should be possible for TCP&lt;br /&gt;
buffers&lt;br /&gt;
&lt;br /&gt;
One critical aspect of multipath protocols is the reordering problem that usually require larger buffer to get the same performance as single path protocols. The main challenge to simulate correctly MPTCP is to mimic linux buffer mechanisms (in my opinion).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nb: MPTCP has many mechanisms to deal with middleboxes and such but I don't believe they are interesting to have in ns3 which should be used to analyze the algorithmic part, thus none of the failure mechanims are implemented (e.g. fallback to TCP  in case the server is not MPTCP compliant etc...).&lt;br /&gt;
&lt;br /&gt;
== On the per node clock ==&lt;br /&gt;
I would like to start implementing per node clock to be able to simulate time distribution protocols. Right now nodes are all perfectly synchronized ins ns3 (they share the simulator clocks). My goal is to be able to run NTPD in ns3-dce over ns3 nodes with drifting clocks. Time distribution experimentations are hard to do in practice (do you control 2 or more stratum 1 NTP servers ? and the traffic between these), I believe it makes sens and I know of no simulator that does it. This proposition is a follow up of my email to the dev ml: http://network-simulator-ns-2.7690.n7.nabble.com/Addition-of-per-node-clocks-in-ns3-td29301.html&lt;br /&gt;
&lt;br /&gt;
More discussion of this topic is on the [[Local Clocks]] page.&lt;br /&gt;
&lt;br /&gt;
= Expected deliverables =&lt;br /&gt;
While working on the previous projects I also intend to send patches to improve some parts of the ns3 code (such as the waf upgrade I sent last week).&lt;br /&gt;
I plan to work during the first half on the MPTCP code and then on the per-node clock integration. The MPTCP code has the priority though since this is the most awaited feature I believe.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
I intend to validate MPTCP against DCE. This may require some synergy with the TCP validation project.&lt;br /&gt;
&lt;br /&gt;
== Week 1 - Step 1 ==&lt;br /&gt;
* Modify tcp-option.h to support MPTCP&lt;br /&gt;
* (de)Serialization of the numerous MPTCP options&lt;br /&gt;
&lt;br /&gt;
== Week 2 - Deliverable for Step 1; start of Step 2 ==&lt;br /&gt;
* Add MPTCP crypto&lt;br /&gt;
The following was the initial plan but it may be postponed:&lt;br /&gt;
* Adapt TcpSocketBase to be more flexible (making all function virtual, overload some functions with TcpHeaders parameters instead of flags etc...)&lt;br /&gt;
* Same for TcpXxBuffer&lt;br /&gt;
&lt;br /&gt;
== Week 3 - Step 2 ==&lt;br /&gt;
* Addition of test scripts, to trace buffers&lt;br /&gt;
&lt;br /&gt;
== Week 4 - Step 2 ==&lt;br /&gt;
* put DCE infrastructure into place&lt;br /&gt;
&lt;br /&gt;
== Week 5 - Deliverable for Step2 and Step 3 ==&lt;br /&gt;
* Implement linux MPTCP schedulers to be able to compare&lt;br /&gt;
* Implement OLIA/LIA congestion controls&lt;br /&gt;
&lt;br /&gt;
== Week 6 - Step 3 ==&lt;br /&gt;
* MPTCP may still need some polishing at this point&lt;br /&gt;
&lt;br /&gt;
== Week 7 - Deliverable for Step 3; start of Step 4 ==&lt;br /&gt;
* Addition of a Clock m_clock member in each Node.&lt;br /&gt;
** (Peter) Consider adding the clock by aggregation instead.  I haven't thought this through, but I think aggregation will make it easier to manipulate the clock through the Config system, for example.&lt;br /&gt;
* Addition of a perfect clock (default behavior won't change)&lt;br /&gt;
* Addition of a drifting clock with initial offset&lt;br /&gt;
&lt;br /&gt;
== Week 8 - Step 4 ==&lt;br /&gt;
* making ntpd work in DCE&lt;br /&gt;
&lt;br /&gt;
== Week 9 - Step 4 ==&lt;br /&gt;
* making ntpd work in DCE (indeed: that looks complex)&lt;br /&gt;
&lt;br /&gt;
== Week 10 - Step 4 and Deliverables for Step 3 and 4 ==&lt;br /&gt;
* test the whole thing&lt;br /&gt;
* Add some tests/documentation&lt;br /&gt;
&lt;br /&gt;
= Weekly progress =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - Step 1 ==&lt;br /&gt;
&lt;br /&gt;
Sticking the plan In summary, this week has delivered the following:&lt;br /&gt;
&lt;br /&gt;
   - (de)Serialization of the 7/8 mptcp options with their documentation&lt;br /&gt;
   - Associated testsuite&lt;br /&gt;
&lt;br /&gt;
The implementation of these message can found on the repository[1].For more&lt;br /&gt;
details check wiki[2].&lt;br /&gt;
During next week, while waiting for a clearer schedule over the mptcp&lt;br /&gt;
work I plan to:&lt;br /&gt;
&lt;br /&gt;
   - Add the pending mptcp crypto testsuite (depends on the discussion)&lt;br /&gt;
   - Continue the work I've started in background over netlink export&lt;br /&gt;
from DCE. This is something I've started long ago but it proves quite&lt;br /&gt;
difficult, since wireshark can't dissect raw netlink, it expects it to&lt;br /&gt;
be contained within a &amp;quot;cooked linux&amp;quot; header that libpcap generates but&lt;br /&gt;
not DCE (yet). Current DCE netlink implementation does not work with&lt;br /&gt;
NTPd, that's why I look into it. (Netlink is the linux communication&lt;br /&gt;
protocol between kernel and userspace).&lt;br /&gt;
   - Send some patches to DCE to support ntpd&lt;br /&gt;
&lt;br /&gt;
[1] https://github.com/teto/ns-3-dev-git/tree/mptcp_options&lt;br /&gt;
[2] https://www.nsnam.org/wiki/GSOC2015MpTcpImplementation#Expected_deliverables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 2 - Step 2 ==&lt;br /&gt;
This week has delivered the following:&lt;br /&gt;
&lt;br /&gt;
  - Generation of MPTCP token/initial sequence data number based on libgcrypt when available or an ns3 implementation not compliant with the standard). waf configure seems to detect correctly libgcrypt but it does not seem to pass on the -DENABLE_CRYPTO flag. This is something I have to look into &lt;br /&gt;
  - Associated testsuite&lt;br /&gt;
  - Generated a diff of the MPTCP implementation against ns3.19 to help reviewers get a feeling of the architecture.&lt;br /&gt;
  - I also got more understanding of a DCE bug [0] . &lt;br /&gt;
&lt;br /&gt;
The implementation of these message can found on the repository[1]. For more details check wiki[2]. This week end got surprisingly hectic for me so I did not have the time to clean my DCE tree, for next week:&lt;br /&gt;
&lt;br /&gt;
  - I have good hope to find &amp;amp; fix my DCE bug. Once this is done, I will have a respectable amount of code to clean and push.&lt;br /&gt;
  - Fix the ENABLE_CRYPTO flag detection&lt;br /&gt;
  - Review and maybe merge nat's code&lt;br /&gt;
  - Try to generate mptcp graphs with DCE + linux kernel&lt;br /&gt;
&lt;br /&gt;
[0] https://github.com/direct-code-execution/ns-3-dce/issues/2 &amp;lt;br /&amp;gt;&lt;br /&gt;
[1] https://github.com/teto/ns-3-dev-git/tree/libcrypto &amp;lt;br /&amp;gt;&lt;br /&gt;
[2] https://www.nsnam.org/wiki/GSOC2015MpTcpImplementation#Expected_deliverables &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 3 - Step 3 ==&lt;br /&gt;
&lt;br /&gt;
This week has delivered the following:&lt;br /&gt;
 - fixed the netlink bug described in [1] (to help me in that task, I&lt;br /&gt;
extended wireshark's netlink dissector[0])&lt;br /&gt;
 - About the libgcrypt problem, it doesn't provide pkg-config so I&lt;br /&gt;
found a waf alternative that can check for its presence without it.&lt;br /&gt;
Test nearly finished.&lt;br /&gt;
 - Rather than sending patches dependant on one another, I've pushed&lt;br /&gt;
the clock support code for dce [2] and ns3 [3]. This seems to launch&lt;br /&gt;
ntpd but I've no idea if it works&lt;br /&gt;
 I've not had the time to look at mptcp dce as I had (ambitiously xD) proposed&lt;br /&gt;
&lt;br /&gt;
For the upcoming week:&lt;br /&gt;
 - prepare the mptcp crypto code for the 20 of june review&lt;br /&gt;
 - understand if clock synchronization happens or not and fix what&lt;br /&gt;
needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
[0] https://code.wireshark.org/review/#/c/8916/1/epan/dissectors/packet-netlink.c&lt;br /&gt;
[1] https://github.com/direct-code-execution/ns-3-dce/issues/2&lt;br /&gt;
[2] https://github.com/teto/ns-3-dce/commits/clock_support&lt;br /&gt;
[3] https://github.com/teto/ns-3-dev-git/commits/clock_support&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 4 - Step 4 ==&lt;br /&gt;
&lt;br /&gt;
This week has delivered the following:&lt;br /&gt;
 - I have modified my testing script so that it can run with different&lt;br /&gt;
ntp programs : ntimed-client, ntpd, chronyd. Ntpd has a huge codebase&lt;br /&gt;
so I prefer to work for now with simpler programs ie chronyd &amp;amp; ntimed.&lt;br /&gt;
 - Openntpd portable now can compile for DCE [1] but I have not tested it yet&lt;br /&gt;
 - I wrote a script that evaluates the number of unimplemented DCE&lt;br /&gt;
syscalls compared to what a binary calls. It got merged in DCE [2]. It&lt;br /&gt;
can be interesting to evaluate the complexity of running a program&lt;br /&gt;
within DCE. It is worth mentioning so that all the missing syscalls do&lt;br /&gt;
not need to be implemented to run the program within DCE. For instance&lt;br /&gt;
the ntpd binary calls 80 syscalls missing from DCE but the part of the&lt;br /&gt;
program I use doesn't call these 80 syscalls so ntpd works fine.&lt;br /&gt;
 - got some fixes on the mptcp crypto part [3]&lt;br /&gt;
&lt;br /&gt;
I have not been able yet to draw plots about offsets of the clocks.&lt;br /&gt;
This is what I plan for the next week.&lt;br /&gt;
So far, programs can't steer the clock (adjtimex/settimeofday not&lt;br /&gt;
implemented) and this is something I also hope to accomplish for next&lt;br /&gt;
week but I have little idea about how complex it can be.&lt;br /&gt;
&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
[0] https://code.wireshark.org/review/#/c/8916/1/epan/dissectors/packet-netlink.c&lt;br /&gt;
[1] https://github.com/openntpd-portable/openntpd-portable/issues/13&lt;br /&gt;
[2] https://github.com/direct-code-execution/ns-3-dce/pull/4&lt;br /&gt;
[3] https://github.com/teto/ns-3-dev-git/commits/libcrypto&lt;br /&gt;
&lt;br /&gt;
== Midterm Report ==&lt;br /&gt;
&lt;br /&gt;
The initial schedule of my gsoc got reversed due to the presence of the other TCP Gsoc. I preferred to wait for these changes to come first before rebasing my previous work on MPTCP. I am also eager to read comments about the architecture of the MPTCP implementation (link at the top of this page https://www.nsnam.org/wiki/GSOC2015MpTcpImplementation#On_the_MPTCP_subject).&lt;br /&gt;
&lt;br /&gt;
Here is a list of repositories with the work done so far:&lt;br /&gt;
- https://github.com/teto/ns-3-dev-git/commits/libcrypto : this branch contains the code to a cleaned version of the mptcp options (de)serialization code. I've added some files about cryptographic processes used in MPTCP. I did not test this part extensively enough.&lt;br /&gt;
- https://github.com/teto/ns-3-dev-git/commits/clock_support WIP: This branch implements an aggregatable virtual clock that can be set on a per node basis. This can be used to modelize how node synchronization can play a role in different protocols. It can also be used with the following DCE version.&lt;br /&gt;
- https://github.com/teto/ns-3-dce/commits/clock_support . This DCE fork can't work without the specific ns3 branch previously mentioned. This branch fixes an important bug about the netlink implementation of DCE as well as adds documentation.&lt;br /&gt;
&lt;br /&gt;
== Week 5 ==&lt;br /&gt;
&lt;br /&gt;
This week hasn't delivered much in sound code as I was trying to&lt;br /&gt;
understand how to simulate the clock.&lt;br /&gt;
I've discovered the simulator [0] and proposed a similar way to&lt;br /&gt;
simulate time. It was rightfully objected by my mentors that it would&lt;br /&gt;
change ns3 into a timestep simulator. I had to come up with an&lt;br /&gt;
alternate design which still needs some feedback. My proposal is to&lt;br /&gt;
add Node::Schedule members that would convert node's time to&lt;br /&gt;
simulation time. Whenever the node's clock frequency is changed or&lt;br /&gt;
stepped, it should cancel the registered events and reregister them&lt;br /&gt;
with an updated simulator time.&lt;br /&gt;
&lt;br /&gt;
Now the translation between node and simulator time is not that easy&lt;br /&gt;
even in the simple case to which I limit myself (I only plan to&lt;br /&gt;
support adjtime and not adjtimex). The clock's frequency has 3&lt;br /&gt;
potentially components: the background frequency + the ntp correction&lt;br /&gt;
+ a singleshot ntp correction that is removed as soon as the&lt;br /&gt;
singleshot offset is compensated for.&lt;br /&gt;
&lt;br /&gt;
So for instance when translating from node's time to sim time, you&lt;br /&gt;
potentially have to distinguish between 2 phases, the one with the&lt;br /&gt;
singleshot frequency and the one without.&lt;br /&gt;
&lt;br /&gt;
I've started some experimental implementation adding C++11 flags to&lt;br /&gt;
quickly relay Node::Schedule calls to Simulator::Schedule (replaced&lt;br /&gt;
with legacy templates if the branch proves successful). This doesn't&lt;br /&gt;
compile yet. My plan is to have a test for the clock conversion&lt;br /&gt;
covering different frequencies.&lt;br /&gt;
&lt;br /&gt;
I've updated the wiki with the midterm report with mainly a patch for&lt;br /&gt;
mptcp options. I've added to it some crypto code so I would not advise&lt;br /&gt;
it for immediate inclusion (as I had previosuly done) since I am not&lt;br /&gt;
sure about how stable the crypto API will be.&lt;br /&gt;
&lt;br /&gt;
[0] https://github.com/mlichvar/clknetsim&lt;br /&gt;
[1] https://www.nsnam.org/wiki/GSOC2015MpTcpImplementation#Midterm_Report&lt;br /&gt;
[2] https://github.com/teto/ns-3-dev-git/commits/clock_support&lt;br /&gt;
&lt;br /&gt;
== Week 6 ==&lt;br /&gt;
&lt;br /&gt;
This week thanks to the help of Peter, Steve &amp;amp; David, I've started the&lt;br /&gt;
API to allow scheduling events based on a node's clock. Instead of&lt;br /&gt;
using Simulator::Schedule, one would use Node::Schedule that would&lt;br /&gt;
relay these calls to Simulator::Schedule with a corrected timestep&lt;br /&gt;
depending on the node's clock. Compared to last week's design, we only&lt;br /&gt;
schedule the first node event in the node queue and as soon as that&lt;br /&gt;
event is finished, the next event of the node is pushed to the&lt;br /&gt;
simulator's queue. This way, if the frequency of the clock changes,&lt;br /&gt;
you only have one event (already pushed to the Simulator) that you&lt;br /&gt;
have to cancel &amp;amp; repush with a new timestep.&lt;br /&gt;
&lt;br /&gt;
The idea was to write tests along the implementation. So I've started&lt;br /&gt;
writing 2 tests:&lt;br /&gt;
1/ One test is for the clock (&amp;quot;clock-test.cc&amp;quot;). It sets a frequency&lt;br /&gt;
and checks that the&lt;br /&gt;
clock time matches the tested skew against simulator time.&lt;br /&gt;
It is possible to change the frequency during the test to check that it&lt;br /&gt;
calls the test callback. It should also be possible to test against&lt;br /&gt;
timesteps but this is not implemented yet.&lt;br /&gt;
2/ The 2nd test is in &amp;quot;node-schedule-test&amp;quot; and is equivalent to&lt;br /&gt;
simulator-test-suite but with calls like m_node-&amp;gt;Schedule( Time(3),&lt;br /&gt;
...).&lt;br /&gt;
It also checks that events trigger according to node's clock.&lt;br /&gt;
There are no Node::*Destroy functions as they don't seem fundamental yet.&lt;br /&gt;
&lt;br /&gt;
The tests don't pass yet so for next week, the plan would be:&lt;br /&gt;
- to pass the simple cases&lt;br /&gt;
- as Nat finished the bulk changes on the TCP stack, to start working&lt;br /&gt;
on a rebase for MPTCP.&lt;br /&gt;
&lt;br /&gt;
== Week 7 ==&lt;br /&gt;
&lt;br /&gt;
As proposed in week 6:&lt;br /&gt;
- I fixed the clock tests so that they now pass [0].&lt;br /&gt;
- I submitted a patch to change a few things&lt;br /&gt;
in pcap handling to unblock some [1]&lt;br /&gt;
- started rebasing mptcp implementation on nat's branch [2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My planning for next week is:&lt;br /&gt;
- to upstream most of the DCE changes I wrote during the first Gsoc&lt;br /&gt;
part (netlink fix, some syscalls, doc...)&lt;br /&gt;
- keep working on mptcp rebasing&lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
[0] https://github.com/teto/ns-3-dev-git/tree/clock_support&lt;br /&gt;
[1] https://github.com/teto/ns-3-dev-git/commits/netlink_ok&lt;br /&gt;
[2] https://github.com/teto/ns-3-dev-git/commit/f6cd305de0378b028d1ca9275a8f5d8b7835b437&lt;br /&gt;
&lt;br /&gt;
== Week 8 ==&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
I've not been able to complete the tasks partly because I had less time to work due to personal issues and the tasks I had in mind required someinteractions. I spent time to investigate how to improve the MPTCP codebase.&lt;br /&gt;
While the initial codebase copies a lot of code to minimize changes it makes it hard to maintain. Also the TCP changes made by Nat though interesting break how the initial MPTCP aware socket was created. Somehow this is a chance since it motivated me to look into MPTCP fallback. So far the user had to create an MPTCP socket and it would fail it the peer was not MPTCP compliant. I hope to minimize the&lt;br /&gt;
changes needed by the user to ease the use of MPTCP. This was not in the initial proposal and I've had a hard time defining an API but I believe we should do it as in the (linux) kernel:&lt;br /&gt;
-the client sends the MPTCP options during the SYN but does not&lt;br /&gt;
instantiate any MPTCP related structure&lt;br /&gt;
-upon SYN/ACK, it generates MPTCP structures, copies the current&lt;br /&gt;
socket (the copy becomes the &amp;quot;master&amp;quot; socket) and uses the socket seen&lt;br /&gt;
by the application as the metasocket&lt;br /&gt;
&lt;br /&gt;
In the case of ns3, this approach is more problematic because of the Ptr&amp;lt;Socket&amp;gt; indirection. Thus I've used &amp;quot;placement new&amp;quot; to replace a TcpSocketBase instance with an MpTcpSocketBase. This is a bit tricky and this as far as I went.&lt;br /&gt;
&lt;br /&gt;
So for next week to sum up, I have to:&lt;br /&gt;
-address comments on time simulation&lt;br /&gt;
-keep working on MPTCP&lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
[0] https://github.com/teto/ns-3-dev-git/tree/merge_nat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 9 ==&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
This week has been really tough in the sense I had to deal with 2&lt;br /&gt;
problems in domains I was not very confident with. First I had to&lt;br /&gt;
change the link order so that libgcrypt got linked first, which is not&lt;br /&gt;
that simple if you are not familiar with waf. Many thanks to Alex&lt;br /&gt;
Afanasyev who really saved me there. libgcrypt license is compatible&lt;br /&gt;
with ns3. As discussed on the mailing list, it is an optional&lt;br /&gt;
dependancy and it felt more natural than duplicating sha1 in ns3. This&lt;br /&gt;
should allow to read mptcp pcap in wireshark, which relies on the&lt;br /&gt;
token to identify subflows of a same connection.&lt;br /&gt;
The second problem I had was dealing with the placement new. It seemed&lt;br /&gt;
to create bugs in libc (&amp;quot;double linked list corrupted&amp;quot;) and as I was&lt;br /&gt;
unsure it was valid C++ I looked at the libc code just to realize that&lt;br /&gt;
in fact I had left in the code a &amp;quot;CopyObject&amp;lt;TcpSocketBase&amp;gt;&amp;quot; that was&lt;br /&gt;
not allocating enough memory to convert this TcpSocketBase to a&lt;br /&gt;
MpTcpSocketBase.&lt;br /&gt;
&lt;br /&gt;
As for the TCP design, what I've done is to remove the&lt;br /&gt;
TcpSocketBase::ReadOptions that was reading options even when the&lt;br /&gt;
packet was discarded later on. I contextualize option reading as in&lt;br /&gt;
linux with functions such as &amp;quot;ProcessTcpOptionsSynSent&amp;quot;.&lt;br /&gt;
I've also introduced a function&lt;br /&gt;
&amp;quot;TcpSocketBase::IsTcpOptionEnabled(TcpOption::Kind)&amp;quot; which is easier&lt;br /&gt;
to remember than the boolean for each option.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As for next week, development should be a lot smoother:&lt;br /&gt;
- Vedranm pushed the patch that was preventing me to propose DCE PRs.&lt;br /&gt;
- I should be able to have a single subflow scenario running&lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
[0] https://github.com/teto/ns-3-dev-git/tree/merge_nat&lt;br /&gt;
&lt;br /&gt;
== Week 10 ==&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
This past week, I had planned to upstream some DCE code and I had to&lt;br /&gt;
hook HookDefaultSink with the (header,packet) version. Instead of&lt;br /&gt;
adding a new function in the PcapHelper, I thought ns3 could bind the&lt;br /&gt;
correct callback depending on the signature, something like if you&lt;br /&gt;
can't bind to X, try Y etc...&lt;br /&gt;
&lt;br /&gt;
By the way, I don't know why this function is a template since it is&lt;br /&gt;
equivalent to &amp;quot;void PcapHelper::HookDefaultSink (Ptr&amp;lt;Object&amp;gt; object,&lt;br /&gt;
std::string tracename, Ptr&amp;lt;PcapFileWrapper&amp;gt; file)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
So I dived into TraceConnectWithoutContext details and the callback&lt;br /&gt;
mechanism. I looked into Callback::DoCheckType which is supposed to&lt;br /&gt;
compare callbacks but apparently it accepts any callback (if none is&lt;br /&gt;
set, it accepts and otherwise there is a dynamic_cast which I suspect&lt;br /&gt;
to always succeed even though callbacks are not compatible). All of&lt;br /&gt;
the compile time information disappear at runtime.&lt;br /&gt;
So my idea was to retain the difference in types within CallbackBase&lt;br /&gt;
since due to object slicing (during the upcast, the most derived&lt;br /&gt;
members disappear) usin virtual functions is &amp;quot;prohibited&amp;quot;. My idea is&lt;br /&gt;
to set a member in CallbackBase that register std::type_info of&lt;br /&gt;
callback. I've made a first approach in a specifc branch that allows&lt;br /&gt;
to compare callbacks a lot better than the current ns3 [0]. The&lt;br /&gt;
drawback of the current approach is that it is not possible to run&lt;br /&gt;
typeid(*this) in Callback constructor since the object is being&lt;br /&gt;
constructed. Thus I run it afterwards but the problem is that if&lt;br /&gt;
MakeNullCallback was not called, then the type checks don't work&lt;br /&gt;
If we had C++11, we could use an std::tuple and it would always work&lt;br /&gt;
(I think). I understand the previous explanations may not make sense&lt;br /&gt;
at all but to sum up, the added callback compareasons in [1] would not&lt;br /&gt;
work without my changes. I don't think I will have the time to work&lt;br /&gt;
more on this so I put it on hold (since MPTCP takes precedence).&lt;br /&gt;
&lt;br /&gt;
I've sent a patch [2] to flush pcap writing so that packets get&lt;br /&gt;
recorded even in case of a crash.&lt;br /&gt;
&lt;br /&gt;
As for the MPTCP stack, I've kept on improving the design. IMO the&lt;br /&gt;
design is much better than the original one but doing so I broke many&lt;br /&gt;
features and I am slowly putting things in order again.&lt;br /&gt;
There used to be a mix between the meta socket and subflows while the&lt;br /&gt;
separation is now clearer with the meta socket really becoming a shim&lt;br /&gt;
layer, without any actual packet.&lt;br /&gt;
As such single path communications start sending data but the closing&lt;br /&gt;
phase it not working yet [3].&lt;br /&gt;
&lt;br /&gt;
For the following week, I plan to fix the MPTCP closing phase so that&lt;br /&gt;
1 path communications work flawlessly and then move forward to the&lt;br /&gt;
multiple subflow case.&lt;br /&gt;
&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
[0] https://github.com/teto/ns-3-dev-git/blob/add_sink_with_header&lt;br /&gt;
[1] https://github.com/teto/ns-3-dev-git/blob/add_sink_with_header/src/core/test/callback-test-suite.cc#L744&lt;br /&gt;
[2] https://github.com/nsnam/ns-3-dev-git/pull/3&lt;br /&gt;
[3] https://github.com/teto/ns-3-dev-git/tree/merge_nat&lt;br /&gt;
&lt;br /&gt;
== Final review ==&lt;br /&gt;
&lt;br /&gt;
This is my final report for the Gsoc 2015 on Clock support &amp;amp; MpTcp&lt;br /&gt;
Implementation on Linux.&lt;br /&gt;
&lt;br /&gt;
I will sum up the work done and some propositions for the after Gsoc.&lt;br /&gt;
- During the first half of my Gsoc, I have been working on allowing&lt;br /&gt;
each node to run its own clock [0]. This way each node can have its&lt;br /&gt;
own time. It makes sense to test the difference in behavior of&lt;br /&gt;
protocols that depend on node synchronization. The clock takes some&lt;br /&gt;
parameters such as the raw frequency which can change over time. In&lt;br /&gt;
the end every event must be queued into the main simulator class. To&lt;br /&gt;
prevent the addition/update (when clock parameters change)/removal of&lt;br /&gt;
events, we only queue the next node event in the global Simulator.&lt;br /&gt;
Thus if the node clock change, it's enough to reschedule the event.&lt;br /&gt;
Once the event is fired, we schedule the next node event.&lt;br /&gt;
During this process, I also was able to run an unmodified ntpd (the&lt;br /&gt;
Nework Time Protocol daemon) in DCE with specific DCE patches [1].&lt;br /&gt;
&lt;br /&gt;
- As for the Mptcp implementation, I got a much cleaner version then&lt;br /&gt;
the initial one. There is now a clear difference between the &amp;quot;meta&lt;br /&gt;
socket&amp;quot; (seen by the applications) and the TCP subflows (traditional&lt;br /&gt;
TCP connections). The old meta was sending packets etc... while now it&lt;br /&gt;
focuses on the logic between subflows. Also it used to be a modified&lt;br /&gt;
copy/paste of TcpSocketBase while now subflows and meta integrate with&lt;br /&gt;
it, resulting in less code duplication. I've also improved the&lt;br /&gt;
TCP/MPTCP compatiblity, i.e., MPTCP is now a TCP option like any other&lt;br /&gt;
while you used to create a specific MPTCP socket. For instance when&lt;br /&gt;
you had one MPTCP socket connecting to a legacy TCP one, it was&lt;br /&gt;
impossible before the Gsoc and now it is. [1] I managed to exchange a&lt;br /&gt;
file between 2 nodes with 1 subflow. The multiple subflow case is&lt;br /&gt;
trickier and while a second subflow can be established, I have to do&lt;br /&gt;
more testing before assessing anything else.&lt;br /&gt;
&lt;br /&gt;
I've also sent a few patches to:&lt;br /&gt;
- upgrade waf to 1.8 (with vedran's help mostly)&lt;br /&gt;
- provided a script to allow YouCompleteMe (a vim completion engine)&lt;br /&gt;
to work with ns3&lt;br /&gt;
&lt;br /&gt;
I don't think any of these 2 are ready for reviewing yet. Don't get me&lt;br /&gt;
wrong, I have working tests in each case but each project is&lt;br /&gt;
intertwined with other ns3 components (the TCP stack, DCE, event&lt;br /&gt;
handling) and thus require specific attention to the API. I don't&lt;br /&gt;
think I am quite there yet. Once I am I will clean/document the code&lt;br /&gt;
and send official reviews. You can already have a look at it but the&lt;br /&gt;
documentation may not be quite there yet.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3.29&amp;diff=11275</id>
		<title>Ns-3.29</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3.29&amp;diff=11275"/>
		<updated>2018-08-08T00:22:30Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: Add waf update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This page summarizes the release planning for ns-3.29.  The ns-3 release process is listed [http://www.nsnam.org/developers/release-process/ here] and [[Release Process | here]].&lt;br /&gt;
&lt;br /&gt;
= Release status =&lt;br /&gt;
&lt;br /&gt;
ns-3.29 is rescheduled for August 2018.&lt;br /&gt;
&lt;br /&gt;
= Current open issues =&lt;br /&gt;
&lt;br /&gt;
The following is considered a blocker:&lt;br /&gt;
&lt;br /&gt;
* (Bug 2930) Ubuntu 18.04 missing pygoocanvas package&lt;br /&gt;
** Tracked here:  https://www.nsnam.org/bugzilla/show_bug.cgi?id=2930  Ankit is looking into remaining issue.&lt;br /&gt;
&lt;br /&gt;
The following would be nice to have but probably not blockers:&lt;br /&gt;
&lt;br /&gt;
* (Bug 2470) Block ack agreement handshake&lt;br /&gt;
** Pending issue with InactivityTimeout identified with Alexander&lt;br /&gt;
* (Bug 2960) Improve bindings toolchain installation via bake&lt;br /&gt;
** Tracked here:  https://www.nsnam.org/bugzilla/show_bug.cgi?id=2960&lt;br /&gt;
&lt;br /&gt;
* Steve would like to update waf to current (v2.0.9), patch coming. This will enable him to fix another issue: lack of MD5 in FIPS-compliant systems.  Patch coming. [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=11056</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=11056"/>
		<updated>2018-05-11T21:57:52Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Alternative Proposals */ comment&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code is an example of a header file that is not used and does not exist on Windows systems:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the ns-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the ns-3 modules that are accessible by other ns-3 modules or user programs.  &lt;br /&gt;
&lt;br /&gt;
Here is an example provided by Peter Barnes that illustrates the issue.  Assuming you have the following code:&lt;br /&gt;
&lt;br /&gt;
''src/foo/model/foo.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 class foo &lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class foo  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/bar/model/bar.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include “ns3/foo.h”&lt;br /&gt;
 class bar&lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class bar &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When compiling module foo, the symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt; (because the implementation lives in this executable unit foo which is a separate DLL).  When compiling bar.cc, those same symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt; (because the implementation is located in a different execution unit, the DLL containing bar needs to import them from the DLL containing foo).  In the specific case of ns-3, each module is a separate DLL so references to a class that is exposed for consumption by other executable units (DLLs or programs) need to change this declaration depending on what's being compiled.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Method ====&lt;br /&gt;
This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
''src/core/ns3dll.h code fragment''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #ifndef NS3DLL_H&lt;br /&gt;
 #define NS3DLL_H&lt;br /&gt;
 &lt;br /&gt;
 #ifdef _WIN32&lt;br /&gt;
 #  ifdef _ANT&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
 #  else&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
 #  endif&lt;br /&gt;
 ...&lt;br /&gt;
 #else  /* _WIN32 */&lt;br /&gt;
 #  define NS3ANTLIB&lt;br /&gt;
 ...&lt;br /&gt;
 #endif  /* _WIN32 */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Each exported symbol needs the corresponding module export/import token as a label.  Here is an example class declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;class NS3ANTLIB AntennaModel : public Object&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach has these drawbacks:&lt;br /&gt;
* Every module needs a mention in a core file, ns3dll.h&lt;br /&gt;
* Not clear what to do with contrib modules.  Does bake have to know how to insert contrib modules in this core file?&lt;br /&gt;
* How do we prevent modified ns3dll.h files from being pushed accidentally?&lt;br /&gt;
&lt;br /&gt;
These questions need to be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Solutions ====&lt;br /&gt;
A question that has been received is &amp;quot;are there are other ways to indicate export/import&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
(1) For Microsoft Windows targets there are alternative methods for including the symbol in the DLL’s export table such as using a .def file with an EXPORTS section&lt;br /&gt;
&lt;br /&gt;
* ''This will work, but the names in the EXPORTS section must be the &amp;quot;object code&amp;quot; names of the items.  Remember that in C++, the actual names of functions, global variables, classes, etc. are NOT the names assigned in the source code, they are decorated names created by the compiler.  In order to use a .def file for this, a developer would have to know the compiler decorated name of the item.  Also, Microsoft strongly recommends that the decorated names NOT be used by developers since the scheme used to create the decorated name by the compiler can change with a new compiler version ''&lt;br /&gt;
** ''Agreed, manually updating mangled names is a bad idea. Can this be automated?`` [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
(2) With GNU ld, using the --export-all linker flag&lt;br /&gt;
&lt;br /&gt;
* ''This approach will not work because gcc and Visual Studio do not use identical rules for name mangling of C++ objects.  The --export-all output would be specfic to gcc and would not work for Visual Studio.&lt;br /&gt;
&lt;br /&gt;
==== Digression on Current Symbol Export ====&lt;br /&gt;
The current behavior is to export all symbols in headers listed in wscript:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 headers = bld(features='ns3header')&lt;br /&gt;
 headers.module = 'internet'&lt;br /&gt;
 headers.source = [&lt;br /&gt;
    ''model/udp-header.h',&lt;br /&gt;
     ...&amp;lt;/nowiki &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Private headers are simply not listed, so they are not copied to &amp;lt;code&amp;gt;build/ns3/&amp;lt;/code&amp;gt; and so aren't visible outside the declaring module.&lt;br /&gt;
&lt;br /&gt;
An alternative method is to include a &amp;quot;private header&amp;quot; stanza in wscript (see a remnant from &amp;lt;nowiki&amp;gt;src/internet/wscript&amp;lt;/nowiki&amp;gt;):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 privateheaders = bld(features='ns3privateheader')&lt;br /&gt;
 privateheaders.module = 'internet'&lt;br /&gt;
 privateheaders.source = [&lt;br /&gt;
    ] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This feature is not used at the moment. It was used at one point to expose a private (non-exported) header to test code.&lt;br /&gt;
&lt;br /&gt;
==== Questions/Discussion ====&lt;br /&gt;
# Can this use the existing NS3_MODULE_x symbol for the declaration?&lt;br /&gt;
#* ''Any name can be used for the export / import symbol name.  The names chosen and list in ns3dll.h were created by me to be short (since they have to be added to the source code) yet provide enough detail on what they represent.&lt;br /&gt;
# Why does the value of the symbol need to be dynamic?&lt;br /&gt;
#* ''As noted in the alternative proposal what the symbol resolves to depends on if the header file is being included in the module where the implementation resides or if it is used by another module to reference the module where the implementation resides.&lt;br /&gt;
#Why don't all headers include ns3dll.h?&lt;br /&gt;
#* ''All headers need the declarations provided in ns3dll.h.  If ns3dll.h is included by another header file that is included in the header file (either directly or indirectly), it has already been included and adding it to the header file is not necessary.  NOTE:  There is no reason that this header file could not be included in every other header file, the patches submitted for review only included this file where it was necessary to reduce the size of the changes.&lt;br /&gt;
&lt;br /&gt;
==== ATTRIBUTE_x Macro Modifications ====&lt;br /&gt;
Another example is all of the&amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros have been extended.  The &amp;lt;code&amp;gt;ATTRIBUTE_*&amp;lt;/code&amp;gt; macros declare a three classes for each underlying type &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;:  &amp;lt;code&amp;gt;XValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XAccessor&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;XChecker&amp;lt;/code&amp;gt;.  These are impacted by the import/export tag discussed above. As a result, the tag for the module ''invoking'' the macro has to be passed through to the macro, so they now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros within a base ns-3 module require the new macro with the additional parameter.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros locally within a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the ns-3 source code.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Proposals ====&lt;br /&gt;
Desirable attributes of any solution are:&lt;br /&gt;
* All (exported) headers would have a common format&lt;br /&gt;
* No need to mention every module in a core file (ns3dll.h)&lt;br /&gt;
* Scales to contrib modules&lt;br /&gt;
* No need to extend the ATTRIBUTE_x macros&lt;br /&gt;
&lt;br /&gt;
Could a refinement of the primary proposal be made to work?&lt;br /&gt;
&lt;br /&gt;
* Auto-generate &amp;lt;code&amp;gt;ns3-modules.h&amp;lt;/code&amp;gt; file (see below for a sketch)&lt;br /&gt;
**  Which defines a unique numeric symbol for each module present in the build.&lt;br /&gt;
&lt;br /&gt;
This file would be added to the hgignore file, so it never gets added to the repo.&lt;br /&gt;
By dynamically (at build time) assigning module numbers, we avoid numbering conflict from statically assigned module symbols, yet still facilitate simple (integer) comparisons between module tags and the current compilation unit tag.&lt;br /&gt;
&lt;br /&gt;
This would enable a variation of an earlier (unworkable) proposal:&lt;br /&gt;
&lt;br /&gt;
''build/ns3/ns3-modules.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 /* This file autogenerated-do not edit. */&lt;br /&gt;
 &lt;br /&gt;
 /* Make sure NS3_MODULE is undefined.&lt;br /&gt;
   It will be defined by the file including this file. */&lt;br /&gt;
 #ifdef NS3_MODULE&lt;br /&gt;
 #  undef NS3_MODULE&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 /* Define the module ids */&lt;br /&gt;
 #ifndef NS3_MODULES_DEFINED&lt;br /&gt;
 #define NS3_MODULES_DEFINED&lt;br /&gt;
 &lt;br /&gt;
 #define NS3_ANTENNA_MODULE   1&lt;br /&gt;
 #define NS3_AODV_MODULE      2&lt;br /&gt;
 /* ... */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3_MODULES_DEFINED */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/core/model/ns3-export.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 /* No include guard.  This is meant to appear many times&lt;br /&gt;
    in a single compilation unit&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 /* Usage:  &lt;br /&gt;
    Start each header with this three line block, after the last header inclusion (assuming this is the core module):&lt;br /&gt;
      #include &amp;quot;ns3-modules.h&amp;quot;&lt;br /&gt;
      #define NS3_MODULE NS3_CORE_MODULE&lt;br /&gt;
      #include &amp;quot;ns3/ns3-export.h&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
    Label each class with&lt;br /&gt;
  &lt;br /&gt;
      class NS3_EXPORT ...&lt;br /&gt;
 &lt;br /&gt;
    The build system defines NS3_COMPILATION_MODULE to be&lt;br /&gt;
    the current module being built.&lt;br /&gt;
 */&lt;br /&gt;
 	&lt;br /&gt;
 #ifdef NS3_EXPORT&lt;br /&gt;
 #  undef NS3_EXPORT&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #if NS3_MODULE == NS3_COMPILATION_MODULE&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllexport)&lt;br /&gt;
 #else&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllimport)&lt;br /&gt;
 #endif &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and an example source file:&lt;br /&gt;
&lt;br /&gt;
''src/.../example.cc:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include &amp;lt;iostream&amp;gt;&lt;br /&gt;
 #include &amp;lt;iomanip&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 // The build system:&lt;br /&gt;
 #ifndef NS3_COMPILATION_MODULE&lt;br /&gt;
 #  define NS3_COMPILATION_MODULE NS3_AODV_MODULE&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 // A module header file:&lt;br /&gt;
 #include &amp;quot;ns3-modules.h&amp;quot;&lt;br /&gt;
 #define NS3_MODULE NS3_ANTENNA_MODULE&lt;br /&gt;
 #include &amp;quot;ns3-export.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 // Helpers for this demo&lt;br /&gt;
 #define stringify_it( name ) # name&lt;br /&gt;
 #define stringify(name) stringify_it(name)&lt;br /&gt;
 #define doc(name) std::left &amp;lt;&amp;lt; std::setw (20) &amp;lt;&amp;lt; # name &amp;lt;&amp;lt; &amp;quot;\t&amp;quot; &amp;lt;&amp;lt; stringify (name) &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 int&lt;br /&gt;
 main (int argc, char** argv)&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
   std::cout &amp;lt;&amp;lt; doc (NS3_MODULE)&lt;br /&gt;
 	     &amp;lt;&amp;lt; doc (NS3_COMPILATION_MODULE)&lt;br /&gt;
 	     &amp;lt;&amp;lt; doc (NS3_EXPORT);&lt;br /&gt;
 &lt;br /&gt;
   return 0;&lt;br /&gt;
 } &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two example builds and runs:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 g++ example.cc -o example  &amp;amp;&amp;amp; ./example&lt;br /&gt;
 NS3_MODULE          	1&lt;br /&gt;
 NS3_COMPILATION_MODULE	2&lt;br /&gt;
 NS3_EXPORT          	__declspec(dllimport)&lt;br /&gt;
 &lt;br /&gt;
 g++ example.cc -o example -DNS3_COMPILATION_MODULE=NS3_ANTENNA_MODULE &amp;amp;&amp;amp; ./example&lt;br /&gt;
 NS3_MODULE          	1&lt;br /&gt;
 NS3_COMPILATION_MODULE	1&lt;br /&gt;
 NS3_EXPORT          	__declspec(dllexport) &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This appears to address the requirements above, in a more direct way than the original proposal:&lt;br /&gt;
&lt;br /&gt;
* All exported headers have the same three line block defining their module identity, between two ns-3 includes&lt;br /&gt;
* No core file listing all modules; it's auto-generated and only exists in the build tree.&lt;br /&gt;
* Works equally well with contrib modules, since &amp;lt;code&amp;gt;ns3-modules.h&amp;lt;/code&amp;gt; is auto-generated at build time, when the modules are known.&lt;br /&gt;
* Works transparently through macros, including the &amp;lt;code&amp;gt;ATTRIBUTE_&amp;lt;/code&amp;gt; macros.&lt;br /&gt;
**''This approach will work and the patch has been updated to use this approach with one exception.  Autogenerating the file at build time wont work because that would cause every source file in the whole project to be recompiled every time any modification is made to any file because Visual Studio uses the file modification time to determine which files need to be compiled. Visual Studio doesn't provide an analog to ./waf configure to configure the project before build time.&lt;br /&gt;
** The file build/ns3/ns3-modules.h only needs to be created when the list of modules changes, not every build. How to achieve this in VS is up to you.  If we can't solve this, we're stuck, because the original proposal to create src/core/ns3dll.h has the same issues (as well as other show-stoppers IMO).&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10990</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10990"/>
		<updated>2018-05-01T16:20:37Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Alternative Proposals */ add missing include line&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code is an example of a header file that is not used and does not exist on Windows systems:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the ns-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the ns-3 modules that are accessible by other ns-3 modules or user programs.  &lt;br /&gt;
&lt;br /&gt;
Here is an example provided by Peter Barnes that illustrates the issue.  Assuming you have the following code:&lt;br /&gt;
&lt;br /&gt;
''src/foo/model/foo.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 class foo &lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class foo  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/bar/model/bar.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include “ns3/foo.h”&lt;br /&gt;
 class bar&lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class bar &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When compiling module foo, the symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt; (because the implementation lives in this executable unit foo which is a separate DLL).  When compiling bar.cc, those same symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt; (because the implementation is located in a different execution unit, the DLL containing bar needs to import them from the DLL containing foo).  In the specific case of ns-3, each module is a separate DLL so references to a class that is exposed for consumption by other executable units (DLLs or programs) need to change this declaration depending on what's being compiled.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Method ====&lt;br /&gt;
This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
''src/core/ns3dll.h code fragment''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #ifndef NS3DLL_H&lt;br /&gt;
 #define NS3DLL_H&lt;br /&gt;
 &lt;br /&gt;
 #ifdef _WIN32&lt;br /&gt;
 #  ifdef _ANT&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
 #  else&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
 #  endif&lt;br /&gt;
 ...&lt;br /&gt;
 #else  /* _WIN32 */&lt;br /&gt;
 #  define NS3ANTLIB&lt;br /&gt;
 ...&lt;br /&gt;
 #endif  /* _WIN32 */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Each exported symbol needs the corresponding module export/import token as a label.  Here is an example class declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;class NS3ANTLIB AntennaModel : public Object&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach has these drawbacks:&lt;br /&gt;
* Every module needs a mention in a core file, ns3dll.h&lt;br /&gt;
* Not clear what to do with contrib modules.  Does bake have to know how to insert contrib modules in this core file?&lt;br /&gt;
* How do we prevent modified ns3dll.h files from being pushed accidentally?&lt;br /&gt;
&lt;br /&gt;
These questions need to be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Solutions ====&lt;br /&gt;
A question that has been received is &amp;quot;are there are other ways to indicate export/import&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
(1) For Microsoft Windows targets there are alternative methods for including the symbol in the DLL’s export table such as using a .def file with an EXPORTS section&lt;br /&gt;
&lt;br /&gt;
* ''This will work, but the names in the EXPORTS section must be the &amp;quot;object code&amp;quot; names of the items.  Remember that in C++, the actual names of functions, global variables, classes, etc. are NOT the names assigned in the source code, they are decorated names created by the compiler.  In order to use a .def file for this, a developer would have to know the compiler decorated name of the item.  Also, Microsoft strongly recommends that the decorated names NOT be used by developers since the scheme used to create the decorated name by the compiler can change with a new compiler version ''&lt;br /&gt;
** ''Agreed, manually updating mangled names is a bad idea. Can this be automated?`` [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
(2) With GNU ld, using the --export-all linker flag&lt;br /&gt;
&lt;br /&gt;
* ''This approach was not evaluated for two reasons, first the goal of the project was to set up a Visual Studio development environment that did not require any other tools or software beyond Visual Studio.  Second, using an approach like this would eliminate developer control of what was exported.  While this may not be an issue for core ns-3 modules, with a contributor model, contributor may not want to make all of the implementation visible or external.&lt;br /&gt;
** ''Exporting all symbols is the current behavior (with two possible exceptions, see below).  What's wrong with keeping this as the default?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Is there room to modify the overall goals for the project? For example, instead of &amp;quot;pure VS environment&amp;quot; we could set the lower bar of &amp;quot;can be built and developed from VS&amp;quot;, which leaves room for hybrid solutions, such as continuing to use waf, or other non-VS build tools/steps.  In particular, this might enable us to do something like --export-all and leverage the list of exported headers already present in wscript to indicate what should be exported.  This would provide the same granularity as presently available.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Digression on Current Symbol Export ====&lt;br /&gt;
The current behavior is to export all symbols in headers listed in wscript:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 headers = bld(features='ns3header')&lt;br /&gt;
 headers.module = 'internet'&lt;br /&gt;
 headers.source = [&lt;br /&gt;
    ''model/udp-header.h',&lt;br /&gt;
     ...&amp;lt;/nowiki &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Private headers are simply not listed, so they are not copied to &amp;lt;code&amp;gt;build/ns3/&amp;lt;/code&amp;gt; and so aren't visible outside the declaring module.&lt;br /&gt;
&lt;br /&gt;
An alternative method is to include a &amp;quot;private header&amp;quot; stanza in wscript (see a remnant from &amp;lt;nowiki&amp;gt;src/internet/wscript&amp;lt;/nowiki&amp;gt;):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 privateheaders = bld(features='ns3privateheader')&lt;br /&gt;
 privateheaders.module = 'internet'&lt;br /&gt;
 privateheaders.source = [&lt;br /&gt;
    ] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This feature is not used at the moment. It was used at one point to expose a private (non-exported) header to test code.&lt;br /&gt;
&lt;br /&gt;
==== Questions/Discussion ====&lt;br /&gt;
# Can this use the existing NS3_MODULE_x symbol for the declaration?&lt;br /&gt;
#* ''Any name can be used for the export / import symbol name.  The names chosen and list in ns3dll.h were created by me to be short (since they have to be added to the source code) yet provide enough detail on what they represent.&lt;br /&gt;
# Why does the value of the symbol need to be dynamic?&lt;br /&gt;
#Why don't all headers include ns3dll.h?&lt;br /&gt;
#* ''All headers need the declarations provided in ns3dll.h.  If ns3dll.h is included by another header file that is included in the header file (either directly or indirectly), it has already been included and adding it to the header file is not necessary.  NOTE:  There is no reason that this header file could not be included in every other header file, the patches submitted for review only included this file where it was necessary to reduce the size of the changes.&lt;br /&gt;
&lt;br /&gt;
==== ATTRIBUTE_x Macro Modifications ====&lt;br /&gt;
Another example is all of the&amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros have been extended.  The &amp;lt;code&amp;gt;ATTRIBUTE_*&amp;lt;/code&amp;gt; macros declare a three classes for each underlying type &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;:  &amp;lt;code&amp;gt;XValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XAccessor&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;XChecker&amp;lt;/code&amp;gt;.  These are impacted by the import/export tag discussed above. As a result, the tag for the module ''invoking'' the macro has to be passed through to the macro, so they now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros within a base ns-3 module require the new macro with the additional parameter.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros locally within a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the ns-3 source code.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Proposals ====&lt;br /&gt;
Desirable attributes of any solution are:&lt;br /&gt;
* All (exported) headers would have a common format&lt;br /&gt;
* No need to mention every module in a core file (ns3dll.h)&lt;br /&gt;
* Scales to contrib modules&lt;br /&gt;
* No need to extend the ATTRIBUTE_x macros&lt;br /&gt;
&lt;br /&gt;
Could a refinement of the primary proposal be made to work?&lt;br /&gt;
&lt;br /&gt;
* Auto-generate &amp;lt;code&amp;gt;ns3-modules.h&amp;lt;/code&amp;gt; file (see below for a sketch)&lt;br /&gt;
**  Which defines a unique numeric symbol for each module present in the build.&lt;br /&gt;
&lt;br /&gt;
This file would be added to the hgignore file, so it never gets added to the repo.&lt;br /&gt;
By dynamically (at build time) assigning module numbers, we avoid numbering conflict from statically assigned module symbols, yet still facilitate simple (integer) comparisons between module tags and the current compilation unit tag.&lt;br /&gt;
&lt;br /&gt;
This would enable a variation of an earlier (unworkable) proposal:&lt;br /&gt;
&lt;br /&gt;
''build/ns3/ns3-modules.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 /* This file autogenerated-do not edit. */&lt;br /&gt;
 &lt;br /&gt;
 /* Make sure NS3_MODULE is undefined.&lt;br /&gt;
   It will be defined by the file including this file. */&lt;br /&gt;
 #ifdef NS3_MODULE&lt;br /&gt;
 #  undef NS3_MODULE&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 /* Define the module ids */&lt;br /&gt;
 #ifndef NS3_MODULES_DEFINED&lt;br /&gt;
 #define NS3_MODULES_DEFINED&lt;br /&gt;
 &lt;br /&gt;
 #define NS3_ANTENNA_MODULE   1&lt;br /&gt;
 #define NS3_AODV_MODULE      2&lt;br /&gt;
 /* ... */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3_MODULES_DEFINED */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/core/model/ns3-export.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 /* No include guard.  This is meant to appear many times&lt;br /&gt;
    in a single compilation unit&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 /* Usage:  &lt;br /&gt;
    Start each header with this three line block, after the last header inclusion (assuming this is the core module):&lt;br /&gt;
      #include &amp;quot;ns3-modules.h&amp;quot;&lt;br /&gt;
      #define NS3_MODULE NS3_CORE_MODULE&lt;br /&gt;
      #include &amp;quot;ns3/ns3-export.h&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
    Label each class with&lt;br /&gt;
  &lt;br /&gt;
      class NS3_EXPORT ...&lt;br /&gt;
 &lt;br /&gt;
    The build system defines NS3_COMPILATION_MODULE to be&lt;br /&gt;
    the current module being built.&lt;br /&gt;
 */&lt;br /&gt;
 	&lt;br /&gt;
 #ifdef NS3_EXPORT&lt;br /&gt;
 #  undef NS3_EXPORT&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #if NS3_MODULE == NS3_COMPILATION_MODULE&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllexport)&lt;br /&gt;
 #else&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllimport)&lt;br /&gt;
 #endif &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and an example source file:&lt;br /&gt;
&lt;br /&gt;
''src/.../example.cc:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include &amp;lt;iostream&amp;gt;&lt;br /&gt;
 #include &amp;lt;iomanip&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 // The build system:&lt;br /&gt;
 #ifndef NS3_COMPILATION_MODULE&lt;br /&gt;
 #  define NS3_COMPILATION_MODULE NS3_AODV_MODULE&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 // A module header file:&lt;br /&gt;
 #include &amp;quot;ns3-modules.h&amp;quot;&lt;br /&gt;
 #define NS3_MODULE NS3_ANTENNA_MODULE&lt;br /&gt;
 #include &amp;quot;ns3-export.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 // Helpers for this demo&lt;br /&gt;
 #define stringify_it( name ) # name&lt;br /&gt;
 #define stringify(name) stringify_it(name)&lt;br /&gt;
 #define doc(name) std::left &amp;lt;&amp;lt; std::setw (20) &amp;lt;&amp;lt; # name &amp;lt;&amp;lt; &amp;quot;\t&amp;quot; &amp;lt;&amp;lt; stringify (name) &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 int&lt;br /&gt;
 main (int argc, char** argv)&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
   std::cout &amp;lt;&amp;lt; doc (NS3_MODULE)&lt;br /&gt;
 	     &amp;lt;&amp;lt; doc (NS3_COMPILATION_MODULE)&lt;br /&gt;
 	     &amp;lt;&amp;lt; doc (NS3_EXPORT);&lt;br /&gt;
 &lt;br /&gt;
   return 0;&lt;br /&gt;
 } &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two example builds and runs:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 g++ example.cc -o example  &amp;amp;&amp;amp; ./example&lt;br /&gt;
 NS3_MODULE          	1&lt;br /&gt;
 NS3_COMPILATION_MODULE	2&lt;br /&gt;
 NS3_EXPORT          	__declspec(dllimport)&lt;br /&gt;
 &lt;br /&gt;
 g++ example.cc -o example -DNS3_COMPILATION_MODULE=NS3_ANTENNA_MODULE &amp;amp;&amp;amp; ./example&lt;br /&gt;
 NS3_MODULE          	1&lt;br /&gt;
 NS3_COMPILATION_MODULE	1&lt;br /&gt;
 NS3_EXPORT          	__declspec(dllexport) &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This appears to address the requirements above, in a more direct way than the original proposal:&lt;br /&gt;
&lt;br /&gt;
* All exported headers have the same three line block defining their module identity, between two ns-3 includes&lt;br /&gt;
* No core file listing all modules; it's auto-generated and only exists in the build tree.&lt;br /&gt;
* Works equally well with contrib modules, since &amp;lt;code&amp;gt;ns3-modules.h&amp;lt;/code&amp;gt; is auto-generated at build time, when the modules are known.&lt;br /&gt;
* Works transparently through macros, including the &amp;lt;code&amp;gt;ATTRIBUTE_&amp;lt;/code&amp;gt; macros.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10983</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10983"/>
		<updated>2018-04-30T21:40:48Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Alternative Proposals */ New proposal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''The purpose of the change is to make the Visual Studio implementation match the GCC implementation (and not include full path names under Visual Studio).  If you want them to be different, we can do that but I don't think the user community is going to like the difference because it increases the size of the log files generated by a factor of 2 or 3 when the full path name of the EXE is included in each log message when function names are enabled.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Yet this patch shows __FUNCTION__ for WIN32, and __func__ for all others.  It sounds like WIN32 should use __func__, in which case they can both use __func__, and no need for conditional compilation.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''You have the cases reversed, the conditional at the start of the block is'' #ifndef _WIN32 ''not'' #ifdef _WIN32.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Doh!  In any case can't they both use the same symbol __func__?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''I don't have any way to verify the behavior on the non Windows platforms other than gcc on Ubuntu 16.04'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
*** ''That's sufficient.  Does it work?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the ns-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the ns-3 modules that are accessible by other ns-3 modules or user programs.  &lt;br /&gt;
&lt;br /&gt;
Here is an example provided by Peter Barnes that illustrates the issue.  Assuming you have the following code:&lt;br /&gt;
&lt;br /&gt;
''src/foo/model/foo.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 class foo &lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class foo  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/bar/model/bar.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include “ns3/foo.h”&lt;br /&gt;
 class bar&lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class bar &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When compiling module foo, the symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt; (because the implementation lives in this executable unit foo which is a separate DLL).  When compiling bar.cc, those same symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt; (because the implementation is located in a different execution unit, the DLL containing bar needs to import them from the DLL containing foo).  In the specific case of ns-3, each module is a separate DLL so references to a class that is exposed for consumption by other executable units (DLLs or programs) need to change this declaration depending on what's being compiled.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Method ====&lt;br /&gt;
This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
''src/core/ns3dll.h code fragment''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #ifndef NS3DLL_H&lt;br /&gt;
 #define NS3DLL_H&lt;br /&gt;
 &lt;br /&gt;
 #ifdef _WIN32&lt;br /&gt;
 #  ifdef _ANT&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
 #  else&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
 #  endif&lt;br /&gt;
 ...&lt;br /&gt;
 #else  /* _WIN32 */&lt;br /&gt;
 #  define NS3ANTLIB&lt;br /&gt;
 ...&lt;br /&gt;
 #endif  /* _WIN32 */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Each exported symbol needs the corresponding module export/import token as a label.  Here is an example class declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;class NS3ANTLIB AntennaModel : public Object&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach has these drawbacks:&lt;br /&gt;
* Every module needs a mention in a core file, ns3dll.h&lt;br /&gt;
* Not clear what to do with contrib modules.  Does bake have to know how to insert contrib modules in this core file?&lt;br /&gt;
* How do we prevent modified ns3dll.h files from being pushed accidentally?&lt;br /&gt;
&lt;br /&gt;
These questions need to be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Solutions ====&lt;br /&gt;
A question that has been received is &amp;quot;are there are other ways to indicate export/import&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
(1) For Microsoft Windows targets there are alternative methods for including the symbol in the DLL’s export table such as using a .def file with an EXPORTS section&lt;br /&gt;
&lt;br /&gt;
* ''This will work, but the names in the EXPORTS section must be the &amp;quot;object code&amp;quot; names of the items.  Remember that in C++, the actual names of functions, global variables, classes, etc. are NOT the names assigned in the source code, they are decorated names created by the compiler.  In order to use a .def file for this, a developer would have to know the compiler decorated name of the item.  Also, Microsoft strongly recommends that the decorated names NOT be used by developers since the scheme used to create the decorated name by the compiler can change with a new compiler version ''&lt;br /&gt;
** ''Agreed, manually updating mangled names is a bad idea. Can this be automated?`` [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
(2) With GNU ld, using the --export-all linker flag&lt;br /&gt;
&lt;br /&gt;
* ''This approach was not evaluated for two reasons, first the goal of the project was to set up a Visual Studio development environment that did not require any other tools or software beyond Visual Studio.  Second, using an approach like this would eliminate developer control of what was exported.  While this may not be an issue for core ns-3 modules, with a contributor model, contributor may not want to make all of the implementation visible or external.&lt;br /&gt;
** ''Exporting all symbols is the current behavior (with two possible exceptions, see below).  What's wrong with keeping this as the default?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Is there room to modify the overall goals for the project? For example, instead of &amp;quot;pure VS environment&amp;quot; we could set the lower bar of &amp;quot;can be built and developed from VS&amp;quot;, which leaves room for hybrid solutions, such as continuing to use waf, or other non-VS build tools/steps.  In particular, this might enable us to do something like --export-all and leverage the list of exported headers already present in wscript to indicate what should be exported.  This would provide the same granularity as presently available.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Digression on Current Symbol Export ====&lt;br /&gt;
The current behavior is to export all symbols in headers listed in wscript:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 headers = bld(features='ns3header')&lt;br /&gt;
 headers.module = 'internet'&lt;br /&gt;
 headers.source = [&lt;br /&gt;
    ''model/udp-header.h',&lt;br /&gt;
     ...&amp;lt;/nowiki &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Private headers are simply not listed, so they are not copied to &amp;lt;code&amp;gt;build/ns3/&amp;lt;/code&amp;gt; and so aren't visible outside the declaring module.&lt;br /&gt;
&lt;br /&gt;
An alternative method is to include a &amp;quot;private header&amp;quot; stanza in wscript (see a remnant from &amp;lt;nowiki&amp;gt;src/internet/wscript&amp;lt;/nowiki&amp;gt;):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 privateheaders = bld(features='ns3privateheader')&lt;br /&gt;
 privateheaders.module = 'internet'&lt;br /&gt;
 privateheaders.source = [&lt;br /&gt;
    ] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This feature is not used at the moment. It was used at one point to expose a private (non-exported) header to test code.&lt;br /&gt;
&lt;br /&gt;
==== Questions/Discussion ====&lt;br /&gt;
# Can this use the existing NS3_MODULE_x symbol for the declaration?&lt;br /&gt;
#* ''Any name can be used for the export / import symbol name.  The names chosen and list in ns3dll.h were created by me to be short (since they have to be added to the source code) yet provide enough detail on what they represent.&lt;br /&gt;
# Why does the value of the symbol need to be dynamic?&lt;br /&gt;
#Why don't all headers include ns3dll.h?&lt;br /&gt;
#* ''All headers need the declarations provided in ns3dll.h.  If ns3dll.h is included by another header file that is included in the header file (either directly or indirectly), it has already been included and adding it to the header file is not necessary.  NOTE:  There is no reason that this header file could not be included in every other header file, the patches submitted for review only included this file where it was necessary to reduce the size of the changes.&lt;br /&gt;
&lt;br /&gt;
==== ATTRIBUTE_x Macro Modifications ====&lt;br /&gt;
Another example is all of the&amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros have been extended.  The &amp;lt;code&amp;gt;ATTRIBUTE_*&amp;lt;/code&amp;gt; macros declare a three classes for each underlying type &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;:  &amp;lt;code&amp;gt;XValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XAccessor&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;XChecker&amp;lt;/code&amp;gt;.  These are impacted by the import/export tag discussed above. As a result, the tag for the module ''invoking'' the macro has to be passed through to the macro, so they now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros within a base ns-3 module require the new macro with the additional parameter.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros locally within a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the ns-3 source code.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Proposals ====&lt;br /&gt;
Desirable attributes of any solution are:&lt;br /&gt;
* All (exported) headers would have a common format&lt;br /&gt;
* No need to mention every module in a core file (ns3dll.h)&lt;br /&gt;
* Scales to contrib modules&lt;br /&gt;
* No need to extend the ATTRIBUTE_x macros&lt;br /&gt;
&lt;br /&gt;
Could a refinement of the primary proposal be made to work?&lt;br /&gt;
&lt;br /&gt;
* Auto-generate &amp;lt;code&amp;gt;ns3-modules.h&amp;lt;/code&amp;gt; file (see below for a sketch)&lt;br /&gt;
**  Which defines a unique numeric symbol for each module present in the build.&lt;br /&gt;
&lt;br /&gt;
This file would be added to the hgignore file, so it never gets added to the repo.&lt;br /&gt;
By dynamically (at build time) assigning module numbers, we avoid numbering conflict from statically assigned module symbols, yet still facilitate simple (integer) comparisons between module tags and the current compilation unit tag.&lt;br /&gt;
&lt;br /&gt;
This would enable a variation of an earlier (unworkable) proposal:&lt;br /&gt;
&lt;br /&gt;
''build/ns3/ns3-modules.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 /* This file autogenerated-do not edit. */&lt;br /&gt;
 &lt;br /&gt;
 /* Make sure NS3_MODULE is undefined.&lt;br /&gt;
   It will be defined by the file including this file. */&lt;br /&gt;
 #ifdef NS3_MODULE&lt;br /&gt;
 #  undef NS3_MODULE&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 /* Define the module ids */&lt;br /&gt;
 #ifndef NS3_MODULES_DEFINED&lt;br /&gt;
 #define NS3_MODULES_DEFINED&lt;br /&gt;
 &lt;br /&gt;
 #define NS3_ANTENNA_MODULE   1&lt;br /&gt;
 #define NS3_AODV_MODULE      2&lt;br /&gt;
 /* ... */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3_MODULES_DEFINED */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/core/model/ns3-export.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 /* No include guard.  This is meant to appear many times&lt;br /&gt;
    in a single compilation unit&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 /* Usage:  &lt;br /&gt;
    Start each header with (assuming this is the core module):&lt;br /&gt;
      #define NS3_MODULE NS3_CORE_MODULE&lt;br /&gt;
      #include &amp;quot;ns3/ns3-export.h&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
    Label each class with&lt;br /&gt;
  &lt;br /&gt;
      class NS3_EXPORT ...&lt;br /&gt;
 &lt;br /&gt;
    The build system defines NS3_COMPILATION_MODULE to be&lt;br /&gt;
    the current module being built.&lt;br /&gt;
 */&lt;br /&gt;
 	&lt;br /&gt;
 #ifdef NS3_EXPORT&lt;br /&gt;
 #  undef NS3_EXPORT&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #if NS3_MODULE == NS3_COMPILATION_MODULE&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllexport)&lt;br /&gt;
 #else&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllimport)&lt;br /&gt;
 #endif &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and an example source file:&lt;br /&gt;
&lt;br /&gt;
''src/.../example.cc:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include &amp;lt;iostream&amp;gt;&lt;br /&gt;
 #include &amp;lt;iomanip&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 // The build system:&lt;br /&gt;
 #ifndef NS3_COMPILATION_MODULE&lt;br /&gt;
 #  define NS3_COMPILATION_MODULE NS3_AODV_MODULE&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 // A module header file:&lt;br /&gt;
 #include &amp;quot;ns3-modules.h&amp;quot;&lt;br /&gt;
 #define NS3_MODULE NS3_ANTENNA_MODULE&lt;br /&gt;
 #include &amp;quot;ns3-export.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 // Helpers for this demo&lt;br /&gt;
 #define stringify_it( name ) # name&lt;br /&gt;
 #define stringify(name) stringify_it(name)&lt;br /&gt;
 #define doc(name) std::left &amp;lt;&amp;lt; std::setw (20) &amp;lt;&amp;lt; # name &amp;lt;&amp;lt; &amp;quot;\t&amp;quot; &amp;lt;&amp;lt; stringify (name) &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 int&lt;br /&gt;
 main (int argc, char** argv)&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
   std::cout &amp;lt;&amp;lt; doc (NS3_MODULE)&lt;br /&gt;
 	     &amp;lt;&amp;lt; doc (NS3_COMPILATION_MODULE)&lt;br /&gt;
 	     &amp;lt;&amp;lt; doc (NS3_EXPORT);&lt;br /&gt;
 &lt;br /&gt;
   return 0;&lt;br /&gt;
 } &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two example builds and runs:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 g++ example.cc -o example  &amp;amp;&amp;amp; ./example&lt;br /&gt;
 NS3_MODULE          	1&lt;br /&gt;
 NS3_COMPILATION_MODULE	2&lt;br /&gt;
 NS3_EXPORT          	__declspec(dllimport)&lt;br /&gt;
 &lt;br /&gt;
 g++ example.cc -o example -DNS3_COMPILATION_MODULE=NS3_ANTENNA_MODULE &amp;amp;&amp;amp; ./example&lt;br /&gt;
 NS3_MODULE          	1&lt;br /&gt;
 NS3_COMPILATION_MODULE	1&lt;br /&gt;
 NS3_EXPORT          	__declspec(dllexport) &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This appears to address the requirements above, in a more direct way than the original proposal:&lt;br /&gt;
&lt;br /&gt;
* All exported headers have the same three line block defining their module identity, between two ns-3 includes&lt;br /&gt;
* No core file listing all modules; it's auto-generated and only exists in the build tree.&lt;br /&gt;
* Works equally well with contrib modules, since &amp;lt;code&amp;gt;ns3-modules.h&amp;lt;/code&amp;gt; is auto-generated at build time, when the modules are known.&lt;br /&gt;
* Works transparently through macros, including the &amp;lt;code&amp;gt;ATTRIBUTE_&amp;lt;/code&amp;gt; macros.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10982</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10982"/>
		<updated>2018-04-30T20:39:07Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Proposed Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''The purpose of the change is to make the Visual Studio implementation match the GCC implementation (and not include full path names under Visual Studio).  If you want them to be different, we can do that but I don't think the user community is going to like the difference because it increases the size of the log files generated by a factor of 2 or 3 when the full path name of the EXE is included in each log message when function names are enabled.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Yet this patch shows __FUNCTION__ for WIN32, and __func__ for all others.  It sounds like WIN32 should use __func__, in which case they can both use __func__, and no need for conditional compilation.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''You have the cases reversed, the conditional at the start of the block is'' #ifndef _WIN32 ''not'' #ifdef _WIN32.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Doh!  In any case can't they both use the same symbol __func__?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''I don't have any way to verify the behavior on the non Windows platforms other than gcc on Ubuntu 16.04'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
*** ''That's sufficient.  Does it work?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the ns-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the ns-3 modules that are accessible by other ns-3 modules or user programs.  &lt;br /&gt;
&lt;br /&gt;
Here is an example provided by Peter Barnes that illustrates the issue.  Assuming you have the following code:&lt;br /&gt;
&lt;br /&gt;
''src/foo/model/foo.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 class foo &lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class foo  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/bar/model/bar.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include “ns3/foo.h”&lt;br /&gt;
 class bar&lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class bar &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When compiling module foo, the symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt; (because the implementation lives in this executable unit foo which is a separate DLL).  When compiling bar.cc, those same symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt; (because the implementation is located in a different execution unit, the DLL containing bar needs to import them from the DLL containing foo).  In the specific case of ns-3, each module is a separate DLL so references to a class that is exposed for consumption by other executable units (DLLs or programs) need to change this declaration depending on what's being compiled.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Method ====&lt;br /&gt;
This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
''src/core/ns3dll.h code fragment''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #ifndef NS3DLL_H&lt;br /&gt;
 #define NS3DLL_H&lt;br /&gt;
 &lt;br /&gt;
 #ifdef _WIN32&lt;br /&gt;
 #  ifdef _ANT&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
 #  else&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
 #  endif&lt;br /&gt;
 ...&lt;br /&gt;
 #else  /* _WIN32 */&lt;br /&gt;
 #  define NS3ANTLIB&lt;br /&gt;
 ...&lt;br /&gt;
 #endif  /* _WIN32 */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Each exported symbol needs the corresponding module export/import token as a label.  Here is an example class declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;class NS3ANTLIB AntennaModel : public Object&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach has these drawbacks:&lt;br /&gt;
* Every module needs a mention in a core file, ns3dll.h&lt;br /&gt;
* Not clear what to do with contrib modules.  Does bake have to know how to insert contrib modules in this core file?&lt;br /&gt;
* How do we prevent modified ns3dll.h files from being pushed accidentally?&lt;br /&gt;
&lt;br /&gt;
These questions need to be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Solutions ====&lt;br /&gt;
A question that has been received is &amp;quot;are there are other ways to indicate export/import&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
(1) For Microsoft Windows targets there are alternative methods for including the symbol in the DLL’s export table such as using a .def file with an EXPORTS section&lt;br /&gt;
&lt;br /&gt;
* ''This will work, but the names in the EXPORTS section must be the &amp;quot;object code&amp;quot; names of the items.  Remember that in C++, the actual names of functions, global variables, classes, etc. are NOT the names assigned in the source code, they are decorated names created by the compiler.  In order to use a .def file for this, a developer would have to know the compiler decorated name of the item.  Also, Microsoft strongly recommends that the decorated names NOT be used by developers since the scheme used to create the decorated name by the compiler can change with a new compiler version ''&lt;br /&gt;
** ''Agreed, manually updating mangled names is a bad idea. Can this be automated?`` [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
(2) With GNU ld, using the --export-all linker flag&lt;br /&gt;
&lt;br /&gt;
* ''This approach was not evaluated for two reasons, first the goal of the project was to set up a Visual Studio development environment that did not require any other tools or software beyond Visual Studio.  Second, using an approach like this would eliminate developer control of what was exported.  While this may not be an issue for core ns-3 modules, with a contributor model, contributor may not want to make all of the implementation visible or external.&lt;br /&gt;
** ''Exporting all symbols is the current behavior (with two possible exceptions, see below).  What's wrong with keeping this as the default?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Is there room to modify the overall goals for the project? For example, instead of &amp;quot;pure VS environment&amp;quot; we could set the lower bar of &amp;quot;can be built and developed from VS&amp;quot;, which leaves room for hybrid solutions, such as continuing to use waf, or other non-VS build tools/steps.  In particular, this might enable us to do something like --export-all and leverage the list of exported headers already present in wscript to indicate what should be exported.  This would provide the same granularity as presently available.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Digression on Current Symbol Export ====&lt;br /&gt;
The current behavior is to export all symbols in headers listed in wscript:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 headers = bld(features='ns3header')&lt;br /&gt;
 headers.module = 'internet'&lt;br /&gt;
 headers.source = [&lt;br /&gt;
    ''model/udp-header.h',&lt;br /&gt;
     ...&amp;lt;/nowiki &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Private headers are simply not listed, so they are not copied to &amp;lt;code&amp;gt;build/ns3/&amp;lt;/code&amp;gt; and so aren't visible outside the declaring module.&lt;br /&gt;
&lt;br /&gt;
An alternative method is to include a &amp;quot;private header&amp;quot; stanza in wscript (see a remnant from &amp;lt;nowiki&amp;gt;src/internet/wscript&amp;lt;/nowiki&amp;gt;):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 privateheaders = bld(features='ns3privateheader')&lt;br /&gt;
 privateheaders.module = 'internet'&lt;br /&gt;
 privateheaders.source = [&lt;br /&gt;
    ] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This feature is not used at the moment. It was used at one point to expose a private (non-exported) header to test code.&lt;br /&gt;
&lt;br /&gt;
==== Questions/Discussion ====&lt;br /&gt;
# Can this use the existing NS3_MODULE_x symbol for the declaration?&lt;br /&gt;
#* ''Any name can be used for the export / import symbol name.  The names chosen and list in ns3dll.h were created by me to be short (since they have to be added to the source code) yet provide enough detail on what they represent.&lt;br /&gt;
# Why does the value of the symbol need to be dynamic?&lt;br /&gt;
#Why don't all headers include ns3dll.h?&lt;br /&gt;
#* ''All headers need the declarations provided in ns3dll.h.  If ns3dll.h is included by another header file that is included in the header file (either directly or indirectly), it has already been included and adding it to the header file is not necessary.  NOTE:  There is no reason that this header file could not be included in every other header file, the patches submitted for review only included this file where it was necessary to reduce the size of the changes.&lt;br /&gt;
&lt;br /&gt;
==== ATTRIBUTE_x Macro Modifications ====&lt;br /&gt;
Another example is all of the&amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros have been extended.  The &amp;lt;code&amp;gt;ATTRIBUTE_*&amp;lt;/code&amp;gt; macros declare a three classes for each underlying type &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;:  &amp;lt;code&amp;gt;XValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XAccessor&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;XChecker&amp;lt;/code&amp;gt;.  These are impacted by the import/export tag discussed above. As a result, the tag for the module ''invoking'' the macro has to be passed through to the macro, so they now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros within a base ns-3 module require the new macro with the additional parameter.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros locally within a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the ns-3 source code.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Proposals ====&lt;br /&gt;
Desirable attributes of any solution are:&lt;br /&gt;
* All (exported) headers would have a common format&lt;br /&gt;
* No need to mention every module in a core file (ns3dll.h)&lt;br /&gt;
* Scales to contrib modules&lt;br /&gt;
* No need to extend the ATTRIBUTE_x macros&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10981</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10981"/>
		<updated>2018-04-30T20:37:48Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Alternative Proposal */ Remove unworkable suggestion; leave the criteria&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''The purpose of the change is to make the Visual Studio implementation match the GCC implementation (and not include full path names under Visual Studio).  If you want them to be different, we can do that but I don't think the user community is going to like the difference because it increases the size of the log files generated by a factor of 2 or 3 when the full path name of the EXE is included in each log message when function names are enabled.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Yet this patch shows __FUNCTION__ for WIN32, and __func__ for all others.  It sounds like WIN32 should use __func__, in which case they can both use __func__, and no need for conditional compilation.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''You have the cases reversed, the conditional at the start of the block is'' #ifndef _WIN32 ''not'' #ifdef _WIN32.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Doh!  In any case can't they both use the same symbol __func__?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''I don't have any way to verify the behavior on the non Windows platforms other than gcc on Ubuntu 16.04'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
*** ''That's sufficient.  Does it work?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the ns-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the ns-3 modules that are accessible by other ns-3 modules or user programs.  &lt;br /&gt;
&lt;br /&gt;
Here is an example provided by Peter Barnes that illustrates the issue.  Assuming you have the following code:&lt;br /&gt;
&lt;br /&gt;
''src/foo/model/foo.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 class foo &lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class foo  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/bar/model/bar.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include “ns3/foo.h”&lt;br /&gt;
 class bar&lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class bar &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When compiling module foo, the symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt; (because the implementation lives in this executable unit foo which is a separate DLL).  When compiling bar.cc, those same symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt; (because the implementation is located in a different execution unit, the DLL containing bar needs to import them from the DLL containing foo).  In the specific case of ns-3, each module is a separate DLL so references to a class that is exposed for consumption by other executable units (DLLs or programs) need to change this declaration depending on what's being compiled.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Method ====&lt;br /&gt;
This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
''src/core/ns3dll.h code fragment''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #ifndef NS3DLL_H&lt;br /&gt;
 #define NS3DLL_H&lt;br /&gt;
 &lt;br /&gt;
 #ifdef _WIN32&lt;br /&gt;
 #  ifdef _ANT&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
 #  else&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
 #  endif&lt;br /&gt;
 ...&lt;br /&gt;
 #else  /* _WIN32 */&lt;br /&gt;
 #  define NS3ANTLIB&lt;br /&gt;
 ...&lt;br /&gt;
 #endif  /* _WIN32 */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Each exported symbol needs the corresponding module export/import token as a label.  Here is an example class declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;class NS3ANTLIB AntennaModel : public Object&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach has these drawbacks:&lt;br /&gt;
* Every module needs a mention in a core file, ns3dll.h&lt;br /&gt;
* Not clear what to do with contrib modules.  Does bake have to know how to insert contrib modules in this core file?&lt;br /&gt;
* How do we prevent modified ns3dll.h files from being pushed accidentally?&lt;br /&gt;
&lt;br /&gt;
==== Alternative Solutions ====&lt;br /&gt;
A question that has been received is &amp;quot;are there are other ways to indicate export/import&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
(1) For Microsoft Windows targets there are alternative methods for including the symbol in the DLL’s export table such as using a .def file with an EXPORTS section&lt;br /&gt;
&lt;br /&gt;
* ''This will work, but the names in the EXPORTS section must be the &amp;quot;object code&amp;quot; names of the items.  Remember that in C++, the actual names of functions, global variables, classes, etc. are NOT the names assigned in the source code, they are decorated names created by the compiler.  In order to use a .def file for this, a developer would have to know the compiler decorated name of the item.  Also, Microsoft strongly recommends that the decorated names NOT be used by developers since the scheme used to create the decorated name by the compiler can change with a new compiler version ''&lt;br /&gt;
** ''Agreed, manually updating mangled names is a bad idea. Can this be automated?`` [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
(2) With GNU ld, using the --export-all linker flag&lt;br /&gt;
&lt;br /&gt;
* ''This approach was not evaluated for two reasons, first the goal of the project was to set up a Visual Studio development environment that did not require any other tools or software beyond Visual Studio.  Second, using an approach like this would eliminate developer control of what was exported.  While this may not be an issue for core ns-3 modules, with a contributor model, contributor may not want to make all of the implementation visible or external.&lt;br /&gt;
** ''Exporting all symbols is the current behavior (with two possible exceptions, see below).  What's wrong with keeping this as the default?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Is there room to modify the overall goals for the project? For example, instead of &amp;quot;pure VS environment&amp;quot; we could set the lower bar of &amp;quot;can be built and developed from VS&amp;quot;, which leaves room for hybrid solutions, such as continuing to use waf, or other non-VS build tools/steps.  In particular, this might enable us to do something like --export-all and leverage the list of exported headers already present in wscript to indicate what should be exported.  This would provide the same granularity as presently available.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Digression on Current Symbol Export ====&lt;br /&gt;
The current behavior is to export all symbols in headers listed in wscript:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 headers = bld(features='ns3header')&lt;br /&gt;
 headers.module = 'internet'&lt;br /&gt;
 headers.source = [&lt;br /&gt;
    ''model/udp-header.h',&lt;br /&gt;
     ...&amp;lt;/nowiki &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Private headers are simply not listed, so they are not copied to &amp;lt;code&amp;gt;build/ns3/&amp;lt;/code&amp;gt; and so aren't visible outside the declaring module.&lt;br /&gt;
&lt;br /&gt;
An alternative method is to include a &amp;quot;private header&amp;quot; stanza in wscript (see a remnant from &amp;lt;nowiki&amp;gt;src/internet/wscript&amp;lt;/nowiki&amp;gt;):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 privateheaders = bld(features='ns3privateheader')&lt;br /&gt;
 privateheaders.module = 'internet'&lt;br /&gt;
 privateheaders.source = [&lt;br /&gt;
    ] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This feature is not used at the moment. It was used at one point to expose a private (non-exported) header to test code.&lt;br /&gt;
&lt;br /&gt;
==== Questions/Discussion ====&lt;br /&gt;
# Can this use the existing NS3_MODULE_x symbol for the declaration?&lt;br /&gt;
#* ''Any name can be used for the export / import symbol name.  The names chosen and list in ns3dll.h were created by me to be short (since they have to be added to the source code) yet provide enough detail on what they represent.&lt;br /&gt;
# Why does the value of the symbol need to be dynamic?&lt;br /&gt;
#Why don't all headers include ns3dll.h?&lt;br /&gt;
#* ''All headers need the declarations provided in ns3dll.h.  If ns3dll.h is included by another header file that is included in the header file (either directly or indirectly), it has already been included and adding it to the header file is not necessary.  NOTE:  There is no reason that this header file could not be included in every other header file, the patches submitted for review only included this file where it was necessary to reduce the size of the changes.&lt;br /&gt;
&lt;br /&gt;
==== ATTRIBUTE_x Macro Modifications ====&lt;br /&gt;
Another example is all of the&amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros have been extended.  The &amp;lt;code&amp;gt;ATTRIBUTE_*&amp;lt;/code&amp;gt; macros declare a three classes for each underlying type &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;:  &amp;lt;code&amp;gt;XValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XAccessor&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;XChecker&amp;lt;/code&amp;gt;.  These are impacted by the import/export tag discussed above. As a result, the tag for the module ''invoking'' the macro has to be passed through to the macro, so they now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros within a base ns-3 module require the new macro with the additional parameter.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros locally within a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the ns-3 source code.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Proposals ====&lt;br /&gt;
Desirable attributes of any solution are:&lt;br /&gt;
* All (exported) headers would have a common format&lt;br /&gt;
* No need to mention every module in a core file (ns3dll.h)&lt;br /&gt;
* Scales to contrib modules&lt;br /&gt;
* No need to extend the ATTRIBUTE_x macros&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10980</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10980"/>
		<updated>2018-04-30T20:34:29Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* ATTRIBUTE_x Macro Modifications */ clarification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''The purpose of the change is to make the Visual Studio implementation match the GCC implementation (and not include full path names under Visual Studio).  If you want them to be different, we can do that but I don't think the user community is going to like the difference because it increases the size of the log files generated by a factor of 2 or 3 when the full path name of the EXE is included in each log message when function names are enabled.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Yet this patch shows __FUNCTION__ for WIN32, and __func__ for all others.  It sounds like WIN32 should use __func__, in which case they can both use __func__, and no need for conditional compilation.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''You have the cases reversed, the conditional at the start of the block is'' #ifndef _WIN32 ''not'' #ifdef _WIN32.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Doh!  In any case can't they both use the same symbol __func__?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''I don't have any way to verify the behavior on the non Windows platforms other than gcc on Ubuntu 16.04'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
*** ''That's sufficient.  Does it work?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the ns-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the ns-3 modules that are accessible by other ns-3 modules or user programs.  &lt;br /&gt;
&lt;br /&gt;
Here is an example provided by Peter Barnes that illustrates the issue.  Assuming you have the following code:&lt;br /&gt;
&lt;br /&gt;
''src/foo/model/foo.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 class foo &lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class foo  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/bar/model/bar.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include “ns3/foo.h”&lt;br /&gt;
 class bar&lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class bar &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When compiling module foo, the symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt; (because the implementation lives in this executable unit foo which is a separate DLL).  When compiling bar.cc, those same symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt; (because the implementation is located in a different execution unit, the DLL containing bar needs to import them from the DLL containing foo).  In the specific case of ns-3, each module is a separate DLL so references to a class that is exposed for consumption by other executable units (DLLs or programs) need to change this declaration depending on what's being compiled.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Method ====&lt;br /&gt;
This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
''src/core/ns3dll.h code fragment''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #ifndef NS3DLL_H&lt;br /&gt;
 #define NS3DLL_H&lt;br /&gt;
 &lt;br /&gt;
 #ifdef _WIN32&lt;br /&gt;
 #  ifdef _ANT&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
 #  else&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
 #  endif&lt;br /&gt;
 ...&lt;br /&gt;
 #else  /* _WIN32 */&lt;br /&gt;
 #  define NS3ANTLIB&lt;br /&gt;
 ...&lt;br /&gt;
 #endif  /* _WIN32 */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Each exported symbol needs the corresponding module export/import token as a label.  Here is an example class declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;class NS3ANTLIB AntennaModel : public Object&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach has these drawbacks:&lt;br /&gt;
* Every module needs a mention in a core file, ns3dll.h&lt;br /&gt;
* Not clear what to do with contrib modules.  Does bake have to know how to insert contrib modules in this core file?&lt;br /&gt;
* How do we prevent modified ns3dll.h files from being pushed accidentally?&lt;br /&gt;
&lt;br /&gt;
==== Alternative Solutions ====&lt;br /&gt;
A question that has been received is &amp;quot;are there are other ways to indicate export/import&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
(1) For Microsoft Windows targets there are alternative methods for including the symbol in the DLL’s export table such as using a .def file with an EXPORTS section&lt;br /&gt;
&lt;br /&gt;
* ''This will work, but the names in the EXPORTS section must be the &amp;quot;object code&amp;quot; names of the items.  Remember that in C++, the actual names of functions, global variables, classes, etc. are NOT the names assigned in the source code, they are decorated names created by the compiler.  In order to use a .def file for this, a developer would have to know the compiler decorated name of the item.  Also, Microsoft strongly recommends that the decorated names NOT be used by developers since the scheme used to create the decorated name by the compiler can change with a new compiler version ''&lt;br /&gt;
** ''Agreed, manually updating mangled names is a bad idea. Can this be automated?`` [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
(2) With GNU ld, using the --export-all linker flag&lt;br /&gt;
&lt;br /&gt;
* ''This approach was not evaluated for two reasons, first the goal of the project was to set up a Visual Studio development environment that did not require any other tools or software beyond Visual Studio.  Second, using an approach like this would eliminate developer control of what was exported.  While this may not be an issue for core ns-3 modules, with a contributor model, contributor may not want to make all of the implementation visible or external.&lt;br /&gt;
** ''Exporting all symbols is the current behavior (with two possible exceptions, see below).  What's wrong with keeping this as the default?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Is there room to modify the overall goals for the project? For example, instead of &amp;quot;pure VS environment&amp;quot; we could set the lower bar of &amp;quot;can be built and developed from VS&amp;quot;, which leaves room for hybrid solutions, such as continuing to use waf, or other non-VS build tools/steps.  In particular, this might enable us to do something like --export-all and leverage the list of exported headers already present in wscript to indicate what should be exported.  This would provide the same granularity as presently available.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Digression on Current Symbol Export ====&lt;br /&gt;
The current behavior is to export all symbols in headers listed in wscript:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 headers = bld(features='ns3header')&lt;br /&gt;
 headers.module = 'internet'&lt;br /&gt;
 headers.source = [&lt;br /&gt;
    ''model/udp-header.h',&lt;br /&gt;
     ...&amp;lt;/nowiki &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Private headers are simply not listed, so they are not copied to &amp;lt;code&amp;gt;build/ns3/&amp;lt;/code&amp;gt; and so aren't visible outside the declaring module.&lt;br /&gt;
&lt;br /&gt;
An alternative method is to include a &amp;quot;private header&amp;quot; stanza in wscript (see a remnant from &amp;lt;nowiki&amp;gt;src/internet/wscript&amp;lt;/nowiki&amp;gt;):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 privateheaders = bld(features='ns3privateheader')&lt;br /&gt;
 privateheaders.module = 'internet'&lt;br /&gt;
 privateheaders.source = [&lt;br /&gt;
    ] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This feature is not used at the moment. It was used at one point to expose a private (non-exported) header to test code.&lt;br /&gt;
&lt;br /&gt;
==== Questions/Discussion ====&lt;br /&gt;
# Can this use the existing NS3_MODULE_x symbol for the declaration?&lt;br /&gt;
#* ''Any name can be used for the export / import symbol name.  The names chosen and list in ns3dll.h were created by me to be short (since they have to be added to the source code) yet provide enough detail on what they represent.&lt;br /&gt;
# Why does the value of the symbol need to be dynamic?&lt;br /&gt;
#Why don't all headers include ns3dll.h?&lt;br /&gt;
#* ''All headers need the declarations provided in ns3dll.h.  If ns3dll.h is included by another header file that is included in the header file (either directly or indirectly), it has already been included and adding it to the header file is not necessary.  NOTE:  There is no reason that this header file could not be included in every other header file, the patches submitted for review only included this file where it was necessary to reduce the size of the changes.&lt;br /&gt;
&lt;br /&gt;
==== ATTRIBUTE_x Macro Modifications ====&lt;br /&gt;
Another example is all of the&amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros have been extended.  The &amp;lt;code&amp;gt;ATTRIBUTE_*&amp;lt;/code&amp;gt; macros declare a three classes for each underlying type &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;:  &amp;lt;code&amp;gt;XValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XAccessor&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;XChecker&amp;lt;/code&amp;gt;.  These are impacted by the import/export tag discussed above. As a result, the tag for the module ''invoking'' the macro has to be passed through to the macro, so they now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros within a base ns-3 module require the new macro with the additional parameter.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the &amp;lt;code&amp;gt;ATTRIBUTE_HELPER_*&amp;lt;/code&amp;gt; macros locally within a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the ns-3 source code.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Proposal ====&lt;br /&gt;
This alternative has been proposed, but not implemented or tested.&lt;br /&gt;
&lt;br /&gt;
''src/core/model/ns3-export.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 //  No include guard.  This is meant to appear many times in a single compilation unit&lt;br /&gt;
 &lt;br /&gt;
 /*Usage:  start each header with:&lt;br /&gt;
     #define NS3_MODULE myModule&lt;br /&gt;
     #include &amp;quot;ns3/ns-export.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     Label each class with&lt;br /&gt;
 &lt;br /&gt;
     class NS3_EXPORT ...&lt;br /&gt;
 &lt;br /&gt;
     Have waf define NS3_COMPILATION_MODULE as the current module.&lt;br /&gt;
     (Or repurpose what it currently defines, NS3_MODULE_COMPILATION=1&lt;br /&gt;
     to hold the module name.)&lt;br /&gt;
 */&lt;br /&gt;
 	&lt;br /&gt;
 #ifdef NS3_EXPORT&lt;br /&gt;
 #  undef NS3_EXPORT&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 # From&lt;br /&gt;
 # https://stackoverflow.com/questions/2335888/how-to-compare-strings-in-c-conditional-preprocessor-directives&lt;br /&gt;
 constexpr int&lt;br /&gt;
 NS3_MODULE_STRCMP (char const* lhs, char const* rhs)&lt;br /&gt;
 {&lt;br /&gt;
   return (('\0' == lhs[0]) &amp;amp;&amp;amp; ('\0' == rhs[0])) ? 0&lt;br /&gt;
     : (lhs[0] != rhs[0]) ? ((int)lhs[0] - (int)rhs[0])&lt;br /&gt;
     : NS3_MODULE_STRCMP ( lhs + 1, rhs + 1 );&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #if 0 == NS3_MODULE_STRCMP (NS3_COMPILATION_MODUL, NS3_MODULE)&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllexport)&lt;br /&gt;
 #else&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllimport)&lt;br /&gt;
 #endif &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This proposal would simplify the implementation somewhat:&lt;br /&gt;
* All (exported) headers would have a common format&lt;br /&gt;
* No need to mention every module in a core file (ns3dll.h)&lt;br /&gt;
* Scales to contrib modules&lt;br /&gt;
* No need to extend the ATTRIBUTE_x macros&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10979</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10979"/>
		<updated>2018-04-30T20:25:17Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Alternative Solutions */ comment on goals&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''The purpose of the change is to make the Visual Studio implementation match the GCC implementation (and not include full path names under Visual Studio).  If you want them to be different, we can do that but I don't think the user community is going to like the difference because it increases the size of the log files generated by a factor of 2 or 3 when the full path name of the EXE is included in each log message when function names are enabled.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Yet this patch shows __FUNCTION__ for WIN32, and __func__ for all others.  It sounds like WIN32 should use __func__, in which case they can both use __func__, and no need for conditional compilation.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''You have the cases reversed, the conditional at the start of the block is'' #ifndef _WIN32 ''not'' #ifdef _WIN32.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Doh!  In any case can't they both use the same symbol __func__?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''I don't have any way to verify the behavior on the non Windows platforms other than gcc on Ubuntu 16.04'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
*** ''That's sufficient.  Does it work?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the ns-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the ns-3 modules that are accessible by other ns-3 modules or user programs.  &lt;br /&gt;
&lt;br /&gt;
Here is an example provided by Peter Barnes that illustrates the issue.  Assuming you have the following code:&lt;br /&gt;
&lt;br /&gt;
''src/foo/model/foo.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 class foo &lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class foo  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/bar/model/bar.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include “ns3/foo.h”&lt;br /&gt;
 class bar&lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class bar &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When compiling module foo, the symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt; (because the implementation lives in this executable unit foo which is a separate DLL).  When compiling bar.cc, those same symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt; (because the implementation is located in a different execution unit, the DLL containing bar needs to import them from the DLL containing foo).  In the specific case of ns-3, each module is a separate DLL so references to a class that is exposed for consumption by other executable units (DLLs or programs) need to change this declaration depending on what's being compiled.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Method ====&lt;br /&gt;
This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
''src/core/ns3dll.h code fragment''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #ifndef NS3DLL_H&lt;br /&gt;
 #define NS3DLL_H&lt;br /&gt;
 &lt;br /&gt;
 #ifdef _WIN32&lt;br /&gt;
 #  ifdef _ANT&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
 #  else&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
 #  endif&lt;br /&gt;
 ...&lt;br /&gt;
 #else  /* _WIN32 */&lt;br /&gt;
 #  define NS3ANTLIB&lt;br /&gt;
 ...&lt;br /&gt;
 #endif  /* _WIN32 */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Each exported symbol needs the corresponding module export/import token as a label.  Here is an example class declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;class NS3ANTLIB AntennaModel : public Object&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach has these drawbacks:&lt;br /&gt;
* Every module needs a mention in a core file, ns3dll.h&lt;br /&gt;
* Not clear what to do with contrib modules.  Does bake have to know how to insert contrib modules in this core file?&lt;br /&gt;
* How do we prevent modified ns3dll.h files from being pushed accidentally?&lt;br /&gt;
&lt;br /&gt;
==== Alternative Solutions ====&lt;br /&gt;
A question that has been received is &amp;quot;are there are other ways to indicate export/import&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
(1) For Microsoft Windows targets there are alternative methods for including the symbol in the DLL’s export table such as using a .def file with an EXPORTS section&lt;br /&gt;
&lt;br /&gt;
* ''This will work, but the names in the EXPORTS section must be the &amp;quot;object code&amp;quot; names of the items.  Remember that in C++, the actual names of functions, global variables, classes, etc. are NOT the names assigned in the source code, they are decorated names created by the compiler.  In order to use a .def file for this, a developer would have to know the compiler decorated name of the item.  Also, Microsoft strongly recommends that the decorated names NOT be used by developers since the scheme used to create the decorated name by the compiler can change with a new compiler version ''&lt;br /&gt;
** ''Agreed, manually updating mangled names is a bad idea. Can this be automated?`` [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
(2) With GNU ld, using the --export-all linker flag&lt;br /&gt;
&lt;br /&gt;
* ''This approach was not evaluated for two reasons, first the goal of the project was to set up a Visual Studio development environment that did not require any other tools or software beyond Visual Studio.  Second, using an approach like this would eliminate developer control of what was exported.  While this may not be an issue for core ns-3 modules, with a contributor model, contributor may not want to make all of the implementation visible or external.&lt;br /&gt;
** ''Exporting all symbols is the current behavior (with two possible exceptions, see below).  What's wrong with keeping this as the default?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Is there room to modify the overall goals for the project? For example, instead of &amp;quot;pure VS environment&amp;quot; we could set the lower bar of &amp;quot;can be built and developed from VS&amp;quot;, which leaves room for hybrid solutions, such as continuing to use waf, or other non-VS build tools/steps.  In particular, this might enable us to do something like --export-all and leverage the list of exported headers already present in wscript to indicate what should be exported.  This would provide the same granularity as presently available.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Digression on Current Symbol Export ====&lt;br /&gt;
The current behavior is to export all symbols in headers listed in wscript:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 headers = bld(features='ns3header')&lt;br /&gt;
 headers.module = 'internet'&lt;br /&gt;
 headers.source = [&lt;br /&gt;
    ''model/udp-header.h',&lt;br /&gt;
     ...&amp;lt;/nowiki &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Private headers are simply not listed, so they are not copied to &amp;lt;code&amp;gt;build/ns3/&amp;lt;/code&amp;gt; and so aren't visible outside the declaring module.&lt;br /&gt;
&lt;br /&gt;
An alternative method is to include a &amp;quot;private header&amp;quot; stanza in wscript (see a remnant from &amp;lt;nowiki&amp;gt;src/internet/wscript&amp;lt;/nowiki&amp;gt;):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 privateheaders = bld(features='ns3privateheader')&lt;br /&gt;
 privateheaders.module = 'internet'&lt;br /&gt;
 privateheaders.source = [&lt;br /&gt;
    ] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This feature is not used at the moment. It was used at one point to expose a private (non-exported) header to test code.&lt;br /&gt;
&lt;br /&gt;
==== Questions/Discussion ====&lt;br /&gt;
# Can this use the existing NS3_MODULE_x symbol for the declaration?&lt;br /&gt;
#* ''Any name can be used for the export / import symbol name.  The names chosen and list in ns3dll.h were created by me to be short (since they have to be added to the source code) yet provide enough detail on what they represent.&lt;br /&gt;
# Why does the value of the symbol need to be dynamic?&lt;br /&gt;
#Why don't all headers include ns3dll.h?&lt;br /&gt;
#* ''All headers need the declarations provided in ns3dll.h.  If ns3dll.h is included by another header file that is included in the header file (either directly or indirectly), it has already been included and adding it to the header file is not necessary.  NOTE:  There is no reason that this header file could not be included in every other header file, the patches submitted for review only included this file where it was necessary to reduce the size of the changes.&lt;br /&gt;
&lt;br /&gt;
==== ATTRIBUTE_x Macro Modifications ====&lt;br /&gt;
Another example is all of the ATTRIBUTE_HELPER_* macros have been extended.  All ATTRIBUTE_HELPER_* macros now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the ATTRIBUTE_HELPER_* macros within a base ns-3 module require the new macro with the additional parameter.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the ATTRIBUTE_HELPER_* macros locally with a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the ns-3 source code.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Proposal ====&lt;br /&gt;
This alternative has been proposed, but not implemented or tested.&lt;br /&gt;
&lt;br /&gt;
''src/core/model/ns3-export.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 //  No include guard.  This is meant to appear many times in a single compilation unit&lt;br /&gt;
 &lt;br /&gt;
 /*Usage:  start each header with:&lt;br /&gt;
     #define NS3_MODULE myModule&lt;br /&gt;
     #include &amp;quot;ns3/ns-export.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     Label each class with&lt;br /&gt;
 &lt;br /&gt;
     class NS3_EXPORT ...&lt;br /&gt;
 &lt;br /&gt;
     Have waf define NS3_COMPILATION_MODULE as the current module.&lt;br /&gt;
     (Or repurpose what it currently defines, NS3_MODULE_COMPILATION=1&lt;br /&gt;
     to hold the module name.)&lt;br /&gt;
 */&lt;br /&gt;
 	&lt;br /&gt;
 #ifdef NS3_EXPORT&lt;br /&gt;
 #  undef NS3_EXPORT&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 # From&lt;br /&gt;
 # https://stackoverflow.com/questions/2335888/how-to-compare-strings-in-c-conditional-preprocessor-directives&lt;br /&gt;
 constexpr int&lt;br /&gt;
 NS3_MODULE_STRCMP (char const* lhs, char const* rhs)&lt;br /&gt;
 {&lt;br /&gt;
   return (('\0' == lhs[0]) &amp;amp;&amp;amp; ('\0' == rhs[0])) ? 0&lt;br /&gt;
     : (lhs[0] != rhs[0]) ? ((int)lhs[0] - (int)rhs[0])&lt;br /&gt;
     : NS3_MODULE_STRCMP ( lhs + 1, rhs + 1 );&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #if 0 == NS3_MODULE_STRCMP (NS3_COMPILATION_MODUL, NS3_MODULE)&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllexport)&lt;br /&gt;
 #else&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllimport)&lt;br /&gt;
 #endif &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This proposal would simplify the implementation somewhat:&lt;br /&gt;
* All (exported) headers would have a common format&lt;br /&gt;
* No need to mention every module in a core file (ns3dll.h)&lt;br /&gt;
* Scales to contrib modules&lt;br /&gt;
* No need to extend the ATTRIBUTE_x macros&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10965</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10965"/>
		<updated>2018-04-17T18:20:25Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Phase 3 – Visual Studio Class Declaration Changes */ refactor discussion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''The purpose of the change is to make the Visual Studio implementation match the GCC implementation (and not include full path names under Visual Studio).  If you want them to be different, we can do that but I don't think the user community is going to like the difference because it increases the size of the log files generated by a factor of 2 or 3 when the full path name of the EXE is included in each log message when function names are enabled.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Yet this patch shows __FUNCTION__ for WIN32, and __func__ for all others.  It sounds like WIN32 should use __func__, in which case they can both use __func__, and no need for conditional compilation.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''You have the cases reversed, the conditional at the start of the block is'' #ifndef _WIN32 ''not'' #ifdef _WIN32.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Doh!  In any case can't they both use the same symbol __func__?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''I don't have any way to verify the behavior on the non Windows platforms other than gcc on Ubuntu 16.04'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
*** ''That's sufficient.  Does it work?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the ns-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the ns-3 modules that are accessible by other ns-3 modules or user programs.  &lt;br /&gt;
&lt;br /&gt;
Here is an example provided by Peter Barnes that illustrates the issue.  Assuming you have the following code:&lt;br /&gt;
&lt;br /&gt;
''src/foo/model/foo.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 class foo &lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class foo  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''src/bar/model/bar.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #include “ns3/foo.h”&lt;br /&gt;
 class bar&lt;br /&gt;
 {&lt;br /&gt;
    ...&lt;br /&gt;
 }; // class bar &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When compiling module foo, the symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt; (because the implementation lives in this executable unit foo which is a separate DLL).  When compiling bar.cc, those same symbols in foo.h should be labeled &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt; (because the implementation is located in a different execution unit, the DLL containing bar needs to import them from the DLL containing foo).  In the specific case of ns-3, each module is a separate DLL so references to a class that is exposed for consumption by other executable units (DLLs or programs) need to change this declaration depending on what's being compiled.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Method ====&lt;br /&gt;
This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
''src/core/ns3dll.h code fragment''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #ifndef NS3DLL_H&lt;br /&gt;
 #define NS3DLL_H&lt;br /&gt;
 &lt;br /&gt;
 #ifdef _WIN32&lt;br /&gt;
 #  ifdef _ANT&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
 #  else&lt;br /&gt;
 #    define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
 #  endif&lt;br /&gt;
 ...&lt;br /&gt;
 #else  /* _WIN32 */&lt;br /&gt;
 #  define NS3ANTLIB&lt;br /&gt;
 ...&lt;br /&gt;
 #endif  /* _WIN32 */&lt;br /&gt;
 &lt;br /&gt;
 #endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Each exported symbol needs the corresponding module export/import token as a label.  Here is an example class declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;class NS3ANTLIB AntennaModel : public Object&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach has these drawbacks:&lt;br /&gt;
* Every module needs a mention in a core file, ns3dll.h&lt;br /&gt;
* Not clear what to do with contrib modules.  Does bake have to know how to insert contrib modules in this core file?&lt;br /&gt;
* How do we prevent modified ns3dll.h files from being pushed accidentally?&lt;br /&gt;
&lt;br /&gt;
==== Alternative Solutions ====&lt;br /&gt;
A question that has been received is &amp;quot;are there are other ways to indicate export/import&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
(1) For Microsoft Windows targets there are alternative methods for including the symbol in the DLL’s export table such as using a .def file with an EXPORTS section&lt;br /&gt;
&lt;br /&gt;
* ''This will work, but the names in the EXPORTS section must be the &amp;quot;object code&amp;quot; names of the items.  Remember that in C++, the actual names of functions, global variables, classes, etc. are NOT the names assigned in the source code, they are decorated names created by the compiler.  In order to use a .def file for this, a developer would have to know the compiler decorated name of the item.  Also, Microsoft strongly recommends that the decorated names NOT be used by developers since the scheme used to create the decorated name by the compiler can change with a new compiler version ''&lt;br /&gt;
** ''Agreed, manually updating mangled names is a bad idea. Can this be automated?`` [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
(2) With GNU ld, using the --export-all linker flag&lt;br /&gt;
&lt;br /&gt;
* ''This approach was not evaluated for two reasons, first the goal of the project was to set up a Visual Studio development environment that did not require any other tools or software beyond Visual Studio.  Second, using an approach like this would eliminate developer control of what was exported.  While this may not be an issue for core ns-3 modules, with a contributor model, contributor may not want to make all of the implementation visible or external.&lt;br /&gt;
** ''Exporting all symbols is the current behavior (with two possible exceptions, see below).  What's wrong with keeping this as the default?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Digression on Current Symbol Export ====&lt;br /&gt;
The current behavior is to export all symbols in headers listed in wscript:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 headers = bld(features='ns3header')&lt;br /&gt;
 headers.module = 'internet'&lt;br /&gt;
 headers.source = [&lt;br /&gt;
    ''model/udp-header.h',&lt;br /&gt;
     ...&amp;lt;/nowiki &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Private headers are simply not listed, so they are not copied to &amp;lt;code&amp;gt;build/ns3/&amp;lt;/code&amp;gt; and so aren't visible outside the declaring module.&lt;br /&gt;
&lt;br /&gt;
An alternative method is to include a &amp;quot;private header&amp;quot; stanza in wscript (see a remnant from &amp;lt;nowiki&amp;gt;src/internet/wscript&amp;lt;/nowiki&amp;gt;):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 privateheaders = bld(features='ns3privateheader')&lt;br /&gt;
 privateheaders.module = 'internet'&lt;br /&gt;
 privateheaders.source = [&lt;br /&gt;
    ] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This feature is not used at the moment. It was used at one point to expose a private (non-exported) header to test code.&lt;br /&gt;
&lt;br /&gt;
==== Questions/Discussion ====&lt;br /&gt;
# Can this use the existing NS3_MODULE_x symbol for the declaration?&lt;br /&gt;
#* ''Any name can be used for the export / import symbol name.  The names chosen and list in ns3dll.h were created by me to be short (since they have to be added to the source code) yet provide enough detail on what they represent.&lt;br /&gt;
# Why does the value of the symbol need to be dynamic?&lt;br /&gt;
#Why don't all headers include ns3dll.h?&lt;br /&gt;
#* ''All headers need the declarations provided in ns3dll.h.  If ns3dll.h is included by another header file that is included in the header file (either directly or indirectly), it has already been included and adding it to the header file is not necessary.  NOTE:  There is no reason that this header file could not be included in every other header file, the patches submitted for review only included this file where it was necessary to reduce the size of the changes.&lt;br /&gt;
&lt;br /&gt;
==== ATTRIBUTE_x Macro Modifications ====&lt;br /&gt;
Another example is all of the ATTRIBUTE_HELPER_* macros have been extended.  All ATTRIBUTE_HELPER_* macros now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the ATTRIBUTE_HELPER_* macros within a base ns-3 module require the new macro with the additional parameter.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the ATTRIBUTE_HELPER_* macros locally with a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the ns-3 source code.&lt;br /&gt;
&lt;br /&gt;
==== Alternative Proposal ====&lt;br /&gt;
This alternative has been proposed, but not implemented or tested.&lt;br /&gt;
&lt;br /&gt;
''src/core/model/ns3-export.h:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 //  No include guard.  This is meant to appear many times in a single compilation unit&lt;br /&gt;
 &lt;br /&gt;
 /*Usage:  start each header with:&lt;br /&gt;
     #define NS3_MODULE myModule&lt;br /&gt;
     #include &amp;quot;ns3/ns-export.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     Label each class with&lt;br /&gt;
 &lt;br /&gt;
     class NS3_EXPORT ...&lt;br /&gt;
 &lt;br /&gt;
     Have waf define NS3_COMPILATION_MODULE as the current module.&lt;br /&gt;
     (Or repurpose what it currently defines, NS3_MODULE_COMPILATION=1&lt;br /&gt;
     to hold the module name.)&lt;br /&gt;
 */&lt;br /&gt;
 	&lt;br /&gt;
 #ifdef NS3_EXPORT&lt;br /&gt;
 #  undef NS3_EXPORT&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 # From&lt;br /&gt;
 # https://stackoverflow.com/questions/2335888/how-to-compare-strings-in-c-conditional-preprocessor-directives&lt;br /&gt;
 constexpr int&lt;br /&gt;
 NS3_MODULE_STRCMP (char const* lhs, char const* rhs)&lt;br /&gt;
 {&lt;br /&gt;
   return (('\0' == lhs[0]) &amp;amp;&amp;amp; ('\0' == rhs[0])) ? 0&lt;br /&gt;
     : (lhs[0] != rhs[0]) ? ((int)lhs[0] - (int)rhs[0])&lt;br /&gt;
     : NS3_MODULE_STRCMP ( lhs + 1, rhs + 1 );&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #if 0 == NS3_MODULE_STRCMP (NS3_COMPILATION_MODUL, NS3_MODULE)&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllexport)&lt;br /&gt;
 #else&lt;br /&gt;
 #  define NS3_EXPORT __declspec(dllimport)&lt;br /&gt;
 #endif &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This proposal would simplify the implementation somewhat:&lt;br /&gt;
* All (exported) headers would have a common format&lt;br /&gt;
* No need to mention every module in a core file (ns3dll.h)&lt;br /&gt;
* Scales to contrib modules&lt;br /&gt;
* No need to extend the ATTRIBUTE_x macros&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10964</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10964"/>
		<updated>2018-04-17T17:05:21Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Phase 2 – Visual Studio Windows Conditional Compilation */ comment on __FUNCTION__&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''The purpose of the change is to make the Visual Studio implementation match the GCC implementation (and not include full path names under Visual Studio).  If you want them to be different, we can do that but I don't think the user community is going to like the difference because it increases the size of the log files generated by a factor of 2 or 3 when the full path name of the EXE is included in each log message when function names are enabled.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Yet this patch shows __FUNCTION__ for WIN32, and __func__ for all others.  It sounds like WIN32 should use __func__, in which case they can both use __func__, and no need for conditional compilation.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''You have the cases reversed, the conditional at the start of the block is'' #ifndef _WIN32 ''not'' #ifdef _WIN32.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Doh!  In any case can't they both use the same symbol __func__?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''I don't have any way to verify the behavior on the non Windows platforms other than gcc on Ubuntu 16.04'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
*** ''That's sufficient.  Does it work?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the NS-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the NS-3 modules that are accessible by other NS-3 modules or user programs.  This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;NS3DLL.H code fragment&lt;br /&gt;
#ifndef NS3DLL_H&lt;br /&gt;
#define NS3DLL_H&lt;br /&gt;
&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
#ifdef _ANT&lt;br /&gt;
#define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Example class declaration&lt;br /&gt;
&lt;br /&gt;
 class NS3ANTLIB AntennaModel : public Object&lt;br /&gt;
&lt;br /&gt;
A question that has been received is &amp;quot;are there are other ways to indicate export/import&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
 (1) for Microsoft Windows targets there are alternative methods for including the symbol in the DLL’s export table such as using a .def file with an EXPORTS section&lt;br /&gt;
&lt;br /&gt;
* ''This will work, but the names in the EXPORTS section must be the &amp;quot;object code&amp;quot; names of the items.  Remember that in C++, the actual names of functions, global variables, classes, etc. are NOT the names assigned in the source code, they are decorated names created by the compiler.  In order to use a .def file for this, a developer would have to know the compiler decorated name of the item.  Also, Microsoft strongly recommends that the decorated names NOT be used by developers since the scheme used to create the decorated name by the compiler can change with a new compiler version ''&lt;br /&gt;
&lt;br /&gt;
 (2) with GNU ld, using the --export-all linker flag&lt;br /&gt;
&lt;br /&gt;
* ''This approach was not evaluated for two reasons, first the goal of the project was to set up a Visual Studio development environment that did not require any other tools or software beyond Visual Studio.  Second, using an approach like this would eliminate developer control of what was exported.  While this may not be an issue for core NS-3 modules, with a contributor model, contributor may not want to make all of the implementation visible or external.&lt;br /&gt;
&lt;br /&gt;
Can this use the existing NS3_MODULE_x symbol for the declaration?&lt;br /&gt;
&lt;br /&gt;
* ''Any name can be used for the export / import symbol name.  The names chosen and list in NS3DLL.H were created by me to be short (since they have to be added to the source code) yet provide enough detail on what they represent.&lt;br /&gt;
&lt;br /&gt;
Why does the value of the symbol need to be dynamic?&lt;br /&gt;
&lt;br /&gt;
* '' The following is an example provided by Peter Barnes that illustrates the issue.  Assuming you have the following code:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    foo/model/foo.h:&lt;br /&gt;
      class foo {…};&lt;br /&gt;
&lt;br /&gt;
    bar/model/bar.h:&lt;br /&gt;
      #include “ns3/foo.h”&lt;br /&gt;
    &lt;br /&gt;
      class bar {…};&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '' The trick is that when compiling module foo, the symbols in foo.h should be labeled dllexport (because the implementation lives in this executable unit foo which is a separate DLL).  When compiling bar.cc, those same symbols in foo.h should be labeled dllimport (because the implementation is located in a different execution unit, the DLL containing bar needs to import them from the DLL containing foo).  In the specific case of NS-3, each core module is a separate DLL so references to a class that is exposed for consumption by other executable units (DLLs or programs) need to use this declaration.&lt;br /&gt;
&lt;br /&gt;
Why don't all headers include ns3dll.h?&lt;br /&gt;
&lt;br /&gt;
* ''All headers need the declarations provided in ns3dll.h.  If ns3dll.h is included by another header file that is included in the header file (either directly or indirectly), it has already been included and adding it to the header file is not necessary.  NOTE:  There is no reason that this header file could not be included in every other header file, the patches submitted for review only included this file where it was necessary to reduce the size of the changes.&lt;br /&gt;
&lt;br /&gt;
Another example is all of the ATTRIBUTE_HELPER_* macros have been extended.  All ATTRIBUTE_HELPER_* macros now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the ATTRIBUTE_HELPER_* macros within a base NS-3 module require the new macro with the additional parameter.&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the ATTRIBUTE_HELPER_* macros locally with a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the NS-3 source code.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10961</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10961"/>
		<updated>2018-04-12T23:49:43Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Phase 2 – Visual Studio Windows Conditional Compilation */ comment/Q&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''The purpose of the change is to make the Visual Studio implementation match the GCC implementation (and not include full path names under Visual Studio).  If you want them to be different, we can do that but I don't think the user community is going to like the difference because it increases the size of the log files generated by a factor of 2 or 3 when the full path name of the EXE is included in each log message when function names are enabled.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Yet this patch shows __FUNCTION__ for WIN32, and __func__ for all others.  It sounds like WIN32 should use __func__, in which case they can both use __func__, and no need for conditional compilation.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''You have the cases reversed, the conditional at the start of the block is'' #ifndef _WIN32 ''not'' #ifdef _WIN32.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Doh!  In any case can't they both use the same symbol __func__?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the NS-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the NS-3 modules that are accessible by other NS-3 modules or user programs.  This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;NS3DLL.H code fragment&lt;br /&gt;
#ifndef NS3DLL_H&lt;br /&gt;
#define NS3DLL_H&lt;br /&gt;
&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
#ifdef _ANT&lt;br /&gt;
#define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Example class declaration&lt;br /&gt;
&lt;br /&gt;
 class NS3ANTLIB AntennaModel : public Object&lt;br /&gt;
&lt;br /&gt;
Another example is all of the ATTRIBUTE_HELPER_* macros have been extended.  All ATTRIBUTE_HELPER_* macros now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the ATTRIBUTE_HELPER_* macros within a base NS-3 module require the new macro with the additional parameter.&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the ATTRIBUTE_HELPER_* macros locally with a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the NS-3 source code.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10958</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10958"/>
		<updated>2018-04-06T19:43:05Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Phase 2 – Visual Studio Windows Conditional Compilation */ typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''The purpose of the change is to make the Visual Studio implementation match the GCC implementation (and not include full path names under Visual Studio).  If you want them to be different, we can do that but I don't think the user community is going to like the difference because it increases the size of the log files generated by a factor of 2 or 3 when the full path name of the EXE is included in each log message when function names are enabled.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Yet this patch shows __FUNCTION__ for WIN32, and __func__ for all others.  It sounds like WIN32 should use __func__, in which case they can both use __func__, and no need for conditional compilation.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the NS-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the NS-3 modules that are accessible by other NS-3 modules or user programs.  This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;NS3DLL.H code fragment&lt;br /&gt;
#ifndef NS3DLL_H&lt;br /&gt;
#define NS3DLL_H&lt;br /&gt;
&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
#ifdef _ANT&lt;br /&gt;
#define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Example class declaration&lt;br /&gt;
&lt;br /&gt;
 class NS3ANTLIB AntennaModel : public Object&lt;br /&gt;
&lt;br /&gt;
Another example is all of the ATTRIBUTE_HELPER_* macros have been extended.  All ATTRIBUTE_HELPER_* macros now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the ATTRIBUTE_HELPER_* macros within a base NS-3 module require the new macro with the additional parameter.&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the ATTRIBUTE_HELPER_* macros locally with a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the NS-3 source code.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10957</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10957"/>
		<updated>2018-04-06T19:42:36Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Phase 2 – Visual Studio Windows Conditional Compilation */ comment/Q&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''The purpose of the change is to make the Visual Studio implementation match the GCC implementation (and not include full path names under Visual Studio).  If you want them to be different, we can do that but I don't think the user community is going to like the difference because it increases the size of the log files generated by a factor of 2 or 3 when the full path name of the EXE is included in each log message when function names are enabled.'' [[User: rammon|Robert Ammon]]&lt;br /&gt;
** ''Yes this patch shows __FUNCTION__ for WIN32, and __func__ for all others.  It sounds like WIN32 should use __func__, in which case they can both use __func__, and no need for conditional compilation.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the NS-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the NS-3 modules that are accessible by other NS-3 modules or user programs.  This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;NS3DLL.H code fragment&lt;br /&gt;
#ifndef NS3DLL_H&lt;br /&gt;
#define NS3DLL_H&lt;br /&gt;
&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
#ifdef _ANT&lt;br /&gt;
#define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Example class declaration&lt;br /&gt;
&lt;br /&gt;
 class NS3ANTLIB AntennaModel : public Object&lt;br /&gt;
&lt;br /&gt;
Another example is all of the ATTRIBUTE_HELPER_* macros have been extended.  All ATTRIBUTE_HELPER_* macros now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the ATTRIBUTE_HELPER_* macros within a base NS-3 module require the new macro with the additional parameter.&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the ATTRIBUTE_HELPER_* macros locally with a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the NS-3 source code.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10955</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10955"/>
		<updated>2018-04-06T19:30:12Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Phase 2 – Visual Studio Windows Conditional Compilation */ comment/Q&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names]) so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''This changes is modifying the use of'' __FUNCTION__ ''under GCC to'' __func__ ''under Visual Studio.  Under Visual Studio,'' __FUNCTION__ ''includes the complete path name,'' __func__ ''matches what'' __FUNCTION__ ''under GCC does.'' [[User:rammon|Robert Ammon]]&lt;br /&gt;
** ''I'm suggesting we can avoid conditional code completely in this case.  How important is it to show full path names in log messages?  Finding the matching function is what IDE's, grep, Doxygen are for.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** ''Now that I stare at the current code, I see we use __FUNCTION__ already, so even to get full paths why is any change needed?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the NS-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the NS-3 modules that are accessible by other NS-3 modules or user programs.  This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;NS3DLL.H code fragment&lt;br /&gt;
#ifndef NS3DLL_H&lt;br /&gt;
#define NS3DLL_H&lt;br /&gt;
&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
#ifdef _ANT&lt;br /&gt;
#define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Example class declaration&lt;br /&gt;
&lt;br /&gt;
 class NS3ANTLIB AntennaModel : public Object&lt;br /&gt;
&lt;br /&gt;
Another example is all of the ATTRIBUTE_HELPER_* macros have been extended.  All ATTRIBUTE_HELPER_* macros now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the ATTRIBUTE_HELPER_* macros within a base NS-3 module require the new macro with the additional parameter.&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the ATTRIBUTE_HELPER_* macros locally with a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the NS-3 source code.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10953</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10953"/>
		<updated>2018-04-06T00:39:09Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Phase 2 – Visual Studio Windows Conditional Compilation */ comment on __FUNCTION__&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  &lt;br /&gt;
&lt;br /&gt;
For example, the following code from CORE is an example of code changed for Windows to produce the same log output:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef _WIN32&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __FUNCTION__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                   \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#else&lt;br /&gt;
#define NS_LOG_APPEND_FUNC_PREFIX                               \&lt;br /&gt;
  if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \&lt;br /&gt;
    {                                                           \&lt;br /&gt;
      std::clog &amp;lt;&amp;lt; g_log.Name () &amp;lt;&amp;lt; &amp;quot;:&amp;quot; &amp;lt;&amp;lt;                      \&lt;br /&gt;
      __func__ &amp;lt;&amp;lt; &amp;quot;(): &amp;quot;;                                       \&lt;br /&gt;
    }                                                           \&lt;br /&gt;
&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''In this particular case, GCC also accepts'' __FUNCTION__ '''(see [https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function-Names GCC Function Names] so we don't need to make this change.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the NS-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the NS-3 modules that are accessible by other NS-3 modules or user programs.  This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;NS3DLL.H code fragment&lt;br /&gt;
#ifndef NS3DLL_H&lt;br /&gt;
#define NS3DLL_H&lt;br /&gt;
&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
#ifdef _ANT&lt;br /&gt;
#define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Example class declaration&lt;br /&gt;
&lt;br /&gt;
 class NS3ANTLIB AntennaModel : public Object&lt;br /&gt;
&lt;br /&gt;
Another example is all of the ATTRIBUTE_HELPER_* macros have been extended.  All ATTRIBUTE_HELPER_* macros now have an additional parameter (same one as previous section) that defines the DLL the &amp;quot;implementation&amp;quot; is located in.  The following is an example from the CORE module.  Use of any of the ATTRIBUTE_HELPER_* macros within a base NS-3 module require the new macro with the additional parameter.&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean, NS3CORELIB);&lt;br /&gt;
&lt;br /&gt;
Note:  Use of the ATTRIBUTE_HELPER_* macros locally with a program continue to use the previous macro and parameter sequence.  An example is the following code from attribute-test-suite.c&lt;br /&gt;
&lt;br /&gt;
 ATTRIBUTE_HELPER_HEADER (ValueClassTest);&lt;br /&gt;
 ATTRIBUTE_HELPER_CPP (ValueClassTest);&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the NS-3 source code.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10951</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10951"/>
		<updated>2018-04-05T19:06:33Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: comments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
Code to the example programs to produce crashdump files under the Release configuration (similar to core files produced under the Unix variant operating systems).&lt;br /&gt;
&lt;br /&gt;
==== Additional CrashHandler header ====&lt;br /&gt;
This includes adding an additional header file&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifdef _WIN32&lt;br /&gt;
#include &amp;quot;CrashHandler.h&amp;quot;&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Suggest adding this to'' &amp;lt;code&amp;gt;src/core/model/command-line.h&amp;lt;/code&amp;gt;, since all executables'' should ''(at least in the main tree) have a'' &amp;lt;code&amp;gt;CommandLine&amp;lt;/code&amp;gt; ''instance.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** Suggested change incorporated, no need to modify individual programs to include header file.  Required updating a few programs to include command-line.h [[User:rammon|Robert Ammon]]&lt;br /&gt;
&lt;br /&gt;
==== Instantiating the CrashHandler ====&lt;br /&gt;
And an additional installation function &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifdef _WIN32&lt;br /&gt;
#ifndef _DEBUG&lt;br /&gt;
	CCrashHandler ch;&lt;br /&gt;
	ch.SetProcessExceptionHandlers();&lt;br /&gt;
	ch.SetThreadExceptionHandlers(); &lt;br /&gt;
#endif&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to each main program.&lt;br /&gt;
&lt;br /&gt;
* ''What scope and lifetime does the'' &amp;lt;code&amp;gt;CCrashHandler&amp;lt;/code&amp;gt; ''instance require?  Can it be a data member of'' &amp;lt;code&amp;gt;CommandLine&amp;lt;/code&amp;gt; ''? Or a global declared in'' &amp;lt;code&amp;gt;src/core/model/command-line.cc&amp;lt;/code&amp;gt;''?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
** Suggested change incorporated, no need to modify individual programs to include crash handler.  Suggestions eliminate changes to most examples [[User:rammon|Robert Ammon]]&lt;br /&gt;
&lt;br /&gt;
==== Loading DLLs ====&lt;br /&gt;
Modification of existing code or addition of new code for the Windows configuration.  For example&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifdef _WIN32&lt;br /&gt;
ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean,NS3CORELIB);&lt;br /&gt;
ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean,NS3CORELIB);&lt;br /&gt;
#else&lt;br /&gt;
ATTRIBUTE_CHECKER_DEFINE (Boolean);&lt;br /&gt;
ATTRIBUTE_ACCESSOR_DEFINE (Boolean);&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#define ATTRIBUTE_CHECKER_DEFINE_LIB(type,lib)                          \&lt;br /&gt;
  class lib type ## Checker : public AttributeChecker {};               \&lt;br /&gt;
  lib Ptr&amp;lt;const AttributeChecker&amp;gt; Make ## type ## Checker (void)&lt;br /&gt;
&lt;br /&gt;
#define ATTRIBUTE_CHECKER_DEFINE(type)                                  \&lt;br /&gt;
  class type ## Checker : public AttributeChecker {};                   \&lt;br /&gt;
  Ptr&amp;lt;const AttributeChecker&amp;gt; Make ## type ## Checker (void)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''Examples like this need some explanation, at least indicating where (in what kinds of files) these lines would appear, how macros would be invoked.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''This example is problematic for a couple of reasons.  First, not all attributes are in the core lib. Second, this doesn't effectively hide the WIN32 implementation: declarers of Attributes will still need a conditional block to invoke the _LIB version for public API, but only on WIN32.  Third, in this particular case, AttributeCheckers should always be public.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the NS-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the NS-3 modules that are accessible by other NS-3 modules or user programs.  This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;NS3DLL.H code fragment&lt;br /&gt;
#ifndef NS3DLL_H&lt;br /&gt;
#define NS3DLL_H&lt;br /&gt;
&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
#ifdef _ANT&lt;br /&gt;
#define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Example class declaration&lt;br /&gt;
&lt;br /&gt;
 class NS3ANTLIB AntennaModel : public Object&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the NS-3 source code.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10950</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10950"/>
		<updated>2018-04-05T18:50:28Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Loading DLLs */ comments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
Code to the example programs to produce crashdump files under the Release configuration (similar to core files produced under the Unix variant operating systems).&lt;br /&gt;
&lt;br /&gt;
==== Additional CrashHandler header ====&lt;br /&gt;
This includes adding an additional header file&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifdef _WIN32&lt;br /&gt;
#include &amp;quot;CrashHandler.h&amp;quot;&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Suggest adding this to'' &amp;lt;code&amp;gt;src/core/model/command-line.h&amp;lt;/code&amp;gt;, since all executables'' should ''(at least in the main tree) have a'' &amp;lt;code&amp;gt;CommandLine&amp;lt;/code&amp;gt; ''instance.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
* Suggested change incorporated, no need to modify individual programs to include header file.  Required updating a few programs to include command-line.h [[User:rammon|Robert Ammon]]&lt;br /&gt;
&lt;br /&gt;
==== Instantiating the CrashHandler ====&lt;br /&gt;
And an additional installation function &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifdef _WIN32&lt;br /&gt;
#ifndef _DEBUG&lt;br /&gt;
	CCrashHandler ch;&lt;br /&gt;
	ch.SetProcessExceptionHandlers();&lt;br /&gt;
	ch.SetThreadExceptionHandlers(); &lt;br /&gt;
#endif&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to each main program.&lt;br /&gt;
&lt;br /&gt;
* ''What scope and lifetime does the'' &amp;lt;code&amp;gt;CCrashHandler&amp;lt;/code&amp;gt; ''instance require?  Can it be a data member of'' &amp;lt;code&amp;gt;CommandLine&amp;lt;/code&amp;gt; ''? Or a global declared in'' &amp;lt;code&amp;gt;src/core/model/command-line.cc&amp;lt;/code&amp;gt;''?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
* Suggested change incorporated, no need to modify individual programs to include crash handler.  Suggestions eliminate changes to most examples [[User:rammon|Robert Ammon]]&lt;br /&gt;
&lt;br /&gt;
==== Loading DLLs ====&lt;br /&gt;
Modification of existing code or addition of new code for the Windows configuration.  For example&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifdef _WIN32&lt;br /&gt;
ATTRIBUTE_CHECKER_DEFINE_LIB (Boolean,NS3CORELIB);&lt;br /&gt;
ATTRIBUTE_ACCESSOR_DEFINE_LIB (Boolean,NS3CORELIB);&lt;br /&gt;
#else&lt;br /&gt;
ATTRIBUTE_CHECKER_DEFINE (Boolean);&lt;br /&gt;
ATTRIBUTE_ACCESSOR_DEFINE (Boolean);&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#define ATTRIBUTE_CHECKER_DEFINE_LIB(type,lib)                          \&lt;br /&gt;
  class lib type ## Checker : public AttributeChecker {};               \&lt;br /&gt;
  lib Ptr&amp;lt;const AttributeChecker&amp;gt; Make ## type ## Checker (void)&lt;br /&gt;
&lt;br /&gt;
#define ATTRIBUTE_CHECKER_DEFINE(type)                                  \&lt;br /&gt;
  class type ## Checker : public AttributeChecker {};                   \&lt;br /&gt;
  Ptr&amp;lt;const AttributeChecker&amp;gt; Make ## type ## Checker (void)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
* ''Examples like this need some explanation, at least indicating where (in what kinds of files) these lines would appear, how macros would be invoked.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''This example is problematic for a couple of reasons.  First, not all attributes are in the core lib. Second, this doesn't effectively hide the WIN32 implementation: declarers of Attributes will still need a conditional block to invoke the _LIB version for public API, but only on WIN32.  Third, in this particular case, AttributeCheckers should always be public.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the NS-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the NS-3 modules that are accessible by other NS-3 modules or user programs.  This change adds a new header file to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;NS3DLL.H code fragment&lt;br /&gt;
#ifndef NS3DLL_H&lt;br /&gt;
#define NS3DLL_H&lt;br /&gt;
&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
#ifdef _ANT&lt;br /&gt;
#define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Example class declaration&lt;br /&gt;
&lt;br /&gt;
 class NS3ANTLIB AntennaModel : public Object&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the NS-3 source code.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10948</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10948"/>
		<updated>2018-04-04T18:46:54Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Phase 3 – Visual Studio Class Declaration Changes */ Clarification and background on DLL import/export machinery&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
Code to the example programs to produce crashdump files under the Release configuration (similar to core files produced under the Unix variant operating systems).&lt;br /&gt;
&lt;br /&gt;
==== Additional CrashHandler header ====&lt;br /&gt;
This includes adding an additional header file&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifdef _WIN32&lt;br /&gt;
#include &amp;quot;CrashHandler.h&amp;quot;&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Suggest adding this to'' &amp;lt;code&amp;gt;src/core/model/command-line.h&amp;lt;/code&amp;gt;, since all executables'' should ''(at least in the main tree) have a'' &amp;lt;code&amp;gt;CommandLine&amp;lt;/code&amp;gt; ''instance.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Instantiating the CrashHandler ====&lt;br /&gt;
And an additional installation function &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifdef _WIN32&lt;br /&gt;
#ifndef _DEBUG&lt;br /&gt;
	CCrashHandler ch;&lt;br /&gt;
	ch.SetProcessExceptionHandlers();&lt;br /&gt;
	ch.SetThreadExceptionHandlers(); &lt;br /&gt;
#endif&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to each main program.&lt;br /&gt;
&lt;br /&gt;
* ''What scope and lifetime does the'' &amp;lt;code&amp;gt;CCrashHandler&amp;lt;/code&amp;gt; ''instance require?  Can it be a data member of'' &amp;lt;code&amp;gt;CommandLine&amp;lt;/code&amp;gt; ''? Or a global declared in'' &amp;lt;code&amp;gt;src/core/model/command-line.cc&amp;lt;/code&amp;gt;''?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Loading DLLs ====&lt;br /&gt;
Modification of existing code or addition of new code for the Windows configuration.  For example&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;// Force DLLs to be loaded for modules loaded dynamically&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
  LoadLibraryA(&amp;quot;wimax.dll&amp;quot;);&lt;br /&gt;
  LoadLibraryA(&amp;quot;uan.dll&amp;quot;);&lt;br /&gt;
  LoadLibraryA(&amp;quot;wave.dll&amp;quot;);&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Where does this stanza have to occur?  In the main program?  Can it occur in code in a dll itself (building dll A, which depends on dll B)?  How can we leverage the module dependencies already captured in wscript files? [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the NS-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the NS-3 modules that are accessible by other NS-3 modules or user programs.  This change adds a new DLL to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;NS3DLL.H code fragment&lt;br /&gt;
#ifndef NS3DLL_H&lt;br /&gt;
#define NS3DLL_H&lt;br /&gt;
&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
#ifdef _ANT&lt;br /&gt;
#define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Clarification:'' &amp;lt;code&amp;gt;NS3ANTLIB&amp;lt;/code&amp;gt; ''refers to the antenna module. In the current proposal a stanza like this exists for every module. The build system toggles the'' &amp;lt;code&amp;gt;_MODULE&amp;lt;/code&amp;gt; ''flag for the module DLL currently being built, so its symbols are marked'' &amp;lt;code&amp;gt;dllexport&amp;lt;/code&amp;gt;'', while symbols in all other headers (which this module depends on) are marked'' &amp;lt;code&amp;gt;dllimport&amp;lt;/code&amp;gt;.   [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
* ''Here's a decent discussion: https://gcc.gnu.org/wiki/Visibility'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
Example class declaration&lt;br /&gt;
&lt;br /&gt;
 class NS3ANTLIB AntennaModel : public Object&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the NS-3 source code.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10947</id>
		<title>Ns-3 on Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3_on_Visual_Studio&amp;diff=10947"/>
		<updated>2018-04-04T18:24:00Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Phase 2 – Visual Studio Windows Conditional Compilation */ Questions to clarify the requirements&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This is a page to summarize the Visual Studio compatibility work that Robert Ammon initiated during the ns-3.28 release cycle, and continues towards ns-3.29.&lt;br /&gt;
&lt;br /&gt;
Some previous ports for older versions of Visual Studio (2010, 2012) can be found by searching the wiki, but are no longer maintained.&lt;br /&gt;
&lt;br /&gt;
The ns-3 tracker issue is https://www.nsnam.org/bugzilla/show_bug.cgi?id=2726.  A per-module status table can be found at https://www.nsnam.org/bugzilla/attachment.cgi?id=3088.  As of ns-3.28 release (March 2018), the project is still working through the Phase 1 patches.&lt;br /&gt;
&lt;br /&gt;
== Summary of changes ==&lt;br /&gt;
&lt;br /&gt;
The following provides a summary of the changes for the Visual Studio Development environment.  It highlights the changes necessary to the existing NS-3 files to support development for Windows using Visual Studio.&lt;br /&gt;
&lt;br /&gt;
To support integration of the changes in a more manageable fashion, the changes necessary for the VS development environment are segregated into four phases.  The four phases are defined as&lt;br /&gt;
&lt;br /&gt;
* Phase 1 – Visual Studio Compiler Warning Resolution&lt;br /&gt;
* Phase 2 – Visual Studio Windows Conditional Compilation&lt;br /&gt;
* Phase 3 – Visual Studio Class Declaration Changes&lt;br /&gt;
* Phase 4 – NS-3 Implementation Changes for Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 – Visual Studio Compiler Warning Resolution ===&lt;br /&gt;
&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to eliminate compiler warnings under Visual Studio.  Under the Visual Studio development environment, all compiler warnings are treated s errors.  The changes for this phase eliminate the compiler warnings under Visual Studio.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* Elimination of automatic type casts to lower resolution data types (for example uint16_t to uint8_t)&lt;br /&gt;
: These changes either add static cast declarations or modify the code (if possible) to eliminate the need for a type case&lt;br /&gt;
&lt;br /&gt;
* Elimination of unused function parameters&lt;br /&gt;
: These changes either eliminate the unused parameters (if possible) or add NS_UNUSED references to the parameter.&lt;br /&gt;
&lt;br /&gt;
* Elimination of hidden variables (for example, a for loop using index i inside of a for loop using index i)&lt;br /&gt;
: These changes rename the inner variable that is hiding the outer variable.&lt;br /&gt;
&lt;br /&gt;
The Phase 1 changes will be applied in first before the Phase 2, Phase 3 and Phase 4 changes.  The Phase 1 changes apply to the majority of the NS-3 modules but not all modules.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 – Visual Studio Windows Conditional Compilation ===&lt;br /&gt;
The changes in this phase are changes to the existing NS-3 source code files to add conditional code for the Visual Studio development environment.  These changes add code that is executed under the Windows configuration only.  The changes mostly fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
Code to the example programs to produce crashdump files under the Release configuration (similar to core files produced under the Unix variant operating systems).&lt;br /&gt;
&lt;br /&gt;
==== Additional CrashHandler header ====&lt;br /&gt;
This includes adding an additional header file&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifdef _WIN32&lt;br /&gt;
#include &amp;quot;CrashHandler.h&amp;quot;&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Suggest adding this to'' &amp;lt;code&amp;gt;src/core/model/command-line.h&amp;lt;/code&amp;gt;, since all executables'' should ''(at least in the main tree) have a'' &amp;lt;code&amp;gt;CommandLine&amp;lt;/code&amp;gt; ''instance.'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Instantiating the CrashHandler ====&lt;br /&gt;
And an additional installation function &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifdef _WIN32&lt;br /&gt;
#ifndef _DEBUG&lt;br /&gt;
	CCrashHandler ch;&lt;br /&gt;
	ch.SetProcessExceptionHandlers();&lt;br /&gt;
	ch.SetThreadExceptionHandlers(); &lt;br /&gt;
#endif&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to each main program.&lt;br /&gt;
&lt;br /&gt;
* ''What scope and lifetime does the'' &amp;lt;code&amp;gt;CCrashHandler&amp;lt;/code&amp;gt; ''instance require?  Can it be a data member of'' &amp;lt;code&amp;gt;CommandLine&amp;lt;/code&amp;gt; ''? Or a global declared in'' &amp;lt;code&amp;gt;src/core/model/command-line.cc&amp;lt;/code&amp;gt;''?'' [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
==== Loading DLLs ====&lt;br /&gt;
Modification of existing code or addition of new code for the Windows configuration.  For example&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;// Force DLLs to be loaded for modules loaded dynamically&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
  LoadLibraryA(&amp;quot;wimax.dll&amp;quot;);&lt;br /&gt;
  LoadLibraryA(&amp;quot;uan.dll&amp;quot;);&lt;br /&gt;
  LoadLibraryA(&amp;quot;wave.dll&amp;quot;);&lt;br /&gt;
#endif&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''Where does this stanza have to occur?  In the main program?  Can it occur in code in a dll itself (building dll A, which depends on dll B)?  How can we leverage the module dependencies already captured in wscript files? [[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]])&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect a minority of the NS-3 source code files.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 – Visual Studio Class Declaration Changes ===&lt;br /&gt;
While the Windows DLLs are similar to the Unix shared libraries, there are a couple of significant differences between them.  One of the differences which cause changes in the NS-3 source code is items in a Windows DLL are hidden from consumers of the DLL unless specifically identified as exported items.  This means that the classes in the NS-3 modules that are accessible by other NS-3 modules or user programs.  This change adds a new DLL to the core module and an additional conditional declaration to each class declaration.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;NS3DLL.H code fragment&lt;br /&gt;
#ifndef NS3DLL_H&lt;br /&gt;
#define NS3DLL_H&lt;br /&gt;
&lt;br /&gt;
#ifdef _WIN32&lt;br /&gt;
#ifdef _ANT&lt;br /&gt;
#define NS3ANTLIB __declspec(dllexport)&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB __declspec(dllimport)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
#else&lt;br /&gt;
#define NS3ANTLIB&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif /* NS3DLL_H */&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example class declaration&lt;br /&gt;
&lt;br /&gt;
 class NS3ANTLIB AntennaModel : public Object&lt;br /&gt;
&lt;br /&gt;
The modifications in this phase affect almost every header file in the NS-3 source code.&lt;br /&gt;
&lt;br /&gt;
=== Phase 4 – NS-3 Implementation Changes for Visual Studio ===&lt;br /&gt;
&lt;br /&gt;
In a few of the NS-3 implementations, there are differences in the implementation between Linux and Windows.  These are cases where the same source code does not produce the exact same results, either to differences in the OS, third party libraries of compiler code generation.  For these changes, the source code has been modified to produce equivalent behavior on all platforms that matches the original implementation.&lt;br /&gt;
&lt;br /&gt;
The number of changes in this phase are limited to a few examples.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3-users-guidelines-for-posting&amp;diff=10322</id>
		<title>Ns-3-users-guidelines-for-posting</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3-users-guidelines-for-posting&amp;diff=10322"/>
		<updated>2017-03-10T18:15:15Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Preliminaries */ Add exceptions and crashes section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
== Preliminaries ==&lt;br /&gt;
&lt;br /&gt;
This is the short form of our posting guide.  More lengthy explanations are in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Do your homework ===&lt;br /&gt;
&lt;br /&gt;
==== Work through the [https://www.nsnam.org/ns-3-24/documentation/ tutorial], all of it ====&lt;br /&gt;
==== Read the [http://www.nsnam.org/documentation documentation] about models and the reference manual ====&lt;br /&gt;
==== Search the [https://groups.google.com/forum/#!forum/ns-3-users Google Groups] to see if your question was asked before ====&lt;br /&gt;
&lt;br /&gt;
=== Subjects/topics ===&lt;br /&gt;
&lt;br /&gt;
==== Search for related discussions ====&lt;br /&gt;
&lt;br /&gt;
Add to existing threads if the last reply is less than a year old.  If older than a year, start a new thread, specifically linking to the prior thread.&lt;br /&gt;
	&lt;br /&gt;
==== Use a specific subject line ====&lt;br /&gt;
&lt;br /&gt;
Do not ask unrelated questions in reply to a topic about something else.  Start a new thread with a specific subject line.&lt;br /&gt;
&lt;br /&gt;
=== Information to include in your message ===&lt;br /&gt;
&lt;br /&gt;
==== Platform ====&lt;br /&gt;
&lt;br /&gt;
If you are reporting a problem such as a installation failure, please report enough details about your platform to allow a maintainer to reproduce.&lt;br /&gt;
&lt;br /&gt;
==== Source Code  ====&lt;br /&gt;
&lt;br /&gt;
Use the attachment feature for posting scripts; only short snippets (less than 10 lines) should be inline.&lt;br /&gt;
&lt;br /&gt;
Create the simplest possible script which illustrates the issue you are facing.  &lt;br /&gt;
&lt;br /&gt;
It’s almost always impossible to give a helpful reply when looking  at a snippet from a larger script, or worse a snippet which refers to code models not part of the distribution.&lt;br /&gt;
&lt;br /&gt;
If there is the remotest chance you changed something in an ns-3 module, state that up front.  Attach your modified files and a minimal main script that triggers the problem.&lt;br /&gt;
&lt;br /&gt;
==== Exceptions and Crashes ====&lt;br /&gt;
&lt;br /&gt;
Exceptions and crashes are a normal part of debugging. Learn to use a debugger; this isn't the right place to ask what to do next when the &amp;lt;tt&amp;gt;gdb&amp;gt;&amp;lt;/tt&amp;gt; prompt appears.  When someone (or an error message) suggests running your script in a debugger, expect to do some work to learn more about what's going on, beyond just the stack trace. it's almost always impossible to make useful suggestions from just that.  Don't waste everyone's time, including yours, by just posting it and asking for help.  Reread the previous section on [[#Source Code]].&lt;br /&gt;
&lt;br /&gt;
== Posting Guide: How to ask good questions that prompt useful answers ==&lt;br /&gt;
&lt;br /&gt;
This is the long form of the posting guide, summarized above.&lt;br /&gt;
&lt;br /&gt;
This guide is intended to make more productive use of the ns-3-users group by recommending best practices for posting questions and answers.  Please keep in mind that over 5000 people subscribe to this group, so it is common courtesy to follow this guidance.&lt;br /&gt;
&lt;br /&gt;
If one of the project maintainers responds to your question by citing this guide, please re-read the guidance before asking your question again.&lt;br /&gt;
&lt;br /&gt;
This guide is freely adapted from the R Posting Guide (http://www.r-project.org/posting-guide.html)&lt;br /&gt;
&lt;br /&gt;
=== Good manners: ===&lt;br /&gt;
&lt;br /&gt;
ns-3 is open source software, constructed and maintained by volunteers. They have various reasons for contributing software and participating on the group, but often have limited time.  Please help them quickly understand the details about your problem, and please avoid asking questions that have already been answered.&lt;br /&gt;
&lt;br /&gt;
Follow etiquette and professionalism guidelines found in [https://www.ietf.org/rfc/rfc1855.txt RFC1855] and [https://www.ietf.org/rfc/rfc7704.txt RFC7704].  Please read these if you haven't already.&lt;br /&gt;
&lt;br /&gt;
Customs differ. Some people are very direct. Others surround everything they say with hedges and apologies. Be tolerant. Rudeness is never warranted, but sometimes `read the manual' ''is'' the appropriate response. Don't waste time discussing such matters on the list.  Ad hominem comments are absolutely out of place.&lt;br /&gt;
&lt;br /&gt;
Note:  if moderators find posts that lack etiquette or professionalism, we will follow an escalation path that will result in private and/or public warnings, and eventual ban from the group if behavior is not modified.&lt;br /&gt;
&lt;br /&gt;
=== Which group (or mailing list)?: ===&lt;br /&gt;
&lt;br /&gt;
ns-3-users or ns-developers? There are two widely used mailing lists for questions and discussion about ns-3.&lt;br /&gt;
&lt;br /&gt;
*  '''ns-3-users'''  is intended for people who want to use ns-3 but who are not necessarily interested in developing new or extending existing modules for public release.&lt;br /&gt;
*  '''ns-developers'''  is intended for questions and discussion about code development in ns-3, new features, etc.&lt;br /&gt;
&lt;br /&gt;
Questions such as &amp;quot;Does ns-3 support &amp;lt;insert-protocol-model&amp;gt; because I'd like to reuse it if so?&amp;quot; should always be asked on ns-3-users.  Questions such as &amp;quot;Is anyone developing a model of &amp;lt;insert-protocol-model&amp;gt; for contributing back to ns-3?&amp;quot; are appropriate for ns-developers or ns-3-users.&lt;br /&gt;
&lt;br /&gt;
New users, or users seeking help in performing a particular task are probably more comfortable with ns-3-users. The ns-developers mailing list is friendly as well, but it assumes that you have some knowledge of ns-3, and out-of-scope posts will usually be redirected to ns-3-users.&lt;br /&gt;
&lt;br /&gt;
Please do not post the same message to both lists; pick one.  ns-3 maintainers read both lists.&lt;br /&gt;
&lt;br /&gt;
The ns-3-users group primarily intended for questions and discussion about the ns-3 software. However, questions about networking protocols are sometimes posted. If the question is well-asked and of interest to someone on the list, it may elicit an informative up-to-date answer.&lt;br /&gt;
&lt;br /&gt;
=== Do your homework before posting: ===&lt;br /&gt;
&lt;br /&gt;
If it is clear that you have done basic background research and searched already for the answer, you are far more likely to get an informative response. &lt;br /&gt;
&lt;br /&gt;
* Search the ns-3-users group. The web interface has a nice search feature, use it.&lt;br /&gt;
* Search the web. Use your preferred search engine, you may find good tips.&lt;br /&gt;
* Search the ns-3 wiki, manual and Doxygen.&lt;br /&gt;
* For ''any'' result found, pay attention to the post date. Some posts are about very old ns-3 versions, and the solution may not be working anymore. Or the problem may have been fixed altogether.&lt;br /&gt;
* When possible, always use the latest ns-3 release.  If you are using an older release, please try to reproduce your problem on the most recent release or development code to see if it has already been fixed.&lt;br /&gt;
* If you have doubts that something changed from release to release, consult the ns-3 changes file (it is named CHANGES.html).&lt;br /&gt;
* If you search for help for an unsupported module (e.g., one not distributed with ns-3-allinone), contact the module developer first.&lt;br /&gt;
&lt;br /&gt;
=== Useful posting tips: ===&lt;br /&gt;
&lt;br /&gt;
In order to have more chances to have a fast and meaningful answer, please do the following:&lt;br /&gt;
&lt;br /&gt;
* Use an informative subject line (not something like `question', or 'help me').&lt;br /&gt;
* Do not ask another unrelated question by replying to an existing thread with a different subject line; start a new thread instead.&lt;br /&gt;
* Don't expect a reply in hours. Feel free to bump the question, but only after a couple of days.&lt;br /&gt;
* Only reply to ''recent'' threads (less then 1 year old).&lt;br /&gt;
* The more threads you ask the same question in, the ''less'' you will receive an answer.&lt;br /&gt;
* Do not include more than 10 lines of code in the message. The group allows attachments, use them.&lt;br /&gt;
* The ns-3-users group is not the best place to ask basic C++ questions.&lt;br /&gt;
* If relevant, state clearly the ns-3 version, compiler version, OS (type and version). If you're in doubt if it's relevant, then it is.&lt;br /&gt;
** the ns-3 version can be found in RELEASE_NOTES, the compiler version from ''g++ --version'' and the OS type/version from ''uname -a''&lt;br /&gt;
* Some consider it good manners to include a concise signature specifying your affiliation, but this is not required.&lt;br /&gt;
&lt;br /&gt;
=== Surprising behavior and bugs: ===&lt;br /&gt;
&lt;br /&gt;
What you think is a bug may be many other things, such as a default behavior that you do not like, a feature, an undocumented feature, or a bug in the documentation.&lt;br /&gt;
If you think you have found a bug, feel free to discuss about it in the ns-3-users group. In order to simplify the bug processing, please try to do the following:&lt;br /&gt;
&lt;br /&gt;
* Search the ns-3 Bugzilla for similar bugs. In case, feel free to ask for the estimated resolution time.&lt;br /&gt;
* Debug your script. Using gdb or any debugger GUI is mandatory to discriminate between a ns-3 bug and a mistake in the user's script.&lt;br /&gt;
* Simplify the offending script to the bare minimum. Try to reproduce reliably the misbehaviour in the very latest ns-3 version, possibly ns-3-dev.&lt;br /&gt;
* When opening or replying to a bug, remember that:&lt;br /&gt;
*# Any bug is maximum priority for who found it, but it may not be for others. Be realistic.&lt;br /&gt;
*# Clearly state what was the expected behaviour and the one you got.&lt;br /&gt;
*# Include a script showing the bug.&lt;br /&gt;
*# Bugs are fixed in ns-3-dev. Make sure that your bug is present in ns-3-dev.&lt;br /&gt;
*# If possible, include a patch...&lt;br /&gt;
&lt;br /&gt;
=== Responding to other posts: ===&lt;br /&gt;
&lt;br /&gt;
* Rudeness and ad hominem comments are not acceptable. Brevity is OK.&lt;br /&gt;
* Take care when you quote other people's comments to respect their rights. In particular:&lt;br /&gt;
** Private (non-group or non-list) messages should never be quoted or forwarded to a list without the author's permission.  Don't assume &amp;quot;it is OK&amp;quot;-- always ask first.&lt;br /&gt;
** The original authorship and meaning should always be clear.&lt;br /&gt;
* It is common practice to quote prior messages in entirety.&lt;br /&gt;
* If you edit the quoted text from prior messages, include sufficient context so that the content is clear even if your archived message is referenced at a much later date and in isolation from other messages.&lt;br /&gt;
* When responding to a very simple question, use the following algorithm:&lt;br /&gt;
** Check if someone else posted a reply.  If the question has just arrived in your inbox, wait half an hour.&lt;br /&gt;
** If no one has posted a reply, then post your reply.&lt;br /&gt;
* Use professional writing guidelines to convey information in a clear, efficient way&lt;br /&gt;
** No profanity, and never do jokes about sex, religion, culture, or about someone's misuse of the English language. You can be funny without being offensive.&lt;br /&gt;
** Avoid interactions that could be considered to be harassing or mocking someone else.  If you are interacting with someone who you feel is not making a fair effort to follow the list guidelines, it is best to just stop replying further, rather than to post something out of anger or frustration or to try to get the last word in.&lt;br /&gt;
** Keep in mind also, if writers are trying their best not to be offensive, readers should try not to be offended too easily.&lt;br /&gt;
** Do not plead (e.g., repeatedly asking the same question or with capitalization or many exclamation points) if you do not get the answer you want as quickly as you may want it.&lt;br /&gt;
* Never post something if you are angry. Wait some hours and re-read your message if you composed it while you was upset.&lt;br /&gt;
&lt;br /&gt;
=== Common posting mistakes: ===&lt;br /&gt;
&lt;br /&gt;
* Missing or non-specific message subject&lt;br /&gt;
* Not doing basic homework before posting a question&lt;br /&gt;
* Not being more specific than `function xxx doesn't work'&lt;br /&gt;
* Being overly specific and not stating your real goal; there may be another solution if your underlying goal is better understood&lt;br /&gt;
* Not including version and OS information in question regarding unexpected behavior.&lt;br /&gt;
* Finding a bug in an old version of ns-3 that has been fixed in the most recent version.&lt;br /&gt;
* Claiming that something is a bug when in fact the software is working as intended and documented, just not in the way you first expected.&lt;br /&gt;
* Threatening not to use the software if you cannot get your question answered. Even when intended as a statement of fact, this tends to create negative attitudes.&lt;br /&gt;
* Posting the same question more than once per day (in different threads).&lt;br /&gt;
&lt;br /&gt;
=== Basic networking and classroom homework: ===&lt;br /&gt;
&lt;br /&gt;
The ns-3 user group is not intended for basic networking or classroom homework. Feel free to ask questions, but don't ask to help solving a class assignment (it's cheating, and your teacher will find it).&lt;br /&gt;
&lt;br /&gt;
=== Announcements: ===&lt;br /&gt;
&lt;br /&gt;
Job postings specific to ns-3 (e.g. postdoctoral or professional appointments related to ns-3 specifically) are allowed.  General job postings unrelated to ns-3 are inappropriate.&lt;br /&gt;
&lt;br /&gt;
Calls for participation in events related to ns-3 (e.g. Workshop on ns-3, or other simulation/emulation workshops where ns-3 would be considered a mainstream topic) are allowed.  General conference/workshop/journal call for papers are inappropriate.  &lt;br /&gt;
&lt;br /&gt;
=== Final words: ===&lt;br /&gt;
&lt;br /&gt;
It is a skill to ask good questions. If at first you don't get the answers that are useful to you, don't get discouraged. A response that is concise and technically accurate may be just that, and not an intended putdown. If you feel insulted by some response to a post of yours, don't make any hasty response in return - you're more likely than not to regret it. Read Eric Raymond's essay [http://www.catb.org/esr/faqs/smart-questions.html How To Ask Questions The Smart Way] for more suggestions, and for insight into people's behavior on technical mailing lists.&lt;br /&gt;
&lt;br /&gt;
Posters should be aware that the ns-3 lists are public discussion lists and anything you post will be archived and accessible via several websites for many years, and we cannot remove any posts (it is a Google service).&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=BakeIntegration&amp;diff=10297</id>
		<title>BakeIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=BakeIntegration&amp;diff=10297"/>
		<updated>2017-02-23T19:09:33Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: add link to spack&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This page is for describing functional requirements of the [http://www-sop.inria.fr/members/Daniel.Camara/bake/ bake tool] for [http://www.nsnam.org/wiki/index.php/Ns-3.26 ns-3.26] and for future releases.&lt;br /&gt;
&lt;br /&gt;
= Background and Motivation =&lt;br /&gt;
&lt;br /&gt;
Presently, ns-3 has a large backlog of unmerged contributed code, and the build of ns-3 can take very long, including modules that are not of interest to most users.  We therefore want to move the project towards a more modular arrangement of 'core' modules and 'contributed' modules, and a more user-friendly way of tailoring the build of ns-3 to a specific user's needs.  We need a build orchestration tool to facilitate this.&lt;br /&gt;
&lt;br /&gt;
bake.py is a tool developed at INRIA to orchestrate the Direct Code Execution (DCE) build.  It was developed with some goals of generality (e.g. ns-3-specific constructs were avoided), but in practice is only being used these days to build DCE and some optional components of the ns-3-allinone build.  bake.py is a build orchestration tool, in that it is not a build tool like 'make' or 'Waf', but instead calls to those build tools to orchestrate a build of several libraries in a correct order.  bake.py was developed because the available build orchestration tools examined at the time of development were considered to be insufficient to meet the requirements. &lt;br /&gt;
&lt;br /&gt;
For the ns-3.27 release, we want to take the step towards making a number of contributed ns-3 modules readily available.  We do not have time  in this release cycle to create the perfect tool or transition away from bake to another build orchestration tool for ns-3.27, so we will prioritize getting something reasonably usable in place for ns-3.27, with as many modules enabled as we have time to do, and study later whether we want to make a bigger change such as moving to an externally supported build orchestration tool such as nixpkgs, or work on binary package management.&lt;br /&gt;
&lt;br /&gt;
= Executive summary =&lt;br /&gt;
&lt;br /&gt;
#. ns-3 will add a 'contrib/' directory in parallel with 'src/'; contrib/ will be the landing spot for contributed modules&lt;br /&gt;
#* Patch pending in https://www.nsnam.org/bugzilla/show_bug.cgi?id=2630&lt;br /&gt;
#. contributed modules will be organized according to the standard module layout and hosted somewhere on the web (tar archives, github, bitbucket, etc.)&lt;br /&gt;
#. a small bake XML configuration file will tell bake how to download the new module into contrib/, and will be available to express any other library dependencies of the module.  These XML files will be stored in 'bake/contrib' directory.&lt;br /&gt;
#* Patch pending in https://www.nsnam.org/bugzilla/show_bug.cgi?id=2631&lt;br /&gt;
#. users will tailor their contributed module downloads using the bake tool; users will continue to tailor their ns-3 build using Waf&lt;br /&gt;
#. modules will become more stand-alone, with ability to run Sphinx documentation and Doxygen on them independently.&lt;br /&gt;
#* create-module.py program can migrate from src/ to contrib/ directory and extended to generate initial bake module XML&lt;br /&gt;
#. we will start with a small set of such modules for ns-3.27 initial release and add them throughout the year.  Tentative modules for ns-3.27:&lt;br /&gt;
#* Magister's Satellite Network Simulator 3 (SNS3)&lt;br /&gt;
#* UAN integration with World Ocean Simulation System (WOSS)&lt;br /&gt;
#* SiFT routing&lt;br /&gt;
#* Routes Mobility Model&lt;br /&gt;
#* (others TBD)&lt;br /&gt;
&lt;br /&gt;
Development repos:&lt;br /&gt;
&lt;br /&gt;
1) ns-3-modular:  This contains the ns-3 contrib patch&lt;br /&gt;
https://bitbucket.org/tomhend/ns-3-dev-modular&lt;br /&gt;
&lt;br /&gt;
2) bake-modular:  This contains the bake contrib patch&lt;br /&gt;
https://bitbucket.org/tomhend/bake-modular&lt;br /&gt;
&lt;br /&gt;
3) sift-ns3:  This is a sample contrib module, for testing purposes&lt;br /&gt;
https://bitbucket.org/tomhend/sift-ns3&lt;br /&gt;
&lt;br /&gt;
= How bake is used now =&lt;br /&gt;
&lt;br /&gt;
Bake is used to construct a virtual environment for DCE.  Users can request the enabling of one or more modules, and bake will check for needed system dependencies, will perform the download of libraries that are not system dependencies, can locally patch downloaded libraries if needed, can build and install libraries into a local bin and lib directory, and can build ns-3.&lt;br /&gt;
&lt;br /&gt;
The below shows how this is basically done today.&lt;br /&gt;
&lt;br /&gt;
  1) ./bake.py check&lt;br /&gt;
  2) export BAKE_HOME=`pwd`&lt;br /&gt;
  3) export PATH=$PATH:$BAKE_HOME:$BAKE_HOME/build/bin&lt;br /&gt;
  4) export PYTHONPATH=$PYTHONPATH:$BAKE_HOME:$BAKE_HOME/build/lib&lt;br /&gt;
  5) ./bake.py configure -e dce-linux-1.8 -e dce-quagga-1.8&lt;br /&gt;
  6) ./bake.py show&lt;br /&gt;
  7) ./bake.py download&lt;br /&gt;
  8) ./bake.py build&lt;br /&gt;
&lt;br /&gt;
Bake will, in turn:&lt;br /&gt;
&lt;br /&gt;
1) check that necessary bake prerequisites are filled&lt;br /&gt;
&lt;br /&gt;
2-4) set environment variables so that bake, the python modules, and the built libraries can be found by the user's shell&lt;br /&gt;
&lt;br /&gt;
5) create a bakefile.xml after the configure step, caching the user's configuration details, and selecting the DCE Linux and quagga modules and their module dependencies&lt;br /&gt;
&lt;br /&gt;
6) show the enabled modules and their dependencies&lt;br /&gt;
&lt;br /&gt;
7) download the module sources into a 'source' directory&lt;br /&gt;
&lt;br /&gt;
8) build, using the module's native build tool, within each module's source directory, and perform a 'make install' into a local 'build' directory containing a 'bin', 'lib', and 'include' directory for the built components&lt;br /&gt;
&lt;br /&gt;
Users can recurse into the source/ns-3-dce directory to start using this directly; that is, bake.py can be thought of as the step to get a custom development environment in place, then it can get out of the way and users can just use Waf at the ns-3 level.&lt;br /&gt;
&lt;br /&gt;
The user's shell keeps track of where bake and its installed components live via environment variables &lt;br /&gt;
LD_LIBRARY_PATH, PATH, and PYTHONPATH.  &lt;br /&gt;
&lt;br /&gt;
= Proposed changes for ns-3.27 =&lt;br /&gt;
&lt;br /&gt;
The basic goal is to add a 'contrib' directory for contributed modules, and to publish metadata about available contributed modules.  Some of these modules will be pure ns-3 modules; some will have additional library dependencies that bake can coordinate.  Users should be able to easily discover the list of available modules and pick the ones of interest.  Contributors who work with the release manager can get their module descriptions published, but will host their code at the location of their choice (e.g. github, bitbucket, or their departmental web server).&lt;br /&gt;
&lt;br /&gt;
As a concrete example, let's assume that [[RoutesMobilityModel | routes mobility model]] and [https://codereview.appspot.com/13831049/ epidemic routing] are two modules of interest to a future ns-3.27 user.  ns-3.27 will be distributed with all existing modules as before, but not with these contributed modules.  Upon downloading the base ns-3.27, the directory structure will be the same as before:&lt;br /&gt;
&lt;br /&gt;
  $ ls ns-3.27/src/&lt;br /&gt;
  antenna           dsdv           netanim                test&lt;br /&gt;
  aodv              dsr            network                topology-read&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
but there will be a sparse contrib/ directory with a build script and a create-module program:&lt;br /&gt;
&lt;br /&gt;
  $ ls ns-3.27/contrib/&lt;br /&gt;
  create-module.py   wscript&lt;br /&gt;
&lt;br /&gt;
Let's assume that the user uses bake to download 'routes-mobility-model' and 'epidemic-routing' modules as contributed modules.  After doing so, the following will show up under a 'contrib' directory:&lt;br /&gt;
&lt;br /&gt;
  $ ls ns-3.26/contrib/&lt;br /&gt;
  create-module.py  epidemic-routing   routes-mobility-model  wscript&lt;br /&gt;
&lt;br /&gt;
All Waf commands will treat the 'src/' and 'contrib/' directories equally; that is, Waf will operate on the union of 'src/' and 'contrib/' when performing operations like building documentation, enabling or disabling modules, etc.  As a consequence, providers of contributed modules need to ensure that their modules behave as if they were located in the src/ directory.&lt;br /&gt;
&lt;br /&gt;
== Module discovery ==&lt;br /&gt;
&lt;br /&gt;
The next topic is to describe how users will discover that contributed modules are available to be added to their build.&lt;br /&gt;
&lt;br /&gt;
First, the project will maintain documentation on the web site about the status and availability of contributed modules, on a per-release basis, so users who go to the main documentation page for ns-3.27 would see a pointer to an HTML page with a listing of contributed modules compatible with that release (perhaps other details such as testing status, etc.).&lt;br /&gt;
&lt;br /&gt;
Users will also be able to discover available modules through bake.py.  To enable this, bake module description will be extended with an 'ns-contrib' module type.&lt;br /&gt;
&lt;br /&gt;
  ./bake.py list --contrib&lt;br /&gt;
  contrib:  epidemic-routing&lt;br /&gt;
  contrib:  routes-mobility-model&lt;br /&gt;
&lt;br /&gt;
In practice, the above will be more fully populated with many contrib modules and version numbering of them.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
To work through a concrete example, suppose the user obtains the base ns-3 with pybindgen and netanim (current defaults for allinone), the user will do:&lt;br /&gt;
&lt;br /&gt;
  ./bake.py configure -e ns-allinone-3.27&lt;br /&gt;
  ./bake.py show&lt;br /&gt;
&lt;br /&gt;
which outputs:&lt;br /&gt;
&lt;br /&gt;
  ....&lt;br /&gt;
  module: ns-allinone-3.27 (enabled)&lt;br /&gt;
    depends on:&lt;br /&gt;
     netanim-3.107 (optional:True)&lt;br /&gt;
     pybindgen-0.17.0.post49+ng0e4e3bc (optional:True)&lt;br /&gt;
     pyviz-prerequisites (optional:True)&lt;br /&gt;
     ns-3.27 (optional:False)&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
We can use a new command 'list' to show available modules, and sub-commands specialized to the ns-3 contributed modules.&lt;br /&gt;
&lt;br /&gt;
  ./bake.py list&lt;br /&gt;
&lt;br /&gt;
  /* lists all modules in the bakefile */&lt;br /&gt;
&lt;br /&gt;
   ./bake.py list --contrib&lt;br /&gt;
 &lt;br /&gt;
  /* list all modules of type 'ns-contrib'; e.g.&lt;br /&gt;
  contrib:  routes-mobility-model&lt;br /&gt;
  */&lt;br /&gt;
&lt;br /&gt;
In the future (not for ns-3.27), we may append some version information about the compatibility of the modules, with minimum and maximum ns-3 versions.  Let's assume that epidemic-routing went unmaintained and stopped working with ns-3 versions greater than 3.25, but routes-mobility-model is always maintained to stay compatible with the latest release.  The user doing a &lt;br /&gt;
&lt;br /&gt;
  ./bake.py list contrib&lt;br /&gt;
&lt;br /&gt;
would see something like this:&lt;br /&gt;
&lt;br /&gt;
  module name            version    minimum ns-3 version       maximum ns-3 version&lt;br /&gt;
  ...                    ...        ...                        ...&lt;br /&gt;
  routes-mobility-model  1.0        3.25                       unspecified&lt;br /&gt;
  epidemic-routing       0.9.1      3.23                       3.26&lt;br /&gt;
  ...                    ...        ...                        ...&lt;br /&gt;
&lt;br /&gt;
To further specialize this list, the user could then list all contrib specific to ns-3.25&lt;br /&gt;
&lt;br /&gt;
  ./bake.py list contrib 3.25&lt;br /&gt;
&lt;br /&gt;
and the above list would be filtered to include only those available for ns-3.25 (not implemented yet).&lt;br /&gt;
&lt;br /&gt;
We should also support some filtering to get specific information, such as making the following to be equivalent:&lt;br /&gt;
&lt;br /&gt;
  ./bake.py list | grep epidemic&lt;br /&gt;
  ./bake.py list epidemic&lt;br /&gt;
  ./bake.py list epi&lt;br /&gt;
&lt;br /&gt;
To get more information about any module, we can support a new 'info' command, with support for extensions:&lt;br /&gt;
&lt;br /&gt;
  ./bake.py info epidemic&lt;br /&gt;
  ./bake.py info epi&lt;br /&gt;
&lt;br /&gt;
would print out something based on the metadata found in the XML:&lt;br /&gt;
&lt;br /&gt;
  module: epidemic-routing&lt;br /&gt;
  description:  ...&lt;br /&gt;
  homepage:  ...&lt;br /&gt;
  version:  ... &lt;br /&gt;
  minimum-ns-3-version:  ...&lt;br /&gt;
  maximum-ns-3-version: ...&lt;br /&gt;
  ... &lt;br /&gt;
&lt;br /&gt;
and if these information fields are missing in the XML, they will simply not print out.&lt;br /&gt;
&lt;br /&gt;
The next steps would be to actually configure the contributed modules to 'enabled' status, so that they are downloaded to the src/contrib directory when ./bake.py download is called.&lt;br /&gt;
&lt;br /&gt;
We aim to support an API like this, using the '-e' option to configure to support the adding of contributed modules.  In general, we aim to not require (but still allow) users to specify the contributed module version, as follows:&lt;br /&gt;
&lt;br /&gt;
  ./bake.py configure -c&lt;br /&gt;
  ./bake.py show  /* should result in an empty config */&lt;br /&gt;
&lt;br /&gt;
  ./bake.py configure -a routes-mobility-model&lt;br /&gt;
  &amp;gt; Error: Module &amp;quot;routes-mobility-model&amp;quot; has unmet dependency: ns-3.27 &lt;br /&gt;
&lt;br /&gt;
  ./bake.py configure -e ns-3.27   /* Now I have a base of ns-3.27 module, and I can add to it */&lt;br /&gt;
&lt;br /&gt;
  ./bake.py configure -e pybindgen  /* add python bindings support */&lt;br /&gt;
&lt;br /&gt;
  ./bake.py configure -e routes-mobility-model    /* add routes-mobility-model to build */&lt;br /&gt;
&lt;br /&gt;
  ./bake.py configure -e epidemic-prime&lt;br /&gt;
  Error:  epidemic-prime not found for ns-3.27&lt;br /&gt;
&lt;br /&gt;
  ./bake.py configure -d routes-mobility-model /* remove routes-mobility-model from configuration */&lt;br /&gt;
&lt;br /&gt;
  ./bake.py show /* should show now that ns-3.27 and pybindgen are configured */&lt;br /&gt;
&lt;br /&gt;
Enabling of modules can also be done on a single statement:&lt;br /&gt;
&lt;br /&gt;
  ./bake.py configure -e ns-3.25 -e pybindgen -e routes-mobility-model -e epidemic-routing&lt;br /&gt;
&lt;br /&gt;
= Open issues = &lt;br /&gt;
&lt;br /&gt;
What modules go into the ns-allinone package in the future, if not the universe of compatible libraries and extensions?    I would lean towards requiring that contrib modules be fetched online and that we do not bundle the universe but define a minimum set, like we do today.&lt;br /&gt;
&lt;br /&gt;
How this relates to binary package distribution/preparation is TBD.&lt;br /&gt;
&lt;br /&gt;
Whether we try to replace bake with something like [https://nixos.org/nixpkgs/manual/ nixpkgs] or [https://spack.readthedocs.io/en/latest/ spack] TBD.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=HOWTO_use_the_ConfigStore&amp;diff=10199</id>
		<title>HOWTO use the ConfigStore</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=HOWTO_use_the_ConfigStore&amp;diff=10199"/>
		<updated>2016-09-21T20:34:03Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: add command line to read in a config file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==File-based ConfigStore==&lt;br /&gt;
You need your simulation program to be written like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int main (...)&lt;br /&gt;
{&lt;br /&gt;
  CommandLine cmd;&lt;br /&gt;
  cmd.Parse (...);&lt;br /&gt;
&lt;br /&gt;
  ConfigStore config;&lt;br /&gt;
  config.ConfigureDefaults ();&lt;br /&gt;
&lt;br /&gt;
  ... topology creation&lt;br /&gt;
&lt;br /&gt;
  config.ConfigureAttributes ();&lt;br /&gt;
&lt;br /&gt;
  Simulator::Run ();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then run your simulation program with the following parameters to save a plain text file (in this example, config.txt):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./waf --run &amp;quot;scratch/myprogram --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::Filename=config.txt&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and to read in a configuration&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./waf --run &amp;quot;scratch/myprogram --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat==RawText --ns3::ConfigStore::Filename=config.txt&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GtkConfigStore==&lt;br /&gt;
&lt;br /&gt;
You need your simulation program to be written like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int main (...)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
  ... topology creation&lt;br /&gt;
&lt;br /&gt;
  GtkConfigStore configstore;  &lt;br /&gt;
  configstore.ConfigureAttributes();&lt;br /&gt;
&lt;br /&gt;
  Simulator::Run ();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then before the simulation runs a window will pop up allowing you to browse Object attributes and to save/load the configuration.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Project_Ideas&amp;diff=10198</id>
		<title>Project Ideas</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Project_Ideas&amp;diff=10198"/>
		<updated>2016-09-21T20:31:00Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: fix broken email link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
One way to get involved with ns-3 is to work with a mentor on a suggested project.  These are typically project suggestions that would be valued contributions but the proposer does not have enough time to do it himself or herself, but is willing to mentor someone else to do it.&lt;br /&gt;
&lt;br /&gt;
Another possibility for students is to get involved in the [http://code.google.com/soc/ Google Summer of Code] program.  This program is administered by Google and acceptance is competitive.&lt;br /&gt;
&lt;br /&gt;
How does a mentored project work?  You contact the mentor and describe your interests and availability to work on the module.  You and the mentor will work out a plan to regularly review and discuss the development of your module, following the [https://www.nsnam.org/docs/manual/html/new-modules.html guidelines for developing new models for ns-3].  You will set up a public repository somewhere such as [http://mercurial.selenic.com/wiki/MercurialHosting a site listed here] or your own mercurial server.  &lt;br /&gt;
&lt;br /&gt;
Not all projects are mentored, nor do they all need to be.  Please suggest new project ideas on this page and whether you would mentor them.&lt;br /&gt;
&lt;br /&gt;
= Introductory projects =&lt;br /&gt;
&lt;br /&gt;
This project category is for smaller, simpler projects for new developers to get started.  If you would like to work on one of these, please coordinate with the named mentor.&lt;br /&gt;
&lt;br /&gt;
== Sockets should support the setting of QoS ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''':  [mailto:tommaso.pecorella@unifi.it Tommaso Pecorella]&lt;br /&gt;
&lt;br /&gt;
References:  &lt;br /&gt;
* http://groups.google.com/group/ns-3-users/browse_thread/thread/5be010835c4b5b71&lt;br /&gt;
* https://www.nsnam.org/bugzilla/show_bug.cgi?id=1361&lt;br /&gt;
&lt;br /&gt;
== Reducing header dependencies ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''':  [mailto:tomh@tomh.org Tom Henderson]&lt;br /&gt;
&lt;br /&gt;
Bug [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1832 1832] describes some software maintenance that could be performed on ns-3, to reduce unnecessary header dependencies.  Patches are welcome for even a small part of the overall solution.&lt;br /&gt;
&lt;br /&gt;
I would suggest to adapt deheader and place it in utils/deheader.py.  Running utils/deheader.py should list all the unnecessary includes, and let the maintainers decide whether they want to go clean these up.&lt;br /&gt;
&lt;br /&gt;
Daniel Camara performed this work already, but the work was not finished and merged.  Bug 1832 has the details.&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* http://www.catb.org/~esr/deheader/&lt;br /&gt;
* http://code.google.com/p/include-what-you-use/&lt;br /&gt;
&lt;br /&gt;
== Fixing Doxygen errors and warnings ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': [mailto:tomh@tomh.org Tom Henderson], [mailto:rivanvx@gmail.com Vedran Miletic], or [mailto:pdbarnes@llnl.gov Peter Barnes]&lt;br /&gt;
&lt;br /&gt;
Bug [https://www.nsnam.org/bugzilla/show_bug.cgi?id=938 938] describes an overall effort to eliminate Doxygen warnings (primarily, for missing Doxygen) from our modules.  Any patches that contribute to the overall goal would be welcome.  Contact one of the mentors if interested.&lt;br /&gt;
&lt;br /&gt;
= Projects needing completion =&lt;br /&gt;
&lt;br /&gt;
Some projects were started in the past and never brought to completion.&lt;br /&gt;
&lt;br /&gt;
== Wifi rate control example ==&lt;br /&gt;
&lt;br /&gt;
ns-3 supports many different wifi rate controls, but there isn't a good example program that allows users to clearly contrast the performance of different ones.  The example program 'examples/wireless/multirate.cc' does this a little bit, but it focuses on sampling the throughput.&lt;br /&gt;
&lt;br /&gt;
The suggested project is to work with improving multirate.cc so that users can clearly see the difference between selecting the different rate control algorithms, perhaps by running for longer amount of time and finding a way to plot the rate chosen by the control algorithm as a function of time.&lt;br /&gt;
&lt;br /&gt;
== Perfect ARP ==&lt;br /&gt;
&lt;br /&gt;
[https://www.nsnam.org/bugzilla/show_bug.cgi?id=187 Bug 187] has a patch that needs further review, updating to ns-3-dev, and finishing off.  The enhancement is described as follows:&lt;br /&gt;
&lt;br /&gt;
We need an implementation of ARP which avoids the generation of ARP request/reply packets and assumes a 'perfect' ARP table is always available and  up-to-date.&lt;br /&gt;
&lt;br /&gt;
== IPv6 Routing ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''':   [mailto:tomh@tomh.org Tom Henderson], [mailto:tommaso.pecorella@unifi.it Tommaso Pecorella], &lt;br /&gt;
&lt;br /&gt;
There is little support for global (i.e. god) routing routing for IPv6.  This was started in a 2011 ns-3 summer of code project.&lt;br /&gt;
IPv6 can use Dynamic routing (RIPng is included in ns-3.20), but more protocols are welcome.&lt;br /&gt;
&lt;br /&gt;
However, global routing is still needed. Moreover, all the ad-hoc routing protocols are currently IPv4-only.&lt;br /&gt;
&lt;br /&gt;
== Refactor AODV Hello ==&lt;br /&gt;
&lt;br /&gt;
[https://www.nsnam.org/bugzilla/show_bug.cgi?id=1188 Bug 1188] describes a problem with the current AODV implementation that Hellos are sent even without any active routes.&lt;br /&gt;
&lt;br /&gt;
We would like for someone to align our implementation with the AODV RFC (or with working implementations) in this regard. &lt;br /&gt;
&lt;br /&gt;
'''Mentor''':   [mailto:nikkipui@gmail.com Daniel Lertpratchya]&lt;br /&gt;
&lt;br /&gt;
= Mentored projects =&lt;br /&gt;
&lt;br /&gt;
This section lists project ideas for which there is interest by an ns-3 developer or maintainer to serve as a mentor in the development of a new feature for ns-3.&lt;br /&gt;
&lt;br /&gt;
Please do not apply for mentoring help on a class project unless you have approval from the instructor to receive mentoring.&lt;br /&gt;
&lt;br /&gt;
== Decouple traffic generation from sockets ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''':  [mailto:tomh@tomh.org Tom Henderson]&lt;br /&gt;
&lt;br /&gt;
All ns-3 simulations are IP based but there is no template for how to do this for non-IP-based stacks.  One issue that should be addressed in the long term is that applications that generate traffic are strongly coupled to the sockets interface. It would be nice to decouple the traffic generation aspects of these applications from the sockets-related code.&lt;br /&gt;
&lt;br /&gt;
#* ''summary'': Proposed decoupling to generalize applications&lt;br /&gt;
#* ''ns-developers post'': http://mailman.isi.edu/pipermail/ns-developers/2007-July/003136.html&lt;br /&gt;
#* ''code location'': http://code.nsnam.org/laprisee/ns-3-mp/&lt;br /&gt;
#* ''status'':  Was under discussion in the summer.&lt;br /&gt;
#:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SCTP (Stream Control Transmission Protocol) ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''':   [mailto:tommaso.pecorella@unifi.it Tommaso Pecorella]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol SCTP] is a message-based L4 protocol with features similar to both TCP and UDP. It was originally developed as a reliable protocol to transport PSTN control streams, and it's currently used to carry 3G and 4G signaling over IP networks. The use of SCTP, however, is not limited to signaling transport, as its features makes it very interesting for a lot of other applications where UDP or TCP fails.&lt;br /&gt;
Currently there is no SCTP implementation for ns-3. An SCTP implementation would have to comply with the IPv4 and IPv6 layers and have programming APIs toward the application layer similar to the ones defined in the available SCTP implementations for Linux.&lt;br /&gt;
* Required Experience: C++&lt;br /&gt;
* Bonus Experience: L4 protocols understanding&lt;br /&gt;
* Interests: L4 protocols modeling and simulation&lt;br /&gt;
* Difficulty: medium&lt;br /&gt;
* Recommended reading:&lt;br /&gt;
** [http://tools.ietf.org/html/rfc3286 RFC 3286] An Introduction to the Stream Control Transmission Protocol&lt;br /&gt;
** [http://tools.ietf.org/html/rfc6458 RFC 6458] Sockets API Extensions for the Stream Control Transmission Protocol&lt;br /&gt;
** all the relevant RFCs about SCTP&lt;br /&gt;
&lt;br /&gt;
= Feature requests =&lt;br /&gt;
&lt;br /&gt;
The following projects have been suggested in the past.  If you are working on them, please let us know on the developers or users list so that we can coordinate activities.  If you want to add a project, please describe it below.&lt;br /&gt;
&lt;br /&gt;
== Path MTU discovery ==&lt;br /&gt;
&lt;br /&gt;
When a L4 packet is passed to the IPv4 or IPv6 stacks, the MTU (i.e., the size of the outgoing IP packets) is usually set to the local interface MTU. Or so it is the popular belief. Using the local interface MTU might lead to IP-level fragmentation, more overhead, and poor network performance.+&lt;br /&gt;
&lt;br /&gt;
As a consequence, multiple techniques to discover the end-to-end MTU (called Path MTU) are available.&lt;br /&gt;
The current PMTU discovery ns-3 capability status is listed below.&lt;br /&gt;
&lt;br /&gt;
=== Path MTU discovery for IPv4 stacks ===&lt;br /&gt;
&lt;br /&gt;
'''Status:'''  Being worked on by Vedran Miletic&lt;br /&gt;
&lt;br /&gt;
There is no [http://en.wikipedia.org/wiki/Path_MTU_discovery path MTU discovery] implemented for IPv4.  This makes guessing the end-to-end MTU imperative for ns-3 simulations.  We would welcome a contribution that introduced path MTU discovery to ns-3.  &lt;br /&gt;
&lt;br /&gt;
Vedran expressed interest in working on PMTU discovery.&lt;br /&gt;
&lt;br /&gt;
=== Path MTU discovery for IPv6 stacks ===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Path_MTU_discovery path MTU discovery] is implemented in ns-3's IPv6 stack.&lt;br /&gt;
&lt;br /&gt;
=== Packetization Layer Path MTU Discovery ===&lt;br /&gt;
[http://tools.ietf.org/html/rfc4821 RFC 4821] describes a method to detect PMTU at packetization (i.e., L4) level. This is another good candidate to be implemented.&lt;br /&gt;
&lt;br /&gt;
=== L4 compliance with PMTU ===&lt;br /&gt;
Even if IPv6 is able to detect PMTU, and IPv4 could be, currently there is no API to probe for a specific PMTU from L4 (e.g., UDP, TCP, etc.).&lt;br /&gt;
Moreover, TCP is blind with respect to PMTU. I.e., its MSS (Maximum Segment Size) is fixed.&lt;br /&gt;
&lt;br /&gt;
In order to reproduce real TCP performance it is of paramount importance to:&lt;br /&gt;
&lt;br /&gt;
# Define an API to be used by L4 protocols, for PMTU probing.&lt;br /&gt;
# Update TCP to react to PMTU changes (dynamic MSS).&lt;br /&gt;
# Update TCP to not decrement its Congestion Window upon losses due to PMTU discovery (especially important for IPv6).&lt;br /&gt;
&lt;br /&gt;
== DSR RFC compliance ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' As of June 2015, Gaurangi Saxena is working on this (see: http://mailman.isi.edu/pipermail/ns-developers/2015-June/012842.html).&lt;br /&gt;
&lt;br /&gt;
The ns-3 DSR implementation is not following strictly the [http://datatracker.ietf.org/doc/rfc4728/ RFC 4728]. The topic has been briefly discussed in [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1895 bug# 1895].&lt;br /&gt;
&lt;br /&gt;
It would be nice to have a switch to change from the current behaviour to the &amp;quot;RFC-strict&amp;quot; behaviour.&lt;br /&gt;
As a byproduct, DSR could be updated to support IPv6. Although not explicitly stated by the rFC, DSR can be used for IPv6 as well.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3.26&amp;diff=10197</id>
		<title>Ns-3.26</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3.26&amp;diff=10197"/>
		<updated>2016-09-21T20:26:51Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: add Tentative section, and bug 2507&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This page summarizes the release planning for ns-3.26 (originally planned for June 2016; rescheduled to early September 2016).  The ns-3 release process is listed [http://www.nsnam.org/developers/release-process/ here] and [[Release Process | here]].&lt;br /&gt;
&lt;br /&gt;
This page has been recently revised and some original goals for ns-3.26 have slipped to a new [[ns-3.27]] page.&lt;br /&gt;
&lt;br /&gt;
= Revised schedule =&lt;br /&gt;
&lt;br /&gt;
The revised (again) schedule is as follows:&lt;br /&gt;
&lt;br /&gt;
* code freeze once outstanding issues resolved&lt;br /&gt;
* release shortly afterwards&lt;br /&gt;
&lt;br /&gt;
= Remaining issues being worked for ns-3.26 =&lt;br /&gt;
&lt;br /&gt;
(Updated Sept 21)&lt;br /&gt;
&lt;br /&gt;
There are a few interrelated bugs in wifi that must be fixed (2493, 2477, 2306, 2369), and there is a small bindings generation problem; after those are fixed we can make a release candidate.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;(multiple modules):  fix warnings due to Wstrict-overflow across codebase&amp;lt;/s&amp;gt;  this is resolved for ns-3.26&lt;br /&gt;
* &amp;lt;s&amp;gt;aodv:  merge patch to 2123 (Tommaso)&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;core:  merge patch to 2459 on ./waf --check-config (Peter)&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;core:  resolve attribute errors/attribute spaces/attribute deprecation (issues 2447, 2344, 2149) (Tom and Peter)&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;internet:  global routing and bridging bug 2102 reopened (Tom)&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt; network:  investigate recent packet metadata bugs (2407, 2415), fix if solution found shortly (Tom)&amp;lt;/s&amp;gt; can't reproduce on ns-3-dev; marking as NEEDINFO&lt;br /&gt;
* &amp;lt;s&amp;gt;mobility:  check and merge patch to 2390 (on waypoint mobility) (Tom)&amp;lt;/s&amp;gt;&lt;br /&gt;
* wifi:  merge patch to 2306 and update AODV regression traces (Tom)&lt;br /&gt;
** Patch pending and being tested&lt;br /&gt;
* wave:  merge patch to 2314 (related to 2306) (Tom)&lt;br /&gt;
** This depends on fixing 2306&lt;br /&gt;
* wifi:  investigate DCF assert bug 2477; will fix if solution found shortly (Tom)&lt;br /&gt;
** Patch pending and being tested&lt;br /&gt;
* wifi:  investigate DCF assert bug 2493; will fix if solution found shortly (Tom)&lt;br /&gt;
** Patch pending and being tested&lt;br /&gt;
* wifi:  Supported Rates bug (https://www.nsnam.org/bugzilla/show_bug.cgi?id=2496)&lt;br /&gt;
** Patch pending and being tested&lt;br /&gt;
* wifi:  Immediate access patch&lt;br /&gt;
** Patch pending and being tested&lt;br /&gt;
* &amp;lt;s&amp;gt;uan:  merge patch to 2488 (Tom)&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tentative ==&lt;br /&gt;
* config-store: [https://www.nsnam.org/bugzilla/show_bug.cgi?id=2507 bug 2507]: ConfigStore RawTextConfigLoad doesn't reset stream error state&lt;br /&gt;
** Patch pending, has been tested&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Doxygen-warnings&amp;diff=9857</id>
		<title>Doxygen-warnings</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Doxygen-warnings&amp;diff=9857"/>
		<updated>2016-01-25T19:36:39Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Hnts and tips */ Clarify oxygen.warnings.report.sh options for reducing the volume of output&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Doxygen warning removal =&lt;br /&gt;
&lt;br /&gt;
This page is to help coordinating the efforts in fixing [http://www.nsnam.org/bugzilla/show_bug.cgi?id=938 Bug 938: missing Doxygen in ns-3].&lt;br /&gt;
&lt;br /&gt;
As a followup of [[Sprints|Friday November 15 ns-3 Sprint]], we'd like to coordinate the efforts of Doxygen warning removal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It must be pointed out that warning removing is not good per-se. It is a way to complete the documentation and make it better.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undocumented functions leads to poor coding and, ultimately, not be able to use the ns-3 full power.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, bad or missing documentation means '''bugs''' !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Doxygen work status =&lt;br /&gt;
The following table might seems overwhelming. And the warning are just the ones in the model and helper folders.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, mind that many are chain-warnings, meaning that once you fix the master one in the base class, many of them will disappear. More on that at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current doxygen warning status, by module is:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number of warnings !! Module !! Who's working on it&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 3369 || lte || &lt;br /&gt;
|-&lt;br /&gt;
| 1523 || wimax || &lt;br /&gt;
|-&lt;br /&gt;
| 840 || wifi || Daniel L.&lt;br /&gt;
|-&lt;br /&gt;
| 521 || mesh || &lt;br /&gt;
|-&lt;br /&gt;
| 459 || visualizer || &lt;br /&gt;
|-&lt;br /&gt;
| 236 || dsr || &lt;br /&gt;
|-&lt;br /&gt;
| 227 || netanim || &lt;br /&gt;
|-&lt;br /&gt;
| 211 || wave ||&lt;br /&gt;
|-&lt;br /&gt;
| 210 || spectrum || &lt;br /&gt;
|-&lt;br /&gt;
| 195 || olsr || &lt;br /&gt;
|-&lt;br /&gt;
| 127 || aodv || &lt;br /&gt;
|-&lt;br /&gt;
| 108 || config-store || &lt;br /&gt;
|-&lt;br /&gt;
| 98 || buildings || &lt;br /&gt;
|-&lt;br /&gt;
| 90 || mpi || &lt;br /&gt;
|-&lt;br /&gt;
| 87 || energy || &lt;br /&gt;
|-&lt;br /&gt;
| 74 || dsdv || &lt;br /&gt;
|-&lt;br /&gt;
| 46 || openflow || &lt;br /&gt;
|-&lt;br /&gt;
| 28 || brite || &lt;br /&gt;
|-&lt;br /&gt;
| 22 || nix-vector-routing || &lt;br /&gt;
|-&lt;br /&gt;
| 20 || network ||&lt;br /&gt;
|-&lt;br /&gt;
| 18 || antenna || &lt;br /&gt;
|-&lt;br /&gt;
| 17 || virtual-net-device || &lt;br /&gt;
|-&lt;br /&gt;
| 15 || internet ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || propagation || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || sixlowpan ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || topology ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to proceed =&lt;br /&gt;
The procedure is simple.&lt;br /&gt;
# Post online that you're working on a module. Eventually coordinate with who's already working on the same module.&lt;br /&gt;
# Follow the direction in the [[Sprints|Sprint]] page to setup Doxygen to show you the warnings.&lt;br /&gt;
# Start with base classes. Mind that ''virtual'' functions can (and should) be documented only in the base class.&lt;br /&gt;
# Don't be afraid of the numbers. I was able to kill 1400 warnings in 2 days (just in my spare time).&lt;br /&gt;
# Once you have a patch, post it in Bugzilla: [http://www.nsnam.org/bugzilla/show_bug.cgi?id=938 Bug 938: missing Doxygen in ns-3].&lt;br /&gt;
# Go drink a beer, you deserve it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hint and tips =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; script will make a long list of warnings. You're probably interested in the ones from a single module. The script has a number of options which can help:&lt;br /&gt;
&lt;br /&gt;
 $ doc/doxygen.warnings.report.sh -h&lt;br /&gt;
 ... &lt;br /&gt;
 Usage: doxygen.warnings.report.sh [-eithv] [-s &amp;lt;log-file&amp;gt; | -l | -w] [-m &amp;lt;module&amp;gt;] [-f &amp;lt;regex&amp;gt;] [-F &amp;lt;regex&amp;gt;]&lt;br /&gt;
 ...&lt;br /&gt;
 -e  Filter out warnings from */examples/*&lt;br /&gt;
 -t  Filter out warnings from */test/*&lt;br /&gt;
 -m  Only include files matching src/&amp;lt;module&amp;gt;&lt;br /&gt;
 -f  Only include files matching the &amp;lt;regex&amp;gt;&lt;br /&gt;
 -F  Exclude files matching the &amp;lt;regex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the &amp;lt;tt&amp;gt;-m &amp;amp;lt;module&amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-t&amp;lt;/tt&amp;gt; options.  The &amp;lt;tt&amp;gt;-m &amp;amp;lt;module&amp;gt;&amp;lt;/tt&amp;gt; will show the full warning messages from just files in &amp;lt;tt&amp;gt;src/&amp;lt;module&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now you have a shorter list of bugs to work with. Cut out the ones from the tests and examples (or not, depends on how pedantic you are). Those are your warnings to kill.&lt;br /&gt;
&lt;br /&gt;
= User's opinions = &lt;br /&gt;
&lt;br /&gt;
Some time ago I did a poll, an I asked the users the documentation they need most. Here is the result.&lt;br /&gt;
&lt;br /&gt;
[[File:UsersPollResults.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Tommaso|Tommaso]] ([[User talk:Tommaso|talk]]) 16:29, 26 November 2013 (EST)&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Doxygen-warnings&amp;diff=9822</id>
		<title>Doxygen-warnings</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Doxygen-warnings&amp;diff=9822"/>
		<updated>2015-11-13T06:03:36Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Doxygen work status */ Update core warnings (down to zero!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Doxygen warning removal =&lt;br /&gt;
&lt;br /&gt;
This page is to help coordinating the efforts in fixing [http://www.nsnam.org/bugzilla/show_bug.cgi?id=938 Bug 938: missing Doxygen in ns-3].&lt;br /&gt;
&lt;br /&gt;
As a followup of [[Sprints|Friday November 15 ns-3 Sprint]], we'd like to coordinate the efforts of Doxygen warning removal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It must be pointed out that warning removing is not good per-se. It is a way to complete the documentation and make it better.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undocumented functions leads to poor coding and, ultimately, not be able to use the ns-3 full power.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, bad or missing documentation means '''bugs''' !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Doxygen work status =&lt;br /&gt;
The following table might seems overwhelming. And the warning are just the ones in the model and helper folders.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, mind that many are chain-warnings, meaning that once you fix the master one in the base class, many of them will disappear. More on that at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current doxygen warning status, by module is:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number of warnings !! Module !! Who's working on it&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 3369 || lte || &lt;br /&gt;
|-&lt;br /&gt;
| 1523 || wimax || &lt;br /&gt;
|-&lt;br /&gt;
| 840 || wifi || Daniel L.&lt;br /&gt;
|-&lt;br /&gt;
| 521 || mesh || &lt;br /&gt;
|-&lt;br /&gt;
| 459 || visualizer || &lt;br /&gt;
|-&lt;br /&gt;
| 236 || dsr || &lt;br /&gt;
|-&lt;br /&gt;
| 227 || netanim || &lt;br /&gt;
|-&lt;br /&gt;
| 211 || wave ||&lt;br /&gt;
|-&lt;br /&gt;
| 210 || spectrum || &lt;br /&gt;
|-&lt;br /&gt;
| 195 || olsr || &lt;br /&gt;
|-&lt;br /&gt;
| 127 || aodv || &lt;br /&gt;
|-&lt;br /&gt;
| 108 || config-store || &lt;br /&gt;
|-&lt;br /&gt;
| 98 || buildings || &lt;br /&gt;
|-&lt;br /&gt;
| 90 || mpi || &lt;br /&gt;
|-&lt;br /&gt;
| 87 || energy || &lt;br /&gt;
|-&lt;br /&gt;
| 74 || dsdv || &lt;br /&gt;
|-&lt;br /&gt;
| 46 || openflow || &lt;br /&gt;
|-&lt;br /&gt;
| 28 || brite || &lt;br /&gt;
|-&lt;br /&gt;
| 22 || nix-vector-routing || &lt;br /&gt;
|-&lt;br /&gt;
| 20 || network ||&lt;br /&gt;
|-&lt;br /&gt;
| 18 || antenna || &lt;br /&gt;
|-&lt;br /&gt;
| 17 || virtual-net-device || &lt;br /&gt;
|-&lt;br /&gt;
| 15 || internet ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || propagation || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || sixlowpan ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || topology ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to proceed =&lt;br /&gt;
The procedure is simple.&lt;br /&gt;
# Post online that you're working on a module. Eventually coordinate with who's already working on the same module.&lt;br /&gt;
# Follow the direction in the [[Sprints|Sprint]] page to setup Doxygen to show you the warnings.&lt;br /&gt;
# Start with base classes. Mind that ''virtual'' functions can (and should) be documented only in the base class.&lt;br /&gt;
# Don't be afraid of the numbers. I was able to kill 1400 warnings in 2 days (just in my spare time).&lt;br /&gt;
# Once you have a patch, post it in Bugzilla: [http://www.nsnam.org/bugzilla/show_bug.cgi?id=938 Bug 938: missing Doxygen in ns-3].&lt;br /&gt;
# Go drink a beer, you deserve it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hint and tips =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The doxygen.warnings.report.sh script will make a long list of warnings. You're probably interested in the ones from a single module. The following command might help:&lt;br /&gt;
&lt;br /&gt;
  grep &amp;lt;module name&amp;gt; doc/doxygen.warnings.log | sort &amp;gt; doc/my.doxygen.warnings.txt&lt;br /&gt;
Now you have a shorter list of bugs to work with. Cut out the ones from the tests and examples (or not, depends on how pedantic you are). Those are your warnings to kill.&lt;br /&gt;
&lt;br /&gt;
= User's opinions = &lt;br /&gt;
&lt;br /&gt;
Some time ago I did a poll, an I asked the users the documentation they need most. Here is the result.&lt;br /&gt;
&lt;br /&gt;
[[File:UsersPollResults.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Tommaso|Tommaso]] ([[User talk:Tommaso|talk]]) 16:29, 26 November 2013 (EST)&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Doxygen-warnings&amp;diff=9821</id>
		<title>Doxygen-warnings</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Doxygen-warnings&amp;diff=9821"/>
		<updated>2015-11-12T04:07:11Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Doxygen work status */ Update core stats&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Doxygen warning removal =&lt;br /&gt;
&lt;br /&gt;
This page is to help coordinating the efforts in fixing [http://www.nsnam.org/bugzilla/show_bug.cgi?id=938 Bug 938: missing Doxygen in ns-3].&lt;br /&gt;
&lt;br /&gt;
As a followup of [[Sprints|Friday November 15 ns-3 Sprint]], we'd like to coordinate the efforts of Doxygen warning removal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It must be pointed out that warning removing is not good per-se. It is a way to complete the documentation and make it better.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undocumented functions leads to poor coding and, ultimately, not be able to use the ns-3 full power.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, bad or missing documentation means '''bugs''' !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Doxygen work status =&lt;br /&gt;
The following table might seems overwhelming. And the warning are just the ones in the model and helper folders.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, mind that many are chain-warnings, meaning that once you fix the master one in the base class, many of them will disappear. More on that at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current doxygen warning status, by module is:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number of warnings !! Module !! Who's working on it&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 3369 || lte || &lt;br /&gt;
|-&lt;br /&gt;
| 1523 || wimax || &lt;br /&gt;
|-&lt;br /&gt;
| 840 || wifi || Daniel L.&lt;br /&gt;
|-&lt;br /&gt;
| 521 || mesh || &lt;br /&gt;
|-&lt;br /&gt;
| 459 || visualizer || &lt;br /&gt;
|-&lt;br /&gt;
| 236 || dsr || &lt;br /&gt;
|-&lt;br /&gt;
| 227 || netanim || &lt;br /&gt;
|-&lt;br /&gt;
| 211 || wave ||&lt;br /&gt;
|-&lt;br /&gt;
| 210 || spectrum || &lt;br /&gt;
|-&lt;br /&gt;
| 195 || olsr || &lt;br /&gt;
|-&lt;br /&gt;
| 127 || aodv || &lt;br /&gt;
|-&lt;br /&gt;
| 108 || config-store || &lt;br /&gt;
|-&lt;br /&gt;
| 98 || buildings || &lt;br /&gt;
|-&lt;br /&gt;
| 90 || mpi || &lt;br /&gt;
|-&lt;br /&gt;
| 87 || energy || &lt;br /&gt;
|-&lt;br /&gt;
| 74 || dsdv || &lt;br /&gt;
|-&lt;br /&gt;
| 49 || core || &lt;br /&gt;
|-&lt;br /&gt;
| 46 || openflow || &lt;br /&gt;
|-&lt;br /&gt;
| 28 || brite || &lt;br /&gt;
|-&lt;br /&gt;
| 22 || nix-vector-routing || &lt;br /&gt;
|-&lt;br /&gt;
| 20 || network ||&lt;br /&gt;
|-&lt;br /&gt;
| 18 || antenna || &lt;br /&gt;
|-&lt;br /&gt;
| 17 || virtual-net-device || &lt;br /&gt;
|-&lt;br /&gt;
| 15 || internet ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || propagation || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || sixlowpan ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || topology ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to proceed =&lt;br /&gt;
The procedure is simple.&lt;br /&gt;
# Post online that you're working on a module. Eventually coordinate with who's already working on the same module.&lt;br /&gt;
# Follow the direction in the [[Sprints|Sprint]] page to setup Doxygen to show you the warnings.&lt;br /&gt;
# Start with base classes. Mind that ''virtual'' functions can (and should) be documented only in the base class.&lt;br /&gt;
# Don't be afraid of the numbers. I was able to kill 1400 warnings in 2 days (just in my spare time).&lt;br /&gt;
# Once you have a patch, post it in Bugzilla: [http://www.nsnam.org/bugzilla/show_bug.cgi?id=938 Bug 938: missing Doxygen in ns-3].&lt;br /&gt;
# Go drink a beer, you deserve it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hint and tips =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The doxygen.warnings.report.sh script will make a long list of warnings. You're probably interested in the ones from a single module. The following command might help:&lt;br /&gt;
&lt;br /&gt;
  grep &amp;lt;module name&amp;gt; doc/doxygen.warnings.log | sort &amp;gt; doc/my.doxygen.warnings.txt&lt;br /&gt;
Now you have a shorter list of bugs to work with. Cut out the ones from the tests and examples (or not, depends on how pedantic you are). Those are your warnings to kill.&lt;br /&gt;
&lt;br /&gt;
= User's opinions = &lt;br /&gt;
&lt;br /&gt;
Some time ago I did a poll, an I asked the users the documentation they need most. Here is the result.&lt;br /&gt;
&lt;br /&gt;
[[File:UsersPollResults.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Tommaso|Tommaso]] ([[User talk:Tommaso|talk]]) 16:29, 26 November 2013 (EST)&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Doxygen-warnings&amp;diff=9820</id>
		<title>Doxygen-warnings</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Doxygen-warnings&amp;diff=9820"/>
		<updated>2015-11-12T03:35:47Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Doxygen work status */ Correct typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Doxygen warning removal =&lt;br /&gt;
&lt;br /&gt;
This page is to help coordinating the efforts in fixing [http://www.nsnam.org/bugzilla/show_bug.cgi?id=938 Bug 938: missing Doxygen in ns-3].&lt;br /&gt;
&lt;br /&gt;
As a followup of [[Sprints|Friday November 15 ns-3 Sprint]], we'd like to coordinate the efforts of Doxygen warning removal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It must be pointed out that warning removing is not good per-se. It is a way to complete the documentation and make it better.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undocumented functions leads to poor coding and, ultimately, not be able to use the ns-3 full power.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, bad or missing documentation means '''bugs''' !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Doxygen work status =&lt;br /&gt;
The following table might seems overwhelming. And the warning are just the ones in the model and helper folders.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, mind that many are chain-warnings, meaning that once you fix the master one in the base class, many of them will disappear. More on that at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current doxygen warning status, by module is:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number of warnings !! Module !! Who's working on it&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 3369 || lte || &lt;br /&gt;
|-&lt;br /&gt;
| 1523 || wimax || &lt;br /&gt;
|-&lt;br /&gt;
| 840 || wifi || Daniel L.&lt;br /&gt;
|-&lt;br /&gt;
| 521 || mesh || &lt;br /&gt;
|-&lt;br /&gt;
| 459 || visualizer || &lt;br /&gt;
|-&lt;br /&gt;
| 420 || core || &lt;br /&gt;
|-&lt;br /&gt;
| 236 || dsr || &lt;br /&gt;
|-&lt;br /&gt;
| 227 || netanim || &lt;br /&gt;
|-&lt;br /&gt;
| 211 || wave ||&lt;br /&gt;
|-&lt;br /&gt;
| 210 || spectrum || &lt;br /&gt;
|-&lt;br /&gt;
| 195 || olsr || &lt;br /&gt;
|-&lt;br /&gt;
| 127 || aodv || &lt;br /&gt;
|-&lt;br /&gt;
| 108 || config-store || &lt;br /&gt;
|-&lt;br /&gt;
| 98 || buildings || &lt;br /&gt;
|-&lt;br /&gt;
| 90 || mpi || &lt;br /&gt;
|-&lt;br /&gt;
| 87 || energy || &lt;br /&gt;
|-&lt;br /&gt;
| 74 || dsdv || &lt;br /&gt;
|-&lt;br /&gt;
| 46 || openflow || &lt;br /&gt;
|-&lt;br /&gt;
| 28 || brite || &lt;br /&gt;
|-&lt;br /&gt;
| 22 || nix-vector-routing || &lt;br /&gt;
|-&lt;br /&gt;
| 20 || network ||&lt;br /&gt;
|-&lt;br /&gt;
| 18 || antenna || &lt;br /&gt;
|-&lt;br /&gt;
| 17 || virtual-net-device || &lt;br /&gt;
|-&lt;br /&gt;
| 15 || internet ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || propagation || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || sixlowpan ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || topology ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to proceed =&lt;br /&gt;
The procedure is simple.&lt;br /&gt;
# Post online that you're working on a module. Eventually coordinate with who's already working on the same module.&lt;br /&gt;
# Follow the direction in the [[Sprints|Sprint]] page to setup Doxygen to show you the warnings.&lt;br /&gt;
# Start with base classes. Mind that ''virtual'' functions can (and should) be documented only in the base class.&lt;br /&gt;
# Don't be afraid of the numbers. I was able to kill 1400 warnings in 2 days (just in my spare time).&lt;br /&gt;
# Once you have a patch, post it in Bugzilla: [http://www.nsnam.org/bugzilla/show_bug.cgi?id=938 Bug 938: missing Doxygen in ns-3].&lt;br /&gt;
# Go drink a beer, you deserve it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hint and tips =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The doxygen.warnings.report.sh script will make a long list of warnings. You're probably interested in the ones from a single module. The following command might help:&lt;br /&gt;
&lt;br /&gt;
  grep &amp;lt;module name&amp;gt; doc/doxygen.warnings.log | sort &amp;gt; doc/my.doxygen.warnings.txt&lt;br /&gt;
Now you have a shorter list of bugs to work with. Cut out the ones from the tests and examples (or not, depends on how pedantic you are). Those are your warnings to kill.&lt;br /&gt;
&lt;br /&gt;
= User's opinions = &lt;br /&gt;
&lt;br /&gt;
Some time ago I did a poll, an I asked the users the documentation they need most. Here is the result.&lt;br /&gt;
&lt;br /&gt;
[[File:UsersPollResults.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Tommaso|Tommaso]] ([[User talk:Tommaso|talk]]) 16:29, 26 November 2013 (EST)&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Doxygen-warnings&amp;diff=9819</id>
		<title>Doxygen-warnings</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Doxygen-warnings&amp;diff=9819"/>
		<updated>2015-11-12T03:34:48Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Doxygen work status */ Update table numbers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Doxygen warning removal =&lt;br /&gt;
&lt;br /&gt;
This page is to help coordinating the efforts in fixing [http://www.nsnam.org/bugzilla/show_bug.cgi?id=938 Bug 938: missing Doxygen in ns-3].&lt;br /&gt;
&lt;br /&gt;
As a followup of [[Sprints|Friday November 15 ns-3 Sprint]], we'd like to coordinate the efforts of Doxygen warning removal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It must be pointed out that warning removing is not good per-se. It is a way to complete the documentation and make it better.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undocumented functions leads to poor coding and, ultimately, not be able to use the ns-3 full power.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, bad or missing documentation means '''bugs''' !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Doxygen work status =&lt;br /&gt;
The following table might seems overwhelming. And the warning are just the ones in the model and helper folders.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, mind that many are chain-warnings, meaning that once you fix the master one in the base class, many of them will disappear. More on that at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current doxygen warning status, by module is:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number of warnings !! Module !! Who's working on it&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 33336964 || lte || &lt;br /&gt;
|-&lt;br /&gt;
| 1523 || wimax || &lt;br /&gt;
|-&lt;br /&gt;
| 840 || wifi || Daniel L.&lt;br /&gt;
|-&lt;br /&gt;
| 521 || mesh || &lt;br /&gt;
|-&lt;br /&gt;
| 459 || visualizer || &lt;br /&gt;
|-&lt;br /&gt;
| 420 || core || &lt;br /&gt;
|-&lt;br /&gt;
| 236 || dsr || &lt;br /&gt;
|-&lt;br /&gt;
| 227 || netanim || &lt;br /&gt;
|-&lt;br /&gt;
| 211 || wave ||&lt;br /&gt;
|-&lt;br /&gt;
| 210 || spectrum || &lt;br /&gt;
|-&lt;br /&gt;
| 195 || olsr || &lt;br /&gt;
|-&lt;br /&gt;
| 127 || aodv || &lt;br /&gt;
|-&lt;br /&gt;
| 108 || config-store || &lt;br /&gt;
|-&lt;br /&gt;
| 98 || buildings || &lt;br /&gt;
|-&lt;br /&gt;
| 90 || mpi || &lt;br /&gt;
|-&lt;br /&gt;
| 87 || energy || &lt;br /&gt;
|-&lt;br /&gt;
| 74 || dsdv || &lt;br /&gt;
|-&lt;br /&gt;
| 46 || openflow || &lt;br /&gt;
|-&lt;br /&gt;
| 28 || brite || &lt;br /&gt;
|-&lt;br /&gt;
| 22 || nix-vector-routing || &lt;br /&gt;
|-&lt;br /&gt;
| 20 || network ||&lt;br /&gt;
|-&lt;br /&gt;
| 18 || antenna || &lt;br /&gt;
|-&lt;br /&gt;
| 17 || virtual-net-device || &lt;br /&gt;
|-&lt;br /&gt;
| 15 || internet ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || propagation || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || sixlowpan ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || topology ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to proceed =&lt;br /&gt;
The procedure is simple.&lt;br /&gt;
# Post online that you're working on a module. Eventually coordinate with who's already working on the same module.&lt;br /&gt;
# Follow the direction in the [[Sprints|Sprint]] page to setup Doxygen to show you the warnings.&lt;br /&gt;
# Start with base classes. Mind that ''virtual'' functions can (and should) be documented only in the base class.&lt;br /&gt;
# Don't be afraid of the numbers. I was able to kill 1400 warnings in 2 days (just in my spare time).&lt;br /&gt;
# Once you have a patch, post it in Bugzilla: [http://www.nsnam.org/bugzilla/show_bug.cgi?id=938 Bug 938: missing Doxygen in ns-3].&lt;br /&gt;
# Go drink a beer, you deserve it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hint and tips =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The doxygen.warnings.report.sh script will make a long list of warnings. You're probably interested in the ones from a single module. The following command might help:&lt;br /&gt;
&lt;br /&gt;
  grep &amp;lt;module name&amp;gt; doc/doxygen.warnings.log | sort &amp;gt; doc/my.doxygen.warnings.txt&lt;br /&gt;
Now you have a shorter list of bugs to work with. Cut out the ones from the tests and examples (or not, depends on how pedantic you are). Those are your warnings to kill.&lt;br /&gt;
&lt;br /&gt;
= User's opinions = &lt;br /&gt;
&lt;br /&gt;
Some time ago I did a poll, an I asked the users the documentation they need most. Here is the result.&lt;br /&gt;
&lt;br /&gt;
[[File:UsersPollResults.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Tommaso|Tommaso]] ([[User talk:Tommaso|talk]]) 16:29, 26 November 2013 (EST)&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2015MpTcpImplementation&amp;diff=9584</id>
		<title>GSOC2015MpTcpImplementation</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2015MpTcpImplementation&amp;diff=9584"/>
		<updated>2015-06-08T17:58:48Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Week 2 - Step 2 */ line breaks in references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.&lt;br /&gt;
== Project overview ==&lt;br /&gt;
* '''Project:''' Implementation of MPTCP (Multipath TCP) + Implementation of per-node clocks&lt;br /&gt;
* '''Student:'''  Matthieu Coudron&lt;br /&gt;
* '''Mentors:'''  [mailto:tomh@tomh.org Tom Henderson], Vedran Miletic, Tommaso Pecarolla, Peter Barnes&lt;br /&gt;
* '''Code:''' https://github.com/teto/ns-3-dev-git/tree/master (check out the different branches)&lt;br /&gt;
* '''About me:''' I am a PhD student working on multipath communications. I have a background in network and system security.&lt;br /&gt;
&lt;br /&gt;
== On the MPTCP subject ==&lt;br /&gt;
&lt;br /&gt;
Thanks to last year TCP option gsoc, it is possible to implement multipath TCP - an extension to TCP that is more and more popular (used in Apple voice recognition system &amp;quot;SIRI&amp;quot;, embedded in yosemite, some Citrix products, soon to be embedded in Proximus products) - in a clean way.&lt;br /&gt;
MPTCP is available in some (possibly out of branch) kernels - Linux, Mac OS, FreeBSD - and work even with adversary middleboxes (Contrary to SCTP), which was an important challenge.&lt;br /&gt;
The 2nd challenge is still pending, ie, how to make the best usage of the path diversity ? How to be better than TCP without being more aggressive than TCP at bottlenecks ? I hope that being able to run MPTCP in a simulator could foster research on that peculiar subject since doing it with kernel code or creating a multihomed (3G/wired) setup can be complex (MPTCP kernel code is being refactored, and implementation is quite time consuming). There is no solution in the literature that answers this in a robust way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
Here is a diff file of the beginning of one mptcp incomplete implementation based on ns3.19: http://downloads.tuxfamily.org/bluecosmos/ns3/final.patch. It was generated through this kind of&lt;br /&gt;
command (I just discovered the filterdiff utility, pretty cool):&lt;br /&gt;
diff -ENwbur ~/ns3off/src/internet src/internet &amp;gt; test.patch&lt;br /&gt;
cat test.patch | filterdiff -p0 -X toexclude.txt &amp;gt; final.patch&lt;br /&gt;
&lt;br /&gt;
To help reviewers focus on the architecture, I removed some unnecessary files (but this is still a huge diff) and I add some comments in the following about MPTCP and the code.&lt;br /&gt;
To sum up, the main files to check are mptcp-socket-base.* and mptcp-subflow.* and the modifications made to tcp-socket-base.* .&lt;br /&gt;
&lt;br /&gt;
1/ First of all, MPTCP doesn't require modifications to be modified, so does this implementation, it just appears as another TCP variant so the MPTCP socket works with all the code that can work with a TcpSocket.&lt;br /&gt;
2/ MPTCP is a TCP extension, all the signaling is done through TCP options&lt;br /&gt;
3/ The application sees a *fake* TCP socket usually called the &amp;quot;meta socket&amp;quot;. This socket then dispatches the data to send among the different TCP connections of the MPTCP connection (usually called subflows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TcpSocketBase&lt;br /&gt;
|-MpTcpSocketBase (this is the &amp;quot;meta socket&amp;quot;, a logical socket that dispatches the send buffer between the different MpTcpSubflows, and reorder the segments received on the different subflows for the application to see)&lt;br /&gt;
|&lt;br /&gt;
|-MpTcpSubflow (This is a copy/paste of TcpNewReno except that it handles MPTCP logic, add/pop options when necessary)&lt;br /&gt;
&lt;br /&gt;
4/ the standard demands that MPTCP should not be more greedy than TCP so there are congestion control algorithms specific to MPTCP. In the diff you just mptcp-cc-uncoupled. the way it's implemented, you subclass both MpTcpSocketBase and MpTcpSubflow into MpTcpSocketBaseUncoupled and MpTcpSubflowUncoupled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5/ the path management files/classes are not used in the implementation and they don't have the same meaning as in the linux kernel, these classes are meant to attribute the unique IDs for each possible subflow (as required by the standard). In the linux kernel, path management modules implement policies as to yes or no should the meta establishes a new subflow.&lt;br /&gt;
&lt;br /&gt;
6/ MPTCP has a global sequence number (to reassemble packets in order at the receiver) that is conveyed through a TCP option. Every TCP sequence number should be mapped to an &amp;quot;MPTCP sequence number&amp;quot;. There are strict rules concerning these mappings: once a mapping is sent, it can't be changed, the data has to be sent, resent even if it was received on another subflow etc... the mapping is responsible for much complexity of the code. It means a mapping can't be removed as long as the whole data has not been received, and the data can not be passed to the upper layer because there may be a checksum covering the whole mapping.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Features required from ns3:&lt;br /&gt;
- Need to decorralate Tcp sender unacknowledged head (SND.UNA) from TcpTxBuffer&lt;br /&gt;
- MPTCP demultiplexing is not done on the 5 tuple but on the key&lt;br /&gt;
embedded in the MPTCP capable option&lt;br /&gt;
- it should be possible to set a memory size for the Meta buffer and&lt;br /&gt;
to share this space with subflows, ie it should be possible for TCP&lt;br /&gt;
buffers&lt;br /&gt;
&lt;br /&gt;
One critical aspect of multipath protocols is the reordering problem that usually require larger buffer to get the same performance as single path protocols. The main challenge to simulate correctly MPTCP is to mimic linux buffer mechanisms (in my opinion).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nb: MPTCP has many mechanisms to deal with middleboxes and such but I don't believe they are interesting to have in ns3 which should be used to analyze the algorithmic part, thus none of the failure mechanims are implemented (e.g. fallback to TCP  in case the server is not MPTCP compliant etc...).&lt;br /&gt;
&lt;br /&gt;
== On the per node clock ==&lt;br /&gt;
I would like to start implementing per node clock to be able to simulate time distribution protocols. Right now nodes are all perfectly synchronized ins ns3 (they share the simulator clocks). My goal is to be able to run NTPD in ns3-dce over ns3 nodes with drifting clocks. Time distribution experimentations are hard to do in practice (do you control 2 or more stratum 1 NTP servers ? and the traffic between these), I believe it makes sens and I know of no simulator that does it. This proposition is a follow up of my email to the dev ml: http://network-simulator-ns-2.7690.n7.nabble.com/Addition-of-per-node-clocks-in-ns3-td29301.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Expected deliverables =&lt;br /&gt;
While working on the previous projects I also intend to send patches to improve some parts of the ns3 code (such as the waf upgrade I sent last week).&lt;br /&gt;
I plan to work during the first half on the MPTCP code and then on the per-node clock integration. The MPTCP code has the priority though since this is the most awaited feature I believe.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
I intend to validate MPTCP against DCE. This may require some synergy with the TCP validation project.&lt;br /&gt;
&lt;br /&gt;
== Week 1 - Step 1 ==&lt;br /&gt;
* Modify tcp-option.h to support MPTCP&lt;br /&gt;
* (de)Serialization of the numerous MPTCP options&lt;br /&gt;
&lt;br /&gt;
== Week 2 - Deliverable for Step 1; start of Step 2 ==&lt;br /&gt;
* Add MPTCP crypto&lt;br /&gt;
The following was the initial plan but it may be postponed:&lt;br /&gt;
* Adapt TcpSocketBase to be more flexible (making all function virtual, overload some functions with TcpHeaders parameters instead of flags etc...)&lt;br /&gt;
* Same for TcpXxBuffer&lt;br /&gt;
&lt;br /&gt;
== Week 3 - Step 2 ==&lt;br /&gt;
* Addition of test scripts, to trace buffers&lt;br /&gt;
&lt;br /&gt;
== Week 4 - Step 2 ==&lt;br /&gt;
* put DCE infrastructure into place&lt;br /&gt;
&lt;br /&gt;
== Week 5 - Deliverable for Step2 and Step 3 ==&lt;br /&gt;
* Implement linux MPTCP schedulers to be able to compare&lt;br /&gt;
* Implement OLIA/LIA congestion controls&lt;br /&gt;
&lt;br /&gt;
== Week 6 - Step 3 ==&lt;br /&gt;
* MPTCP may still need some polishing at this point&lt;br /&gt;
&lt;br /&gt;
== Week 7 - Deliverable for Step 3; start of Step 4 ==&lt;br /&gt;
* Addition of a Clock m_clock member in each Node.&lt;br /&gt;
** (Peter) Consider adding the clock by aggregation instead.  I haven't thought this through, but I think aggregation will make it easier to manipulate the clock through the Config system, for example.&lt;br /&gt;
* Addition of a perfect clock (default behavior won't change)&lt;br /&gt;
* Addition of a drifting clock with initial offset&lt;br /&gt;
&lt;br /&gt;
== Week 8 - Step 4 ==&lt;br /&gt;
* making ntpd work in DCE&lt;br /&gt;
&lt;br /&gt;
== Week 9 - Step 4 ==&lt;br /&gt;
* making ntpd work in DCE (indeed: that looks complex)&lt;br /&gt;
&lt;br /&gt;
== Week 10 - Step 4 and Deliverables for Step 3 and 4 ==&lt;br /&gt;
* test the whole thing&lt;br /&gt;
* Add some tests/documentation&lt;br /&gt;
&lt;br /&gt;
= Weekly progress =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - Step 1 ==&lt;br /&gt;
&lt;br /&gt;
Sticking the plan In summary, this week has delivered the following:&lt;br /&gt;
&lt;br /&gt;
   - (de)Serialization of the 7/8 mptcp options with their documentation&lt;br /&gt;
   - Associated testsuite&lt;br /&gt;
&lt;br /&gt;
The implementation of these message can found on the repository[1].For more&lt;br /&gt;
details check wiki[2].&lt;br /&gt;
During next week, while waiting for a clearer schedule over the mptcp&lt;br /&gt;
work I plan to:&lt;br /&gt;
&lt;br /&gt;
   - Add the pending mptcp crypto testsuite (depends on the discussion)&lt;br /&gt;
   - Continue the work I've started in background over netlink export&lt;br /&gt;
from DCE. This is something I've started long ago but it proves quite&lt;br /&gt;
difficult, since wireshark can't dissect raw netlink, it expects it to&lt;br /&gt;
be contained within a &amp;quot;cooked linux&amp;quot; header that libpcap generates but&lt;br /&gt;
not DCE (yet). Current DCE netlink implementation does not work with&lt;br /&gt;
NTPd, that's why I look into it. (Netlink is the linux communication&lt;br /&gt;
protocol between kernel and userspace).&lt;br /&gt;
   - Send some patches to DCE to support ntpd&lt;br /&gt;
&lt;br /&gt;
[1] https://github.com/teto/ns-3-dev-git/tree/mptcp_options&lt;br /&gt;
[2] https://www.nsnam.org/wiki/GSOC2015MpTcpImplementation#Expected_deliverables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 2 - Step 2 ==&lt;br /&gt;
This week has delivered the following:&lt;br /&gt;
&lt;br /&gt;
  - Generation of MPTCP token/initial sequence data number based on libgcrypt when available or an ns3 implementation not compliant with the standard). waf configure seems to detect correctly libgcrypt but it does not seem to pass on the -DENABLE_CRYPTO flag. This is something I have to look into &lt;br /&gt;
  - Associated testsuite&lt;br /&gt;
  - Generated a diff of the MPTCP implementation against ns3.19 to help reviewers get a feeling of the architecture.&lt;br /&gt;
  - I also got more understanding of a DCE bug [0] . &lt;br /&gt;
&lt;br /&gt;
The implementation of these message can found on the repository[1]. For more details check wiki[2]. This week end got surprisingly hectic for me so I did not have the time to clean my DCE tree, for next week:&lt;br /&gt;
&lt;br /&gt;
  - I have good hope to find &amp;amp; fix my DCE bug. Once this is done, I will have a respectable amount of code to clean and push.&lt;br /&gt;
  - Fix the ENABLE_CRYPTO flag detection&lt;br /&gt;
  - Review and maybe merge nat's code&lt;br /&gt;
  - Try to generate mptcp graphs with DCE + linux kernel&lt;br /&gt;
&lt;br /&gt;
[0] https://github.com/direct-code-execution/ns-3-dce/issues/2 &amp;lt;br /&amp;gt;&lt;br /&gt;
[1] https://github.com/teto/ns-3-dev-git/tree/libcrypto &amp;lt;br /&amp;gt;&lt;br /&gt;
[2] https://www.nsnam.org/wiki/GSOC2015MpTcpImplementation#Expected_deliverables &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final review ==&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Python3&amp;diff=9572</id>
		<title>Python3</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Python3&amp;diff=9572"/>
		<updated>2015-06-03T21:25:48Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Tasks */ raise upload.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This page is tracking Python3 compatibility for ns-3 and related projects.  As of ns-3.23 (May 2015), only Python2 (2.7 series) is supported.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
Make ns-3 and related projects (bake build system, pyviz visualizer) compatible with both Python 2.7 and 3.4.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
The following ports for basic ns-3 operation need to be accomplished (if found incompatible with Python3):&lt;br /&gt;
&lt;br /&gt;
# All scripts for the waf build system (waf-tools, wutils.py, etc.)&lt;br /&gt;
# All ns-3 python programs (e.g. first.py) &lt;br /&gt;
# src/visualizer &lt;br /&gt;
# The test.py test runner program &lt;br /&gt;
# All python programs in the documentation directories (e.g. conf.py)&lt;br /&gt;
# All scripts in ns-3-allinone (build.py dist.py download.py)&lt;br /&gt;
# src/create-module.py&lt;br /&gt;
# utils.py&lt;br /&gt;
# utils/check-style.py&lt;br /&gt;
# utils/grid.py&lt;br /&gt;
# utils/python-unit-tests.py&lt;br /&gt;
&lt;br /&gt;
[[User:Pdbarnes|Pdbarnes]] ([[User talk:Pdbarnes|talk]]) ''What about the Rietveld'' upload.py ''script used for code review?  This is their [https://github.com/rietveld-codereview/rietveld/issues/486 issue #486]''&lt;br /&gt;
&lt;br /&gt;
Also, the bake build system must be ported.&lt;br /&gt;
&lt;br /&gt;
Also, the Python API scanning process needs to be upgraded.  This relies on third party tools (particularly [https://github.com/gccxml/pygccxml pygccxml] and [https://code.google.com/p/pybindgen/ pybindgen]) that need to be investigated.&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
The most recent code is maintained at http://code.nsnam.org/tomh/ns-3-dev-python3/ until we merge it.  A [[Python3_Project | summer project from 2014]] by Siddharth Sankurtar has accomplished much of the initial port of ns-3 portions (above) to Python-3.3.5; the above repository includes Siddharth's previous work on this.&lt;br /&gt;
&lt;br /&gt;
One of the goals of ns-3.24 release is to at least get to compatibility of the core of ns-3, even if bake and python scanning does not yet work.&lt;br /&gt;
&lt;br /&gt;
There are three main remaining issues (patches requested for 1) and 2)):&lt;br /&gt;
&lt;br /&gt;
1.  Something has broken in moving from Python 3.3 to Python 3.4&lt;br /&gt;
&lt;br /&gt;
  _pickle.PicklingError: Can't pickle &amp;lt;class 'waflib.Node.Context.__init__.&amp;lt;locals&amp;gt;.node_class'&amp;gt;: attribute lookup   &lt;br /&gt;
  Context.__init__.&amp;lt;locals&amp;gt;.node_class on waflib.Node failed&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
      os.chmod(dst, 0600)&lt;br /&gt;
                     ^&lt;br /&gt;
  SyntaxError: invalid token&lt;br /&gt;
&lt;br /&gt;
2.  In python 3.3, the following issue was encountered and not debugged yet.&lt;br /&gt;
&lt;br /&gt;
During the first build phase, waf generates signatures for every task. Upon successful completion of the task, the signature of the task is stored into a hidden file in the build directory. The task signatures are serialized using the Pickle library.&lt;br /&gt;
&lt;br /&gt;
Following builds after this would load the task signatures from the hidden file. For every task, it generates its signature and checks if it is present in the dictionary of the loaded task signatures. In case of Python3, for some tasks, the newly generated signature fails to match with the loaded signature, causing a KeyError and consequently a re-building of that task. The issue possibly lies in the signature generation in Python3.&lt;br /&gt;
&lt;br /&gt;
3.  Siddharth has written some test programs to test waf and test.py themselves; do we want to add them to a test directory?  See:&lt;br /&gt;
&lt;br /&gt;
* utils/tests/TestBase.py&lt;br /&gt;
* utils/tests/test-test.py&lt;br /&gt;
* utils/tests/test-waf.py&lt;br /&gt;
&lt;br /&gt;
Also, beyond basic ns-3, we need volunteers to work on these additional issues:&lt;br /&gt;
&lt;br /&gt;
* Siddharth Santurkar has volunteered to port bake&lt;br /&gt;
* We don't have anyone working on Python API scanning toolchain (please contact us if you want to work on this)&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
The latest ns-3 code is available at http://code.nsnam.org/tomh/ns-3-dev-python3&lt;br /&gt;
&lt;br /&gt;
Python3 can be tested on most Linux systems using the [http://docs.python-guide.org/en/latest/dev/virtualenvs/ virtualenv] system.&lt;br /&gt;
&lt;br /&gt;
If you have 'pip' installed, you can install virtualenv as follows:&lt;br /&gt;
&lt;br /&gt;
  $ sudo pip install virtualenv&lt;br /&gt;
&lt;br /&gt;
Then, the following steps are recommended:&lt;br /&gt;
&lt;br /&gt;
  $ mkdir my_project_folder &amp;amp;&amp;amp; cd $_&lt;br /&gt;
  $ hg clone http://code.nsnam.org/ns-3-allinone&lt;br /&gt;
  $ cd ns-3-allinone&lt;br /&gt;
  $ /usr/bin/python2.7 download.py&lt;br /&gt;
  $ hg clone http://code.nsnam.org/tomh/ns-3-dev-python3&lt;br /&gt;
  $ virtualenv -p /usr/bin/python3 venv&lt;br /&gt;
  $ source venv/bin/activate&lt;br /&gt;
&lt;br /&gt;
Your prompt should now look like this, prepended with '(venv)':&lt;br /&gt;
&lt;br /&gt;
  (venv)buildslave@slave-ubuntu-15:~/my_project_folder/ns-3-allinone$&lt;br /&gt;
&lt;br /&gt;
Now you are in a special environment for which any calls to 'python' will use the python3 version.  To see this, try calling:&lt;br /&gt;
&lt;br /&gt;
  (venv)buildslave@slave-ubuntu-15:~/my_project_folder/ns-3-allinone$ python -V&lt;br /&gt;
&lt;br /&gt;
To drop out of this virtualenv, type:&lt;br /&gt;
&lt;br /&gt;
  $ deactivate&lt;br /&gt;
&lt;br /&gt;
You may also consider to run the test-test.py and test-waf.py programs (which unit test the test.py and waf programs and their options) found in ``utils/tests/`` directory.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2015MpTcpImplementation&amp;diff=9471</id>
		<title>GSOC2015MpTcpImplementation</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2015MpTcpImplementation&amp;diff=9471"/>
		<updated>2015-05-01T16:28:44Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Week 7 - Deliverable for Step 3; start of Step 4 */ aggregate clock, instead of member variable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.&lt;br /&gt;
== Project overview ==&lt;br /&gt;
* '''Project:''' Implementation of MPTCP (Multipath TCP) + Implementation of per-node clocks&lt;br /&gt;
* '''Student:'''  Matthieu Coudron&lt;br /&gt;
* '''Mentors:'''  [mailto:tomh@tomh.org Tom Henderson]&lt;br /&gt;
* '''Code:''' In a repository not so far away... (to come)&lt;br /&gt;
* '''About me:''' I am a PhD student working on multipath communications. I have a background in network and system security.&lt;br /&gt;
&lt;br /&gt;
== On the MPTCP subject ==&lt;br /&gt;
&lt;br /&gt;
Thanks to last year TCP option gsoc, it is possible to implement multipath TCP - an extension to TCP that is more and more popular (used in Apple voice recognition system &amp;quot;SIRI&amp;quot;, embedded in yosemite, some Citrix products, soon to be embedded in Proximus products) - in a clean way.&lt;br /&gt;
MPTCP is available in some (possibly out of branch) kernels - Linux, Mac OS, FreeBSD - and work even with adversary middleboxes (Contrary to SCTP), which was an important challenge.&lt;br /&gt;
The 2nd challenge is still pending, ie, how to make the best usage of the path diversity ? How to be better than TCP without being more aggressive than TCP at bottlenecks ? I hope that being able to run MPTCP in a simulator could foster research on that peculiar subject since doing it with kernel code or creating a multihomed (3G/wired) setup can be complex (MPTCP kernel code is being refactored, and implementation is quite time consuming). There is no solution in the literature that answers this in a robust way.&lt;br /&gt;
&lt;br /&gt;
== On the per node clock ==&lt;br /&gt;
I would like to start implementing per node clock to be able to simulate time distribution protocols. Right now nodes are all perfectly synchronized ins ns3 (they share the simulator clocks). My goal is to be able to run NTPD in ns3-dce over ns3 nodes with drifting clocks. Time distribution experimentations are hard to do in practice (do you control 2 or more stratum 1 NTP servers ? and the traffic between these), I believe it makes sens and I know of no simulator that does it. This proposition is a follow up of my email to the dev ml: http://network-simulator-ns-2.7690.n7.nabble.com/Addition-of-per-node-clocks-in-ns3-td29301.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Expected deliverables =&lt;br /&gt;
While working on the previous projects I also intend to send patches to improve some parts of the ns3 code (such as the waf upgrade I sent last week).&lt;br /&gt;
I plan to work during the first half on the MPTCP code and then on the per-node clock integration. The MPTCP code has the priority though since this is the most awaited feature I believe.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
I intend to validate MPTCP against DCE. This may require some synergy with the TCP validation project.&lt;br /&gt;
&lt;br /&gt;
== Week 1 - Step 1 ==&lt;br /&gt;
* Modify tcp-option.h to support MPTCP&lt;br /&gt;
* (de)Serialization of the numerous MPTCP options&lt;br /&gt;
&lt;br /&gt;
== Week 2 - Deliverable for Step 1; start of Step 2 ==&lt;br /&gt;
* Adapt TcpSocketBase to be more flexible (making all function virtual, overload some functions with TcpHeaders parameters instead of flags etc...)&lt;br /&gt;
* Same for TcpXxBuffer&lt;br /&gt;
&lt;br /&gt;
== Week 3 - Step 2 ==&lt;br /&gt;
* Addition of test scripts, to trace buffers&lt;br /&gt;
&lt;br /&gt;
== Week 4 - Step 2 ==&lt;br /&gt;
* put DCE infrastructure into place&lt;br /&gt;
&lt;br /&gt;
== Week 5 - Deliverable for Step2 and Step 3 ==&lt;br /&gt;
* Implement linux MPTCP schedulers to be able to compare&lt;br /&gt;
* Implement OLIA/LIA congestion controls&lt;br /&gt;
&lt;br /&gt;
== Week 6 - Step 3 ==&lt;br /&gt;
* MPTCP may still need some polishing at this point&lt;br /&gt;
&lt;br /&gt;
== Week 7 - Deliverable for Step 3; start of Step 4 ==&lt;br /&gt;
* Addition of a Clock m_clock member in each Node.&lt;br /&gt;
** (Peter) Consider adding the clock by aggregation instead.  I haven't thought this through, but I think aggregation will make it easier to manipulate the clock through the Config system, for example.&lt;br /&gt;
* Addition of a perfect clock (default behavior won't change)&lt;br /&gt;
* Addition of a drifting clock with initial offset&lt;br /&gt;
&lt;br /&gt;
== Week 8 - Step 4 ==&lt;br /&gt;
* making ntpd work in DCE&lt;br /&gt;
&lt;br /&gt;
== Week 9 - Step 4 ==&lt;br /&gt;
* making ntpd work in DCE (indeed: that looks complex)&lt;br /&gt;
&lt;br /&gt;
== Week 10 - Step 4 and Deliverables for Step 3 and 4 ==&lt;br /&gt;
* test the whole thing&lt;br /&gt;
* Add some tests/documentation&lt;br /&gt;
&lt;br /&gt;
= Weekly progress =&lt;br /&gt;
&lt;br /&gt;
== Final review ==&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Sprints&amp;diff=9055</id>
		<title>Sprints</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Sprints&amp;diff=9055"/>
		<updated>2014-09-26T19:21:40Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* How to build Doxygen for ns-3 and find the errors */ formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= What is a sprint? =&lt;br /&gt;
&lt;br /&gt;
A sprint is a scheduled time for ns-3 contributors to gather and focus their undivided attention on improving the code, documentation, or tests. &lt;br /&gt;
&lt;br /&gt;
Sprints are open to anyone, and are conducted on IRC, and if needed, other virtual meeting technologies.  &lt;br /&gt;
* IRC channel is '''#ns-3''' at irc.freenode.net&lt;br /&gt;
&lt;br /&gt;
The [https://code.djangoproject.com/wiki/Sprints Django project] has a good reference and links to some presentations all about coding sprints.&lt;br /&gt;
&lt;br /&gt;
A summary of the results of sprints will be shared with other developers on the ns-developers mailing list.&lt;br /&gt;
&lt;br /&gt;
= Upcoming sprints =&lt;br /&gt;
&lt;br /&gt;
== Friday October 3, 14h00-20h00 UTC ==&lt;br /&gt;
('''note:'''  attendees are welcome to attend a subset of the 6-hour slot, if so desired)&lt;br /&gt;
* '''Etherpad:''' http://etherpad.osuosl.org/gMofL8fupm&lt;br /&gt;
* '''Topic:'''  Documentation improvement.  https://www.nsnam.org/bugzilla/show_bug.cgi?id=938.  In particular, we will work on reducing the number of doxygen warnings that are generated due to missing Doxygen.  This is a long-standing issue that just requires group effort to resolve.&lt;br /&gt;
* '''Organizer:''' [mailto:tomhend@u.washington.edu Tom Henderson]&lt;br /&gt;
* '''Preparation:'''&lt;br /&gt;
*# Read the general preparation below&lt;br /&gt;
*# Make sure you have Doxygen installed on your system, and can run the shell script &amp;lt;tt&amp;gt;doc/doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; (it may take a while to run, and should generate a lot of warnings). &lt;br /&gt;
*# Review this link about building doxygen, and filtering for output that you care about:  http://www.nsnam.org/docs/manual/html/documentation.html#building-doxygen-docs&lt;br /&gt;
*# Review this link for ns-3 specific formatting:  http://www.nsnam.org/docs/manual/html/documentation.html#id1&lt;br /&gt;
*# Contact ns-3-users mailing list or the organizer for help if you have trouble with the above&lt;br /&gt;
* '''Tasks:'''  &lt;br /&gt;
: Fix as many of the doxygen warnings as we can.  A current count of warnings (by module) can be seen here:  http://mailman.isi.edu/pipermail/ns-commits/2014-September/015625.html.  There is a full log generated that can be used to identify what is the error, and then it can be fixed with a text editor.  How this is planned to work is that contributors who show up will choose a file or set of files (that they are comfortable with documenting) and will try to clear the errors in that file, producing a patch that can be merged to ns-3-dev.&lt;br /&gt;
*  '''Coordination:'''  We will use IRC and [http://etherpad.org Etherpad] to coordinate the work (make sure multiple people do not work on the same file).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to build Doxygen for ns-3 and find the errors ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  Use mercurial to check out the current copy of ns-3 (see the tutorial if you don't know how to do this):&lt;br /&gt;
*  You must also have [http://doxygen.org Doxygen] installed on your machine.&lt;br /&gt;
&lt;br /&gt;
Once you have an &amp;lt;tt&amp;gt;ns-3-dev/&amp;lt;/tt&amp;gt; directory, take these steps:&lt;br /&gt;
&lt;br /&gt;
    $ ./waf configure --enable-examples --enable-tests&lt;br /&gt;
    $ ./waf build&lt;br /&gt;
&lt;br /&gt;
Then, run the script &amp;lt;tt&amp;gt;doc/doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; from the &amp;lt;tt&amp;gt;ns-3-dev&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh&lt;br /&gt;
&lt;br /&gt;
This will produce lots of summary statistics like:&lt;br /&gt;
&lt;br /&gt;
  Warnings by module/directory:&lt;br /&gt;
  &lt;br /&gt;
  Count Directory&lt;br /&gt;
  ----- ----------------------------------&lt;br /&gt;
   3219 src/lte/model&lt;br /&gt;
   1173 src/wimax/model&lt;br /&gt;
   1066 src/core/model&lt;br /&gt;
    646 src/lte/test&lt;br /&gt;
    518 src/wifi/model&lt;br /&gt;
    ... &lt;br /&gt;
&lt;br /&gt;
Once this is complete, you can use the &amp;lt;tt&amp;gt;doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; script to focus on one module or file.  To see just the errors from one module, for example &amp;lt;tt&amp;gt;wifi&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -s -m wifi&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; option skips the doxygen run, and just reports results &lt;br /&gt;
from the existing warnings log.  Obviously, if you want to see the results of your edits, &lt;br /&gt;
you would omit the &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; option.  The &amp;lt;tt&amp;gt;-m &amp;lt;module&amp;gt;&amp;lt;/tt&amp;gt; option only shows &lt;br /&gt;
results from the &amp;lt;tt&amp;gt;./src/&amp;lt;module&amp;gt;&amp;lt;/tt&amp;gt; module; after printing the&lt;br /&gt;
warnings counts by file, it shows the actual errors from each file:&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  Filtered Warnings&lt;br /&gt;
  ========================================&lt;br /&gt;
  src/wifi/examples/wifi-phy-test.cc:53: warning: Compound PsrExperiment::Output is not documented.&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
This means the type (probably a struct) &amp;lt;tt&amp;gt;PsrExperiment::Output&amp;lt;/tt&amp;gt; has no documentation,&lt;br /&gt;
and it's declared in &amp;lt;tt&amp;gt;src/wifi/examples/wifi-phy-test.cc&amp;lt;/tt&amp;gt; around line 53.&lt;br /&gt;
&lt;br /&gt;
To see just the warnings from a single file (or a set of files matching a regular expression)&lt;br /&gt;
use the &amp;lt;tt&amp;gt;-F &amp;lt;file-name-or-regex&amp;gt;&amp;lt;/tt&amp;gt; option:  &lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -s -F &amp;quot;block-ack.*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== How to add documentation during the sprint ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you find the list of files and look at the possible errors to fix, feel free to join the chat and request to take a module or file and fix it, and we will list it on the [http://etherpad.osuosl.org/gMofL8fupm Etherpad] as being taken.  While all docs are valuable, &lt;br /&gt;
we should probably focus on code in the model/ directories, then helpers/, examples/, and finally test/.&lt;br /&gt;
&lt;br /&gt;
To add doxygen documentation, please follow the [http://www.nsnam.org/docs/manual/html/documentation.html#id1 ns-3 Specifics] guidelines.&lt;br /&gt;
&lt;br /&gt;
Don't be surprised if you fix one warning and more appear!  If a struct, class or function &lt;br /&gt;
has no documentation, doxygen reports a single &amp;quot;is not documented&amp;quot; error.  Once that object&lt;br /&gt;
has documentation, then doxygen will examine it in detail and report additional warnings.&lt;br /&gt;
For example, a function with no documentation will generate one warning.  Adding documentation&lt;br /&gt;
''about the function itself'' will fix that warning, but then generate warnings for each of the &lt;br /&gt;
function parameters and return value, until those are also documented.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it's not enough just ''write'' documentation; you also have to test it. &lt;br /&gt;
(Documentation has bugs too!)  Just rerun the &amp;lt;tt&amp;gt;doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; script without the &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -m &amp;lt;module&amp;gt; # or -F &amp;lt;file-name-or-regex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(BTW, without &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; the script will always build all the doxygen; &lt;br /&gt;
the &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-F&amp;lt;/tt&amp;gt; options only&lt;br /&gt;
affect what it displays from the resulting &amp;lt;tt&amp;gt;doxygen.warnings.log&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Once the script completes, load up the docs in your browser and check that it looks as you &lt;br /&gt;
intended/you didn't mistype some doxygen syntax:&lt;br /&gt;
&lt;br /&gt;
  $ firefox doc/html/index.html &amp;amp;&lt;br /&gt;
&lt;br /&gt;
As in all code development:  wash, rinse, repeat, or, in this case:&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -m &amp;lt;module&amp;gt;&lt;br /&gt;
  [edit, edit, edit]&lt;br /&gt;
  $ firefox doc/html/index.html &amp;amp;&lt;br /&gt;
&lt;br /&gt;
=== How to contribute your docs ===&lt;br /&gt;
&lt;br /&gt;
Once you have fixed a file, you may create a patch such as follows:&lt;br /&gt;
&lt;br /&gt;
  $ hg diff file-you-have-fixed.h &amp;gt; file-you-have-fixed.h.patch&lt;br /&gt;
&lt;br /&gt;
and upload it to [https://www.nsnam.org/bugzilla/show_bug.cgi?id=938 bug 938] or email it to one of the maintainers participating in the sprint (you can ask on IRC about it).&lt;br /&gt;
&lt;br /&gt;
== General preparation ==&lt;br /&gt;
&lt;br /&gt;
* Make sure that you can join the IRC channel in advance&lt;br /&gt;
* Make sure you can checkout the development version of ns-3 (we will use ns-3-dev)&lt;br /&gt;
* Familiarize yourself with how to [http://www.nsnam.org/developers/contributing-code/submit/ generate a patch] against ns-3-dev.  Patches you write can be uploaded to Bugzilla or sent to one of the maintainers.&lt;br /&gt;
&lt;br /&gt;
== Once you're there ==&lt;br /&gt;
&lt;br /&gt;
* Check in on IRC by letting others know that you've joined and are ready to contribute, and a maintainer will go from there&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Sprints&amp;diff=9054</id>
		<title>Sprints</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Sprints&amp;diff=9054"/>
		<updated>2014-09-26T19:20:43Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* How to build Doxygen for ns-3 and find the errors */ fix output block formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= What is a sprint? =&lt;br /&gt;
&lt;br /&gt;
A sprint is a scheduled time for ns-3 contributors to gather and focus their undivided attention on improving the code, documentation, or tests. &lt;br /&gt;
&lt;br /&gt;
Sprints are open to anyone, and are conducted on IRC, and if needed, other virtual meeting technologies.  &lt;br /&gt;
* IRC channel is '''#ns-3''' at irc.freenode.net&lt;br /&gt;
&lt;br /&gt;
The [https://code.djangoproject.com/wiki/Sprints Django project] has a good reference and links to some presentations all about coding sprints.&lt;br /&gt;
&lt;br /&gt;
A summary of the results of sprints will be shared with other developers on the ns-developers mailing list.&lt;br /&gt;
&lt;br /&gt;
= Upcoming sprints =&lt;br /&gt;
&lt;br /&gt;
== Friday October 3, 14h00-20h00 UTC ==&lt;br /&gt;
('''note:'''  attendees are welcome to attend a subset of the 6-hour slot, if so desired)&lt;br /&gt;
* '''Etherpad:''' http://etherpad.osuosl.org/gMofL8fupm&lt;br /&gt;
* '''Topic:'''  Documentation improvement.  https://www.nsnam.org/bugzilla/show_bug.cgi?id=938.  In particular, we will work on reducing the number of doxygen warnings that are generated due to missing Doxygen.  This is a long-standing issue that just requires group effort to resolve.&lt;br /&gt;
* '''Organizer:''' [mailto:tomhend@u.washington.edu Tom Henderson]&lt;br /&gt;
* '''Preparation:'''&lt;br /&gt;
*# Read the general preparation below&lt;br /&gt;
*# Make sure you have Doxygen installed on your system, and can run the shell script &amp;lt;tt&amp;gt;doc/doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; (it may take a while to run, and should generate a lot of warnings). &lt;br /&gt;
*# Review this link about building doxygen, and filtering for output that you care about:  http://www.nsnam.org/docs/manual/html/documentation.html#building-doxygen-docs&lt;br /&gt;
*# Review this link for ns-3 specific formatting:  http://www.nsnam.org/docs/manual/html/documentation.html#id1&lt;br /&gt;
*# Contact ns-3-users mailing list or the organizer for help if you have trouble with the above&lt;br /&gt;
* '''Tasks:'''  &lt;br /&gt;
: Fix as many of the doxygen warnings as we can.  A current count of warnings (by module) can be seen here:  http://mailman.isi.edu/pipermail/ns-commits/2014-September/015625.html.  There is a full log generated that can be used to identify what is the error, and then it can be fixed with a text editor.  How this is planned to work is that contributors who show up will choose a file or set of files (that they are comfortable with documenting) and will try to clear the errors in that file, producing a patch that can be merged to ns-3-dev.&lt;br /&gt;
*  '''Coordination:'''  We will use IRC and [http://etherpad.org Etherpad] to coordinate the work (make sure multiple people do not work on the same file).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to build Doxygen for ns-3 and find the errors ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  Use mercurial to check out the current copy of ns-3 (see the tutorial if you don't know how to do this):&lt;br /&gt;
*  You must also have [http://doxygen.org Doxygen] installed on your machine.&lt;br /&gt;
&lt;br /&gt;
Once you have an &amp;lt;tt&amp;gt;ns-3-dev/&amp;lt;/tt&amp;gt; directory, take these steps:&lt;br /&gt;
&lt;br /&gt;
    $ ./waf configure --enable-examples --enable-tests&lt;br /&gt;
    $ ./waf build&lt;br /&gt;
&lt;br /&gt;
Then, run the script &amp;lt;tt&amp;gt;doc/doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; from the &amp;lt;tt&amp;gt;ns-3-dev&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh&lt;br /&gt;
&lt;br /&gt;
This will produce lots of summary statistics like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  Warnings by module/directory:&lt;br /&gt;
  &lt;br /&gt;
  Count Directory&lt;br /&gt;
  ----- ----------------------------------&lt;br /&gt;
   3219 src/lte/model&lt;br /&gt;
   1173 src/wimax/model&lt;br /&gt;
   1066 src/core/model&lt;br /&gt;
    646 src/lte/test&lt;br /&gt;
    518 src/wifi/model&lt;br /&gt;
    ... &lt;br /&gt;
&lt;br /&gt;
Once this is complete, you can use the &amp;lt;tt&amp;gt;doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; script to focus on one module or file.  To see just the errors from one module, for example &amp;lt;tt&amp;gt;wifi&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -s -m wifi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; option skips the doxygen run, and just reports results &lt;br /&gt;
from the existing warnings log.  Obviously, if you want to see the results of your edits, &lt;br /&gt;
you would omit the &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; option.  The &amp;lt;tt&amp;gt;-m &amp;lt;module&amp;gt;&amp;lt;/tt&amp;gt; option only shows &lt;br /&gt;
results from the &amp;lt;tt&amp;gt;./src/&amp;lt;module&amp;gt;&amp;lt;/tt&amp;gt; module; after printing the&lt;br /&gt;
warnings counts by file, it shows the actual errors from each file:&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  Filtered Warnings&lt;br /&gt;
  ========================================&lt;br /&gt;
  src/wifi/examples/wifi-phy-test.cc:53: warning: Compound PsrExperiment::Output is not documented.&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This means the type (probably a struct) &amp;lt;tt&amp;gt;PsrExperiment::Output&amp;lt;/tt&amp;gt; has no documentation,&lt;br /&gt;
and it's declared in &amp;lt;tt&amp;gt;src/wifi/examples/wifi-phy-test.cc&amp;lt;/tt&amp;gt; around line 53.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see just the warnings from a single file (or a set of files matching a regular expression)&lt;br /&gt;
use the &amp;lt;tt&amp;gt;-F &amp;lt;file-name-or-regex&amp;gt;&amp;lt;/tt&amp;gt; option:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -s -F &amp;quot;block-ack.*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== How to add documentation during the sprint ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you find the list of files and look at the possible errors to fix, feel free to join the chat and request to take a module or file and fix it, and we will list it on the [http://etherpad.osuosl.org/gMofL8fupm Etherpad] as being taken.  While all docs are valuable, &lt;br /&gt;
we should probably focus on code in the model/ directories, then helpers/, examples/, and finally test/.&lt;br /&gt;
&lt;br /&gt;
To add doxygen documentation, please follow the [http://www.nsnam.org/docs/manual/html/documentation.html#id1 ns-3 Specifics] guidelines.&lt;br /&gt;
&lt;br /&gt;
Don't be surprised if you fix one warning and more appear!  If a struct, class or function &lt;br /&gt;
has no documentation, doxygen reports a single &amp;quot;is not documented&amp;quot; error.  Once that object&lt;br /&gt;
has documentation, then doxygen will examine it in detail and report additional warnings.&lt;br /&gt;
For example, a function with no documentation will generate one warning.  Adding documentation&lt;br /&gt;
''about the function itself'' will fix that warning, but then generate warnings for each of the &lt;br /&gt;
function parameters and return value, until those are also documented.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it's not enough just ''write'' documentation; you also have to test it. &lt;br /&gt;
(Documentation has bugs too!)  Just rerun the &amp;lt;tt&amp;gt;doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; script without the &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -m &amp;lt;module&amp;gt; # or -F &amp;lt;file-name-or-regex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(BTW, without &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; the script will always build all the doxygen; &lt;br /&gt;
the &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-F&amp;lt;/tt&amp;gt; options only&lt;br /&gt;
affect what it displays from the resulting &amp;lt;tt&amp;gt;doxygen.warnings.log&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Once the script completes, load up the docs in your browser and check that it looks as you &lt;br /&gt;
intended/you didn't mistype some doxygen syntax:&lt;br /&gt;
&lt;br /&gt;
  $ firefox doc/html/index.html &amp;amp;&lt;br /&gt;
&lt;br /&gt;
As in all code development:  wash, rinse, repeat, or, in this case:&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -m &amp;lt;module&amp;gt;&lt;br /&gt;
  [edit, edit, edit]&lt;br /&gt;
  $ firefox doc/html/index.html &amp;amp;&lt;br /&gt;
&lt;br /&gt;
=== How to contribute your docs ===&lt;br /&gt;
&lt;br /&gt;
Once you have fixed a file, you may create a patch such as follows:&lt;br /&gt;
&lt;br /&gt;
  $ hg diff file-you-have-fixed.h &amp;gt; file-you-have-fixed.h.patch&lt;br /&gt;
&lt;br /&gt;
and upload it to [https://www.nsnam.org/bugzilla/show_bug.cgi?id=938 bug 938] or email it to one of the maintainers participating in the sprint (you can ask on IRC about it).&lt;br /&gt;
&lt;br /&gt;
== General preparation ==&lt;br /&gt;
&lt;br /&gt;
* Make sure that you can join the IRC channel in advance&lt;br /&gt;
* Make sure you can checkout the development version of ns-3 (we will use ns-3-dev)&lt;br /&gt;
* Familiarize yourself with how to [http://www.nsnam.org/developers/contributing-code/submit/ generate a patch] against ns-3-dev.  Patches you write can be uploaded to Bugzilla or sent to one of the maintainers.&lt;br /&gt;
&lt;br /&gt;
== Once you're there ==&lt;br /&gt;
&lt;br /&gt;
* Check in on IRC by letting others know that you've joined and are ready to contribute, and a maintainer will go from there&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Sprints&amp;diff=9053</id>
		<title>Sprints</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Sprints&amp;diff=9053"/>
		<updated>2014-09-26T19:19:19Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Upcoming sprints */ revise documentation instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= What is a sprint? =&lt;br /&gt;
&lt;br /&gt;
A sprint is a scheduled time for ns-3 contributors to gather and focus their undivided attention on improving the code, documentation, or tests. &lt;br /&gt;
&lt;br /&gt;
Sprints are open to anyone, and are conducted on IRC, and if needed, other virtual meeting technologies.  &lt;br /&gt;
* IRC channel is '''#ns-3''' at irc.freenode.net&lt;br /&gt;
&lt;br /&gt;
The [https://code.djangoproject.com/wiki/Sprints Django project] has a good reference and links to some presentations all about coding sprints.&lt;br /&gt;
&lt;br /&gt;
A summary of the results of sprints will be shared with other developers on the ns-developers mailing list.&lt;br /&gt;
&lt;br /&gt;
= Upcoming sprints =&lt;br /&gt;
&lt;br /&gt;
== Friday October 3, 14h00-20h00 UTC ==&lt;br /&gt;
('''note:'''  attendees are welcome to attend a subset of the 6-hour slot, if so desired)&lt;br /&gt;
* '''Etherpad:''' http://etherpad.osuosl.org/gMofL8fupm&lt;br /&gt;
* '''Topic:'''  Documentation improvement.  https://www.nsnam.org/bugzilla/show_bug.cgi?id=938.  In particular, we will work on reducing the number of doxygen warnings that are generated due to missing Doxygen.  This is a long-standing issue that just requires group effort to resolve.&lt;br /&gt;
* '''Organizer:''' [mailto:tomhend@u.washington.edu Tom Henderson]&lt;br /&gt;
* '''Preparation:'''&lt;br /&gt;
*# Read the general preparation below&lt;br /&gt;
*# Make sure you have Doxygen installed on your system, and can run the shell script &amp;lt;tt&amp;gt;doc/doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; (it may take a while to run, and should generate a lot of warnings). &lt;br /&gt;
*# Review this link about building doxygen, and filtering for output that you care about:  http://www.nsnam.org/docs/manual/html/documentation.html#building-doxygen-docs&lt;br /&gt;
*# Review this link for ns-3 specific formatting:  http://www.nsnam.org/docs/manual/html/documentation.html#id1&lt;br /&gt;
*# Contact ns-3-users mailing list or the organizer for help if you have trouble with the above&lt;br /&gt;
* '''Tasks:'''  &lt;br /&gt;
: Fix as many of the doxygen warnings as we can.  A current count of warnings (by module) can be seen here:  http://mailman.isi.edu/pipermail/ns-commits/2014-September/015625.html.  There is a full log generated that can be used to identify what is the error, and then it can be fixed with a text editor.  How this is planned to work is that contributors who show up will choose a file or set of files (that they are comfortable with documenting) and will try to clear the errors in that file, producing a patch that can be merged to ns-3-dev.&lt;br /&gt;
*  '''Coordination:'''  We will use IRC and [http://etherpad.org Etherpad] to coordinate the work (make sure multiple people do not work on the same file).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to build Doxygen for ns-3 and find the errors ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  Use mercurial to check out the current copy of ns-3 (see the tutorial if you don't know how to do this):&lt;br /&gt;
*  You must also have [http://doxygen.org Doxygen] installed on your machine.&lt;br /&gt;
&lt;br /&gt;
Once you have an &amp;lt;tt&amp;gt;ns-3-dev/&amp;lt;/tt&amp;gt; directory, take these steps:&lt;br /&gt;
&lt;br /&gt;
    $ ./waf configure --enable-examples --enable-tests&lt;br /&gt;
    $ ./waf build&lt;br /&gt;
&lt;br /&gt;
Then, run the script &amp;lt;tt&amp;gt;doc/doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; from the &amp;lt;tt&amp;gt;ns-3-dev&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh&lt;br /&gt;
&lt;br /&gt;
This will produce lots of summary statistics like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  Warnings by module/directory:&lt;br /&gt;
    Count Directory  ----- ----------------------------------   3219 src/lte/model   1173 src/wimax/model   1066 src/core/model    646 src/lte/test    518 src/wifi/model    ... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is complete, you can use the &amp;lt;tt&amp;gt;doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; script to focus on one module or file.  To see just the errors from one module, for example &amp;lt;tt&amp;gt;wifi&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -s -m wifi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; option skips the doxygen run, and just reports results &lt;br /&gt;
from the existing warnings log.  Obviously, if you want to see the results of your edits, &lt;br /&gt;
you would omit the &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; option.  The &amp;lt;tt&amp;gt;-m &amp;lt;module&amp;gt;&amp;lt;/tt&amp;gt; option only shows &lt;br /&gt;
results from the &amp;lt;tt&amp;gt;./src/&amp;lt;module&amp;gt;&amp;lt;/tt&amp;gt; module; after printing the&lt;br /&gt;
warnings counts by file, it shows the actual errors from each file:&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  Filtered Warnings&lt;br /&gt;
  ========================================&lt;br /&gt;
  src/wifi/examples/wifi-phy-test.cc:53: warning: Compound PsrExperiment::Output is not documented.&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This means the type (probably a struct) &amp;lt;tt&amp;gt;PsrExperiment::Output&amp;lt;/tt&amp;gt; has no documentation,&lt;br /&gt;
and it's declared in &amp;lt;tt&amp;gt;src/wifi/examples/wifi-phy-test.cc&amp;lt;/tt&amp;gt; around line 53.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see just the warnings from a single file (or a set of files matching a regular expression)&lt;br /&gt;
use the &amp;lt;tt&amp;gt;-F &amp;lt;file-name-or-regex&amp;gt;&amp;lt;/tt&amp;gt; option:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -s -F &amp;quot;block-ack.*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to add documentation during the sprint ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you find the list of files and look at the possible errors to fix, feel free to join the chat and request to take a module or file and fix it, and we will list it on the [http://etherpad.osuosl.org/gMofL8fupm Etherpad] as being taken.  While all docs are valuable, &lt;br /&gt;
we should probably focus on code in the model/ directories, then helpers/, examples/, and finally test/.&lt;br /&gt;
&lt;br /&gt;
To add doxygen documentation, please follow the [http://www.nsnam.org/docs/manual/html/documentation.html#id1 ns-3 Specifics] guidelines.&lt;br /&gt;
&lt;br /&gt;
Don't be surprised if you fix one warning and more appear!  If a struct, class or function &lt;br /&gt;
has no documentation, doxygen reports a single &amp;quot;is not documented&amp;quot; error.  Once that object&lt;br /&gt;
has documentation, then doxygen will examine it in detail and report additional warnings.&lt;br /&gt;
For example, a function with no documentation will generate one warning.  Adding documentation&lt;br /&gt;
''about the function itself'' will fix that warning, but then generate warnings for each of the &lt;br /&gt;
function parameters and return value, until those are also documented.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it's not enough just ''write'' documentation; you also have to test it. &lt;br /&gt;
(Documentation has bugs too!)  Just rerun the &amp;lt;tt&amp;gt;doxygen.warnings.report.sh&amp;lt;/tt&amp;gt; script without the &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -m &amp;lt;module&amp;gt; # or -F &amp;lt;file-name-or-regex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(BTW, without &amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt; the script will always build all the doxygen; &lt;br /&gt;
the &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-F&amp;lt;/tt&amp;gt; options only&lt;br /&gt;
affect what it displays from the resulting &amp;lt;tt&amp;gt;doxygen.warnings.log&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Once the script completes, load up the docs in your browser and check that it looks as you &lt;br /&gt;
intended/you didn't mistype some doxygen syntax:&lt;br /&gt;
&lt;br /&gt;
  $ firefox doc/html/index.html &amp;amp;&lt;br /&gt;
&lt;br /&gt;
As in all code development:  wash, rinse, repeat, or, in this case:&lt;br /&gt;
&lt;br /&gt;
  $ ./doc/doxygen.warnings.report.sh -m &amp;lt;module&amp;gt;&lt;br /&gt;
  [edit, edit, edit]&lt;br /&gt;
  $ firefox doc/html/index.html &amp;amp;&lt;br /&gt;
&lt;br /&gt;
=== How to contribute your docs ===&lt;br /&gt;
&lt;br /&gt;
Once you have fixed a file, you may create a patch such as follows:&lt;br /&gt;
&lt;br /&gt;
  $ hg diff file-you-have-fixed.h &amp;gt; file-you-have-fixed.h.patch&lt;br /&gt;
&lt;br /&gt;
and upload it to [https://www.nsnam.org/bugzilla/show_bug.cgi?id=938 bug 938] or email it to one of the maintainers participating in the sprint (you can ask on IRC about it).&lt;br /&gt;
&lt;br /&gt;
== General preparation ==&lt;br /&gt;
&lt;br /&gt;
* Make sure that you can join the IRC channel in advance&lt;br /&gt;
* Make sure you can checkout the development version of ns-3 (we will use ns-3-dev)&lt;br /&gt;
* Familiarize yourself with how to [http://www.nsnam.org/developers/contributing-code/submit/ generate a patch] against ns-3-dev.  Patches you write can be uploaded to Bugzilla or sent to one of the maintainers.&lt;br /&gt;
&lt;br /&gt;
== Once you're there ==&lt;br /&gt;
&lt;br /&gt;
* Check in on IRC by letting others know that you've joined and are ready to contribute, and a maintainer will go from there&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3.22&amp;diff=9047</id>
		<title>Ns-3.22</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3.22&amp;diff=9047"/>
		<updated>2014-09-19T18:23:13Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Bugs or issues in ns-3 core */ carry over open bugs from ns-3.21 release page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This page summarizes the release planning for ns-3.22.  The ns-3 release process is listed [http://www.nsnam.org/developers/release-process/ here] and [[Release Process | here]].&lt;br /&gt;
&lt;br /&gt;
The release manager is [mailto:tomh@tomh.org Tom Henderson].  Please contact him if you would like to participate in any way in preparing the ns-3.22 release.&lt;br /&gt;
&lt;br /&gt;
= Release goals =&lt;br /&gt;
&lt;br /&gt;
1) make a major dent in the [http://www.nsnam.org/bugzilla bug tracker].  Can we clean out most issues on our actively maintained modules, including closing out feature requests for which we do not have anyone working on them?&lt;br /&gt;
&lt;br /&gt;
2) continue the transition to a [[BakeIntegration | more modular build system]].  While a major change to the build system is not planned for ns-3.22, one goal is to start to allow modules outside the core of ns-3 to be maintained in separate places, and integrated using the 'bake' tool (rather than merge everything into ns-3-dev).&lt;br /&gt;
&lt;br /&gt;
3) merge (into ns-3-dev or to a bake-enabled repository) as many new features as we can get ready, including all remaining features from 2013 and 2014 GSOC and SOCIS projects, and 2014 summer projects&lt;br /&gt;
&lt;br /&gt;
= Release schedule =&lt;br /&gt;
&lt;br /&gt;
ns-3.22 is planned for mid-January, 2015.  ns-3 makes roughly three releases per year (Dec/Jan, Apr/May, and Aug/Sept timeframes).&lt;br /&gt;
&lt;br /&gt;
This means that we ought to get most new features and major changes into the simulator by early December.&lt;br /&gt;
&lt;br /&gt;
= Packaging = &lt;br /&gt;
&lt;br /&gt;
ns-3.22 will be packaged as a source tarball as before:  ns-allinone-3.22.tar.bz2.&lt;br /&gt;
&lt;br /&gt;
The tarball will contain:&lt;br /&gt;
* Latest version of pybindgen&lt;br /&gt;
* Latest version of netanim&lt;br /&gt;
* ns-3.22&lt;br /&gt;
* bake&lt;br /&gt;
&lt;br /&gt;
where bake is used to fetch optional ns-3 components, including DCE.&lt;br /&gt;
&lt;br /&gt;
A patch from ns-3.21 to ns-3.22 will also be posted.&lt;br /&gt;
&lt;br /&gt;
Whether ns-3.22 is prepared in other packaging (e.g. Debian) is ''to be determined.''&lt;br /&gt;
&lt;br /&gt;
Whether ns-3.22 will be distributed also as a [http://www.docker.com Docker container] is ''to be determined.''&lt;br /&gt;
&lt;br /&gt;
= Release platforms =&lt;br /&gt;
&lt;br /&gt;
We usually try to keep pace with the latest popular versions of Linux, OS X, and FreeBSD.  For the ns-3.22 release, we plan to support the following systems and compilers:&lt;br /&gt;
&lt;br /&gt;
* OS X 10.10 Yosemite with latest Xcode&lt;br /&gt;
* Ubuntu 14.04 and 14.10 (gcc-4.8, 4.9)&lt;br /&gt;
* Fedora 20 and 21 (gcc-4.8, 4.9)&lt;br /&gt;
* Debian 7 (gcc-4.9)&lt;br /&gt;
* FreeBSD 10.1 (clang 3)&lt;br /&gt;
* some legacy platforms (''to be determined''); likely older Ubuntu LTS and CentOS systems, and OS X 10.9&lt;br /&gt;
&lt;br /&gt;
== New features ==&lt;br /&gt;
&lt;br /&gt;
Developers are working or planning to work on the following new features for ns-3.22.  '''Note:''' there is no guarantee that the features will be finished by the end of the year, so check back for progress/status.&lt;br /&gt;
&lt;br /&gt;
=== Changes to the simulation core ===&lt;br /&gt;
&lt;br /&gt;
* [[Python3_Project | Python 3 support]] (Siddharth Sankurdar)&lt;br /&gt;
** '''Synopsis:'''  ns-3 is Python 2 based, and must be upgraded to support both Python 2 and 3&lt;br /&gt;
* Discuss changes due to Object Start/Stop discussion held at [http://www.nsnam.org/docs/meetings/ns-3-developer-meeting-notes-May14.pdf May developers meeting].&lt;br /&gt;
* Shared RngStream (Peter Barnes)&lt;br /&gt;
** '''Synopsis:'''  Add API to allow multiple random variables to share an underlying RNG stream&lt;br /&gt;
** https://codereview.appspot.com/114060043/&lt;br /&gt;
* Changes to better support [[Ns-3_on_Visual_Studio_2012 | ns-3 on Windows Visual Studio]]&lt;br /&gt;
** https://codereview.appspot.com/8932044/&lt;br /&gt;
&lt;br /&gt;
''' Others to be determined'''&lt;br /&gt;
&lt;br /&gt;
=== Statistics ===&lt;br /&gt;
&lt;br /&gt;
* Add a basic statistics collector, and convert some existing stats helpers in LTE and WiFi to use the statistics framework (Tom Henderson and Li Li)&lt;br /&gt;
&lt;br /&gt;
=== Internet module ===&lt;br /&gt;
&lt;br /&gt;
* An implementation of MLDv2 for IPv6 (Krishna Teja Yadavalli and Tommaso Pecorella)&lt;br /&gt;
** http://www.nsnam.org/wiki/GSOC2014MulticastIPv6&lt;br /&gt;
* FQ-Codel and SFQ-Codel models  (Anh Nguyen and Dave Taht)&lt;br /&gt;
** http://www.nsnam.org/wiki/GSOC2014Bufferbloat&lt;br /&gt;
** This will require some refactoring to allow AQM queues that need access to the IP and transport headers to get access at the layer at which ns3::Queue operates&lt;br /&gt;
* Move RED queue from network module to internet module&lt;br /&gt;
&lt;br /&gt;
=== TCP ===&lt;br /&gt;
&lt;br /&gt;
* TCP variants for satellite networks (Natale Patriciello)&lt;br /&gt;
** &lt;br /&gt;
* RttEstimator improvements (Natale Patriciello)&lt;br /&gt;
* Multipath TCP ([mailto:M.Kheirkhah@sussex.ac.uk Morteza Kheirkhah Sabetghadam])&lt;br /&gt;
&lt;br /&gt;
=== WiFi ===&lt;br /&gt;
&lt;br /&gt;
* MPDU aggregation for 802.11n ([mailto:sebastien.deronne@gmail.com Sebastien Deronne] and [mailto:gbadawy@gmail.com Ghada Badawy], and others)&lt;br /&gt;
** https://codereview.appspot.com/14549044/&lt;br /&gt;
&lt;br /&gt;
=== Vehicular networks ===&lt;br /&gt;
&lt;br /&gt;
* WAVE for 802.11 vehicular networks (Scott Carpenter and Junling Bu)&lt;br /&gt;
** Finish off the 2013 GSoC code merging&lt;br /&gt;
* VANET example (Scott Carpenter)&lt;br /&gt;
** https://codereview.appspot.com/103470050/&lt;br /&gt;
* [[RoutesMobilityModel | Routes Mobility Model]] (Tiago Cerqueira)&lt;br /&gt;
&lt;br /&gt;
=== Delay-tolerant networking ===&lt;br /&gt;
&lt;br /&gt;
* Self-Delimiting Numeric Values (Dizhi Zhou and Ruben Martinez)&lt;br /&gt;
** https://codereview.appspot.com/97540043/&lt;br /&gt;
* Licklider Transport Protocol (Ruben Martinez)&lt;br /&gt;
* Bundle Protocol from SOCIS 2013 (Dizhi Zhou)&lt;br /&gt;
&lt;br /&gt;
=== DSR ===&lt;br /&gt;
&lt;br /&gt;
* LEAR extensions https://codereview.appspot.com/96130043/&lt;br /&gt;
&lt;br /&gt;
=== CSMA improvements ====&lt;br /&gt;
* https://codereview.appspot.com/109450044/ (Mehdi Moussouni)&lt;br /&gt;
&lt;br /&gt;
=== Epidemic Routing ===&lt;br /&gt;
* https://codereview.appspot.com/13831049/&lt;br /&gt;
&lt;br /&gt;
== Software maintenance issues ==&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1945 Remove emu module from codebase (1945)] (Tom Henderson)&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1770 Mesh test crashes for certain configurations]&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1900 Time arithmetic consistency]&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1868 Wstrict-overflow and gcc-4.9] (Tom Henderson and Peter Barnes)&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1941 Remove unnecessary dependency on Application module in other modules (1941)] Tommaso Pecorella&lt;br /&gt;
** Cleanup of remaining modules unnecessarily dependent on applications (aodv, mesh, olsr, lte)&lt;br /&gt;
&lt;br /&gt;
== Documentation improvements ==&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1490 improve documentation on linking ns-3 with other libraries] (Tom Henderson)&lt;br /&gt;
&lt;br /&gt;
''others to be determined''&lt;br /&gt;
&lt;br /&gt;
== Bugs or issues in ns-3 core ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1962 RandomVariableStream::GetStream returns -1 for all automatically assigned streams (1962)] Peter Barnes&lt;br /&gt;
* Close [https://www.nsnam.org/bugzilla/show_bug.cgi?id=954 Changing the simulation time resolution does not work well with attributes (954)] ?&lt;br /&gt;
* Close [https://www.nsnam.org/bugzilla/show_bug.cgi?id=764 feature request: non-doxygen trace source introspection program needed] with status Resolved?&lt;br /&gt;
&lt;br /&gt;
== Bugs in models to fix ==&lt;br /&gt;
&lt;br /&gt;
'' To be determined ''&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3.21&amp;diff=9016</id>
		<title>Ns-3.21</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3.21&amp;diff=9016"/>
		<updated>2014-09-12T22:50:45Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Also Possible */ bug 764&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This page summarizes the release planning for ns-3.21.  The ns-3 release process is listed [http://www.nsnam.org/developers/release-process/ here] and [[Release Process | here]].&lt;br /&gt;
&lt;br /&gt;
The release manager is Tom Henderson.&lt;br /&gt;
&lt;br /&gt;
= Release schedule =&lt;br /&gt;
&lt;br /&gt;
ns-3.21 is planned for September 17, 2014.  New feature code should be ready for merge by no later than 5 September.  An initial release candidate should be available by 12 September.&lt;br /&gt;
&lt;br /&gt;
= Packaging = &lt;br /&gt;
&lt;br /&gt;
ns-3.21 will be packaged as a source tarball as before:  ns-allinone-3.21.tar.bz2.&lt;br /&gt;
&lt;br /&gt;
The tarball will contain:&lt;br /&gt;
* Latest version of pybindgen&lt;br /&gt;
* Latest version of netanim&lt;br /&gt;
* ns-3.21&lt;br /&gt;
* bake&lt;br /&gt;
&lt;br /&gt;
where bake is used to fetch optional ns-3 components, including DCE.&lt;br /&gt;
&lt;br /&gt;
A patch from ns-3.20 to ns-3.21 will also be posted.&lt;br /&gt;
&lt;br /&gt;
= Release platforms =&lt;br /&gt;
&lt;br /&gt;
We usually try to keep pace with the latest popular versions of Linux, OS X, and FreeBSD.  For the ns-3.21 release, we plan to support the following systems and compilers:&lt;br /&gt;
&lt;br /&gt;
* OS X 10.9 Mavericks with Xcode 5.1&lt;br /&gt;
* Ubuntu 14.04 (gcc-4.8)&lt;br /&gt;
* Fedora 20 (gcc-4.8)&lt;br /&gt;
* Debian 7 (gcc-4.9)&lt;br /&gt;
* Ubuntu 10.04 LTS (gcc-4.4)&lt;br /&gt;
* Ubuntu 12.04 LTS (gcc-4.6)&lt;br /&gt;
* Centos 6.4 (gcc-4.4)&lt;br /&gt;
* FreeBSD 9.3 (clang 3.3)&lt;br /&gt;
&lt;br /&gt;
== New features ==&lt;br /&gt;
&lt;br /&gt;
Pending new features:&lt;br /&gt;
* Self-Delimiting Numeric Values (https://codereview.appspot.com/97540043/)&lt;br /&gt;
** '''Update:'''  Slipping to [[ns-3.22]]&lt;br /&gt;
* TCP options code from [[SOCIS2014TCP | SOCIS TCP project]] (including window scale and timestamps)&lt;br /&gt;
** Code review issue:  https://codereview.appspot.com/110860043/&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:'''  A repo (http://code.nsnam.org/repositories/tomh/ns-3-dev-tcp-options-for-merge) is staged for final review; a few minor issues are being worked out for Friday&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
** RttEstimator improvements will slip until [[ns-3.22]]&lt;br /&gt;
* (enhancement) Add propagation delay capability to SimpleChannel (for testing purposes)&lt;br /&gt;
** &amp;lt;s&amp;gt;code review issue:  https://codereview.appspot.com/132870043/&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
* CoDel queue support (from [[GSOC2014Bufferbloat | GSoC bufferbloat project]])&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:'''  A repo (http://code.nsnam.org/repositories/tomh/ns-3-dev-codel-for-merge) is staged for final review&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
** FQ-CoDel and SFQ-CoDel will slip until [[ns-3.22]]&lt;br /&gt;
* Energy harvesting model&lt;br /&gt;
** Code review issue:  https://codereview.appspot.com/103750047/&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:''' Cristiano has updated this and it appears ready for merging&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
* LTE FFR models from GSoC project&lt;br /&gt;
** Code review issue:  https://codereview.appspot.com/130130043/&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:''' Piotr has created a staging repo for final merge: http://code.nsnam.org/pgawlowicz/ns-3-dev/&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
&lt;br /&gt;
WiFi-related:&lt;br /&gt;
* [https://codereview.appspot.com/57210044/ Wifi Sleep mode]&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:''' Stefano has created a final patch (emailed offlist), ready for merge with Cristiano's energy harvesting patch&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
* [https://codereview.appspot.com/14549044/ MPDU aggregation]&lt;br /&gt;
** Will slip to [[ns-3.22]]&lt;br /&gt;
* [https://codereview.appspot.com/103470050/ new VANET example]&lt;br /&gt;
** '''Update:''' Not yet ready for merge, may slip to [[ns-3.22]]&lt;br /&gt;
&lt;br /&gt;
== Software maintenance issues ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1945 Remove emu module from codebase (1945)] (Tom Henderson)&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1770 Mesh test crashes for certain configurations]&lt;br /&gt;
** There is likely not enough time to finish this off before release&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1900 Time arithmetic consistency]&lt;br /&gt;
** There is likely not enough time to finish this off before release&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1868 Wstrict-overflow and gcc-4.9] (Tom Henderson and Peter Barnes)&lt;br /&gt;
** Tom to take next step to see what progress he can make on this bug&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1941 Remove unnecessary dependency on Application module in other modules (1941)] Tommaso Pecorella&lt;br /&gt;
** &amp;lt;s&amp;gt; Depends on merging of simple applications https://codereview.appspot.com/45320043 &amp;lt;/s&amp;gt; merged&lt;br /&gt;
** Cleanup of remaining modules dependent on applications (aodv, mesh, olsr, lte) will slip to 3.22&lt;br /&gt;
&lt;br /&gt;
== Bugs or issues in ns-3 core ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1972 Command line argument handling (1972)] Peter Barnes (patch in bugzilla)&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1964 GetInteger off-by-one (1964)] Peter Barnes and Tom Henderson&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1962 RandomVariableStream::GetStream returns -1 for all automatically assigned streams (1962)] Peter Barnes&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1959 Config::Path not parsed correctly (1959)] Tom Henderson&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1824 L4 protocol sockets should support BindToNetDevice over IPv6 (1824)] Tommaso Pecorella - waiting comments&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1911 AODV can not work on nodes with more than one NetDevice (1911)] Tommaso Pecorella - waiting comments&lt;br /&gt;
&lt;br /&gt;
=== Also Possible ===&lt;br /&gt;
* Close [https://www.nsnam.org/bugzilla/show_bug.cgi?id=954 Changing the simulation time resolution does not work well with attributes (954)] ?&lt;br /&gt;
* Apply patch for [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1652 Storage of the log name in LogComponent (1652)] ?&lt;br /&gt;
* Close [https://www.nsnam.org/bugzilla/show_bug.cgi?id=764 feature request: non-doxygen trace source introspection program needed] with status Resolved?&lt;br /&gt;
&lt;br /&gt;
== Bugs in models being worked by someone ==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Documentation improvements ==&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1490 improve documentation on linking ns-3 with other libraries] (Tom Henderson)&lt;br /&gt;
** Not likely to be fully fixed for ns-3.21 but may take a stab at this, time permitting&lt;br /&gt;
* Wifi documentation patch from Sebastien Deronne (Daniel L)&lt;br /&gt;
* Fix tutorial first.cc and documentation to explicitly call out the need for StopApplication() (Tommaso and/or Tom)&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3.21&amp;diff=9015</id>
		<title>Ns-3.21</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3.21&amp;diff=9015"/>
		<updated>2014-09-12T22:16:59Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Bugs or issues in ns-3 core */ Bug 1652&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This page summarizes the release planning for ns-3.21.  The ns-3 release process is listed [http://www.nsnam.org/developers/release-process/ here] and [[Release Process | here]].&lt;br /&gt;
&lt;br /&gt;
The release manager is Tom Henderson.&lt;br /&gt;
&lt;br /&gt;
= Release schedule =&lt;br /&gt;
&lt;br /&gt;
ns-3.21 is planned for September 17, 2014.  New feature code should be ready for merge by no later than 5 September.  An initial release candidate should be available by 12 September.&lt;br /&gt;
&lt;br /&gt;
= Packaging = &lt;br /&gt;
&lt;br /&gt;
ns-3.21 will be packaged as a source tarball as before:  ns-allinone-3.21.tar.bz2.&lt;br /&gt;
&lt;br /&gt;
The tarball will contain:&lt;br /&gt;
* Latest version of pybindgen&lt;br /&gt;
* Latest version of netanim&lt;br /&gt;
* ns-3.21&lt;br /&gt;
* bake&lt;br /&gt;
&lt;br /&gt;
where bake is used to fetch optional ns-3 components, including DCE.&lt;br /&gt;
&lt;br /&gt;
A patch from ns-3.20 to ns-3.21 will also be posted.&lt;br /&gt;
&lt;br /&gt;
= Release platforms =&lt;br /&gt;
&lt;br /&gt;
We usually try to keep pace with the latest popular versions of Linux, OS X, and FreeBSD.  For the ns-3.21 release, we plan to support the following systems and compilers:&lt;br /&gt;
&lt;br /&gt;
* OS X 10.9 Mavericks with Xcode 5.1&lt;br /&gt;
* Ubuntu 14.04 (gcc-4.8)&lt;br /&gt;
* Fedora 20 (gcc-4.8)&lt;br /&gt;
* Debian 7 (gcc-4.9)&lt;br /&gt;
* Ubuntu 10.04 LTS (gcc-4.4)&lt;br /&gt;
* Ubuntu 12.04 LTS (gcc-4.6)&lt;br /&gt;
* Centos 6.4 (gcc-4.4)&lt;br /&gt;
* FreeBSD 9.3 (clang 3.3)&lt;br /&gt;
&lt;br /&gt;
== New features ==&lt;br /&gt;
&lt;br /&gt;
Pending new features:&lt;br /&gt;
* Self-Delimiting Numeric Values (https://codereview.appspot.com/97540043/)&lt;br /&gt;
** '''Update:'''  Slipping to [[ns-3.22]]&lt;br /&gt;
* TCP options code from [[SOCIS2014TCP | SOCIS TCP project]] (including window scale and timestamps)&lt;br /&gt;
** Code review issue:  https://codereview.appspot.com/110860043/&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:'''  A repo (http://code.nsnam.org/repositories/tomh/ns-3-dev-tcp-options-for-merge) is staged for final review; a few minor issues are being worked out for Friday&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
** RttEstimator improvements will slip until [[ns-3.22]]&lt;br /&gt;
* (enhancement) Add propagation delay capability to SimpleChannel (for testing purposes)&lt;br /&gt;
** &amp;lt;s&amp;gt;code review issue:  https://codereview.appspot.com/132870043/&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
* CoDel queue support (from [[GSOC2014Bufferbloat | GSoC bufferbloat project]])&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:'''  A repo (http://code.nsnam.org/repositories/tomh/ns-3-dev-codel-for-merge) is staged for final review&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
** FQ-CoDel and SFQ-CoDel will slip until [[ns-3.22]]&lt;br /&gt;
* Energy harvesting model&lt;br /&gt;
** Code review issue:  https://codereview.appspot.com/103750047/&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:''' Cristiano has updated this and it appears ready for merging&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
* LTE FFR models from GSoC project&lt;br /&gt;
** Code review issue:  https://codereview.appspot.com/130130043/&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:''' Piotr has created a staging repo for final merge: http://code.nsnam.org/pgawlowicz/ns-3-dev/&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
&lt;br /&gt;
WiFi-related:&lt;br /&gt;
* [https://codereview.appspot.com/57210044/ Wifi Sleep mode]&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:''' Stefano has created a final patch (emailed offlist), ready for merge with Cristiano's energy harvesting patch&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
* [https://codereview.appspot.com/14549044/ MPDU aggregation]&lt;br /&gt;
** Will slip to [[ns-3.22]]&lt;br /&gt;
* [https://codereview.appspot.com/103470050/ new VANET example]&lt;br /&gt;
** '''Update:''' Not yet ready for merge, may slip to [[ns-3.22]]&lt;br /&gt;
&lt;br /&gt;
== Software maintenance issues ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1945 Remove emu module from codebase (1945)] (Tom Henderson)&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1770 Mesh test crashes for certain configurations]&lt;br /&gt;
** There is likely not enough time to finish this off before release&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1900 Time arithmetic consistency]&lt;br /&gt;
** There is likely not enough time to finish this off before release&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1868 Wstrict-overflow and gcc-4.9] (Tom Henderson and Peter Barnes)&lt;br /&gt;
** Tom to take next step to see what progress he can make on this bug&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1941 Remove unnecessary dependency on Application module in other modules (1941)] Tommaso Pecorella&lt;br /&gt;
** &amp;lt;s&amp;gt; Depends on merging of simple applications https://codereview.appspot.com/45320043 &amp;lt;/s&amp;gt; merged&lt;br /&gt;
** Cleanup of remaining modules dependent on applications (aodv, mesh, olsr, lte) will slip to 3.22&lt;br /&gt;
&lt;br /&gt;
== Bugs or issues in ns-3 core ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1972 Command line argument handling (1972)] Peter Barnes (patch in bugzilla)&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1964 GetInteger off-by-one (1964)] Peter Barnes and Tom Henderson&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1962 RandomVariableStream::GetStream returns -1 for all automatically assigned streams (1962)] Peter Barnes&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1959 Config::Path not parsed correctly (1959)] Tom Henderson&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1824 L4 protocol sockets should support BindToNetDevice over IPv6 (1824)] Tommaso Pecorella - waiting comments&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1911 AODV can not work on nodes with more than one NetDevice (1911)] Tommaso Pecorella - waiting comments&lt;br /&gt;
&lt;br /&gt;
=== Also Possible ===&lt;br /&gt;
* Close [https://www.nsnam.org/bugzilla/show_bug.cgi?id=954 Changing the simulation time resolution does not work well with attributes (954)] ?&lt;br /&gt;
* Apply patch for [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1652 Storage of the log name in LogComponent (1652)] ?&lt;br /&gt;
&lt;br /&gt;
== Bugs in models being worked by someone ==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Documentation improvements ==&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1490 improve documentation on linking ns-3 with other libraries] (Tom Henderson)&lt;br /&gt;
** Not likely to be fully fixed for ns-3.21 but may take a stab at this, time permitting&lt;br /&gt;
* Wifi documentation patch from Sebastien Deronne (Daniel L)&lt;br /&gt;
* Fix tutorial first.cc and documentation to explicitly call out the need for StopApplication() (Tommaso and/or Tom)&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Ns-3.21&amp;diff=9014</id>
		<title>Ns-3.21</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Ns-3.21&amp;diff=9014"/>
		<updated>2014-09-12T22:09:27Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Bugs or issues in ns-3 core */ Consider closing 954&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This page summarizes the release planning for ns-3.21.  The ns-3 release process is listed [http://www.nsnam.org/developers/release-process/ here] and [[Release Process | here]].&lt;br /&gt;
&lt;br /&gt;
The release manager is Tom Henderson.&lt;br /&gt;
&lt;br /&gt;
= Release schedule =&lt;br /&gt;
&lt;br /&gt;
ns-3.21 is planned for September 17, 2014.  New feature code should be ready for merge by no later than 5 September.  An initial release candidate should be available by 12 September.&lt;br /&gt;
&lt;br /&gt;
= Packaging = &lt;br /&gt;
&lt;br /&gt;
ns-3.21 will be packaged as a source tarball as before:  ns-allinone-3.21.tar.bz2.&lt;br /&gt;
&lt;br /&gt;
The tarball will contain:&lt;br /&gt;
* Latest version of pybindgen&lt;br /&gt;
* Latest version of netanim&lt;br /&gt;
* ns-3.21&lt;br /&gt;
* bake&lt;br /&gt;
&lt;br /&gt;
where bake is used to fetch optional ns-3 components, including DCE.&lt;br /&gt;
&lt;br /&gt;
A patch from ns-3.20 to ns-3.21 will also be posted.&lt;br /&gt;
&lt;br /&gt;
= Release platforms =&lt;br /&gt;
&lt;br /&gt;
We usually try to keep pace with the latest popular versions of Linux, OS X, and FreeBSD.  For the ns-3.21 release, we plan to support the following systems and compilers:&lt;br /&gt;
&lt;br /&gt;
* OS X 10.9 Mavericks with Xcode 5.1&lt;br /&gt;
* Ubuntu 14.04 (gcc-4.8)&lt;br /&gt;
* Fedora 20 (gcc-4.8)&lt;br /&gt;
* Debian 7 (gcc-4.9)&lt;br /&gt;
* Ubuntu 10.04 LTS (gcc-4.4)&lt;br /&gt;
* Ubuntu 12.04 LTS (gcc-4.6)&lt;br /&gt;
* Centos 6.4 (gcc-4.4)&lt;br /&gt;
* FreeBSD 9.3 (clang 3.3)&lt;br /&gt;
&lt;br /&gt;
== New features ==&lt;br /&gt;
&lt;br /&gt;
Pending new features:&lt;br /&gt;
* Self-Delimiting Numeric Values (https://codereview.appspot.com/97540043/)&lt;br /&gt;
** '''Update:'''  Slipping to [[ns-3.22]]&lt;br /&gt;
* TCP options code from [[SOCIS2014TCP | SOCIS TCP project]] (including window scale and timestamps)&lt;br /&gt;
** Code review issue:  https://codereview.appspot.com/110860043/&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:'''  A repo (http://code.nsnam.org/repositories/tomh/ns-3-dev-tcp-options-for-merge) is staged for final review; a few minor issues are being worked out for Friday&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
** RttEstimator improvements will slip until [[ns-3.22]]&lt;br /&gt;
* (enhancement) Add propagation delay capability to SimpleChannel (for testing purposes)&lt;br /&gt;
** &amp;lt;s&amp;gt;code review issue:  https://codereview.appspot.com/132870043/&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
* CoDel queue support (from [[GSOC2014Bufferbloat | GSoC bufferbloat project]])&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:'''  A repo (http://code.nsnam.org/repositories/tomh/ns-3-dev-codel-for-merge) is staged for final review&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
** FQ-CoDel and SFQ-CoDel will slip until [[ns-3.22]]&lt;br /&gt;
* Energy harvesting model&lt;br /&gt;
** Code review issue:  https://codereview.appspot.com/103750047/&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:''' Cristiano has updated this and it appears ready for merging&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
* LTE FFR models from GSoC project&lt;br /&gt;
** Code review issue:  https://codereview.appspot.com/130130043/&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:''' Piotr has created a staging repo for final merge: http://code.nsnam.org/pgawlowicz/ns-3-dev/&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
&lt;br /&gt;
WiFi-related:&lt;br /&gt;
* [https://codereview.appspot.com/57210044/ Wifi Sleep mode]&lt;br /&gt;
** &amp;lt;s&amp;gt;'''Update:''' Stefano has created a final patch (emailed offlist), ready for merge with Cristiano's energy harvesting patch&amp;lt;/s&amp;gt; Merged&lt;br /&gt;
* [https://codereview.appspot.com/14549044/ MPDU aggregation]&lt;br /&gt;
** Will slip to [[ns-3.22]]&lt;br /&gt;
* [https://codereview.appspot.com/103470050/ new VANET example]&lt;br /&gt;
** '''Update:''' Not yet ready for merge, may slip to [[ns-3.22]]&lt;br /&gt;
&lt;br /&gt;
== Software maintenance issues ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1945 Remove emu module from codebase (1945)] (Tom Henderson)&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1770 Mesh test crashes for certain configurations]&lt;br /&gt;
** There is likely not enough time to finish this off before release&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1900 Time arithmetic consistency]&lt;br /&gt;
** There is likely not enough time to finish this off before release&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1868 Wstrict-overflow and gcc-4.9] (Tom Henderson and Peter Barnes)&lt;br /&gt;
** Tom to take next step to see what progress he can make on this bug&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1941 Remove unnecessary dependency on Application module in other modules (1941)] Tommaso Pecorella&lt;br /&gt;
** &amp;lt;s&amp;gt; Depends on merging of simple applications https://codereview.appspot.com/45320043 &amp;lt;/s&amp;gt; merged&lt;br /&gt;
** Cleanup of remaining modules dependent on applications (aodv, mesh, olsr, lte) will slip to 3.22&lt;br /&gt;
&lt;br /&gt;
== Bugs or issues in ns-3 core ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1972 Command line argument handling (1972)] Peter Barnes&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1964 GetInteger off-by-one (1964)] Peter Barnes and Tom Henderson&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1962 RandomVariableStream::GetStream returns -1 for all automatically assigned streams (1962)] Peter Barnes&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1959 Config::Path not parsed correctly (1959)] Tom Henderson&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1824 L4 protocol sockets should support BindToNetDevice over IPv6 (1824)] Tommaso Pecorella - waiting comments&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1911 AODV can not work on nodes with more than one NetDevice (1911)] Tommaso Pecorella - waiting comments&lt;br /&gt;
* Close [https://www.nsnam.org/bugzilla/show_bug.cgi?id=954 Changing the simulation time resolution does not work well with attributes (954)] ?&lt;br /&gt;
&lt;br /&gt;
== Bugs in models being worked by someone ==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Documentation improvements ==&lt;br /&gt;
* [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1490 improve documentation on linking ns-3 with other libraries] (Tom Henderson)&lt;br /&gt;
** Not likely to be fully fixed for ns-3.21 but may take a stab at this, time permitting&lt;br /&gt;
* Wifi documentation patch from Sebastien Deronne (Daniel L)&lt;br /&gt;
* Fix tutorial first.cc and documentation to explicitly call out the need for StopApplication() (Tommaso and/or Tom)&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMay2014&amp;diff=8429</id>
		<title>DevelMeetingMay2014</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMay2014&amp;diff=8429"/>
		<updated>2014-04-08T17:20:09Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Location and Schedule =&lt;br /&gt;
&lt;br /&gt;
The meeting will occur Thursday-Friday, May 8-9 at Georgia Tech, Atlanta GA. &lt;br /&gt;
&lt;br /&gt;
A more detailed schedule will be posted at a later date but the schedule will be primarily driven by who is attending and what everyone proposes to discuss.&lt;br /&gt;
&lt;br /&gt;
= Local Information =&lt;br /&gt;
&lt;br /&gt;
See [http://www.nsnam.org/consortium/activities/annual-meeting-may-2014/training-flyer/ information] regarding WNS3 and ns-3 training&lt;br /&gt;
&lt;br /&gt;
= Remote attendance =&lt;br /&gt;
&lt;br /&gt;
We will create a hangout and use a speakerphone, to the extent possible.&lt;br /&gt;
&lt;br /&gt;
= Attendees =&lt;br /&gt;
&lt;br /&gt;
Please add your name here if you intend to attend, and which days.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Who !! Thu !! Fri&lt;br /&gt;
|-&lt;br /&gt;
| Peter Barnes || &amp;amp;#x2714; || &amp;amp;#x2714;&lt;br /&gt;
|-&lt;br /&gt;
| Daniel Lertpratchya || &amp;amp;#x2714; || &amp;amp;#x2714;&lt;br /&gt;
|-&lt;br /&gt;
| Brian Swenson || &amp;amp;#x2714; || &amp;amp;#x2714;&lt;br /&gt;
|-&lt;br /&gt;
| Jared Ivey || &amp;amp;#x2714; || &amp;amp;#x2714;&lt;br /&gt;
|-&lt;br /&gt;
| Tommaso Pecorella&lt;br /&gt;
(depends on time difference, local time: UTC+2) &lt;br /&gt;
|| &amp;amp;#x2714; || &amp;amp;#x2714;&lt;br /&gt;
|}&lt;br /&gt;
= Suggested agenda/topics =&lt;br /&gt;
&lt;br /&gt;
Please list suggested discussion topics below and we will build a schedule at a later date.  Please also suggest 'read-ahead' items as needed.&lt;br /&gt;
&lt;br /&gt;
* Object Start/Stop progress&lt;br /&gt;
* WiFi interaction between 802.11n and 802.11p features&lt;br /&gt;
* Memory scaling (PDB)&lt;br /&gt;
&lt;br /&gt;
= Meeting Notes =&lt;br /&gt;
&lt;br /&gt;
To be posted later.&lt;br /&gt;
&lt;br /&gt;
[[Category:DevelMeeting]]&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMay2014&amp;diff=8428</id>
		<title>DevelMeetingMay2014</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMay2014&amp;diff=8428"/>
		<updated>2014-04-08T17:19:49Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: add Memory Scaling topic&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Location and Schedule =&lt;br /&gt;
&lt;br /&gt;
The meeting will occur Thursday-Friday, May 8-9 at Georgia Tech, Atlanta GA. &lt;br /&gt;
&lt;br /&gt;
A more detailed schedule will be posted at a later date but the schedule will be primarily driven by who is attending and what everyone proposes to discuss.&lt;br /&gt;
&lt;br /&gt;
= Local Information =&lt;br /&gt;
&lt;br /&gt;
See [http://www.nsnam.org/consortium/activities/annual-meeting-may-2014/training-flyer/ information] regarding WNS3 and ns-3 training&lt;br /&gt;
&lt;br /&gt;
= Remote attendance =&lt;br /&gt;
&lt;br /&gt;
We will create a hangout and use a speakerphone, to the extent possible.&lt;br /&gt;
&lt;br /&gt;
= Attendees =&lt;br /&gt;
&lt;br /&gt;
Please add your name here if you intend to attend, and which days.&lt;br /&gt;
&lt;br /&gt;
* [[User:Tomh|Tom Henderson]]: Thurs, Fri&lt;br /&gt;
* Peter Barnes:  Thurs, Fri&lt;br /&gt;
* Daniel Lertpratchya:  Thurs, Fri&lt;br /&gt;
* Brian Swenson: Thurs, Fri&lt;br /&gt;
* Jared Ivey: Thurs, Fri&lt;br /&gt;
* Tommaso Pecorella:  Thurs, Fri (depends on time difference, local time: UTC+2)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Who !! Thu !! Fri&lt;br /&gt;
|-&lt;br /&gt;
| Peter Barnes || &amp;amp;#x2714; || &amp;amp;#x2714;&lt;br /&gt;
|-&lt;br /&gt;
| Daniel Lertpratchya || &amp;amp;#x2714; || &amp;amp;#x2714;&lt;br /&gt;
|-&lt;br /&gt;
| Brian Swenson || &amp;amp;#x2714; || &amp;amp;#x2714;&lt;br /&gt;
|-&lt;br /&gt;
| Jared Ivey || &amp;amp;#x2714; || &amp;amp;#x2714;&lt;br /&gt;
|-&lt;br /&gt;
| Tommaso Pecorella&lt;br /&gt;
(depends on time difference, local time: UTC+2) &lt;br /&gt;
|| &amp;amp;#x2714; || &amp;amp;#x2714;&lt;br /&gt;
|}&lt;br /&gt;
= Suggested agenda/topics =&lt;br /&gt;
&lt;br /&gt;
Please list suggested discussion topics below and we will build a schedule at a later date.  Please also suggest 'read-ahead' items as needed.&lt;br /&gt;
&lt;br /&gt;
* Object Start/Stop progress&lt;br /&gt;
* WiFi interaction between 802.11n and 802.11p features&lt;br /&gt;
* Memory scaling (PDB)&lt;br /&gt;
&lt;br /&gt;
= Meeting Notes =&lt;br /&gt;
&lt;br /&gt;
To be posted later.&lt;br /&gt;
&lt;br /&gt;
[[Category:DevelMeeting]]&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=HOWTO_use_Valgrind_to_debug_memory_problems&amp;diff=7597</id>
		<title>HOWTO use Valgrind to debug memory problems</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=HOWTO_use_Valgrind_to_debug_memory_problems&amp;diff=7597"/>
		<updated>2013-05-24T20:02:37Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: remove extraneous space in &amp;quot;--run&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Memory leaks or errors can be found with [http://www.valgrind.org Valgrind].  Support for valgrind is built into the ./waf system by typing:&lt;br /&gt;
&lt;br /&gt;
  ./waf --command-template=&amp;quot;valgrind [options] %s&amp;quot; --run ns-3-program-name&lt;br /&gt;
&lt;br /&gt;
for example:&lt;br /&gt;
  ./waf --command-template=&amp;quot;valgrind --leak-check=full --show-reachable=yes %s&amp;quot; --run main-propagation-loss&lt;br /&gt;
&lt;br /&gt;
== Common errors ==&lt;br /&gt;
&lt;br /&gt;
Please list hints here as to what kind of errors have known resolution.&lt;br /&gt;
&lt;br /&gt;
=== Failure to call Simulator::Destroy() ===&lt;br /&gt;
&lt;br /&gt;
Simulator::Destroy() will free memory that is created with the ns-3 object system.  Forgetting to call Simulator::Destroy () when you are done will lead to reachable memory being reported by valgrind, such as this trace of the main-propagation-loss example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  ==16325== 88 bytes in 1 blocks are still reachable in loss record 4 of 4&lt;br /&gt;
  ==16325==    at 0x4A069D5: operator new(unsigned long) (vg_replace_malloc.c:261)&lt;br /&gt;
  ==16325==    by 0x4C87A6B: ns3::TypeId ns3::TypeId::AddConstructor&amp;lt;ns3::DefaultSimulatorImpl&amp;gt;()::Maker::Create() (type-id.h:429)&lt;br /&gt;
  ==16325==    by 0x4C778A3: ns3::FunctorCallbackImpl&amp;lt;ns3::ObjectBase* (*)(), ns3::ObjectBase*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty&amp;gt;::operator()() (callback.h:166)&lt;br /&gt;
  ==16325==    by 0x4CBF22C: ns3::Callback&amp;lt;ns3::ObjectBase*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty&amp;gt;::operator()() const (callback.h:407)&lt;br /&gt;
  ==16325==    by 0x4CBE05E: ns3::ObjectFactory::Create() const (object-factory.cc:69)&lt;br /&gt;
  ==16325==    by 0x4C8569E: ns3::Ptr&amp;lt;ns3::SimulatorImpl&amp;gt; ns3::ObjectFactory::Create&amp;lt;ns3::SimulatorImpl&amp;gt;() const (object-factory.h:110)&lt;br /&gt;
  ==16325==    by 0x4C823FB: ns3::GetImpl() (simulator.cc:93)&lt;br /&gt;
  ==16325==    by 0x4C831B1: ns3::Simulator::Stop(ns3::Time const&amp;amp;) (simulator.cc:184)&lt;br /&gt;
  ==16325==    by 0x404157: TestDeterministic(ns3::Ptr&amp;lt;ns3::PropagationLossModel&amp;gt;) (main-propagation-loss.cc:83)&lt;br /&gt;
  ==16325==    by 0x405CC1: main (main-propagation-loss.cc:225)&lt;br /&gt;
  ==16325== &lt;br /&gt;
  ==16325== LEAK SUMMARY:&lt;br /&gt;
  ==16325==    definitely lost: 0 bytes in 0 blocks&lt;br /&gt;
  ==16325==    indirectly lost: 0 bytes in 0 blocks&lt;br /&gt;
  ==16325==      possibly lost: 0 bytes in 0 blocks&lt;br /&gt;
  ==16325==    still reachable: 200 bytes in 4 blocks&lt;br /&gt;
  ==16325==         suppressed: 0 bytes in 0 blocks&lt;br /&gt;
  ==16325== &lt;br /&gt;
  ==16325== For counts of detected and suppressed errors, rerun with: -v&lt;br /&gt;
  ==16325== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 7)&lt;br /&gt;
&lt;br /&gt;
Here, the clue is the line that says ''&amp;quot;ns3::Ptr&amp;lt;ns3::SimulatorImpl&amp;gt; ns3::ObjectFactory::Create&amp;lt;ns3::SimulatorImpl&amp;gt;() const (object-factory.h:110)&amp;quot;'' and the lines above it.  If you see an error such as that reporting &amp;quot;still reachable&amp;quot; blocks, it is often the case that you forgot to call Simulator::Destroy() to free objects that have been created as factory objects.&lt;br /&gt;
&lt;br /&gt;
== test.py memory leaks ==&lt;br /&gt;
&lt;br /&gt;
Sometimes a memory leak pop up on a test program (the ones enabled by ''&amp;quot;configure --enable-tests''&amp;quot; and launched with ''&amp;quot;./test.py -g something''&amp;quot;). That's ok, the test programs are there with this precise purpose: to show memory leaks and to check the correct ns-3 behavior.&lt;br /&gt;
&lt;br /&gt;
The trick, however, is to *not* search for the memory leak using the test program. Write an equivalent ns-3 simulation, the simple, the better. Then use valgrind on that one, find the leak and exterminate it. &lt;br /&gt;
The rationale is: the test programs are launched by a slightly different system than the usual waf launcher (built to run a lot of different tests sequentially). Hence, you could find in the valgrind report a lot of obscure data that (probably) will point you in the wrong direction.&lt;br /&gt;
&lt;br /&gt;
If, however, you can not replicate the memory leak in a &amp;quot;normal&amp;quot; ns-3 simulation, remember that the memory leak might be as well in the test program... in that case: good luck.&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMar2013&amp;diff=7497</id>
		<title>DevelMeetingMar2013</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMar2013&amp;diff=7497"/>
		<updated>2013-04-08T17:26:40Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: Add Peter's slides, link to Meeting Notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Location and Schedule =&lt;br /&gt;
&lt;br /&gt;
The meeting will occur Wed March 6 through Fri March 8 at INRIA Sophia Antipolis.  INRIA will provide us with a large enough conference room to meet.  We will meet for three days, and people can attend whatever portion they feel like.&lt;br /&gt;
&lt;br /&gt;
A more detailed schedule will be posted at a later date.&lt;br /&gt;
&lt;br /&gt;
== Other events this week ==&lt;br /&gt;
&lt;br /&gt;
* Information about Monday's [http://www.nsnam.org/consortium/activities/annual-meeting-march-2013/ Annual Meeting March 2013]&lt;br /&gt;
* Information about Tuesday's [http://www.nsnam.org/wns3/wns3-2013/ Workshop on ns-3 2013]&lt;br /&gt;
&lt;br /&gt;
== Lodging and Directions ==&lt;br /&gt;
&lt;br /&gt;
INRIA Sophia Antipolis is located on a hillside above [http://en.wikipedia.org/wiki/Antibes Antibes] / [http://en.wikipedia.org/wiki/Juan-les-Pins Juan les Pins], France.  It is possible to reach the center by public transport from Antibes, Nice, and Cannes.&lt;br /&gt;
&lt;br /&gt;
* [https://www.nsnam.org/consortium/activities/annual-meeting-march-2013/venue-and-useful-information/ Venue and Useful Information]&lt;br /&gt;
* [https://www.nsnam.org/consortium/activities/annual-meeting-march-2013/accommodation/ Hotel accommodations]&lt;br /&gt;
&lt;br /&gt;
== Registration ==&lt;br /&gt;
&lt;br /&gt;
Attendance is free but everyone must obtain a visitor badge to enter INRIA.  Please list yourself as an attendee and provide contact information as needed to tomh@tomh.org if you want to attend.&lt;br /&gt;
&lt;br /&gt;
== Attendees ==&lt;br /&gt;
&lt;br /&gt;
Please add your name here if you intend to attend, and which days.&lt;br /&gt;
&lt;br /&gt;
* [[User:Tomh|Tom Henderson]], Wed, Thurs, Fri&lt;br /&gt;
* [[User:Vedranm|Vedran Miletic]], Wed, Thurs, Fri (Fri half day only)&lt;br /&gt;
* George Riley, Wed, Thurs&lt;br /&gt;
* Brian Swenson, Wed, Thurs&lt;br /&gt;
* Nicola Baldo, Wed, Thurs, Fri (Fri half day only)&lt;br /&gt;
* Daniel Camara, Wed, Thurs, Fri&lt;br /&gt;
* Peter Barnes, Fri (and possibly parts of Wed, Thurs)&lt;br /&gt;
* [[User:tommaso|Tommaso Pecorella]], Wed, Thurs, Fri (Fri half day only)&lt;br /&gt;
* [[User:Tazaki|Hajime Tazaki]], Wed, Thurs, Fri&lt;br /&gt;
* Alina Quereilhac, Wed, Thurs, Fri&lt;br /&gt;
* Brian Swenson, Wed, Thurs&lt;br /&gt;
* George Riley, Wed&lt;br /&gt;
* Takai Eddine, Wed, Thurs, Fri&lt;br /&gt;
&lt;br /&gt;
* Giovanni Rigazzi, Wed, Thurs, Fri (Fri half day only)&lt;br /&gt;
&lt;br /&gt;
= Suggested agenda/topics =&lt;br /&gt;
&lt;br /&gt;
Please list suggested discussion topics below and we will build a schedule at a later date.  Please also suggest 'read-ahead' items as needed.&lt;br /&gt;
&lt;br /&gt;
* Object Start/Stop&lt;br /&gt;
* ns-3 in education&lt;br /&gt;
* XML as a language for simulation specification, Peter Barnes' talk&lt;br /&gt;
** some ideas could be taken from SimGrid guys, they have rather small XML files that say a lot of things&lt;br /&gt;
* data collection framework&lt;br /&gt;
* variable test scope (bug 1563)&lt;br /&gt;
* Modularization of ns-3&lt;br /&gt;
* &amp;lt;b&amp;gt;user feedback:&amp;lt;/b&amp;gt; what areas (documentation, API) can be improved from a user standpoint?  This discussion will be based on feedback from people who have been active on the ns-3-users mailing list.&lt;br /&gt;
* DCE release plan review&lt;br /&gt;
* Time::SetResolution patch by Peter Barnes and Mathieu Lacage, how to fix it and proceed with merging&lt;br /&gt;
** Peter has a proposal to discuss, ([[media:Ns-3-devel-2013-03-8-Time-SetResolution.pdf|.pdf]], [[media:Ns-3-devel-2013-03-8-Time-SetResolution.pptx|.pptx]])&lt;br /&gt;
&lt;br /&gt;
= Meeting Notes =&lt;br /&gt;
&lt;br /&gt;
* [http://www.nsnam.org/docs/meetings/ns-3-developer-meeting-notes-Mar13.pdf|Meeting Notes (.pdf)]&lt;br /&gt;
&lt;br /&gt;
[[Category:DevelMeeting]]&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=File:Ns-3-devel-2013-03-8-Time-SetResolution.pdf&amp;diff=7496</id>
		<title>File:Ns-3-devel-2013-03-8-Time-SetResolution.pdf</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=File:Ns-3-devel-2013-03-8-Time-SetResolution.pdf&amp;diff=7496"/>
		<updated>2013-04-08T17:24:07Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=File:Ns-3-devel-2013-03-8-Time-SetResolution.pptx&amp;diff=7495</id>
		<title>File:Ns-3-devel-2013-03-8-Time-SetResolution.pptx</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=File:Ns-3-devel-2013-03-8-Time-SetResolution.pptx&amp;diff=7495"/>
		<updated>2013-04-08T17:19:48Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMar2013&amp;diff=7351</id>
		<title>DevelMeetingMar2013</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMar2013&amp;diff=7351"/>
		<updated>2013-02-27T17:33:53Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: /* Suggested agenda/topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Location and Schedule =&lt;br /&gt;
&lt;br /&gt;
The meeting will occur Wed March 6 through Fri March 8 at INRIA Sophia Antipolis.  INRIA will provide us with a large enough conference room to meet.  We will meet for three days, and people can attend whatever portion they feel like.&lt;br /&gt;
&lt;br /&gt;
A more detailed schedule will be posted at a later date.&lt;br /&gt;
&lt;br /&gt;
== Other events this week ==&lt;br /&gt;
&lt;br /&gt;
* Information about Monday's [http://www.nsnam.org/consortium/activities/annual-meeting-march-2013/ Annual Meeting March 2013]&lt;br /&gt;
* Information about Tuesday's [http://www.nsnam.org/wns3/wns3-2013/ Workshop on ns-3 2013]&lt;br /&gt;
&lt;br /&gt;
== Lodging and Directions ==&lt;br /&gt;
&lt;br /&gt;
INRIA Sophia Antipolis is located on a hillside above [http://en.wikipedia.org/wiki/Antibes Antibes] / [http://en.wikipedia.org/wiki/Juan-les-Pins Juan les Pins], France.  It is possible to reach the center by public transport from Antibes, Nice, and Cannes.&lt;br /&gt;
&lt;br /&gt;
* [https://www.nsnam.org/consortium/activities/annual-meeting-march-2013/venue-and-useful-information/ Venue and Useful Information]&lt;br /&gt;
* [https://www.nsnam.org/consortium/activities/annual-meeting-march-2013/accommodation/ Hotel accommodations]&lt;br /&gt;
&lt;br /&gt;
== Registration ==&lt;br /&gt;
&lt;br /&gt;
Attendance is free but everyone must obtain a visitor badge to enter INRIA.  Please list yourself as an attendee and provide contact information as needed to tomh@tomh.org if you want to attend.&lt;br /&gt;
&lt;br /&gt;
== Attendees ==&lt;br /&gt;
&lt;br /&gt;
Please add your name here if you intend to attend, and which days.&lt;br /&gt;
&lt;br /&gt;
* [[User:Tomh|Tom Henderson]], Wed, Thurs, Fri&lt;br /&gt;
* [[User:Vedranm|Vedran Miletic]], Wed, Thurs, Fri (Fri half day only)&lt;br /&gt;
* George Riley, Wed, Thurs&lt;br /&gt;
* Brian Swenson, Wed, Thurs&lt;br /&gt;
* Nicola Baldo, Wed, Thurs, Fri (Fri half day only)&lt;br /&gt;
* Daniel Camara, Wed, Thurs, Fri&lt;br /&gt;
* Peter Barnes, Fri (and possibly parts of Wed, Thurs)&lt;br /&gt;
&lt;br /&gt;
* [[User:tommaso|Tommaso Pecorella]], Wed, Thurs, Fri (Fri half day only)&lt;br /&gt;
&lt;br /&gt;
* [[User:Tazaki|Hajime Tazaki]], Wed, Thurs, Fri&lt;br /&gt;
* Alina Quereilhac, Wed, Thurs, Fri&lt;br /&gt;
&lt;br /&gt;
= Suggested agenda/topics =&lt;br /&gt;
&lt;br /&gt;
Please list suggested discussion topics below and we will build a schedule at a later date.  Please also suggest 'read-ahead' items as needed.&lt;br /&gt;
&lt;br /&gt;
* Object Start/Stop&lt;br /&gt;
* ns-3 in education&lt;br /&gt;
* XML as a language for simulation specification, Peter Barnes' talk&lt;br /&gt;
** some ideas could be taken from SimGrid guys, they have rather small XML files that say a lot of things&lt;br /&gt;
* data collection framework&lt;br /&gt;
* variable test scope (bug 1563)&lt;br /&gt;
* Modularization of ns-3&lt;br /&gt;
* &amp;lt;b&amp;gt;user feedback:&amp;lt;/b&amp;gt; what areas (documentation, API) can be improved from a user standpoint?  This discussion will be based on feedback from people who have been active on the ns-3-users mailing list.&lt;br /&gt;
* DCE release plan review&lt;br /&gt;
* Time::SetResolution patch by Peter Barnes and Mathieu Lacage, how to fix it and proceed with merging&lt;br /&gt;
** Peter has a proposal to discuss&lt;br /&gt;
&lt;br /&gt;
[[Category:DevelMeeting]]&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMar2013&amp;diff=7324</id>
		<title>DevelMeetingMar2013</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMar2013&amp;diff=7324"/>
		<updated>2013-02-12T23:58:22Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: add Peter Barnes to Attendees&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Location and Schedule =&lt;br /&gt;
&lt;br /&gt;
The meeting will occur Wed March 6 through Fri March 8 at INRIA Sophia Antipolis.  INRIA will provide us with a large enough conference room to meet.  We will meet for three days, and people can attend whatever portion they feel like.&lt;br /&gt;
&lt;br /&gt;
A more detailed schedule will be posted at a later date.&lt;br /&gt;
&lt;br /&gt;
== Other events this week ==&lt;br /&gt;
&lt;br /&gt;
* Information about Monday's [http://www.nsnam.org/consortium/activities/annual-meeting-march-2013/ Annual Meeting March 2013]&lt;br /&gt;
* Information about Tuesday's [http://www.nsnam.org/wns3/wns3-2013/ Workshop on ns-3 2013]&lt;br /&gt;
&lt;br /&gt;
== Lodging and Directions ==&lt;br /&gt;
&lt;br /&gt;
INRIA Sophia Antipolis is located on a hillside above [http://en.wikipedia.org/wiki/Antibes Antibes] / [http://en.wikipedia.org/wiki/Juan-les-Pins Juan les Pins], France.  It is possible to reach the center by public transport from Antibes, Nice, and Cannes.&lt;br /&gt;
&lt;br /&gt;
* [https://www.nsnam.org/consortium/activities/annual-meeting-march-2013/venue-and-useful-information/ Venue and Useful Information]&lt;br /&gt;
* [https://www.nsnam.org/consortium/activities/annual-meeting-march-2013/accommodation/ Hotel accommodations]&lt;br /&gt;
&lt;br /&gt;
== Registration ==&lt;br /&gt;
&lt;br /&gt;
Attendance is free but everyone must obtain a visitor badge to enter INRIA.  Please list yourself as an attendee and provide contact information as needed to tomh@tomh.org if you want to attend.&lt;br /&gt;
&lt;br /&gt;
== Attendees ==&lt;br /&gt;
&lt;br /&gt;
Please add your name here if you intend to attend, and which days.&lt;br /&gt;
&lt;br /&gt;
* [[User:Tomh|Tom Henderson]], Wed, Thurs, Fri&lt;br /&gt;
* [[User:Vedranm|Vedran Miletic]], Wed, Thurs, Fri&lt;br /&gt;
* George Riley, Wed, Thurs&lt;br /&gt;
* Brian Swenson, Wed, Thurs&lt;br /&gt;
* Nicola Baldo, Wed, Thurs, maybe Fri&lt;br /&gt;
* Daniel Camara, Wed, Thurs, Fri&lt;br /&gt;
* Peter Barnes, Fri (and possibly parts of Wed, Thurs)&lt;br /&gt;
&lt;br /&gt;
= Suggested agenda/topics =&lt;br /&gt;
&lt;br /&gt;
Please list suggested discussion topics below and we will build a schedule at a later date.  Please also suggest 'read-ahead' items as needed.&lt;br /&gt;
&lt;br /&gt;
* Object Start/Stop&lt;br /&gt;
* ns-3 in education&lt;br /&gt;
* XML as a language for simulation specification, Peter Barnes' talk&lt;br /&gt;
** some ideas could be taken from SimGrid guys, they have rather small XML files that say a lot of things&lt;br /&gt;
* data collection framework&lt;br /&gt;
* variable test scope (bug 1563)&lt;br /&gt;
* Modularization of ns-3&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMar2012&amp;diff=6573</id>
		<title>DevelMeetingMar2012</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=DevelMeetingMar2012&amp;diff=6573"/>
		<updated>2012-02-28T18:03:30Z</updated>

		<summary type="html">&lt;p&gt;Pdbarnes: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
= Location and Schedule =&lt;br /&gt;
&lt;br /&gt;
At the same hotel as SIMUTools 2012, on Saturday March 24, the day after [http://www.nsnam.org/wns3/wns3-2012/ WNS3]&lt;br /&gt;
&lt;br /&gt;
* The meeting site is the [http://www.simutools.org/2012/Venue/ConferenceSite same site] as the conference&lt;br /&gt;
* The meeting has no registration fees&lt;br /&gt;
* The meeting is open to anyone interested&lt;br /&gt;
* Arrangements for lunch and coffee are still being investigated.&lt;br /&gt;
* The tentative schedule is 09h00-17h00 with lunch break.&lt;br /&gt;
* Remote participation (e.g. WebEx and audio) is being investigated.&lt;br /&gt;
&lt;br /&gt;
= Tentative Attendance =&lt;br /&gt;
&lt;br /&gt;
If you'd like to attend, please add your name.&lt;br /&gt;
&lt;br /&gt;
* Tommaso Pecorella (University of Florence)&lt;br /&gt;
* Tom Henderson&lt;br /&gt;
* Felipe Perrone&lt;br /&gt;
* George Riley&lt;br /&gt;
* Lalith Suresh&lt;br /&gt;
* Peter Barnes&lt;br /&gt;
&lt;br /&gt;
= Tentative Topics =&lt;br /&gt;
* Memory leaks extermination process, see John Abraham mail: [http://mailman.isi.edu/pipermail/ns-developers/2012-February/009990.html]&lt;br /&gt;
* Review ns-3 packaging (Fedora/Ubuntu), discuss long term support for releases&lt;br /&gt;
&lt;br /&gt;
= Action Points =&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
</feed>