[ns] How to access mac layer in c++ of ns2

Daniel Dekst dolkoff at yahoo.com.cn
Wed Oct 15 21:52:32 PDT 2008


Hi, everyone,

I know how to access physical layer since Class Node provides a variable ifhead_ for list of phys.
So
WirelessPhy* physicalLayer = (WirelessPhy*)(node_->ifhead()).lh_first;
works.

But it does not provide list of mac, thus can I access mac layer similar as above?
I know tcl may work by calling mac layer and then again use tcl to return the desired value, but is there any method to access it directly using c++?

Best,
Pei

Pei Huang, Ph.D. student
Dept. of Computer Science and Engineering
Michigan State University
http://dekst.awardspace.com
       
---------------------------------
 ÑÅ»¢ÓÊÏ䣬ÄúµÄÖÕÉúÓÊÏ䣡


More information about the Ns-users mailing list