PCAP\_MAJOR\_VERSION(3PCAP) PCAP\_MAJOR\_VERSION(3PCAP)

# [NAME](#NAME)

pcap\_major\_version, pcap\_minor\_version - get the version number of a savefile

# [SYNOPSIS](#SYNOPSIS)

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

```
int pcap_major_version(pcap_t *p);
int pcap_minor_version(pcap_t *p);
```

# [DESCRIPTION](#DESCRIPTION)

If *p* refers to a \`\`savefile'', **pcap\_major\_version**() returns the major number of the file format of the \`\`savefile'' and **pcap\_minor\_version**() returns the minor number of the file format of the \`\`savefile''. The version number is stored in the \`\`savefile''; note that the meaning of its values depends on the type of \`\`savefile'' (for example, pcap or pcapng).

If *p* refers to a live capture, the values returned by **pcap\_major\_version**() and **pcap\_minor\_version**() are not meaningful.

# [SEE ALSO](#SEE_ALSO)

[**pcap**(3PCAP)](/man/os/libpcap/pcap.3PCAP)

8 January 2018

---

Document: pcap_minor_version(3pcap) from libpcap 1.11.0-r0 (Chainguard OS)
Source: https://github.com/the-tcpdump-group/libpcap.git
