0

I'm looking to add timestamp functionality to sending and receiving packets in a Raspberry Pi in order to measure clock skew. I am having trouble finding the correct functions to modify to get accurate readings. The code is open source and can be found here.

Help on which functions to target when trying to accomplish this is appreciated.

Ben
  • 1
  • `clock_gettime` is no good? Or perhaps you need a kernel equivalent? http://stackoverflow.com/questions/13552536/get-current-time-in-seconds-in-kernel-module – yano Aug 22 '16 at 21:47
  • not the function to get the timestamps, what i am looking for are the kernel level functions that create and send/receive packets so that i can modify them. – Ben Aug 23 '16 at 13:20

1 Answers1

0

If you are receiving and transmitting packets by using skb structure then probably you can extract the time stamping from the SKB structure by using following linux library function. do_gettimeofday(&skb->stamp);

if you are not using skb then check your structure must be similar fashion. Thanks Karn