Closes the open files related to the packet capture descriptor and frees the memory used by the packet capture descriptor.
pcap Library (libpcap.a)
void pcap_close(pcap_t * p);
The pcap_close subroutine closes the files associated with the packet capture descriptor and deallocates resources. If the pcap_open_offline subroutine was previously called, the pcap_close subroutine closes the savefile, a previously saved packet capture data file. Or the pcap_close subroutine closes the packet capture device if the pcap_open_live subroutine was previously called.
|p||Points to a packet capture descriptor as returned by the pcap_open_live or the pcap_open_offline subroutine.|
The pcap_open_live (pcap_open_live Subroutine) subroutine, pcap_open_offline (pcap_open_offline Subroutine) subroutine.