[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] forwarding mcast packets
----- Original Message -----
From: "Per Olesen" <[email protected]>
To: "list-ns-users" <[email protected]>
Sent: Wednesday, December 05, 2001 8:45 AM
Subject: [ns] forwarding mcast packets
> Hi,
>
> I have a problem forwarding IP multicast packets from a multicast classifier.
> In my classifier, I determine which next hop(s) that should receive the
> packet. The next hop is identified by a node id and OTcl name.
>
> Then I do a lookup on the node name using TclObject::lookup() and then I call
> recv(pkt) on the reference returned.
You may want to take a more careful look at the classifier. What slot_[] returns is the next hop link HEAD, instead of the next hop node. A packet can only be forwarded from the ns object it is at to an object the current object targets (i.e., directly connected to).
Hope this helps.
Jerry
>
> But the packet never seems to reach its destination (nothing seems to happen).
> I do this, with the packet I forward:
>
> Packet* packetCopy = pkt->copy();
>
> hdr_cmn->prev_hop_ = node_id_; // node id of forwarding node
> hdr_cmn->next_hop_ = nextnodeid; //node id of next hop node
> hdr_cmn->addr_type() = NS_AF_INET;
> hdr_cmn->direction() = hdr_cmn::DOWN;
>
> next->recv(packetCopy, hndl);
>
> What could I be doing wrong?
>
> Regards, Per
>
>