}
}
- /* TCP metrics. */
- if (p->status == Established && p->rtt)
- vty_out (vty, "Estimated round trip time: %d ms%s",
- p->rtt, VTY_NEWLINE);
-
/* Timer information. */
if (use_json)
{
+ if (p->status == Established && p->rtt)
+ json_object_int_add(json_neigh, "estimatedRttInMsecs", p->rtt);
if (p->t_start)
json_object_int_add(json_neigh, "nextStartTimerDueInMsecs", thread_timer_remain_second (p->t_start) * 1000);
if (p->t_connect)
}
else
{
+ /* TCP metrics. */
+ if (p->status == Established && p->rtt)
+ vty_out (vty, "Estimated round trip time: %d ms%s",
+ p->rtt, VTY_NEWLINE);
if (p->t_start)
vty_out (vty, "Next start timer due in %ld seconds%s",
thread_timer_remain_second (p->t_start), VTY_NEWLINE);