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

Technical Reference: Base Operating System and Extensions, Volume 1


pcap_snapshot Subroutine

Purpose

Obtains the number of bytes that will be saved for each packet captured.

Library

pcap Library (libpcap.a)

Syntax


#include <pcap.h>


int pcap_snapshot( pcap_t * p);

Description

The pcap_snapshot subroutine returns the snapshot length, which is the number of bytes to save for each packet captured.

Note: This subroutine should only be called after successful calls to either the pcap_open_live subroutine or pcap_open_offline subroutine. It should not be called after a call to the pcap_close subroutine.

Parameters


p Points to the packet capture descriptor as returned by the pcap_open_live or the pcap_open_offline subroutine.

Return Values

The pcap_snapshot subroutine returns the snapshot length.

Related Information

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


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