###########################################################

# README         : Diffusion port into ns-2
# author         : Padma Haldar
#
#
###########################################################

We have now completed several rounds of porting diffusion testbed code into ns.
However as diffusion continues to develop, we shall continue to work on
extending/debugging/improving the port.
You can get the diffusion code from the latest snapshot from http://www.isi.edu/nsnam/ns/ns-build.html
Please note that since we plan to work on the port,
you'll need to download the latest snapshot to see the most recent updates.

There is a version of diffusion already in ns which was implemented
several years back and had become relatively old and outdated. The newer
version, ported from SCADDS group testbed has several features not present
in the older version. We outline the highlights of this port below:

* Directed Diffusion has been implemented by SCADDS group at USC/ISI.
Briefly it consists of 
(a) an application layer that generates interest (for sinks) and data (for
sources)
(b) a core Diffusion layer that serves as an input/output interface for
all diffusion communications
(c) filters that are used to manipulate data/messages that may have
several applications (in-network aggregration, logging , debugging etc)
(d) an elaborate data naming or attribute system.

* Application layer APIs are defined for subscribing (unsubscribing) to
certain types of data, publishing (unpublish) certain set of data and
for sending and receiving data into/from the network.

* Diffusion interests and data are represented by
attribute-value-operation tuplet. The operation field is used to match
attributes by means of certain operation rules.

* The older version of diffusion already in ns has a very simple attribute
representation (single integer); and filters were not implemented.

* The port is under ~ns/diffusion3 dir and tcl methods for setting up
core-diffusion and diffusion-application agents in a node can be found
under ~ns/tcl/lib/{ns-lib,ns-diffusion}.tcl

* tcl/ex/diffusion3/(simple-diffusion.tcl, diffusion-100.tcl,
diffusion-500.tcl) are
example scripts. The first scenario consists of a simple 3 node topology using ping application,
whereas the second and third scripts use a 100 and 500 node topology
respectively, using the the same ping app.
tcl/test/test-suite-diffusion3.tcl is a test-suite for validating the
port.

* Basic ns tracing can be turned on as shown in the examples.

* we have a ping application and push application under 
(apps/pingapp/*). We plan to have other diffusion applications in place in the fiture.

*  Note that while we have a first-cut implementation of Wei Ye's energy-aware 
mac layer called SMAC in ns, it still is not a competely matured code. And we 
continue to work on SMAC. In the meantime diffusion users
may wish to adjust the 802.11 MAC energy parameters to approximate a
sensor-net specific MAC.

* This version of the port can be found out from the file VERSION residing in 
this dir of diffusion3.

Any comments, bug-reports and other feedbacks are welcome as usual.

