[Ns-developers] Multipoint net device and channel
emmanuelle.laprise at bluekazoo.ca
Wed Jun 20 10:55:00 PDT 2007
I have created a version of the ns-3-dev code that has added the
implementation of multipoint channels and devices. Since my goal is to
use this to simulate ethernet network, I have also created an
infrastructure that does not use any of the ipv4 code. If you have any
comments on the approach that I took, on the implementation or on
anything else, let me know and I will use them to improve the code.
Files are located at: http://code.nsnam.org/laprisee/ns-3-mp
One of the goals was to decouple the net devices and applications from
the protocols that use them. (Not that there was a lot of coupling
before, but there was a little bit).
Files that were added:
** Added an example that uses multipoint channels. Currently this
example is in debug mode and will write a lot to the screen. Tracing has
not been tested, and I don't think that it is working.
** These files were added to support multipoint channels and multipoint
net devices. In a multipoint channel, all packets that are written to a
channel are received by all net devices connected to the channel. If the
channel is busy, then the net device must wait before transmitting. In
the current implementation, there are no collisions as a net device is
not allowed to write to a busy channel and a channel stays busy until
all net devices have received the packet. Propagation delays between all
stations is also constant.
** This is a kind of dummy node that can be used as a packet source
and/or sink when using multipoint channels. It does not require the use
of ipv4. Another node that acts as an ethernet packet switch will also
** These files were added to support the use of ethernet packets.
Functions exist to add the FCS, but the FCS calculations have not yet
** Agents are used to convert between application data buffers and a
protocol specific packet format. They are also the link between
application and net devices. In the tx direction, the mac-agent can be
configured to have a src and dest MAC address. With these, data buffers
are converted into ethernet packets and sent to the net devices. In the
rx direction, the mac-agent will drop all packets that are not addressed
to it. It is also possible for the mac-agent to be configured to receive
packets from a single source. Currently agents are connected to net
devices such that they emit packets straight to the network, bypassing
the node. In the future, it will be optional for them to send packets to
the netdevices such that the netdevice forwards the packet to the node
for further processing before being sent out into the network.
** Based on the onoff-application, this application uses agents instead
of sockets. This was done because sockets seem to need to connect two
entities, whereas I wanted to treat the application as a straight packet
generator that does not know or care where its packets are going. They
can be going to any number of destinations. It is the agents that are
linked together, if the protocol that they are implemented requires it.
** This class is needed to calculate backoff time when trying to
retransmit on a busy multipoint channels
Files that were modified:
** Added SetByte and GetByte functions that allow the user to set and
get one byte of a MAC address at a time.
** Added a dummy function to support the new virtual SendTo function in
the NetDevice base class that does not require a destination address
(function needs to be present because of mp support).
** Modified to compile the new files that were added.
More information about the Ns-developers