---
name: "pcap_strerror"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/pcap_strerror"
---

# pcap\_strerror(3)

convert an errno value to a string

## NAME

pcap\_strerror - convert an errno value to a string

## SYNOPSIS

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

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

## DESCRIPTION

This function returns an error message string corresponding to *error*. It uses either [**strerror**(3)](/strerror/3.md) or its thread-safe variant if one is available, which currently is the case in every supported OS.

## BACKWARD COMPATIBILITY

This function was not thread-safe in libpcap before 1.8.1 on Windows and in libpcap before 1.10.5 on all other OSes.

## SEE ALSO

[**pcap**(3)](/pcap/3.md)
