diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-01-06 11:43:05 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-01-23 18:48:51 +0100 |
commit | cb3c1ce30760aff10a4952a1c3b85f61a6eeacfd (patch) | |
tree | b850d0195f3c653bc9969733c628959c90fa6262 /tap.h | |
parent | b93d025d50dcc2c058b9eb3b67b76da56d27fcba (diff) | |
download | passt-cb3c1ce30760aff10a4952a1c3b85f61a6eeacfd.tar passt-cb3c1ce30760aff10a4952a1c3b85f61a6eeacfd.tar.gz passt-cb3c1ce30760aff10a4952a1c3b85f61a6eeacfd.tar.bz2 passt-cb3c1ce30760aff10a4952a1c3b85f61a6eeacfd.tar.lz passt-cb3c1ce30760aff10a4952a1c3b85f61a6eeacfd.tar.xz passt-cb3c1ce30760aff10a4952a1c3b85f61a6eeacfd.tar.zst passt-cb3c1ce30760aff10a4952a1c3b85f61a6eeacfd.zip |
pcap: Introduce pcap_frame() helper
pcap(), pcapm() and pcapmm() duplicate some code, for the actual writing
to the capture file. The purpose of pcapm() and pcapmm() not calling
pcap() seems to be to avoid repeatedly calling gettimeofday() and to avoid
printing errors for every packet in a batch if there's a problem. We can
accomplish that while still sharing code by adding a new helper which
takes the packet timestamp as a parameter.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tap.h')
0 files changed, 0 insertions, 0 deletions