[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Get an interface label from an agent
> ns developers:
>
>
> I am implementing CBTv2 in ns. A CBT agent needs to know the local
> interface (its label) through a message (CBT PDU) has arrived. I have
> not
> find an efficient way to do it without modify C code defining a compiled
>
> variable, iif_, as follows:
> message.cc, add : int iif_;
> modif.:
> MessageAgent::MessageAgent():Agent(PT_MESSAGE), iif_(2)
> add : bind("iif_", &iif_);
> add(recv): iif_ =
> ((hdr_cmn*)pkt->access(off_cmn_))->iface();
>
> ns-default.tcl, add : Agent/Message set iif_ -2
>
> then, a CBT agent access the interface label:
> set input_interface_label [messager set iif_]
>
> (messager is an Agent/Message object)
>
> Do anyone knows a way to do it entirely in Tcl?
> thanks,
I would probably be in a better position to help you if I understand what
you are trying to do...
an interface_label_ is a variable for an interface.... however,
you seem to want a message agent have an interface label, which on first
look seems like the wrong thing to do...
are you trying to fake which interface the packet arrived on,
or... ?!
Regards,
-A
>
> Guillermo Rigotti
>
>
>