archive_read_next_header(3)

archive_read_next_header3

Functions for reading streaming archives

Part of archive_read_header(3).

Usage

#include <archive.h>

int

archive_read_next_header(struct archive *, struct archive_entry **);

int

archive_read_next_header2(struct archive *, struct archive_entry *);

Library

Streaming Archive Library (libarchive, -larchive)

Overview

archive_read_next_header()

Read the header for the next entry and return a pointer to a struct archive_entry. This is a convenience wrapper around archive_read_next_header2() that reuses an internal struct archive_entry object for each request.

archive_read_next_header2()

Read the header for the next entry and populate the provided struct archive_entry.

Return values

These functions return ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN (the operation succeeded but a non-critical error was encountered), ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the operation failed but can be retried), and ARCHIVE_FATAL (there was a fatal error; the archive should be closed immediately).

Errors

Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions.

Releases

52 releases since FreeBSD 5.3-RELEASE; the text changed 27 times.

  1. 5.3
  2. 5.4
  3. 5.5
  4. 6.0–6.1
  5. 6.2
  6. 6.3
  7. 6.4
  8. 7.0
  9. 7.1
  10. 7.2
  11. 7.3
  12. 7.4
  13. 8.0
  14. 8.1
  15. 8.2
  16. 8.3
  17. 8.4
  18. 9.0
  19. 9.1
  20. 9.2
  21. 9.3
  22. 10.0–11.3
  23. 11.4
  24. 12.0–12.1
  25. 12.2–13.3
  26. 13.4–13.5
  27. 14.0
  28. 14.1–16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.