Wednesday, March 11, 2009

"no-slot" error for classifiers

"no-slot" error for classifiers

From previous post, a classifier is a multi-target packet forwarder. It classifies incoming packets into categories, and forwards packets in the same categories to the same NsObject.

The forwarding NsObject is installed in a so-called "slot". Class Classifier defines a link-list variable "slot_" which holds forwarding NsObjects. The NsObject is "i" slot can be obtained by referring to "slot[i]". If no NsObject is placed in slot "i", and you are trying to access "slot_[i]", a "no-slot" error will be shown on the screen.

Example (trying to access slot "-1"):

_o18: no target for slot -1
_o18 type: Classifier/Hash/Dest
content dump:
classifier _o18
0 offset
0 shift
2147483647 mask
1 slots
slot 2: _o116 (Classifier/Port)
-1 default



For more information about Classifiers, see Chapter 6 in the following book from Springer:

T. Issaraiyakul and E. Hossain, "Introduction to Network Simulator NS2", Springer 2008.
http://www.springer.com/engineering/signals/book/978-0-387-71759-3

You may also find the following website useful:
http://www.ece.ubc.ca/~teerawat/NS2.htm

3 comments:

Unknown said...

I got this error

--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o3486: no target for slot 0
_o3486 type: Classifier/Port
content dump:
classifier _o3486
0 offset
0 shift
2147483647 mask
1 slots
slot 255: _o3488 (CMUTrace/Recv)
---------- Finished standard no-slot{} default handler ----------

The simulation runs ok until to get the error above. If i understood your explanation, i have to add a pointer for my transport agent in slot 0. How can i do this?

Teerawat Issariyakul said...

Hi Filipe,

I suggest you to read the following post

http://www.ns2ultimate.com/post/513029699/classifiers-a-multi-target-packet-forwarder

Now for your question, suppose you have a Tcl instance $tcp and you have a classifier instance $clsfr. You can install $tcp in slot number 10 of $clsfr by using the following Tcl statement:

$clsfr install 0 $tcp

Again, please read the above post for the details.

Anonymous said...

I got the following error,plz help:
Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o20: no target for slot 3
_o20 type: Classifier/Addr
content dump:
classifier _o20
0 offset
22 shift
511 mask
1 slots
slot 0: _o21 (Classifier/Addr)
---------- Finished standard no-slot{} default handler ----------