PCAP_SET_PROMISC(3)
π PCAP_SET_PROMISC π
okay so bestie, welcome to pcap_set_promisc(3) β a whole little library-function moment, section 3 of the manual, living in the pcap family. she's small, she's specific, and she does exactly one thing. no cap. π
β¨ NAME β¨
pcap_set_promisc β set promiscuous mode for a not-yet-activated capture handle π¦
like, the not-yet-activated part is the whole vibe check here, bestie. remember it. it's giving "read the room before you walk in." π
πΈ SYNOPSIS πΈ
#include <pcap/pcap.h>
int pcap_set_promisc(pcap_t *p, int promisc);
so you pull in the header, and you call her with a handle and a number. that's it. iconic. β¨
π DESCRIPTION π
pcap_set_promisc() sets whether promiscuous mode should be set on a capture handle when the handle is activated. highkey the key phrase there β she doesn't flip the switch right this second, she just leaves a little sticky note for activation time. π«Ά
- if
promiscis non-zero β promiscuous mode will be set (yas π₯) - otherwise β it will not be set (not today π )
that's the entire function. she's lowkey minimal and we respect her for it. π
β RETURN VALUE β
0β slay, success, we did it πPCAP_ERROR_ACTIVATEDβ returned if you call her on a capture handle that has already been activated π
fr fr, do not call this on an already-activated handle. she will hand you PCAP_ERROR_ACTIVATED and you will have to sit with that. π
π¦ SEE ALSO π¦
(go read pcap_create(3) and pcap_activate(3) next, bestie β that's the whole lifecycle she lives inside. iykyk π§)
that's the page!! 3 January 2014 is when this beauty was dated, and the source/version stitched across the top and bottom is PCAP_SET_PROMISC(3) from the Library Functions Manual. mwah. go set some promiscuous mode (on a handle that is not yet activated, obviously). ππβ¨
π¦ 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