title: timestamp error in linux kernel?
body: <pre><code>int netif_rx(struct sk_buff *skb) 
  {
  if(skb -&gt; stamp.tv_sec ==0)
  do_gettimeofday(&amp;skb-&gt;stamp);
  }
  </code></pre>
  
  <p>the above api is the receiver side api, which receives the data from the sender. I want to calculate t he time when it receives the data and store it in a buffer. the above api at line number 2993 is available in kernel source code at: /linux/net/core/dev.c
  but I am getting ERROR: as struct sk_buff has no member named stamp.</p>
  
  <p><a href="http://lxr.free-electrons.com/source/include/linux/skbuff.h" rel="nofollow">http://lxr.free-electrons.com/source/include/linux/skbuff.h</a> Could someone please help me : how to get the timestamp for linux kernel.</p>
  
  <p>Later I changed my code to :</p>
  
  <pre><code> int netif_rx(struct sk_buff *skb) 
      {
      if(skb -&gt; tstamp.off_sec ==0)
      do_gettimeofday(&amp;skb-&gt;tstamp);
      }
  </code></pre>
  
  <p>1 : <a href="http://www.fsl.cs.sunysb.edu/kernel-api/re498.html" rel="nofollow">http://www.fsl.cs.sunysb.edu/kernel-api/re498.html</a></p>
  
  <hr>
  
  <p>2 : <a href="https://github.com/embest-tech/platform_prebuilt/blob/master/ndk/android-ndk-r7/platforms/android-4/arch-x86/usr/include/linux/skbuff.h" rel="nofollow">https://github.com/embest-tech/platform_prebuilt/blob/master/ndk/android-ndk-r7/platforms/android-4/arch-x86/usr/include/linux/skbuff.h</a></p>
  
  <p>-------------------------check this at line 81----------------------------------------------</p>
  
  <p>now I am getting error as : ktime_t has no memeber named "tv_sec". struct timeval but argument is of type unio ktime_t.</p>