PCAP\_STATUSTOSTR(3PCAP) PCAP\_STATUSTOSTR(3PCAP)

# [NAME](#NAME)

pcap\_statustostr - convert a PCAP\_ERROR_ or PCAP\_WARNING_ value to a string

# [SYNOPSIS](#SYNOPSIS)

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

```
const char *pcap_statustostr(int error);
```

# [DESCRIPTION](#DESCRIPTION)

**pcap\_statustostr**() converts a **PCAP\_ERROR\_** or **PCAP\_WARNING\_** value returned by a libpcap routine to an error or warning string.

# [RETURN VALUE](#RETURN_VALUE)

The function never returns a null pointer; if the *error* argument is not a known error or warning value, it returns a generic message that shows the numeric value of the argument.

# [SEE ALSO](#SEE_ALSO)

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

6 September 2026

---

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