PCAP_SET_TIMEOUT(3)
okay so this is PCAP_SET_TIMEOUT(3), straight out of the Library Functions Manual, and we're gonna make packet buffer timeout make sense, fr fr β¨
π NAME π
pcap_set_timeout β set the packet buffer timeout for a capture handle that is not yet activated π
β¨ SYNOPSIS β¨
#include <pcap/pcap.h>
int pcap_set_timeout(pcap_t *p, int to_ms);
π DESCRIPTION π
okay bestie, so pcap_set_timeout() sets the packet buffer timeout that will be used on a capture handle when that handle gets activated. You pass it as to_ms, and the units are milliseconds β±οΈβ¨
(if you need the full lore on what the packet buffer timeout even is, go peek at pcap(3) β it's giving explained-in-detail energy π«Ά)
π¨ undefined behavior alert, no cap: the behavior is undefined if the timeout isn't specified. It's also undefined if the timeout is set to 0 or to a negative value. Likeβ¦ don't do that, bestie ππ
we recommend always setting the timeout to a non-zero value, unless immediate mode is set β in that case, the timeout has no effect at all π
π₯ RETURN VALUE π₯
pcap_set_timeout() returns 0 on success β¨
or it returns PCAP_ERROR_ACTIVATED if you call it on a capture handle that has already been activated π
π¦ SEE ALSO π¦
that's the whole page, bestie π the footer's source/version tag is PCAP_SET_TIMEOUT(3), and the date on it is 6 December 2017 β iconic, periodt ππ¦
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- 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