What you can do is open the file in your code with an fopen, and then use 
pcap_fopen_offline() (there is a trick in the code that makes everything work).

There is a sample in the wpdpack that shows  how to use it, 
WpdPack\Examples-remote\pcap_fopen.

Have a nice day
GV

From: [email protected] 
[mailto:[email protected]] On Behalf Of Guy Harris
Sent: Friday, January 14, 2011 5:33 PM
To: [email protected]
Subject: Re: [Winpcap-users] pcap file pointer


On Jan 14, 2011, at 11:55 AM, Brian Panneton wrote:


I am aware that pcap_file is deprecated, however I am in need of getting the 
actual file pointer to the beginning of each packet. Is there some other way to 
access this pointer?

Unfortunately, no - there's no pcap_tell() call, for example, and something 
such as that would be needed (as the documentation indicates, pcap_file() is 
deprecated because there's no guarantee that its return value could be used, so 
the ftell() call would have to be done inside WinPcap).
_______________________________________________
Winpcap-users mailing list
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users

Reply via email to