PCAP\_SET\_BUFFER\_SIZE(3PCAP) PCAP\_SET\_BUFFER\_SIZE(3PCAP)

# [NAME](#NAME)

pcap\_set\_buffer\_size - set the buffer size for a not-yet-activated capture handle

# [SYNOPSIS](#SYNOPSIS)

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

```
int pcap_set_buffer_size(pcap_t *p, int buffer_size);
```

# [DESCRIPTION](#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*, which is in units of bytes.

# [RETURN VALUE](#RETURN_VALUE)

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

# [SEE ALSO](#SEE_ALSO)

[**pcap**(3PCAP)](/man/os/libpcap/pcap.3PCAP), [**pcap\_create**(3PCAP)](/man/os/libpcap/pcap_create.3PCAP), [**pcap\_activate**(3PCAP)](/man/os/libpcap/pcap_activate.3PCAP)

3 January 2014

---

Document: pcap_set_buffer_size(3pcap) from libpcap 1.11.0-r0 (Chainguard OS)
Source: https://github.com/the-tcpdump-group/libpcap.git
