[ns] Question on Time Stamp in cmn header for UDP agents

Geoffrey M. Garner gmg1 at att.net
Wed Feb 4 20:31:40 PST 2004


When using a UDP agent, the timestamp field in the common header (ts_, accessed via timestamp() ) is equal to the local time multiplied by 
a value SAMPLERATE, which is defined in udp.h as #define SAMPLERATE 8000.  (I am using ns-2.26)  Is there a reason for this, rather than simply always putting the actual
time in this field (as is done, e.g., for TCP agents)?  If I want to use this field to calculate the end-to-end delay for a packet produced by a UDP agent, should
I assume I must divide the timestamp by SAMPLERATE to get the actual clock time?

Thanks.

Geoff Garner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.isi.edu/pipermail/ns-users/attachments/20040204/49892c5a/attachment.html>


More information about the Ns-users mailing list