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

Technical Reference: Base Operating System and Extensions, Volume 1

pcap_is_swapped Subroutine

Purpose

Reports if the byte order of the previously saved packet capture data file, known as the savefile was swapped.

Library

pcap Library (libpcap.a)

Syntax


#include <pcap.h>

int pcap_is_swapped(pcap_t * p);

Description

The pcap_is_swapped subroutine returns 1 (True) if the current savefile uses a different byte order than the current system. This subroutine should be called after a successful call to the pcap_open_offline subroutine and before any calls to the pcap_close subroutine.

Parameters

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

Return Values

1 If the byte order of the savefile is different from that of the current system.
0 If the byte order of the savefile is the same as that of the current system.

Related Information

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

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