[Winpcap-users] [Winpcap-bugs] Filenames with characters that are not ISO-8859-1

Gianluca Varenni Gianluca.Varenni at riverbed.com
Tue Feb 1 12:00:45 PST 2011

Pcap_dump_fopen cannot be exposed directly because FILE pointers cannot be passed across DLLs. However I believe it’s possible to expose it in the same way as pcap_fopen_offline i.e. using a combination of macros and “hidden” export functions. I’m not 100% sure that this approach is 100% safe and does not leak memory.


From: winpcap-users-bounces at winpcap.org [mailto:winpcap-users-bounces at winpcap.org] On Behalf Of Boaz Brickner
Sent: Tuesday, February 01, 2011 1:25 AM
To: winpcap-users at winpcap.org
Subject: Re: [Winpcap-users] [Winpcap-bugs] Filenames with characters that are not ISO-8859-1


Is it possible to export pcap_dump_fopen() so I can use fopen to open files with Unicode filenames?


On Fri, Jan 21, 2011 at 14:05, Boaz Brickner <boaz.brickner at gmail.com<mailto:boaz.brickner at gmail.com>> wrote:
Thanks for your answer GV,

I've looked around and thought about using pcap_fopen_offline() to use the FILE structure that I believe can be opened using a Unicode filenames.

I'm also trying to use pcap_dump_fopen() in the same manner, but I saw that it's an unexported function.


What do you think should I do?

Thank you,


On Wed, Jan 19, 2011 at 01:38, Gianluca Varenni <Gianluca.Varenni at riverbed.com<mailto:Gianluca.Varenni at riverbed.com>> wrote:

First of all, sorry for the late answer.
Adding support for UNICODE file names is not exactly trivial. I haven’t looked too much into the source code, but I’m pretty sure that new functions accepting UNICODE file names would be needed, and for the sake of portability, those functions would need to be back-ported to libpcap (so linux/bsd/…).

Have you tried looking at the WinPcap source code (wpcap.dll, in particular) to understand how difficult it would be?

Have a nice day

From: winpcap-bugs-bounces at winpcap.org<mailto:winpcap-bugs-bounces at winpcap.org> [mailto:winpcap-bugs-bounces at winpcap.org<mailto:winpcap-bugs-bounces at winpcap.org>] On Behalf Of Boaz Brickner
Sent: Friday, January 07, 2011 4:21 AM
To: winpcap-bugs at winpcap.org<mailto:winpcap-bugs at winpcap.org>
Subject: [Winpcap-bugs] Filenames with characters that are not ISO-8859-1


I'm trying to add Unicode filenames support to Pcap.Net (http://pcapdot.net) and it seems that filenames that are not ISO-8859-1 are not supported.

For example, I try to get all of the file devices in a folder using pcap_findalldevs_ex() function.
In this folder, I have the same pcap file copies multiple times with different filenames.
If the file has only characters that are ISO-8859-1 (or ASCII) it appears in the output of the function.
If the file has other characters, it doesn't appear in the output of the function.

Is there something else I can do to handle non ISO-8859-1 pcap filenames using WinPcap functions?

Can you fix it so it will be possible to use every Unicode filename in WinPcap?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20110201/5a4bc5aa/attachment.html>

More information about the Winpcap-users mailing list