Get an interface label from an agent
Ahmed A-G Helmy
Tue, 3 Mar 1998 20:15:21 -0800 (PST)
> I 'll try to explain what I need to do describing the following case:
> A message agent receives a CBT join-request; the node is not on tree for the
> group, then the CBT agent needs to create transient information and
> forward the join-request PDU to the core.
I think I am starting to understand your problem...
This is a CBT control message, that is sent and processed hop-by-hop. I
don't see why the originating node of the message (i.e. previous hop)
cannot be included in the message ... [I do this for PIM-SM]..
I wonder how the real implementation does it.
it is true you can use nexthop to get *what you expect* to be the
previous hop,... but in some weird cases (which you will probably not
face in NS since TTBMK we don't have policy routing) this may not be the
real previous hop.
> Transient information consists of:
> <group, incoming interface, outgoing interface>
> The value the agent gives to "incoming interface", is the interface label of
> the interface associated with the link through which the PDU was received.
> A way to access the label is (pim-sender.tcl ):
> set oifInfo [$Node get-oif [$ns set link_([$Node id]:$nexthop)]]
> set oif [lindex $oifInfo 1]
> set lbl [$oif set intf_label_]
> but the nodes need to be adjacent and it is necessary to know "nexthop",
> that may be different from the node that originated the PDU, which generally
> is carried in the PDU.
> A way to know the previous adjacent node ("nexthop") is to use lookup method
> RouteLogic, but I am not sure if it works in every case (for example,
> if we have different policy routing when simulatintg several AS, etc.)
> Another solution is to add a field to every PDU, containing the node id
> of the last node that forwarded the packet, but this not seems to me a
> good solution.
this seems to be the *simplest* (all implementable in OTcl) solution to
if you still want to do it thru the agent, the right way to do it, is to
create another class inheriting from Agent/Message that sends up the
iface number (i.e. label) along with the packet to be processed by OTcl code.
> Guillermo Rigotti