PCAP_CAN_SET_RFMON(3)
π pcap_can_set_rfmon(3) β the monitor-mode vibe check π
Okay so this page is pcap_can_set_rfmon(3), and it lives in the Library Functions Manual. Itβs literally the βcan we set monitor mode on this not-yet-activated handle?β check, and honestly? Iconic little function. π¦
π NAME π
pcap_can_set_rfmon β check whether monitor mode can be set for a not-yet-activated capture handle β¨
β¨ SYNOPSIS β¨
#include <pcap/pcap.h>
int pcap_can_set_rfmon(pcap_t *p);
π¦ DESCRIPTION π¦
pcap_can_set_rfmon() checks whether monitor mode could be set on a capture handle when the handle is activated. Thatβs it, bestie β itβs the pre-flight vibe check before activation. π«Ά
π₯ RETURN VALUE π₯
pcap_can_set_rfmon() returns:
0β monitor mode could not be set π1β monitor mode could be set, slay π- a negative value β an error occurred, and that negative return value indicates what error condition occurred π
The possible error values are:
PCAP_ERROR_NO_SUCH_DEVICEβ the capture source specified when the handle was created doesnβt exist. Not found, not the move. πPCAP_ERROR_PERM_DENIEDβ the process doesnβt have permission to check whether monitor mode could be supported. Permission issues are so not it. πPCAP_ERROR_ACTIVATEDβ the capture handle has already been activated. Too late, babe β this was supposed to happen before activation. β°PCAP_ERRORβ another error occurred. You can callpcap_geterr(3)orpcap_perror(3)withpas an argument to fetch or display a message describing the error. π«Ά
Additional error codes may be added in the future; a program should check for0,1, and negative return codes, and treat all negative return codes as errors.pcap_statustostr(3)can be called, with a warning or error code as an argument, to fetch a message describing the warning or error code. π
π SEE ALSO π
Thatβs the whole page, bestie β PCAP_CAN_SET_RFMON(3) from the Library Functions Manual, dated 31 July 2016. Now go check that handle before you activate it, 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