View | Details | Raw Unified | Return to bug 453
Collapse All | Expand All

(-)a/doc/manual/node.texi (-1 / +1 lines)
 Lines 204-210    Link Here 
204
204
205
First, note that the @code{Receive ()} function has a matching signature
205
First, note that the @code{Receive ()} function has a matching signature
206
to the ReceiveCallback in the @code{class Node}.  This function pointer
206
to the ReceiveCallback in the @code{class Node}.  This function pointer
207
is inserted into the the Node's protocol handler when 
207
is inserted into the Node's protocol handler when 
208
@code{AddInterface ()} is called.  The actual registration is done
208
@code{AddInterface ()} is called.  The actual registration is done
209
with a statement such as:
209
with a statement such as:
210
follows:
210
follows:
(-)a/doc/tutorial/building-topologies.texi (-12 / +12 lines)
 Lines 133-139    Link Here 
133
  p2pNodes.Create (2);
133
  p2pNodes.Create (2);
134
@end verbatim
134
@end verbatim
135
135
136
Next, we delare another @code{NodeContainer} to hold the nodes that will be
136
Next, we declare another @code{NodeContainer} to hold the nodes that will be
137
part of the bus (CSMA) network.  First, we just instantiate the container
137
part of the bus (CSMA) network.  First, we just instantiate the container
138
object itself.  
138
object itself.  
139
139
 Lines 171-177    Link Here 
171
channels, and the next lines introduce them.  The @code{CsmaHelper} works just
171
channels, and the next lines introduce them.  The @code{CsmaHelper} works just
172
like a @code{PointToPointHelper}, but it creates and connects CSMA devices and
172
like a @code{PointToPointHelper}, but it creates and connects CSMA devices and
173
channels.  In the case of a CSMA device and channel pair, notice that the data
173
channels.  In the case of a CSMA device and channel pair, notice that the data
174
rate is specified by a @em{channel} attribute instead of a device attribute.
174
rate is specified by a @emph{channel} attribute instead of a device attribute.
175
This is because a real CSMA network does not allow one to mix, for example, 
175
This is because a real CSMA network does not allow one to mix, for example, 
176
10Base-T and 100Base-T devices on a given channel.  We first set the data rate
176
10Base-T and 100Base-T devices on a given channel.  We first set the data rate
177
to 100 megabits per second, and then set the speed-of-light delay of the channel
177
to 100 megabits per second, and then set the speed-of-light delay of the channel
 Lines 260-268    Link Here 
260
Recall that the @code{csmaNodes NodeContainer} contains one of the 
260
Recall that the @code{csmaNodes NodeContainer} contains one of the 
261
nodes created for the point-to-point network and @code{nCsma} ``extra'' nodes. 
261
nodes created for the point-to-point network and @code{nCsma} ``extra'' nodes. 
262
What we want to get at is the last of the ``extra'' nodes.  The zeroth entry of
262
What we want to get at is the last of the ``extra'' nodes.  The zeroth entry of
263
the @code{csmaNodes} container will the the point-to-point node.  The easy
263
the @code{csmaNodes} container will be the point-to-point node.  The easy
264
way to think of this, then, is if we create one ``extra'' CSMA node, then it
264
way to think of this, then, is if we create one ``extra'' CSMA node, then it
265
will be be at index one of the @code{csmaNodes} container.  By induction,
265
will be at index one of the @code{csmaNodes} container.  By induction,
266
if we create @code{nCsma} ``extra'' nodes the last one will be at index 
266
if we create @code{nCsma} ``extra'' nodes the last one will be at index 
267
@code{nCsma}.  You see this exhibited in the @code{Get} of the first line of 
267
@code{nCsma}.  You see this exhibited in the @code{Get} of the first line of 
268
code.
268
code.
 Lines 367-373    Link Here 
367
367
368
Now look at @code{second-1-0.pcap} and @code{second-1-1.pcap}.  The former is
368
Now look at @code{second-1-0.pcap} and @code{second-1-1.pcap}.  The former is
369
the pcap trace for device zero on node one and the latter is the trace file 
369
the pcap trace for device zero on node one and the latter is the trace file 
370
for device one on node one.  If you refer back to the topology illustrration at
370
for device one on node one.  If you refer back to the topology illustration at
371
the start of the section, you will see that node one is the node that has
371
the start of the section, you will see that node one is the node that has
372
both a point-to-point device and a CSMA device, so we should expect two pcap
372
both a point-to-point device and a CSMA device, so we should expect two pcap
373
traces for that node.
373
traces for that node.
 Lines 416-422    Link Here 
416
  ~/repos/ns-3-dev >
416
  ~/repos/ns-3-dev >
417
@end verbatim
417
@end verbatim
418
418
419
As you can see, the link type is now ``Ethernet.''  Something new has appeared,
419
As you can see, the link type is now ``Ethernet''.  Something new has appeared,
420
though.  The bus network needs @code{ARP}, the Address Resolution Protocol.
420
though.  The bus network needs @code{ARP}, the Address Resolution Protocol.
421
The node knows it needs to send the packet to IP address 10.1.2.4, but it
421
The node knows it needs to send the packet to IP address 10.1.2.4, but it
422
doesn't know the MAC address of the corresponding node.  It broadcasts on the
422
doesn't know the MAC address of the corresponding node.  It broadcasts on the
 Lines 445-451    Link Here 
445
  ~/repos/ns-3-dev >
445
  ~/repos/ns-3-dev >
446
@end verbatim
446
@end verbatim
447
447
448
Again, you see that the link type is ``Ethernet.''  The first two entries are
448
Again, you see that the link type is ``Ethernet''.  The first two entries are
449
the ARP exchange we just explained.  The third packet is the echo packet 
449
the ARP exchange we just explained.  The third packet is the echo packet 
450
being delivered to its final destination.
450
being delivered to its final destination.
451
451
 Lines 706-712    Link Here 
706
  p2pDevices = pointToPoint.Install (p2pNodes);
706
  p2pDevices = pointToPoint.Install (p2pNodes);
707
@end verbatim
707
@end verbatim
708
708
709
Next, we delare another @code{NodeContainer} to hold the nodes that will be
709
Next, we declare another @code{NodeContainer} to hold the nodes that will be
710
part of the bus (CSMA) network.
710
part of the bus (CSMA) network.
711
711
712
@verbatim
712
@verbatim
 Lines 835-841    Link Here 
835
Now, we are going to add mobility models.  We want the STA nodes to be mobile,
835
Now, we are going to add mobility models.  We want the STA nodes to be mobile,
836
wandering around inside a bounding box, and we want to make the AP node 
836
wandering around inside a bounding box, and we want to make the AP node 
837
stationary.  We use the @code{MobilityHelper} to make this easy for us.
837
stationary.  We use the @code{MobilityHelper} to make this easy for us.
838
First, we instantiate a @code{MobilityHelper} obejct and set some attributes
838
First, we instantiate a @code{MobilityHelper} object and set some attributes
839
controlling the ``position allocator'' functionality.
839
controlling the ``position allocator'' functionality.
840
840
841
@verbatim
841
@verbatim
 Lines 854-860    Link Here 
854
place the STA nodes.  Feel free to explore the Doxygen for class 
854
place the STA nodes.  Feel free to explore the Doxygen for class 
855
@code{ns3::GridPositionAllocator} to see exactly what is being done.
855
@code{ns3::GridPositionAllocator} to see exactly what is being done.
856
856
857
We have aranged our nodes on an initial grid, but now we need to tell them
857
We have arranged our nodes on an initial grid, but now we need to tell them
858
how to move.  We choose the @code{RandomWalk2dMobilityModel} which has the 
858
how to move.  We choose the @code{RandomWalk2dMobilityModel} which has the 
859
nodes move in a random direction at a random speed around inside a bounding 
859
nodes move in a random direction at a random speed around inside a bounding 
860
box.
860
box.
 Lines 896-902    Link Here 
896
@code{Ipv4AddressHelper} to assign IP addresses to our device interfaces.
896
@code{Ipv4AddressHelper} to assign IP addresses to our device interfaces.
897
First we use the network 10.1.1.0 to create the two addresses needed for our
897
First we use the network 10.1.1.0 to create the two addresses needed for our
898
two point-to-point devices.  Then we use network 10.1.2.0 to assign addresses
898
two point-to-point devices.  Then we use network 10.1.2.0 to assign addresses
899
the the CSMA network and then we assign addresses from network 10.1.3.0 to
899
to the CSMA network and then we assign addresses from network 10.1.3.0 to
900
both the STA devices and the AP on the wireless network.
900
both the STA devices and the AP on the wireless network.
901
901
902
@verbatim
902
@verbatim
 Lines 941-947    Link Here 
941
  clientApps.Stop (Seconds (10.0));
941
  clientApps.Stop (Seconds (10.0));
942
@end verbatim
942
@end verbatim
943
943
944
Since we have built an internetwork here, we need enable internetwork routing
944
Since we have built an internetwork here, we need to enable internetwork routing
945
just as we did in the @code{second.cc} example script.
945
just as we did in the @code{second.cc} example script.
946
946
947
@verbatim
947
@verbatim
(-)a/doc/tutorial/conceptual-overview.texi (-5 / +5 lines)
 Lines 82-88    Link Here 
82
@cindex Channel
82
@cindex Channel
83
83
84
In the real world, one can connect a computer to a network.  Often the media
84
In the real world, one can connect a computer to a network.  Often the media
85
over which data flows in these netowrks are called @emph{channels}.  When
85
over which data flows in these networks are called @emph{channels}.  When
86
you connect your Ethernet cable to the plug in the wall, you are connecting 
86
you connect your Ethernet cable to the plug in the wall, you are connecting 
87
your computer to an Ethernet communication channel.  In the simulated world
87
your computer to an Ethernet communication channel.  In the simulated world
88
of @command{ns-3}, one connects a @code{Node} to an object representing a
88
of @command{ns-3}, one connects a @code{Node} to an object representing a
 Lines 505-511    Link Here 
505
by the @code{PointToPointHelper}, the attributes previously set in the helper
505
by the @code{PointToPointHelper}, the attributes previously set in the helper
506
are used to initialize the corresponding attributes in the created objects.
506
are used to initialize the corresponding attributes in the created objects.
507
507
508
After executing the the @code{pointToPoint.Install (nodes)} call we will have
508
After executing the @code{pointToPoint.Install (nodes)} call we will have
509
two nodes, each with an installed point-to-point net device and a 
509
two nodes, each with an installed point-to-point net device and a 
510
point-to-point channel between them.  Both devices will be configured to 
510
point-to-point channel between them.  Both devices will be configured to 
511
transmit data at five megabits per second over the channel which has a two 
511
transmit data at five megabits per second over the channel which has a two 
 Lines 658-666    Link Here 
658
658
659
Recall that we used an @code{Ipv4InterfaceContainer} to keep track of the IP 
659
Recall that we used an @code{Ipv4InterfaceContainer} to keep track of the IP 
660
addresses we assigned to our devices.  The zeroth interface in the 
660
addresses we assigned to our devices.  The zeroth interface in the 
661
@code{interfaces} container is going to coorespond to the IP address of the 
661
@code{interfaces} container is going to correspond to the IP address of the 
662
zeroth node in the @code{nodes} container.  The first interface in the 
662
zeroth node in the @code{nodes} container.  The first interface in the 
663
@code{interfaces} container cooresponds to the IP address of the first node 
663
@code{interfaces} container corresponds to the IP address of the first node 
664
in the @code{nodes} container.  So, in the first line of code (from above), we
664
in the @code{nodes} container.  So, in the first line of code (from above), we
665
are creating the helper and telling it so set the remote address of the client
665
are creating the helper and telling it so set the remote address of the client
666
to be  the IP address assigned to the node on which the server resides.  We 
666
to be  the IP address assigned to the node on which the server resides.  We 
 Lines 756-762    Link Here 
756
@end verbatim
756
@end verbatim
757
757
758
You can now run the example (note that if you build your program in the scratch
758
You can now run the example (note that if you build your program in the scratch
759
directory you must run it out of the scratch direcory):
759
directory you must run it out of the scratch directory):
760
760
761
@verbatim
761
@verbatim
762
  ~/repos/ns-3-dev > ./waf --run scratch/first
762
  ~/repos/ns-3-dev > ./waf --run scratch/first
(-)a/doc/tutorial/in-process/introduction.texi (-1 / +1 lines)
 Lines 676-682    Link Here 
676
@cindex Channel
676
@cindex Channel
677
677
678
In the real world, one can connect a computer to a network.  Often the media
678
In the real world, one can connect a computer to a network.  Often the media
679
over which data flows in these netowrks are called @emph{channels}.  When
679
over which data flows in these networks are called @emph{channels}.  When
680
you connect your Ethernet cable to the plug in the wall, you are connecting 
680
you connect your Ethernet cable to the plug in the wall, you are connecting 
681
your computer to an Ethernet communication channel.  In the simulated world
681
your computer to an Ethernet communication channel.  In the simulated world
682
of ns-3 one connects a @code{Node} to an object representing a
682
of ns-3 one connects a @code{Node} to an object representing a
(-)a/doc/tutorial/tweaking.texi (-3 / +3 lines)
 Lines 744-750    Link Here 
744
744
745
The rationale for this explicit division is to allow users to attach new
745
The rationale for this explicit division is to allow users to attach new
746
types of sinks to existing tracing sources, without requiring editing and 
746
types of sinks to existing tracing sources, without requiring editing and 
747
recompilation of the the core of the simulator.  Thus, in the example above, 
747
recompilation of the core of the simulator.  Thus, in the example above, 
748
a user could define a new tracing sink in her script and attach it to an 
748
a user could define a new tracing sink in her script and attach it to an 
749
existing tracing source defined in the simulation core by editing only the 
749
existing tracing source defined in the simulation core by editing only the 
750
user script.
750
user script.
 Lines 885-891    Link Here 
885
the final segments of the ``trace path'' which are @code{TxQueue/Enqueue}.
885
the final segments of the ``trace path'' which are @code{TxQueue/Enqueue}.
886
886
887
The remaining lines in the trace should be fairly intuitive.  References 03-04
887
The remaining lines in the trace should be fairly intuitive.  References 03-04
888
indicate that the packet is encapulated in the point-to-point protocol.  
888
indicate that the packet is encapsulated in the point-to-point protocol.  
889
References 05-07 show that the packet has an IP version four header and has
889
References 05-07 show that the packet has an IP version four header and has
890
originated from IP address 10.1.1.1 and is destined for 10.1.1.2.  References
890
originated from IP address 10.1.1.1 and is destined for 10.1.1.2.  References
891
08-09 show that this packet has a UDP header and, finally, reference 10 shows
891
08-09 show that this packet has a UDP header and, finally, reference 10 shows
 Lines 952-958    Link Here 
952
952
953
In our example script, we will eventually see files named ``first-0-0.pcap'' 
953
In our example script, we will eventually see files named ``first-0-0.pcap'' 
954
and ``first.1-0.pcap'' which are the pcap traces for node 0-device 0 and 
954
and ``first.1-0.pcap'' which are the pcap traces for node 0-device 0 and 
955
node 1-device 1, respectively.
955
node 1-device 0, respectively.
956
956
957
Once you have added the line of code to enable pcap tracing, you can run the
957
Once you have added the line of code to enable pcap tracing, you can run the
958
script in the usual way:
958
script in the usual way:

Return to bug 453