Solved

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

Posted on 2004-04-01
4
224 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
Comment Utility
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
Comment Utility
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 125 total points
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now