---
name: "pcap_set_promisc"
section: "3pcap"
platform: "linux"
package: "libpcap"
version: "1.11.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/pcap_set_promisc/3pcap"
---

# pcap\_set\_promisc(3pcap)

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**(3PCAP), **pcap\_create**(3PCAP), **pcap\_activate**(3PCAP)
