Solved

C, pcap, how to get to the epoch time for the packet

Posted on 2012-03-19
1
742 Views
Last Modified: 2012-03-20
I am new to pcap programming.   How do I get to the epoch time for the packet?  I suppose it is in the header.
0
Comment
Question by:rgbcof
1 Comment
 
LVL 32

Accepted Solution

by:
phoffric earned 500 total points
ID: 37740646
I believe you are interested in struct pcap_pkthdr. See pcap man page:
     http://www.tcpdump.org/pcap3_man.html

"ts  --  a struct timeval containing the time when the packet was captured"
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

760 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

19 Experts available now in Live!

Get 1:1 Help Now