<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi Ouroborus.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Some comments about your patches</FONT></DIV>
<DIV><FONT size=2>1. Ok.</FONT></DIV>
<DIV><FONT size=2>2. and 7. Sounds reasonable. Where did you take the
implementation of gai_strerrorA/W from? If we want to include it into the main
WinPcap source code, its license should be compatible with the WinPcap one (i.e.
BSD).</FONT></DIV>
<DIV><FONT size=2>3. Uhm, sounds quite strange. What's the problem if you don't
perform this patch?</FONT></DIV>
<DIV><FONT size=2>4. It's right. I knew about this issue (it generates a
compilation warning) but I was quite lazy in fixing it...</FONT></DIV>
<DIV><FONT size=2>5. You should probably use wpcap.def (wpcap_no_extensions.def
was created to remove some of the exports from the standard
wpcap.def)</FONT></DIV>
<DIV><FONT size=2>6. It seems reasonable. I need to check if this file is used
by libpcap on the other supported OSes.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Will this patch work on cygnus, as well?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=ouroborus@softhome.net
href="mailto:ouroborus@softhome.net">Ouroborus</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, December 16, 2005 9:46
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] Various fixups
(was: libpcap.a)</DIV>
<DIV><BR></DIV>
<DIV><FONT face="Courier New">I finally got the first step of the tutorial to
compile with MingW. This took a number (7) of fixes:<BR></FONT></DIV>
<DIV><BR><FONT face="Courier New">1. Add "-DHAVE_REMOTE" to "CFLAGS" in the
relevant make files<BR><BR><BR>2. Add "../libpcap/Win32/Src/gai_strerror.o" to
the object list in wpcapsrc_3_1\wpcap\PRJ\GNUmakefile<BR><BR><BR>3. Copy
"struct bpf_stat {...};" from wpcapsrc_3_1\Common\Packet32.h to
wpcapsrc_3_1\wpcap\libpcap\pcap-bpf.h<BR><BR><BR>4. Comment out "#define
IN_MULTICAST..." from wpcap\libpcap\Win32\Include\ip6_misc.h<BR><BR><BR>5. Add
'pcap_findalldevs_ex' to Wpcap_no_extensions.def'<BR><BR><BR>6. Change line
678 in wpcapsrc_3_1\wpcap\libpcap\inet.c as per:<BR>### Begin
###<BR>678c678,679<BR>< (char*)tUstr += strlen(tAstr) +
1;;<BR>---<BR>> // (char*)tUstr += strlen(tAstr) +
1;;<BR>> tUstr = (WCHAR*)(((char*)tUstr) + strlen(tAstr)
+ 1);<BR>### End ###<BR><BR><BR>7. Add file
wpcapsrc_3_1\wpcap\libpcap\Win32\Src\gai_strerror.c:<BR>### Begin
###<BR>#define WIN32_LEAN_AND_MEAN<BR>#include
<windows.h><BR><BR>#define GAI_STRERROR_BUFFER_SIZE 1024<BR>//#define
WS2TCPIP_INLINE extern inline<BR>#define WS2TCPIP_INLINE
__stdcall<BR><BR>WS2TCPIP_INLINE<BR>char
*<BR>gai_strerrorA(<BR> IN int
ecode)<BR>{<BR> DWORD dwMsgLen;<BR> static
char buff[GAI_STRERROR_BUFFER_SIZE + 1];<BR><BR> dwMsgLen =
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM<BR>
|FORMAT_MESSAGE_IGNORE_INSERTS<BR>
|FORMAT_MESSAGE_MAX_WIDTH_MASK,<BR>
NULL,<BR>
ecode,<BR>
MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT),<BR>
(LPSTR)buff,<BR>
GAI_STRERROR_BUFFER_SIZE,<BR>
NULL);<BR><BR> return
buff;<BR>}<BR><BR>WS2TCPIP_INLINE<BR>WCHAR
*<BR>gai_strerrorW(<BR> IN int ecode<BR>
)<BR>{<BR> DWORD dwMsgLen;<BR> static
WCHAR buff[GAI_STRERROR_BUFFER_SIZE + 1];<BR><BR> dwMsgLen =
FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM<BR>
|FORMAT_MESSAGE_IGNORE_INSERTS<BR>
|FORMAT_MESSAGE_MAX_WIDTH_MASK,<BR>
NULL,<BR>
ecode,<BR>
MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT),<BR>
(LPWSTR)buff,<BR>
GAI_STRERROR_BUFFER_SIZE,<BR>
NULL);<BR><BR> return buff;<BR>}<BR>### End ###
<BR></FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>