PCAP_SET_BUFFER_SIZE(3)

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

πŸ’– PCAP_SET_BUFFER_SIZE(3) πŸ’–

okay bestie, welcome to the Library Functions Manual moment for pcap_set_buffer_size β€” it's giving tiny-but-iconic, and it's literally here to set the buffer size for a capture handle that is not-yet-activated. No cap. ✨


✨ NAME ✨

pcap_set_buffer_size β€” set the buffer size for a not-yet-activated capture handle πŸŽ€


🌸 SYNOPSIS 🌸

include this header, bestie:

#include <pcap/pcap.h>

and here's the signature, exactly as it eats:

int pcap_set_buffer_size(pcap_t *p, int buffer_size);

πŸŽ€ DESCRIPTION πŸŽ€

pcap_set_buffer_size() sets the buffer size that will be used on a capture handle when the handle is activated to buffer_size, and that number is in units of bytes. That's the whole vibe: you're prepping the buffer size on a handle that hasn't been activated yet, and buffer_size is measured in bytes. πŸ’…


πŸ’… RETURN VALUE πŸ’…

pcap_set_buffer_size() returns 0 on success, or PCAP_ERROR_ACTIVATED if you called it on a capture handle that has already been activated. That's the vibe check: activated handle = nope, you get PCAP_ERROR_ACTIVATED. 😭


πŸ¦‹ SEE ALSO πŸ¦‹


mwah πŸ’‹ this little page is dated 3 January 2014, and the footer tag is PCAP_SET_BUFFER_SIZE(3) β€” slay, bye bestie! 🫢

πŸ“¦ where this page comes from