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

Re: [ns] Classifier problems



The solution I found out was that instead of grabbing the actual link
object, I just needed to get the oif interface from the incoming interface
and that worked fine.  So, something along these lines

         set OIFace [$node_ iif2oif $IFace]

         return $OIFace

where IFace was the incoming interface ID.

Aaron

At 08:23 PM 2/7/2001 +0000, you wrote:
>Hello all,
>
>I am trying to build a multicast control classifier as well as a
>custom replicator for my code. However, when I am trying to do so,
>I am getting errors which are beyond the scope of my knowledge.
>
>To start, I am trying to get the outgoing link for the node to
>another node:
>
>   set IFace   [$node from-node-iface [$new_core($group) id]]
>   set OutLink [$node iif2link $IFace]
>
>   $mctrl_ Join-Group [$new_core($group) id] $group $IFace $OutLink
>
>The interface comes across fine (a number) but I cannot do a
>successful lookup from my C++ code to get the link object similar
>to what the replicator does.
>
>   NsObject * pLink;
>
>   pLink = (NsObject *) TclObject::lookup(argv[5]);
>
>I do a printf a bit earlier and check the string value of
>argv[5] to be _o1267 which appears at first glance to be
>a valid tcl object. However, when I run my code, pLink always
>becomes 0x00 after the call to Tcl::lookup. Can anyone offer
>any assistance on how I can get the link object out of tcl?
>I need to do this in order to reproduce the packet in a similar
>fashion to the replicator. Thanks in advance.
>
>Aaron
>
>ns 2.1b7
>Visual C++ 6.0 on Windows
>2000