lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Help regarding packet arrival times.


From: K.J. Mansley
Subject: Re: [lwip-users] Help regarding packet arrival times.
Date: 30 Sep 2004 10:44:03 +0100

On Thu, 2004-09-30 at 10:28, N V Krishna wrote:
> On Thu, 30 Sep 2004, K.J. Mansley wrote:
> 
> #On Thu, 2004-09-30 at 09:58, N V Krishna wrote:
> #> On Thu, 30 Sep 2004, K.J. Mansley wrote:
> #>
> #> #On Thu, 2004-09-30 at 09:44, N V Krishna wrote:
> #> #> Exactly. That's what I am doing -- I am trying to add code to measure 
> the
> #> #> time. I am not too well versed with the code. [ I am getting to know it
> #> #> better, every day. ] I wanted some pointers to help me find a place in 
> the
> #> #> code to place the probes. Yes, I am aware of the effect the "probe" will
> #> #> have on the timing. I am ready to test that.
> #> #
> #> #OK.  Do you need to know when a packet is received by the TCP/IP stack,
> #> #or by the simhost application itself?  Are you using tun/tap to connect
> #> #the stack to the network?
> #>
> #> Yes, I want to know when the simhost gets the packet.
> #
> #That should be fairly straightforward then.  Look through the source of
> #the apps that use simhost (eg. tcpecho.c, shell.c) for calls to the
> #"netconn_recv()" function.  This is where the simhost application will
> #receive data.  In the case of the httpd.c application, look for the
> #"http_recv()" function: this is called whenever there is new data.
> #
> #Hope that helps,
> 
> I was looking at this function. I see that, it reads from the mbox
> conn->recvmbox. The question is can I know, when the packet was placed
> in this mbox? Or it is written by the device driver of tap?

It's written to there by the TCP stack (function recv_tcp() in
src/api/api_msg.c)

That is in turn called from tcp_input() in tcp_in.c (the macro
TCP_EVENT_RECV does this) and that from ip_input(), and that from the
device driver.  You should be able to put a call in one of those,
depending on which it is that you are interested in!

Kieran





reply via email to

[Prev in Thread] Current Thread [Next in Thread]