iemonslice
asked on
Is there way to obtain the precise time when a UDP packet *arrives*?
Is there way to obtain the precise time when a UDP packet *arrives*? By arrives I mean the exact time it gets buffered in the receive queue and NOT the time when I do a recv()/recvfrom().
ASKER
Kernel data structure? Am I able to access it from user space? If it can be accessed, how would I obtain that value?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi iemonslice,
I came across this new How-to
http://www.iptables.org/documentation/HOWTO//netfilter-hacking-HOWTO-4.html
It seems that it is possible to do some packet handling in user space using libipq ... There is a section devoted to libipq in this how-to .. I am not sure if it would allow access to skb from user space, but still go through it
I came across this new How-to
http://www.iptables.org/documentation/HOWTO//netfilter-hacking-HOWTO-4.html
It seems that it is possible to do some packet handling in user space using libipq ... There is a section devoted to libipq in this how-to .. I am not sure if it would allow access to skb from user space, but still go through it
struct timeval stamp;
has exactly what you are looking for ...
you can find the struct definition in include/linux/Skbuff.c