Code is in sessions.c handleTCPSession(), starting around line 2162.  It's
computed for the 3rd packet of the 3-way handshake:

  /* Latency measurement */
  if((tp->th_flags == (TH_SYN|TH_ACK)) && (theSession->sessionState ==
FLAG_STATE_SYN))  {
    theSession->sessionState = FLAG_FLAG_STATE_SYN_ACK;
  } else if((tp->th_flags == TH_ACK) && (theSession->sessionState ==
FLAG_FLAG_STATE_SYN_ACK)) {
    if(h->ts.tv_sec >= theSession->nwLatency.tv_sec) {
      theSession->nwLatency.tv_sec =
h->ts.tv_sec-theSession->nwLatency.tv_sec;
  ...

There are lots of reasons why ntop might not see / have seen the setup
packets for a connection.  There are also sanity checks in that code that
could be causing packets to be ignored...

-----Burton 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
marco pozzi
Sent: Tuesday, September 13, 2005 8:03 AM
To: [EMAIL PROTECTED]
Subject: [Ntop] Ntop Lantency

Hi,
why the latency is displayed only for some of the active sessions?
On which basis is it displayed?
Thanks in advance
Regards
Marco
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to