PCAP\_LIB\_VERSION(3PCAP) PCAP\_LIB\_VERSION(3PCAP)

# [NAME](#NAME)

pcap\_lib\_version - get the version information for libpcap

# [SYNOPSIS](#SYNOPSIS)

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

```
const char *pcap_lib_version(void);
```

# [DESCRIPTION](#DESCRIPTION)

**pcap\_lib\_version**() returns a pointer to a string giving information about the version of the libpcap library being used. The string begins with the words "libpcap version" and a space. Then follows the version, which consists of three dot-separated numbers and the optional "-PRE-GIT" suffix to indicate a development snapshot, same as in the output of **pcap-config --version** in sufficiently recent libpcap releases. After the version often follow a space and additional text in an arbitrary human-readable form to indicate particular features. For example:

[an old release, on any OS](#an)

```

libpcap version 1.5.3
```

[a newer release on a Linux host](#a)

```

libpcap version 1.10.4 (with TPACKET_V3)
```

[the same, built with DAG support only](#the)

```

libpcap version 1.10.4 (DAG-only)
```

[a development snapshot on a FreeBSD host](#a~2)

```

libpcap version 1.11.0-PRE-GIT (64-bit time_t, with zerocopy and netmap support)
```

# [SEE ALSO](#SEE_ALSO)

[**pcap-config**(1)](/man/os/libpcap/pcap-config.1), [**pcap**(3PCAP)](/man/os/libpcap/pcap.3PCAP)

21 October 2025

---

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