PCAP_SET_TSTAMP_TYPE(3PCAP)
πΈ NAME πΈ
okay so bestie, this is the pcap_set_tstamp_type(3PCAP) page β yes, that's the manual name, and yes it's a whole vibe. It's literally the function that sets the time stamp type to be used by a capture device. slay β¨
β¨ SYNOPSIS β¨
#include <pcap/pcap.h>
int pcap_set_tstamp_type(pcap_t *p, int tstamp_type);
π DESCRIPTION π
So here's the tea: pcap_set_tstamp_type() sets the type of time stamp desired for packets captured on the pcap descriptor to the type specified by tstamp_type. Like, you're telling it what time-stamp flavor you want. π
It must be called on a pcap descriptor created by pcap_create(3PCAP) that has not yet been activated by pcap_activate(3PCAP). Periodt. Do the setup era first, activate later.
β οΈ bestie warning: this is a before-activation thing. If the handle is already activated, that's a no from the function.
pcap_list_tstamp_types(3PCAP) will give a list of the time stamp types supported by a given capture device. And pcap-tstamp(7) has the full list of all the time stamp types β go read it, iykyk. π
π₯ RETURN VALUE π₯
pcap_set_tstamp_type() returns:
0on success if the specified time stamp type is expected to be supported by the capture device πPCAP_WARNING_TSTAMP_TYPE_NOTSUPif the specified time stamp type is not supported by the capture device πPCAP_ERROR_ACTIVATEDif called on a capture handle that has been activated πPCAP_ERROR_CANTSET_TSTAMP_TYPEif the capture device doesn't support setting the time stamp type β and only older versions of libpcap will return that; newer versions will always allow the time stamp type to be set to the default type π«Ά
π°οΈ BACKWARD COMPATIBILITY π°οΈ
This function became available in libpcap release 1.2.1. In previous releases, the time stamp type cannot be set; only the default time stamp type offered by a capture source is available. ngl, old libpcap really said "default only, bestie." π
π SEE ALSO π
pcap(3PCAP)pcap_tstamp_type_name_to_val(3PCAP)
okay that's the whole vibe. This manual page is dated 8 September 2019, and it's filed under PCAP_SET_TSTAMP_TYPE(3PCAP) β mwah π go set those time stamps, bestie. π«Άβ¨
π¦ where this page comes from
- alpine 3.22: libpcap-doc 1.10.7-r0 Β· BSD-3-Clause
- alpine 3.23: libpcap-doc 1.10.7-r0 Β· BSD-3-Clause
- alpine 3.24: libpcap-doc 1.10.7-r0 Β· BSD-3-Clause
- centos-stream 10: libpcap-devel 14:1.10.4-8.el10 Β· ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC
- debian bookworm: libpcap0.8-dev 1.10.3-1
- debian trixie: libpcap0.8-dev 1.10.5-2
- fedora 43: libpcap-devel 14:1.10.5-3.fc43 Β· ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC
- fedora 43: libpcap-devel 14:1.10.5-3.fc43 Β· ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC
- fedora 43: libpcap-devel 14:1.10.7-1.fc43 Β· ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC
- fedora 43: libpcap-devel 14:1.10.7-1.fc43 Β· ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC
- fedora 44: libpcap-devel 14:1.10.6-2.fc44 Β· ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC
- fedora 44: libpcap-devel 14:1.10.6-2.fc44 Β· ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC
- fedora 44: libpcap-devel 14:1.10.7-1.fc44 Β· ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC
- fedora 44: libpcap-devel 14:1.10.7-1.fc44 Β· ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC
- nixos 26.05: libpcap 1.10.7
- opensuse-leap 16.0: libpcap-devel 1.10.5-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libpcap-devel 1.10.5-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libpcap-devel 1.10.5-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libpcap-devel 1.10.5-160000.5.1 Β· BSD-3-Clause
- ubuntu noble: libpcap0.8-dev 1.10.4-4.1ubuntu3
- ubuntu noble: libpcap0.8-dev 1.10.4-4.1ubuntu3.1
- ubuntu questing: libpcap0.8-dev 1.10.5-2ubuntu2
- ubuntu resolute: libpcap0.8-dev 1.10.6-1ubuntu1 Β· BSD-3-clause-var3
- ubuntu resolute: libpcap0.8-dev 1.10.6-1ubuntu1.1 Β· BSD-3-clause-var3
- ubuntu stonking: libpcap0.8-dev 1.10.7-1ubuntu1 Β· BSD-3-clause-var3
- Copyright (c) 1994, 1996, 1997 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms