[ns] working with command()

Sagar.Sanghani at colorado.edu Sagar.Sanghani at colorado.edu
Tue Jan 27 11:52:40 PST 2004


Hi,

I am new to ns. I need to send a message from my TCL script to the 802.11
mac to modify a small thing.

I added a small compare in the command function in the mac-802_11.cc, as shown
below.


int
Mac802_11::command(int argc, const char*const* argv)
{
                if (argc == 2) {
                if(strcmp(argv[1], "call_my_func") == 0) {
                myfunc();
                }
        }
..........



In my TCL script after creating the wireless nodes I simply say

node1 call_my_func

The code compiles fine. However it never calls myfunc(). Am I doing the right
thing?? If not does anyone have some suggestions?

-Sagar



More information about the Ns-users mailing list