---
name: "pcap_statustostr"
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_statustostr/3pcap"
---

# pcap\_statustostr(3pcap)

convert a PCAP\_ERROR\_ or PCAP\_WARNING\_ value to a string

## NAME

pcap\_statustostr - convert a PCAP\_ERROR\_ or PCAP\_WARNING\_ value to a string

## SYNOPSIS

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

**const char \*pcap\_statustostr(int error);**

## DESCRIPTION

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

## 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

**pcap**(3PCAP)
