Networking Forums

Networking Forums > Computer Networking > Linux Networking > CLOCK_MONOTONIC datagram timestamps by the kernel

Reply
Thread Tools Display Modes

CLOCK_MONOTONIC datagram timestamps by the kernel

 
 
Spoon
Guest
Posts: n/a

 
      02-24-2007, 05:06 PM
Hello,

In Linux, it is possible to ask the kernel to timestamp incoming
datagrams when they are received, then to retrieve this timestamp with
an ioctl command.

SIOCGSTAMP
Return a struct timeval with the receive timestamp of the last
packet passed to the user. This is useful for accurate round trip time
measurements. See setitimer(2) for a description of struct timeval.

As far as I understand, this timestamp is given by the CLOCK_REALTIME
clock. I would like to get the timestamp given by a different clock: the
CLOCK_MONOTONIC clock.

In other words, I would like the kernel to do the equivalent of

struct timespec spec;
clock_gettime(CLOCK_MONOTONIC, &spec)

for each datagram the system receives, as soon as it is received.

How can I achieve that?

Is there a different ioctl perhaps? (I don't think so.)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Obtaining timestamps ajcppmod@gmail.com Linux Networking 1 06-03-2008 04:08 PM
Netgear Router logs emails - wrong timestamps Dave_T Home Networking 2 07-17-2006 04:06 PM
Samba timestamps wrong! RobO Linux Networking 6 08-10-2005 09:23 PM
datagram queue? Jonathan Ellis Linux Networking 0 08-04-2005 11:33 PM
max udp datagram size Artem Baguinski Linux Networking 6 02-20-2004 05:14 PM



1 2 3 4 5 6 7 8 9 10 11