[Click] Reg StoreTimestamp element

Roman Chertov rchertov at cs.ucsb.edu
Tue Sep 6 17:39:52 EDT 2011


Sandeep,

This is a sample config from the StoreUDPTimeSeqRecord.hh file

    src :: RatedSource(\<00>, LENGTH 22, RATE 1, LIMIT 100)
        -> UDPIPEncap(10.0.1.1, 6667, 20.0.0.2, 6667)
        -> EtherEncap(0x0800, 00:04:23:D0:93:63, 00:17:cb:0d:f8:db)
        -> StoreUDPTimeSeqRecord(OFFSET 14, DELTA false)
        -> DelayShaper(100msec)
        -> StoreUDPTimeSeqRecord(OFFSET 14, DELTA true)
        -> ToDump("dump.dmp");


I have attached a piece of code that I use to print out arrival times, delays,
inter-arrivals, etc. (results go into MATLAB for plotting) The code is not very
polished but should give you an idea what is going on.  

Let me know if you have any questions.

Roman

On Tue, 6 Sep 2011 11:10:34 +0100 sandeep <sandeep048 at gmail.com> wrote

> Dear Roman,
> 
> Thanks for your email. Can you please send a sample click script used
> with StoreUDPTimeSeqRecord element and C program to decipher the pcap dump.
> 
> Kind Regards,
> Sandeep
> 
> On Monday, September 5, 2011, Roman Chertov wrote:
> 
> > Sandeep,
> >
> > You might also want to use StoreUDPTimeSeqRecord element to embed time and
> > sequence number information into packets.
> >
> >
http://read.cs.ucla.edu/click/**elements/storeudptimeseqrecord<http://read.cs
> > .ucla.edu/click/elements/storeudptimeseqrecord>
> >
> > In my experiments, I typically always save the packets to a PCAP file
> > (ToDump) element, and then use a C program to look at the PCAP file and
> > extract the appropriate statistics.  I can send the code which computes
> > delays, inter-arrival times, arrival times, etc. to the list tomorrow.
> >
> > Roman
> >
> > On 09/05/2011 04:45 AM, sandeep wrote:
> >
> >> Hi,
> >>
> >> I am using StoreTimestamp element to put a timestamp at the tail of a
> >> packet. Can anyone tell me how to extract the timestamp value out of it on
> >> the receive end or from the dump file.
> >>
> >> -----
> >> My analysis is as follows:
> >> The source code which does this is.
> >> memcpy(q->data() + offset,&q->timestamp_anno(), 8);
> >>
> >> I looks like pointer to Timestamp is written during this memcpy operation.
> >>
> >> I managed to print the timestamp string using
> >> printf("Timestamp is %s\n",
> >> ((&q->timestamp_anno())->**unparse()).mutable_data());
> >> -------
> >>
> >> Kind Regards,
> >> Sandeep,
> >> PhD Student,
> >> CTVR<http://ctvr.ie/>  - Trinity College Dublin
> >> ______________________________**_________________
> >> click mailing list
> >> click at amsterdam.lcs.mit.edu
> >>
> >>
https://amsterdam.lcs.mit.edu/**mailman/listinfo/click<https://amsterdam.lcs.
> >> mit.edu/mailman/listinfo/click>
> >>
> >>
> >

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pkt_stats.cc
Type: text/x-c++src
Size: 7422 bytes
Desc: not available
Url : http://amsterdam.lcs.mit.edu/pipermail/click/attachments/20110906/8294562b/attachment.cc 


More information about the click mailing list