Re: Time between sending and receiving of Ethernet Packet
- From: "Yash" <yash_mbm@xxxxxxxxx>
- Date: 16 Mar 2006 01:55:07 -0800
Hi,
Thanks for your inputs,
Pascal Bourguignon wrote:
"Yash" <yash_mbm@xxxxxxxxx> writes:
Hi all,
I need a solution, by which i can measure time between sending and
receiving of packet from one application to another one.
I am working with application with uses unicast( both TCP and UDP) and
broadcast.
Also i am having "Ethereal" tool to see when packet leaving one
port/NIC and reaching
other port/NIC. But i want more precise solution, by which i can know
delay for
application to application.
ping(1)
One solution which i thought off, is that i can get the system time
before
sending the packet, put it into packet with regular data and extract
the time at other end.
This doesn't work because time is relative. Even with ntp
synchronized hosts, there may be a difference.
By comparing the current time with this time, i can get time
difference. Is it a
correct approch. I am not sure, how precise it is. Is there any better
method or
tool available.
Yes, you can re-implement ping functionality in your application. It
could give you a different number of nanoseconds, given that ping uses
the icmp protocol, while your application may use udp or tcp.
You send data to the other application which sends a response
immediately when it receives it. You measure the time between sending
and receiving the response, and divide by 2.
I was doing the same thing, but it could not satisfy my seniors.
I will be grateful to you for suggestions and solutions.
best regards,
Yashpal
--
__Pascal Bourguignon__ http://www.informatimago.com/
Un chat errant
se soulage
dans le jardin d'hiver
Shiki
NTP can be a good solution but is there any possibility of getting this
time information
without using NTP. I know that there has to be one common time
reference between systems.
In my code (of which,most of the part i got from google group only
;-)), i am using gettimeofday(). So i am sending this time with packet
and after receiving this packet, extracting this time and comparing
with current time. With loopback it seems to work fine but when i use
two linux machines it doesn't work.
Any help is welcome.
Regards
YASHPAL
.
- Follow-Ups:
- References:
- Time between sending and receiving of Ethernet Packet
- From: Yash
- Re: Time between sending and receiving of Ethernet Packet
- From: Pascal Bourguignon
- Time between sending and receiving of Ethernet Packet
- Prev by Date: Re: removing a loop cause it to go at half the speed?
- Next by Date: Using shared memory in linux
- Previous by thread: Re: Time between sending and receiving of Ethernet Packet
- Next by thread: Time between sending and receiving of Ethernet Packet
- Index(es):
Relevant Pages
|