<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>GV<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> winpcap-users-bounces@winpcap.org [mailto:winpcap-users-bounces@winpcap.org] <b>On Behalf Of </b>Boaz Brickner<br><b>Sent:</b> Tuesday, February 01, 2011 1:25 AM<br><b>To:</b> winpcap-users@winpcap.org<br><b>Subject:</b> Re: [Winpcap-users] [Winpcap-bugs] Filenames with characters that are not ISO-8859-1<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hi,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Is it possible to export pcap_dump_fopen() so I can use fopen to open files with Unicode filenames?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Boaz.<o:p></o:p></p><div><p class=MsoNormal>On Fri, Jan 21, 2011 at 14:05, Boaz Brickner <<a href="mailto:boaz.brickner@gmail.com">boaz.brickner@gmail.com</a>> wrote:<o:p></o:p></p><div><p class=MsoNormal>Thanks for your answer GV,<br><br>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.<br><br>I'm also trying to use pcap_dump_fopen() in the same manner, but I saw that it's an unexported function.<br><br><a href="http://www.winpcap.org/pipermail/winpcap-bugs/2007-November/000517.html" target="_blank">http://www.winpcap.org/pipermail/winpcap-bugs/2007-November/000517.html</a><br><br>What do you think should I do?<br><br>Thank you,<br><span style='color:#888888'><br>Boaz.</span><o:p></o:p></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On Wed, Jan 19, 2011 at 01:38, Gianluca Varenni <<a href="mailto:Gianluca.Varenni@riverbed.com" target="_blank">Gianluca.Varenni@riverbed.com</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'>Boaz,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'>First of all, sorry for the late answer.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'>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/…). </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'>Have you tried looking at the WinPcap source code (wpcap.dll, in particular) to understand how difficult it would be?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'>Have a nice day</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'>GV</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:10.0pt'>From:</span></b><span style='font-size:10.0pt'> <a href="mailto:winpcap-bugs-bounces@winpcap.org" target="_blank">winpcap-bugs-bounces@winpcap.org</a> [mailto:<a href="mailto:winpcap-bugs-bounces@winpcap.org" target="_blank">winpcap-bugs-bounces@winpcap.org</a>] <b>On Behalf Of </b>Boaz Brickner<br><b>Sent:</b> Friday, January 07, 2011 4:21 AM<br><b>To:</b> <a href="mailto:winpcap-bugs@winpcap.org" target="_blank">winpcap-bugs@winpcap.org</a><br><b>Subject:</b> [Winpcap-bugs] Filenames with characters that are not ISO-8859-1</span><o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi,<br><br>I'm trying to add Unicode filenames support to Pcap.Net (<a href="http://pcapdot.net" target="_blank">http://pcapdot.net</a>) and it seems that filenames that are not ISO-8859-1 are not supported.<br><br>For example, I try to get all of the file devices in a folder using pcap_findalldevs_ex() function.<br>In this folder, I have the same pcap file copies multiple times with different filenames.<br>If the file has only characters that are ISO-8859-1 (or ASCII) it appears in the output of the function.<br>If the file has other characters, it doesn't appear in the output of the function.<br><br>Is there something else I can do to handle non ISO-8859-1 pcap filenames using WinPcap functions?<br><br>Can you fix it so it will be possible to use every Unicode filename in WinPcap?<br><br>Thanks,<br><br>Boaz.<o:p></o:p></p></div></div></div></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></body></html>