Hello,
                I had to spend this nice warm saturday afternoon debugging ns-2 
: 
( since I encountered the
Classifier::no-slot error. A quick search on www.isi.edu/nsnam  
revealed lots of such queries, but few solutions that I could  
directly apply.
If you encounter the same error, this is probably the first (and  
easiest?) solution that you should try.

                 In my TCL script I was connecting the UDP and SINK agents 
before  
attaching them to the nodes. For e.g., my script had

        set udp_(0) [ new Agent/UDP]
        set sink_(0) [ new Agent/LossMonitor ]
        # set some parameters, including attaching the CBR
        $ns connect $udp_(0) $sink_(0) ### here goes one saturday afternoon

        $ns attach-agent $node_(1) $udp_(0)
        $ns attach-agent $node_(0) $sink_(0)

        I believe that it is this which causes the error - with my belief  
being supported by the following facts:
a) my simulation works if I move the "$ns connect $udp(0) $sink(0)"  
line to after the attach-agent's line with everything else remaining  
the same.
b) the following comment in ns-lib.tcl :   "#XXX need to check that  
agents are attached to nodes already"

        In summary, if you connect the agents before attaching them to the  
nodes, then I have verified that:
        a)  in the connect call,  the UDP agent immediately gets the ip of  
the sink  which is -1 since the sink is not (yet!) attached to any  
node.   
                        - see simplex-connect in ns-lib.tcl
        b) The UDP agent sends packets out with a destination of -1  for  
which the classifier is unable to find a slot, and hence (correctly)  
complains.
                        - use gdb and tcldebug

Of course, YMMV and the standard disclaimers apply - especially  
because I am sure that there are other ways to get the same error.
~Madhu.


        
        


Reply via email to