[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1


pcap_major_version Subroutine

Purpose

Obtains the major version number of the packet capture format used to write the savefile, a previously saved packet capture data file.

Library

pcap Library (libpcap.a)

Syntax


#include <pcap.h>


int pcap_major_version(pcap_t * p);

Description

The pcap_major_version subroutine returns the major version number of the packet capture format used to write the savefile. If there is no open savefile, 0 is returned.

Note: This subroutine should be called only after a successful call to pcap_open_offline subroutine and before any calls to the pcap_close subroutine.

Parameters


p Points to a packet capture descriptor as returned from pcap_open_offline subroutine.

Return Values

The major version number of the packet capture format used to write the savefile.

Related Information

The pcap_close (pcap_close Subroutine) subroutine, pcap_open_offline (pcap_open_offline Subroutine) subroutine.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]