PCAP\_FREECODE(3PCAP) PCAP\_FREECODE(3PCAP)

# [NAME](#NAME)

pcap\_freecode - free a BPF program

# [SYNOPSIS](#SYNOPSIS)

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

```
void pcap_freecode(struct bpf_program *);
```

# [DESCRIPTION](#DESCRIPTION)

**pcap\_freecode**() is used to free up allocated memory pointed to by a **bpf\_program** struct generated by [**pcap\_compile**(3PCAP)](/man/os/libpcap/pcap_compile.3PCAP) when that BPF program is no longer needed, for example after it has been made the filter program for a **pcap\_t** handle by a call to [**pcap\_setfilter**(3PCAP)](/man/os/libpcap/pcap_setfilter.3PCAP).

# [SEE ALSO](#SEE_ALSO)

[**pcap**(3PCAP)](/man/os/libpcap/pcap.3PCAP)

3 January 2014

---

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