netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with frame time stamping
@ 2007-11-12 15:42 Antoine Zen-Ruffinen
  2007-11-12 16:47 ` Eric Dumazet
  0 siblings, 1 reply; 11+ messages in thread
From: Antoine Zen-Ruffinen @ 2007-11-12 15:42 UTC (permalink / raw)
  To: netdev, linux-net, netfilter-devel; +Cc: patrik.arlos

Dear all,

I'm writing a network analyzer software using Linux and I need a VERY
precise frame time stamping. Therefor I am planing to add my own time
stamping algorithm on a modified network driver. For test purpose I
did so :

	skb->tstamp.tv64 = 0x00010002;
	netif_rx(skb);

On the user side, I ask for the timestamp that way :

	...
	sock = socket(AF_PACKET, SOCK_RAW, type);
	...
	//bind this socket with the interface using my modified driver.
	...
	recvByteCount = recv(sock, buffer, 1514, 0);
    	ioctl(sock, SIOCGSTAMP, &timeStamp);

I was surprised to see that the var timeStamp was still holding a
count of second since  year 1970.

Investigating a bit into the kernel code, I found that ioctl(sock,
SIOCGSTAMP, ...) was giving just the current kernel time using
ktime_get_real().

Are my investigation wrong ?
Is that a bug in kernel code ?
Is there an other way to access skb.tstamp from user side ?

Thank's to any one that can help me !

Antoine Zen-Ruffinen

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-11-13 14:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-12 15:42 Problem with frame time stamping Antoine Zen-Ruffinen
2007-11-12 16:47 ` Eric Dumazet
2007-11-13 10:07   ` Antoine Zen-Ruffinen
2007-11-13 10:27     ` Eric Dumazet
2007-11-13 10:39       ` Antoine Zen-Ruffinen
2007-11-13 10:43         ` Antoine Zen-Ruffinen
2007-11-13 10:55         ` Eric Dumazet
2007-11-13 12:34           ` Antoine Zen-Ruffinen
2007-11-13 13:13             ` Eric Dumazet
2007-11-13 14:46               ` Antoine Zen-Ruffinen
2007-11-13 10:36     ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).