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

Re: flow id's and .tr files



On Tue, 1 Feb 2000, Fusun Inanc wrote:

> I don't know if someone answered your question 
> but use the following command to set fid.
> 
> $udp set class_ 7

Interesting. I'd have expected fid_ to Just Work; what version of ns
are you running?

agent.cc seems to be rather confus{ed|ing} here. You have:
Agent::delay_bind_dispatch(const char *varName, const char *localName,
TclObject *tracer)
[..]
if (delay_bind(varName, localName, "fid_", (int*)&fid_, tracer))
return TCL_OK;
[..]
if (delay_bind(varName, localName, "class_", (int*)&fid_, tracer))
return TCL_OK;

[in older snapshots it's:
DELAY_BIND_DISPATCH(varName, localName, "fid_", delay_bind,
(int*)&fid_);
and then a couple of lines later.
DELAY_BIND_DISPATCH(varName, localName, "class_", delay_bind,
(int*)&fid_);
]

(never mind that elsewhere in flowmon.cc fid_ is bound to the separate
 flowid_, and that the implications of binding two Tcl variables to
 one C++ variable is giving me a headache. That's confusing, but it's
 _entirely separately_ confusing.).

I bet if you reversed the order of your statements you'd find that
fid_ suddenly works (and class_ doesn't; the order was the other way
around back in agent.cc v1.33...)

If there's a Good Reason for how all this is done other than leftover
code from iph->flowid()/p->class_ conversion, I'd really like to
know what it is.

As far as I can tell, if anything should break it should be class_,
going on Kevin's comment (in up to v1.59), and fid_ ought to work
these days.

L.

look, can we stick to binding variables of the same name? Once? Please?


> Alex Roetter <[email protected]> wrote:
> > 
> > i'm having trouble setting flow id's for cbr senders attached to udp
> > agents, and seeing that flow id appear in the tracefile.
> > 
> > if i set the fid_ variable of a tcp agent, it works no problem (the new
> > flow id is shown in the trace file for packets from that agent)
> > 
> > but if i do the same thing for a udp agent
> > $udp set fid_ 7
> > 
> > the flow id still shows up as zero in the trace file. this makes it very
> > differnet to differentiate packets by sender for post-processing of the
> > .tr files. does anyone know how to do this?

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>