PCAP_SET_SNAPLEN(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– NAME πŸ’–

Hiii bestie! Welcome to pcap_set_snaplen(3) β€” that's the page name β€” from the Library Functions Manual. This one is all about setting the snapshot length for a not-yet-activated capture handle. Slay. ✨

πŸŽ€ SYNOPSIS πŸŽ€

#include <pcap/pcap.h>

int pcap_set_snaplen(pcap_t *p, int snaplen);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so pcap_set_snaplen() sets the snapshot length that's gonna be used on a capture handle when the handle is activated. You pass that value in as snaplen, and the capture handle is p. Cute and straightforward. πŸ’…

🌸 RETURN VALUE 🌸

pcap_set_snaplen() returns 0 on success. If you call it on a capture handle that has already been activated, it returns PCAP_ERROR_ACTIVATED. No cap, that's the whole return-value story. 🫢

🌈 SEE ALSO 🌈


xoxo, your local Unix bestie πŸ§šπŸ’œ β€” from the Library Functions Manual, PCAP_SET_SNAPLEN(3), dated 3 January 2014.

πŸ“¦ where this page comes from