• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 867
  • Last Modified:

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

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
rgbcof
Asked:
rgbcof
1 Solution
 
phoffricCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now