Solved

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

Posted on 2004-04-01
4
242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 125 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 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