Hi NS-uses,

    Can someone tell me where the pbject reference are returned by the
    folling statements

           TclObject* create(int, const char*const*) {
                 return (new WirelessPhy);
              }

    I have seen in NS code the Ns-programmer has used the reference to the
    objects created by the following code

     this is AODV:command function
        else if (strcmp(argv[1], "port-dmux") == 0) {
        dmux_ = (PortClassifier *)TclObject::lookup(argv[2]);
        if (dmux_ == 0) {
                fprintf (stderr, "%s: %s lookup of %s failed\n", __FILE__,
                argv[1], argv[2]);
                return TCL_ERROR;
                        }
       }

      By this above code, NS-programmer is getting pointer to the
      PortClassifier object from precompiled hirearchy, so that subsequently
      he can use it in AODV

      I want to understand how this is done, because I want to get reference
      of WirelessPhy object in AODV for cross layer work..

      Any suggestion on this is very helpful


     Thanks you all


     Mallapur Veerayya
     M.Tech(CE) <student>
     Reg No. 06307416
     IIT BOMBAY

Reply via email to