Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Is there way to obtain the precise time when a UDP packet *arrives*?

Posted on 2004-04-01
4
Medium Priority
?
261 Views
Last Modified: 2010-04-22
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().
0
Comment
Question by:iemonslice
  • 3
4 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10738737
You can get it from the sk_buff kernel data structure for the packet that arrived ... the
struct timeval      stamp;
has exactly what you are looking for ...

you can find the struct definition in include/linux/Skbuff.c
0
 

Author Comment

by:iemonslice
ID: 10741037
Kernel data structure? Am I able to access it from user space? If it can be accessed, how would I obtain that value?
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 10741085
No, you cannot access it from user space ... you need to register a kernel module with NF_IP_LOCAL_IN hook provided with netfilter framework

I think tcpdump or ethereal should also provide timestamp information ... try them
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10806040
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
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question