REFERENCE
---------
If you use this code for a paper or research activity, please use the following reference:

Pedro Reviriego, Ken Christensen, Alfonso Snchez-Macin, and Juan Antonio Maestro. 2011. Using coordinated transmission with energy efficient ethernet. 
In Proceedings of the 10th international IFIP TC 6 conference on Networking - Volume Part I (NETWORKING'11), Jordi Domingo-Pascual, Pietro Manzoni, Ana Pont, Sergio Palazzo, and Caterina Scoglio (Eds.), 
Vol. Part I. Springer-Verlag, Berlin, Heidelberg, 160-171.

http://dx.doi.org/10.1007/978-3-642-20757-0_13

DESCRIPTION
-----------
This is a a stable version of the files you need to run the EEE implementation we made for ns2.
We have also created a modified version of the MAC implementation to specify a full-duplex channel and to enable bursty behaviour (see below).

They are based on ns-2.33 and you only need to copy them into the mac directory and add the following two lines to the ns2 Makefile:
        mac/wiredeee-phy.o \
        mac/mac-802_3-full.o \
and compile it again.

You will also need to add to the "tcl/lib/ns-default.tcl" this line:
Phy/WiredEEEPhy set bandwidth_ 10e9

It has been tested with 10GBase-T and it should work with 100Base-TX as well. 
Additionally, there is an approach to the implementation of 1000Base-T (where both ways should be turned off simultaneously).
All the EEE Output is currently being printed to the console. Times are printed every time the link completes the sleep transition.

You can find and modify the values for the different speeds in "wiredeee-phy.h". Of course, if you modify them, do not forget to compile ns2 again.

We also worked in implementing a bursty behaviour where the link is not waked up inmediately, but after waiting for a predefined time (so new packets can arrive and queued).
You can enable this behaviour in "mac-802_3-full.h" by setting the DEFAULT_BUSTINESS property. 
Property DEFAULT_BURST_TIME will be used to define the waiting time before waking up. There is also a property to define a maximum number of waiting packages.

SAMPLE SCRIPT
-------------
ns-scenarioGatewayLinux.tcl is a sample script we used for 10GBase-T. The class Mac/802_3Full is used for all the nodes, the Phy/WiredEEEPhy class is used in those interfaces where you want to record EEE times, while you keep Phy/WiredPhy for the other interfaces.
