---
name: "pcap_dump_flush"
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_dump_flush/3pcap"
---

# pcap\_dump\_flush(3pcap)

flush to a savefile packets dumped

## NAME

pcap\_dump\_flush - flush to a savefile packets dumped

## SYNOPSIS

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

**int pcap\_dump\_flush(pcap\_dumper\_t \*p);**

## DESCRIPTION

**pcap\_dump\_flush**() flushes the output buffer to the \`\`savefile'', so that any packets written with **pcap\_dump**(3PCAP) but not yet written to the \`\`savefile'' will be written.

## RETURN VALUE

**pcap\_dump\_flush**() returns **0** on success and **PCAP\_ERROR** on failure.

## SEE ALSO

**pcap**(3PCAP), **pcap\_dump\_open**(3PCAP)
