[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Add SACK info to trace file
Hi,
I posted code to tcptrace@tcptrace.org mailing list.
see
http://tcptrace.org/archive/0072.html
Shawn Ostermann (author of tcptrace) said
> I'm not going to be able to add your patches
> until/unless your other code gets into ns, which I don't have any
> control over. I agree that it's very useful, though.
--
Daikichi Osuga
----- Original Message -----
$BAw?.(B : [ns] Add SACK info to trace file
> Hello
>
> I added SACK block infomation to trace file.
> and wrote support code for visualize SACK blocks for tcptrace. (www.tcptrace.org)
>
> What is the best way to include this feature in official ns release?
> Introduce some switch valiable (for example "show_sackblk_") is more better?
>
> --
> Daikichi Osuga
>
> /* code fragment from trace.cc */
>
> if (!show_tcphdr_) {
> sprintf(wrk_, "%c %g %d %d %s %d %s %d %s%s %s%s %d %d",
> tt,
> round(Scheduler::instance().clock()),
> s,
> d,
> name,
> th->size(),
> flags,
> iph->flowid() /* was p->class_ */,
> // iph->src() >> (Address::instance().NodeShift_[1]),
> // iph->src() & (Address::instance().PortMask_),
> // iph->dst() >> (Address::instance().NodeShift_[1]),
> // iph->dst() & (Address::instance().PortMask_),
> src_nodeaddr,
> src_portaddr,
> dst_nodeaddr,
> dst_portaddr,
> seqno,
> th->uid() /* was p->uid_ */);
> } else {
> sprintf(wrk_,
> "%c %g %d %d %s %d %s %d %s%s %s%s %d %d %d 0x%x %d %d"
> #ifdef SHOW_SACKBLK
> " %d %d %d %d %d %d"
> #endif
> ,tt,
> round(Scheduler::instance().clock()),
> s,
> d,
> name,
> th->size(),
> flags,
> iph->flowid(), /* was p->class_ */
> // iph->src() >> (Address::instance().NodeShift_[1]),
> // iph->src() & (Address::instance().PortMask_),
> // iph->dst() >> (Address::instance().NodeShift_[1]),
> // iph->dst() & (Address::instance().PortMask_),
> src_nodeaddr,
> src_portaddr,
> dst_nodeaddr,
> dst_portaddr,
> seqno,
> th->uid(), /* was p->uid_ */
> tcph->ackno(),
> tcph->flags(),
> tcph->hlen(),
> tcph->sa_length()
> #ifdef SHOW_SACKBLK
> ,tcph->sa_length() >= 1 ? tcph->sa_left(0) : 0,
> tcph->sa_length() >= 1 ? tcph->sa_right(0) : 0,
> tcph->sa_length() >= 2 ? tcph->sa_left(1) : 0,
> tcph->sa_length() >= 2 ? tcph->sa_right(1) : 0,
> tcph->sa_length() >= 3 ? tcph->sa_left(2) : 0,
> tcph->sa_length() >= 3 ? tcph->sa_right(2) : 0
> #endif
> );
> }
>
>
>
>