Reports if the byte order of the previously saved packet capture data file, known as the savefile was swapped.
pcap Library (libpcap.a)
#include <pcap.h>
int pcap_is_swapped(pcap_t * p);
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.
Item | Description |
---|---|
p | Points to a packet capture descriptor as returned from the pcap_open_offline subroutine. |
Item | Description |
---|---|
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. |