Identifying packet incoming link
Thu, 26 Mar 1998 03:21:50 -0600 (CST)
After a node receives a multicast packet, is there a way to
determine the link the packet came from, given the interface
label carried in the packet header?
In other words, does ns store an interface-to-link mapping
anywhere? A quick glance at the code did not reveal anything.
(Do interfaces have addresses in ns? It appears that they don't.)
One possible way, might be to do a routing table lookup from the
current node back to the source of the packet to get the next hop node.
Then do another ns lookup (in array links_) to get the appropriate
link. However, I hope there is an easier way.
Also, if I know link_($n1:$n2) is there away to find link_($n2:$n1)
(as created by duplex-link) if I don't know n1 and n2 (or if I only
know either n1 or n2)?