[Winpcap-users] pcap_fopen_offline() and pcap_close()

Boaz Brickner boaz.brickner at gmail.com
Fri Jan 27 02:34:15 PST 2012


Hi,

In Pcap.Net (http://pcapdot.net), I'm using pcap_fopen_offline() to open
files.
Since this function assumes the FILE* argument it gets is already open,
does calling pcap_close() on its output also closes that FILE* or do I need
to close it separately.
At first, I thought I need to close it separately, but from some debugging
it seems to me that pcap_fopen_offline() actually takes ownership over the
FILE* so pcap_close() will close it.

I just want to verify that I understand the behavior correctly.

Thanks,

Boaz.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20120127/ae5fe9e7/attachment.html>


More information about the Winpcap-users mailing list