doc/tutorial/introduction.texi
author Tom Henderson <tomh@tomh.org>
Mon, 15 Sep 2008 21:37:40 -0700
changeset 3700 fa1c7b813873
parent 3689 d8f140c053d1
child 3712 fd3a9f294807
permissions -rw-r--r--
freshen tutorial
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     1
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     2
@c ========================================================================
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     3
@c Begin document body here
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     4
@c ========================================================================
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     5
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     6
@c ========================================================================
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     7
@c PART:  Introduction
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     8
@c ========================================================================
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     9
@c The below chapters are under the major heading "Introduction"
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    10
@c This is similar to the Latex \part command
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    11
@c
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    12
@c ========================================================================
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    13
@c Introduction
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    14
@c ========================================================================
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    15
@node Introduction
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    16
@chapter Introduction
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    17
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    18
@menu
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    19
* For ns-2 Users::
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    20
* Contributing::
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    21
* Tutorial Organization::
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    22
@end menu
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    23
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    24
The @command{ns-3} simulator is a discrete-event network simulator targeted 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    25
primarily for research and educational use.  The 
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    26
@uref{http://www.nsnam.org,,ns-3 project}, 
3341
7130a81b683c nits on Sections 1-4
Tom Henderson <tomh@tomh.org>
parents: 3333
diff changeset
    27
started in 2006, is an open-source project developing ns-3.
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    28
3346
Craig Dowell <craigdo@ee.washington.edu>
parents: 3345 3343
diff changeset
    29
Primary documentation for the @command{ns-3} project is available in four
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    30
forms:
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    31
@itemize @bullet
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    32
@item @uref{http://www.nsnam.org/doxygen/index.html,,ns-3 Doxygen/Manual}:  
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    33
Documentation of the public APIs of the simulator
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    34
@item Tutorial (this document)
3341
7130a81b683c nits on Sections 1-4
Tom Henderson <tomh@tomh.org>
parents: 3333
diff changeset
    35
@item @uref{http://www.nsnam.org/docs/manual.html,,Reference Manual}:  Reference Manual
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    36
@item @uref{http://www.nsnam.org/wiki/index.php,, ns-3 wiki}
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    37
@end itemize
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    38
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    39
The purpose of this tutorial is to introduce new @command{ns-3} users to the 
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    40
system in a structured way.  It is sometimes difficult for new users to
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    41
glean essential information from detailed manuals and to convert this
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    42
information into working simulations.  In this tutorial, we will build 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    43
several example simulations, introducing and explaining key concepts and
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    44
features as we go.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    45
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    46
As the tutorial unfolds, we will introduce the full ns-3 documentation 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    47
and provide pointers to source code for those interested in delving deeper
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    48
into the workings of the system.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    49
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    50
A few key points are worth noting at the onset:
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    51
@itemize @bullet
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    52
@item Ns-3 is not an extension of @uref{http://www.isi.edu/nsnam/ns,,ns-2}; 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    53
it is a new simulator.  The two simulators are both written in C++ but 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    54
@command{ns-3} is a new simulator that does not support the ns-2 APIs.  Some 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    55
models from ns-2 have already been ported from ns-2 to ns-3. The project will
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    56
continue to maintain ns-2 while ns-3 is being built, and will study transition
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    57
and integration mechanisms.
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    58
@item @command{Ns-3} is open-source, and the project strives to maintain an 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    59
open  environment for researchers to contribute and share their software.  
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    60
@end itemize
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    61
 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    62
@node For ns-2 Users
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    63
@section For ns-2 Users
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    64
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    65
For those familiar with ns-2, the most visible outward change when moving to 
3689
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    66
ns-3 is the choice of scripting language.  Ns-2 is 
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    67
scripted in OTcl and results of simulations can be visualized using the 
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    68
Network Animator @command{nam}.  It is not possible to run a simulation
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    69
in ns-2 purely from C++ (i.e., as a main() program without any OTcl).
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    70
Moreover, some components of ns-2 are written in C++ and others in OTcl.
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    71
In ns-3, the simulator is written entirely in C++, with optional
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    72
Python bindings.  Simulation scripts can therefore be written in C++
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    73
or in Python.  The results of some simulations can be visualized by
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    74
@command{nam}, but new animators are under development.  Since ns-3
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    75
generates pcap packet trace files, other utilities can be used to
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    76
analyze traces as well.
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    77
In this tutorial, we will first concentrate on scripting 
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    78
directly in C++ and interpreting results via ascii trace files.  
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    79
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    80
But there are similarities as well (both, for example, are based on C++ 
3689
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    81
objects, and some code from ns-2 has already been ported to ns-3).
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    82
We will try to highlight differences between ns-2 and ns-3
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    83
as we proceed in this tutorial.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    84
3689
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    85
A question that we often hear is "Should I still use ns-2 or move to
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    86
ns-3?"  The answer is that it depends.  ns-3 does not have all of the
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    87
models that ns-2 currently has, but on the other hand, ns-3 does have
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    88
new capabilities (such as handling multiple interfaces on nodes 
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    89
correctly, use of IP addressing and more alignment with Internet
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    90
protocols and designs, more detailed 802.11 models, etc.).  ns-2
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    91
models can usually be ported to ns-3 (a porting guide is under
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    92
development).  There is active development on multiple fronts for ns-3.
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    93
The ns-3 developers believe (and certain early users have proven) that
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    94
ns-3 is ready for active use, and should be an attractive alternative
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    95
for users looking to start new simulation projects.  
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
    96
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    97
@node Contributing
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    98
@section Contributing
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    99
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   100
@cindex contributing
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   101
@command{Ns-3} is a research and educational simulator, by and for the 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   102
research community.  It will rely on the ongoing contributions of the 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   103
community to develop new models, debug or maintain existing ones, and share 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   104
results.  There are a few policies that we hope will encourage people to 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   105
contribute to @command{ns-3} like they have for ns-2:
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   106
@itemize @bullet
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   107
@item Open source licensing based on GNU GPLv2 compatibility;
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   108
@item @uref{http://www.nsnam.org/wiki/index.php,,wiki};
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   109
@item @uref{http://www.nsnam.org/wiki/index.php/Contributed_Code,,Contributed Code} page, similar to ns-2's popular 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   110
@uref{http://nsnam.isi.edu/nsnam/index.php/Contributed_Code,,Contributed Code} 
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   111
page;
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   112
@item @code{src/contrib} directory (we will host your contributed code);
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   113
@item Open @uref{http://www.nsnam.org/bugzilla,,bug tracker};
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   114
@item @command{Ns-3} developers will gladly help potential contributors to get
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   115
started with the simulator (please contact @uref{http://www.nsnam.org/people.html,,one of us}).
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   116
@end itemize  
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   117
3689
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
   118
We realize that if you are reading this document, contributing back to 
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
   119
the project is probably not your foremost concern at this point, but
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
   120
we want you to be aware that contributing is in the spirit of the project and
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
   121
that even the act of dropping us a note about your early experience 
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
   122
with ns-3 (e.g. "this tutorial section was not clear..."), 
d8f140c053d1 updates to the tutorial introduction
Tom Henderson <tomh@tomh.org>
parents: 3356
diff changeset
   123
reports of stale documentation, etc. are much appreciated. 
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   124
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   125
@node Tutorial Organization
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   126
@section Tutorial Organization
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   127
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   128
The tutorial assumes that new users might initially follow a path such as the
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   129
following:
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   130
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   131
@itemize @bullet
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   132
@item Try to download and build a copy;
3352
4b3c76369b28 remove section in tutorial, move browsing part to where it makes more sense.
Craig Dowell <craigdo@ee.washington.edu>
parents: 3346
diff changeset
   133
@item Try to run a few sample programs;
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   134
@item Look at simulation output, and try to adjust it.
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   135
@end itemize
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   136
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   137
As a result, we have tried to organize the tutorial along the above
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   138
broad sequences of events.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   139
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   140
@c ========================================================================
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   141
@c Resources
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   142
@c ========================================================================
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   143
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   144
@node Resources
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   145
@chapter Resources
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   146
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   147
@menu
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   148
* The Web::
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   149
* Mercurial::
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   150
* Waf::
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   151
* Development Environment::
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   152
* Socket Programming::
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   153
@end menu
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   154
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   155
@node The Web
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   156
@section The Web
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   157
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   158
@cindex www.nsnam.org
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   159
@cindex documentation
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   160
@cindex architecture
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   161
There are several important resources of which any @command{ns-3} user must be
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   162
aware.  The main web site is located at @uref{http://www.nsnam.org} and 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   163
provides access to basic information about the ns-3 system.  Detailed 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   164
documentation is available through the main web site at
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   165
@uref{http://www.nsnam.org/documents.html}.  You can also find documents 
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   166
relating to the system architecture from this page.
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   167
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   168
There is a Wiki that complements the main ns-3 web site which you will find at 
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   169
@uref{http://www.nsnam.org/wiki/}.  You will find user and developer FAQs 
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   170
there, as well as troubleshooting guides, third-party contributed code, 
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   171
papers, etc. 
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   172
3339
ff29f4ba75ed finish up with a wifi example
Craig Dowell <craigdo@ee.washington.edu>
parents: 3333
diff changeset
   173
@cindex mercurial repository
ff29f4ba75ed finish up with a wifi example
Craig Dowell <craigdo@ee.washington.edu>
parents: 3333
diff changeset
   174
@cindex ns-3-dev repository
ff29f4ba75ed finish up with a wifi example
Craig Dowell <craigdo@ee.washington.edu>
parents: 3333
diff changeset
   175
@cindex release repository
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   176
The source code may be found and browsed at @uref{http://code.nsnam.org/}. 
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   177
There you will find the current development tree in the repository named
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   178
@code{ns-3-dev}. Past releases and experimental repositories of the core
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   179
developers may also be found there.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   180
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   181
@node Mercurial
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   182
@section Mercurial
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   183
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   184
Complex software systems need some way to manage the organization and 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   185
changes to the underlying code and documentation.  There are many ways to
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   186
perform this feat, and you may have heard of some of the systems that are
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   187
currently used to do this.  The Concurrent Version System (CVS) is probably
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   188
the most well known.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   189
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   190
@cindex software configuration management
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   191
@cindex Mercurial
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   192
The @command{ns-3} project uses Mercurial as its source code management system.
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   193
Although you do not need to know much about Mercurial in order to complete
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   194
this tutorial, we recommend becoming familiar with Mercurial and using it 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   195
to access the source code.  Mercurial has a web site at 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   196
@uref{http://www.selenic.com/mercurial/},
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   197
from which you can get binary or source releases of this Software
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   198
Configuration Management (SCM) system.  Selenic (the developer of Mercurial)
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   199
also provides a tutorial at 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   200
@uref{http://www.selenic.com/mercurial/wiki/index.cgi/Tutorial/},
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   201
and a QuickStart guide at
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   202
@uref{http://www.selenic.com/mercurial/wiki/index.cgi/QuickStart/}.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   203
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   204
You can also find vital information about using Mercurial and @command{ns-3}
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   205
on the main @command{ns-3} web site.
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   206
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   207
@node Waf
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   208
@section Waf
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   209
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   210
@cindex Waf
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   211
@cindex make
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   212
@cindex build
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   213
Once you have source code downloaded to your local system, you will need 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   214
to compile that source to produce usable programs.  Just as in the case of
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   215
source code management, there are many tools available to perform this 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   216
function.  Probably the most will known of these tools is @code{make}.  Along
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   217
with being the most well known, @code{make} is probably the most difficult to
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   218
use in a very large and highly configurable system.  Because of this, many
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   219
alternatives have been developed.  Recently these systems have been developed
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   220
using the Python language.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   221
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   222
The build system @code{Waf} is used on the @command{ns-3} project.  It is one 
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   223
of the new generation of Python-based build systems.  You will not need to 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   224
understand any Python to build the existing ns-3 system, and will 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   225
only have to understand a tiny and intuitively obvious subset of Python in 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   226
order to extend the system in most cases.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   227
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   228
For those interested in the gory details of Waf, the main web site can be 
3341
7130a81b683c nits on Sections 1-4
Tom Henderson <tomh@tomh.org>
parents: 3333
diff changeset
   229
found at @uref{http://freehackers.org/~tnagy/waf.html}.
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   230
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   231
@node Development Environment
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   232
@section Development Environment
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   233
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   234
@cindex C++
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   235
@cindex Python
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   236
As mentioned above, scripting in ns-3 is done in C++ or Python.
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   237
As of ns-3.2, most of the ns-3 API is available in Python, but the models
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   238
are written in C++ in either case.  A working 
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   239
knowledge of C++ and object-oriented concepts is assumed in this document.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   240
We will take some time to review some of the more advanced concepts or 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   241
possibly unfamiliar language features, idioms and design patterns as they 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   242
appear.  We don't want this tutorial to devolve into a C++ tutorial, though,
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   243
so we do expect a basic command of the language.  There are an almost 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   244
unimaginable number of sources of information on C++ available on the web or
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   245
in print.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   246
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   247
If you are new to C++, you may want to find a tutorial- or cookbook-based
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   248
book or web site and work through at least the basic features of the language
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   249
before proceeding.  For instance, 
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   250
@uref{http://www.cplusplus.com/doc/tutorial/,,this tutorial}.
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   251
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   252
@cindex toolchain
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   253
@cindex GNU
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   254
The @command{ns-3} system uses several components of the GNU ``toolchain'' 
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   255
for development.  A 
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   256
software toolchain is the set of programming tools available in the given 
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   257
environment. For a quick review of what is included in the GNU toolchain see,
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   258
@uref{http://en.wikipedia.org/wiki/GNU_toolchain}.  ns-3 uses gcc, 
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   259
GNU binutils, and gdb.  However, we do not use the GNU build system,
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   260
either make or autotools, using Waf instead.
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   261
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   262
@cindex Linux
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   263
Typically an @command{ns-3} author will work in Linux or a Linux-like
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   264
environment.  For those running under Windows, there do exist environments 
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   265
which simulate the Linux environment to various degrees.  The @command{ns-3} 
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   266
project supports development in the Cygwin environment for 
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   267
these users.  See @uref{http://www.cygwin.com/} 
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   268
for details on downloading (MinGW is presently not supported).
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   269
Cygwin provides many of the popular Linux system commands.
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   270
It can, however, sometimes be problematic due to the way it actually does its 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   271
emulation, and sometimes interactions with other Windows software can cause 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   272
problems.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   273
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   274
@cindex Cygwin
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   275
@cindex MinGW
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   276
If you do use Cygwin or MinGW; and use Logitech products, we will save you
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   277
quite a bit of heartburn right off the bat and encourage you to take a look
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   278
at the @uref{http://www.mingw.org/MinGWiki/index.php/FAQ,,MinGW FAQ}.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   279
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   280
@cindex Logitech
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   281
Search for ``Logitech'' and read the FAQ entry, ``why does make often 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   282
crash creating a sh.exe.stackdump file when I try to compile my source code.''
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   283
Believe it or not, the @code{Logitech Process Monitor} insinuates itself into
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   284
every DLL in the system when it is running.  It can cause your Cygwin or
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   285
MinGW DLLs to die in mysterious ways and often prevents debuggers from 
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   286
running.  Beware of Logitech software when using Cygwin.
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   287
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   288
Another alternative to Cygwin is to install a virtual machine environment
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3689
diff changeset
   289
such as VMware server and install a Linux virtual machine.
3333
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   290
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   291
@node Socket Programming
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   292
@section Socket Programming
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   293
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   294
@cindex sockets
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   295
We will assume a basic facility with the Berkeley Sockets API in the examples
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   296
used in this tutorial.  If you are new to sockets, we recommend reviewing the
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   297
API and some common usage cases.  For a good overview of programming TCP/IP
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   298
sockets we recommend @uref{http://www.elsevier.com/wps/product/cws_home/680765,,Practical TCP/IP Sockets in C, Donahoo and Calvert}.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   299
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   300
There is an associated web site that includes source for the examples in the
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   301
book, which you can find at:
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   302
@uref{http://cs.baylor.edu/~donahoo/practical/CSockets/}.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   303
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   304
If you understand the first four chapters of the book (or for those who do
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   305
not have access to a copy of the book, the echo clients and servers shown in 
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   306
the website above) you will be in good shape to understand the tutorial.
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   307
There is a similar book on Multicast Sockets,
76188c437e2e swapping in all of tutorial would be better
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   308
@uref{http://www.elsevier.com/wps/product/cws_home/700736,,Multicast Sockets, Makofske and Almeroth}.
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   309
that covers material you may need to understand if you look at the multicast 
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3352
diff changeset
   310
examples in the distribution.