---
name: "pcap_dump_close"
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_dump_close"
---

# pcap\_dump\_close(3)

close a savefile being written to

## NAME

pcap\_dump\_close - close a savefile being written to

## SYNOPSIS

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

**void pcap\_dump\_close(pcap\_dumper\_t \*p);**

## DESCRIPTION

**pcap\_dump\_close**() closes the \`\`savefile'' associated with *p* and deallocates resources. This means that, for example, if *p* refers to a savefile that was opened with **pcap\_dump\_fopen**(), the stream provided to that routine will be closed unless it is **stdout**.

## SEE ALSO

[**pcap**(3)](/pcap/3.md), [**pcap\_dump\_open**(3)](/pcap_dump_open/3.md), [**pcap\_dump**(3)](/pcap_dump/3.md)
