Hello, I am having problems with packet generation in a Hierarchical
simulation.

When I receive an udp packet, I get the Power of the received packet Pkrxpw,
and if the power is lower than a Threshold, I have to generate a packet of
another type and send it to a node.

In mac 802_11.cc recv method is the place where y get the packet power and
depending on it I call a send method of an Agent I have created similar to
ping of marc greiƛ tutorial that creates a packet like this:

    hdr_ip* hdrip = hdr_ip::access(pkt);
    hdr_mih* hdr = hdr_mih::access(pkt);
    hdr_cmn* cmn = hdr_cmn::access(pkt);
    hdr->size_LD=50;
    cmn->ptype()=PT_PING;
    // Send the packet
    Scheduler::instance().schedule(target_, pkt, 0.0);

But I get a message :Scheduler: attempt to schedule an event with a NULL
handler.  Don't DO that.
I have tried to set  ports, daddr and srcaddr in tcl and in c++ code but I
get the same message.

I have tried to use send(p,0) and then I get a segmentation fault...

I don know if the problem could be that I am sending the packet while the
udp packet is being sent or it is another thing.

Help would be appreciated.

Best Regards,

Pablo

Reply via email to