[Click] new click element - assert error

Bhushan Chaudhari bhushanschaudhari at gmail.com
Thu Aug 19 22:31:33 EDT 2010


hi guys,

I am a newbie in the "click" world. I am trying to add new ports to
etherswitch element  using a write handler . The problem is if the number of
ports provided during the runtime are different from the number of ports i
have declared in the script , then  the assertion on line 561 of element.hh
fails.


I am not able to figure out how can iu  get rid of this error .


Any inputs are welcome.


this piece of code is one of cases in thw write handler


 case 4: { // changing no of i/p o/p ports using handlers
            /// we need to access int nports[]

           String temp2 = s;
           int no_of_ports = atoi(temp2.c_str());

        e->_nports[1] = no_of_ports;                /// nports 0 is number
of output ports , nport 1 is number of input ports . for the ether switch
the //////////number of ip , op ports hv to be same
          e->_nports[0] = no_of_ports;


             }


More information about the click mailing list