---
name: "pcap_set_promisc"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/pcap_set_promisc"
---

# pcap\_set\_promisc(3)

set promiscuous mode for a not-yet-activated capture handle

## NAME

pcap\_set\_promisc - set promiscuous mode for a not-yet-activated capture handle

## SYNOPSIS

```
#include <pcap/pcap.h>
```

**int pcap\_set\_promisc(pcap\_t \*p, int promisc);**

## DESCRIPTION

**pcap\_set\_promisc**() **sets whether promiscuous mode should be set on a capture handle when** **the handle is activated.** **If** *promisc* **is non-zero, promiscuous mode will be set, otherwise it will not be set.**

## RETURN VALUE

**pcap\_set\_promisc**() **returns** **0** **on success or** **PCAP\_ERROR\_ACTIVATED** **if called on a capture handle that has been activated.**

## SEE ALSO

[**pcap**(3)](/pcap/3.md), [**pcap\_create**(3)](/pcap_create/3.md), [**pcap\_activate**(3)](/pcap_activate/3.md)
