[ns] add a function to

Chen Wen-Jen r7725029@im.ntu.edu.tw
Wed, 28 Feb 2001 23:04:12 +0800 (CST)


hi...

I add a public data member "int test" to drop-tail class.
(drop-tail.h)

And then, add following codes to drop-tail.cc
First, at DropTail::command function:
        if (argc == 3) {
                if (strcmp(argv[1], "my_function")==0) {
                  printf("%d",test);
                }
             }
Second, at DropTail::enque function
       test = 10;

Now, every enque action will make test to be 10.
And then, whenever I invoke "$drop-tail-q1 my_function"
in my ns script, it should print out 10.
But this doesn't work.
It seems that test at enque and command functions are different instance.
Why?
and how to get enque function's data within command function?

thanks a lot... :)

                 Jay...