Skip to content

Use libpcap timestamp information instead of calling gettimeofday() in receive thread#848

Merged
zakird merged 1 commit intozmap:mainfrom
ogasser:use_libpcap_time_instead_of_gettimeofday
Apr 11, 2024
Merged

Use libpcap timestamp information instead of calling gettimeofday() in receive thread#848
zakird merged 1 commit intozmap:mainfrom
ogasser:use_libpcap_time_instead_of_gettimeofday

Conversation

@ogasser
Copy link
Contributor

@ogasser ogasser commented Apr 11, 2024

For every packet that ZMap receives it calls gettimeofday() in the receive thread to write the receive time to the output file. Instead, the already present timestamp in the PCAP header can be used which should save CPU cycles and lead to more accurate receive times.

Copy link
Member

@zakird zakird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me! Thanks for submitting the PR!!

@zakird zakird merged commit 97d941c into zmap:main Apr 11, 2024
@zakird zakird added this to the ZMap 4.2 milestone Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants