[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Problem sending data through agent



Hello fellow ns users,

Our research group is developing some simulations with ns and we are
having a (perhaps simple?) problem that some of you may hopefully
help us out with.

We are getting the following Tcl error message when trying to send packets
through customized application and agents (description of the environment
follows):

--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
        _o15: no target for slot -1
        _o15 type: Classifier/Hash/Dest
content dump:
classifier _o15
        0 offset
        0 shift
        2147483647 mask
        1 slots
                slot 1: _o60 (Classifier/Port)
        -1 default
---------- Finished standard no-slot{} default handler ----------

We are developing an application in NS 2.1b8a which is supposed to send
ADUs to multiple nodes. Following the steps in the tutorial, we created a
new agent extending the Agent class, and the required virtual functions.
We also created a subclass of Application. Each application instance is
connected to its agent. This is the code we have in our agent for sending
a packet to a specific receiver (say, receiver_id).

Packet* pkt = allocpkt();
hdr_ip* ip = hdr_ip::access(pkt);
ip->dst_.addr_ = receiver_id;
Agent::send(pkt, NULL);

In the Tcl code, the usual initalization is done: links are created, agents are
attached to nodes, applications get a handle of their respective agent, and
agents are connected to each other.

I hope I was able to describe clearly our problem. We will promptly supply
any extra information if anybody finds it useful to understand our situation.

Thanks in advance,
Guilherme B. Bedin
Unisinos University, Brazil.