<kc version="0.1.0">
<title>Wine Traffic</title>
<author contact="mailto:vinn@theshell.com">Brian Vincent</author>
<issue num="130" date="25 Jul 2002 23:00:00 -0800"/>

<intro><p>This is the 130th release of the Wine's kernel 
cousin publication. It's main goal is to distribute widely 
what's going on around Wine (the Un*x windows emulator).
</p></intro>



<stats posts="147" size="461" contrib="61" multiples="28" lastweek="28">

<person posts="18" size="40" who="Alexandre Julliard &lt;julliard@winehq.com&gt;" />
<person posts="12" size="60" who="Duane Clark &lt;dclark@akamail.com&gt;" />
<person posts="9" size="26" who="Uwe Bonnes &lt;bon@elektron.ikp.physik.tu-darmstadt.de&gt;" />
<person posts="6" size="13" who="Max &lt;max@veneto.com&gt;" />
<person posts="5" size="17" who="Gregg Mattinson &lt;gm138242@scot.canada.sun.com&gt;" />
<person posts="5" size="13" who="Tony Lambregts &lt;tony_lambregts@telusplanet.net&gt;" />
<person posts="5" size="8" who="=Sylvain Petreolle &lt;spetreolle@yahoo.fr&gt;" />
<person posts="5" size="22" who="Francois Gouget &lt;fgouget@free.fr&gt;" />
<person posts="4" size="18" who="Boris Reisig &lt;boris@thinovations.com&gt;" />
<person posts="6" size="24" who="Michael Stefaniuc &lt;mstefani@redhat.com&gt;" />
<person posts="4" size="9" who="Steven Edwards &lt;steven_ed4153@yahoo.com&gt;" />
<person posts="3" size="10" who="Kristoffer Ericson &lt;kristoffer_e1@hotmail.com&gt;" />
<person posts="3" size="9" who="Patrik Stridvall &lt;ps@leissner.se&gt;" />
<person posts="3" size="8" who="Mike McCormack &lt;mikem@codeweavers.com&gt;" />
<person posts="3" size="6" who="Andriy Palamarchuk &lt;apa3a@yahoo.com&gt;" />
<person posts="2" size="23" who="Guy L. Albertelli &lt;galberte@neo.lrun.com&gt;" />
<person posts="2" size="13" who="shaw &lt;shyguy@163.net&gt;" />
<person posts="2" size="7" who="Jesse Allen &lt;uh_ja@gmx.net&gt;" />
<person posts="2" size="6" who="Paul Millar &lt;paulm@astro.gla.ac.uk&gt;" />
<person posts="2" size="5" who="David D. Hagood &lt;wowbagger@sktc.net&gt;" />
<person posts="3" size="7" who="Eric Pouech &lt;eric.pouech@wanadoo.fr&gt;" />
<person posts="2" size="5" who="Andreas Mohr &lt;andi@rhlx01.fht-esslingen.de&gt;" />
<person posts="2" size="4" who="Massimo &lt;max@veneto.com&gt;" />
<person posts="2" size="4" who="Huw D M Davies &lt;h.davies1@physics.ox.ac.uk&gt;" />
<person posts="2" size="4" who="steve_lustbader@hsgmed.com" />
<person posts="2" size="4" who="Peter Lord &lt;plord@totalise.co.uk&gt;" />
<person posts="2" size="3" who="Medland, Bill &lt;Bill.Medland@accpac.com&gt;" />
<person posts="2" size="3" who="Roland &lt;roland@netquant.com.br&gt;" />
<person posts="1" size="5" who="Kevin DeKorte &lt;kdekorte@yahoo.com&gt;" />
<person posts="1" size="5" who="Martin Wilck &lt;Martin.Wilck@Fujitsu-Siemens.com&gt;" />
<person posts="1" size="4" who="Jean-Baptiste Note &lt;jean-baptiste.note@wanadoo.fr&gt;" />
<person posts="1" size="3" who="Rein Klazes &lt;rklazes@xs4all.nl&gt;" />
<person posts="1" size="2" who="dank@kegel.com" />
<person posts="1" size="2" who="Rick Romero &lt;rick@valeoinc.com&gt;" />
<person posts="1" size="2" who="Anthony Tuininga &lt;tuiningas_ml@shaw.ca&gt;" />
<person posts="1" size="2" who="List vmn &lt;list@vmn.com.br&gt;" />
<person posts="1" size="2" who="Gerald Pfeifer &lt;pfeifer@dbai.tuwien.ac.at&gt;" />
<person posts="1" size="2" who="mfeitosa &lt;mfeitosa@vmn.com.br&gt;" />
<person posts="1" size="2" who="P. Christeas &lt;p_christ@hol.gr&gt;" />
<person posts="1" size="2" who="Jan Hurst &lt;jhurst@ii.net&gt;" />
<person posts="1" size="2" who="us@the-edmeades.demon.co.uk" />
<person posts="1" size="2" who="DanteAliegri &lt;dantealiegri@umbc.edu&gt;" />
<person posts="1" size="2" who="Shachar Shemesh &lt;wine-devel@sun.consumer.org.il&gt;" />
<person posts="1" size="2" who="Jukka Heinonen &lt;jhei@iki.fi&gt;" />
<person posts="1" size="2" who="list@vmn.com.br" />
<person posts="1" size="2" who="David Hammerton &lt;david@transgaming.com&gt;" />
<person posts="1" size="2" who="Lionel Ulmer &lt;lionel.ulmer@free.fr&gt;" />
<person posts="1" size="2" who="David Laight &lt;david@l8s.co.uk&gt;" />
<person posts="1" size="2" who="Rafael Kitover &lt;caelum@debian.org&gt;" />
<person posts="1" size="2" who="dusanv &lt;dusanv@cadlink.com&gt;" />
<person posts="1" size="2" who="Vincent Beron &lt;vberon@mecano.gme.usherb.ca&gt;" />
<person posts="1" size="2" who="Ann and Jason Edmeades &lt;us@the-edmeades.demon.co.uk&gt;" />
<person posts="1" size="1" who="Chris Morgan &lt;cmorgan@alum.wpi.edu&gt;" />
<person posts="1" size="1" who="Marcelo Welter &lt;pouback@sysmo.com.br&gt;" />
<person posts="1" size="1" who="Marcus Meissner &lt;meissner@suse.de&gt;" />
<person posts="1" size="1" who="Mark Hannessen &lt;msh104.mymail@12move.nl&gt;" />
<person posts="1" size="1" who="leanne &lt;leanne@thizlinux.com&gt;" />

</stats>



<section 
	title="News: Wine in China?" 
	subject="News" 
	archive="http://english.peopledaily.com.cn/200207/19/eng20020719_99996.shtml" 
	posts="1" 
	startdate="19 Jul 2002 23:00:00 -0800" 
	enddate="25 Jul 2002 23:00:00 -0800"
>
<topic>News</topic>
<mention></mention>
<mention>News</mention>

<p>Some speculation hit the list this week when it 
<a href="http://english.peopledaily.com.cn/200207/19/eng20020719_99996.shtml">
was announced</a> China is going to develop it's own
equivalent of Windows.  A few people wondered if the effort involved
Wine and what ramifications that might have.  However, it's not clear
that there's any intention to run Windows binaries.  So far it seems
like an initiative based on Red Flag Linux and a version of OpenOffice.
Lately there's been a push for more internationalization of Wine, (as
evidenced by some of <a href="http://kt.zork.net/wine/topics.html#Internationalization">
these topics</a>) so it may actually end up in the product.
</p>

</section>





<section 
	title="Flow Control in Wine" 
	subject="DTR / DTS vs RTS/CTS vs Wine" 
	archive="http://www.winehq.com/hypermail/wine-devel/2002/07/0426.html" 
	posts="6" 
	startdate="23 Jul 2002 23:00:00 -0800"
	enddate="24 Jul 2002 23:00:00 -0800" 
>
<topic>IO</topic>
<mention></mention>

<p>Once again, the question of using DTR/DSR flow control in Wine
came up.  This has been covered in the past in <kcref subject="DTR Flow Control"
startdate="21 Feb 2002 23:00:00 -0800"/> and <kcref subject="[patch] DTR/DSR hardware handshake support for 2.0/2.2/2.4"
startdate="01 Aug 2000 00:00:00 -0800"/>.  The most common solution is to just use the RTS/CTS flow control in
the kernel but change the pinout on the cable to support DTR/DSR.  From the Linux
<a href="http://www.tldp.org/HOWTO/Serial-HOWTO-18.html#ss18.4">Serial Howto</a>:
<quote who="Linux Serial Howto">
 Just like RTS and CTS, these pins are paired. For DTE-to-DTE connections they are likely 
 to cross over. There are two ways to use these pins. One way is to use them as a substitute 
 for RTS/CTS flow control. The DTR pin is just like the RTS pin while the DSR pin behaves 
 like the CTS pin. Although Linux doesn't support DTR/DSR flow control, it can be obtained 
 by connecting the RTS/CTS pins at the PC to the DSR/DTR pins at the device that uses DTR/DSR 
 flow control. DTR flow control is the same as DTR/DSR flow control but it's only one-way and 
 only uses the DTR pin at the device. Many text terminals and some printers use DTR/DSR (or 
 just DTR) flow control. 
</quote>.</p>

<p>That usually translates into connecting the PC's pins 4 and 5 (on a 25-pin connector, or 7 and 8 on
a 9-pin) to pins 6 and 20.  This is what Miguel Feitosa did, but he still had some questions:
<quote who="Miguel Feitosa">
 I am testing a serial printer driver that uses DTR/DTS  hardware flow 
 control on wine.
 While testing the driver running winedbg everything worked, not so when I 
 ran the program directly from wine.
 I sent this problem to the printer manufacturer and they put a data scope 
 on the serial line.
 It seems that the DTR/DTS signal was not being caught by the computer and 
 therefore the computer was sending info
 over the serial port when the printer was not ready.
 I read on the net that the linux  kernel does not  implement  DTR/DTS but 
 only RTS/CTS hardware flow control.
</quote></p>

<p>Mike McCormack suggested,
added, <quote who="Mike McCormack">
 Your idea to build a cable that wires the printer's DTR/DSR to the 
 computer's RTS/CTS may work, but you may also need some small hacks in 
 wine to select RTS/CTS flow control when the program asks for DTR/DSR 
 flow control. That won't garantuee that your program works, but it will 
 at least be a little better...
</quote></p>

<p>Miguel had also heard that Windows didn't implement any flow control
itself, but Mike cleared that up,
<quote who="Mike McCormack">
I'm pretty sure that Windows 95 and Windows NT's standard drivers both 
implement hardware flow control (DTR/DSR and RTS/CTS). Windows 3.1 may 
be a different story though...
</quote></p>

</section>






<section 
	title="Overlapped IO" 
	subject="Winsock 2 functions" 
	archive="http://www.winehq.com/hypermail/wine-devel/2002/07/0342.html" 
	posts="3" 
	startdate="19 Jul 2002 23:00:00 -0800" 
	enddate="21 Jul 2002 23:00:00 -0800"
>
<topic>IO</topic>

<mention></mention>

<p>Peter Lord ran across a problem with an application trying to
access some unimplemented functions, <quote who="Peter Lord">
the stumbling block is when the application starts to use network 
operations, specifically WPUCompleteOverlappedRequest and 
WSAAddressToStringA.  Right now, these are unimplimented and the java 
app crashes when trying to call them.</quote>  He wondered
if there were any plans to add those two Wine.</p>

<p>Martin Wilck replied with a lengthy description of some of Winsock's
behavior:</p>
<quote who="Martin Wilck">
<p>
Overlapped IO means that you can schedule an IO request, keep on doing
work, and receive the IO results later (unlike non-blocking IO, where
you have to retry until data is available for reading or writing).
</p><p>
There is overlapped IO in wine, although the operations are not strictly
asynchronous (they seem to be, from the application's point of view).
I took an effort a few months ago to implement the basics of Winsock2 
overlapped IO, and AFAIK it works ok.
</p><p>
WSAAddressToStringA() should be relatively trivial to code.
</p><p>
WPU... functions are a different animal. They are at the downside of 
Winsock2, which is AFAIK completely unimplemented in Wine. 
In Winsock2 it is possible to register protocols as separate drivers.
Actually, the Winsock2 API only works as a generic interface that passes
requests to the respective protocol driver(s). 
Protocol drivers can be stacked and pass information up and down.
In some situations a protocol driver needs to obtain information or use
services from the generic layer, that's where the "WPU..." ("Winsock
Provider Upcall") calls come into play. 
</p><p>
That is, WPU* functions are only relevant for externally registered
protocols which are non-existent under Wine. It wouldn't make much sense
to support them actually, because which network protocols are supported
under Wine is dependent on what protocols the OS it is running on
supports. This could be worked around by using raw sockets and
re-implement the whole TCP/IP stack in Wine, but I guess this is not
what we currently want to do.
</p><p>
You should find out under which circumstances your app calls WPU...
functions. Normally this should never happen because Wine has no
registered Protocol drivers, all protocol handling is done internally,
and WPU... is called from "below" Winsock where control flow should
never get.
</p><p>
It may be possible to setup a hackish primitive WSP/WPU interface in
Wine that avoids crashing at calls of these functions while not really
providing functionality. Even this, though, would require a fundamental
clean-up of the current Winsock code.
</p><p>
Ooops... after writing all this, I just read that
WPUCompleteOverlappedRequest() is unique in that it is the only WPU...
function directly exported by WS2_32.DLL... talk to me about
consistency. Still I think calling the function is restricted to service
providers, it is not for user-land. Does you code require special
protocols to be installed, or does Java register some? Check the
installed protocols on your Windows box in the Network control panel. 
</p></quote>

</section>








<section 
	title="Coding Debug Breakpoints" 
	subject="Coded breakpoints" 
	archive="http://www.winehq.com/hypermail/wine-devel/2002/07/0409.html" 
	posts="10" 
	startdate="22 Jul 2002 23:00:00 -0800"
	enddate="23 Jul 2002 23:00:00 -0800"
>
<topic>Debugging</topic>

<mention></mention>

<p>Max asked,
<quote who="Max">
 Maybe it's a stupid question, but... is there a way to hard-code a
 breakpoint ? I need to check a bit of code that gets called too many times and 
 I'd like to put a conditional breakpoints compiled in code; no way to use 
 winedbg built-in conditional breaks, the condition is too complicated.....
</quote></p>

<p>A bunch of people jumped in with suggestions.  First, Francois Gouget
suggested:</p>
<quote who="Francois Gouget"><p>
 You can do:<ul>
 <code>
  if (complex condition) {<br />
      _CrtDbgBreak();<br />
  }</code></ul>
</p><p>
 Or equivalently:<ul><code>
  if (complex condition) {<br />
      __asm__ ("\tint $0x3\n");<br />
  }</code></ul></p>
<p>
 The int 3 is a software breakpoint (or rather, a software breakpoint is
 an int 3). The bove code will cause you to drop in the debugger if the
 int 3 ever gets executed. This only works on x86 architectures but this
 is probably all you need.
</p>
</quote>
<p>David Hammerton suggested, <quote who="David Hammerton">
 You could do a "<code>raise(SIGSTOP)</code>", or if your lazy, "<code>raise(19)</code>".
 Replace SIGSTOP with your faviourate signal.
 I know that works when debugging with gdb, I guess it should with winedbg...
</quote></p>
<p>Shachar Shemesh had another approach:</p>
<quote who="Shachar Shemesh"><p>
Personally, I do:<ul>
 <code>
    if( condition)<br />
        some meaningless nop;
 </code></ul>
</p><p>
And then set or clear the breakpoint on the nop if I want. This gives me 
debug time control over the breakpoint without giving up on the flexability.
</p></quote>
<p>Marcus Meissner had the shortest suggestion, <quote who="Marcus Meissner">
Just call DbgBreakPoint();</quote>.  </p>


</section>









<section 
	title="Imports in Winelib" 
	subject="Winelib and documentation" 
	archive="http://www.winehq.com/hypermail/wine-devel/2002/07/0395.html" 
	posts="4" 
	startdate="22 Jul 2002 23:00:00 -0800" 
	enddate="22 Jul 2002 23:00:00 -0800"
>
<topic>Documentation</topic>
<mention></mention>

<p>
Steve Lustbader inquired about the state of Winelib documentation,
<quote who="Steve Lustbader">
I've been having some trouble using winelib (with spec files) following the documentation 
on the web site.  A few people in the IRC channel were under the impression that winelib 
had changed and the docs aren't really relevant anymore.  Is the documentation going to 
be updated to the current status of the source?
</quote></p>

<p>Andriy Palamarchuk felt the docs were pretty close to being correct,
but asked for more info on what was wrong.  Steve specifically mentioned 
he was having a problem with import statements in spec files.  Andriy
explained that the documentation was indeed wrong:</p>
<quote who="Andriy Palamarchuk">
<p>
Now it is done by the
following definition in Makefile.in file:
<ul><code>
IMPORTS   = advapi32 kernel32
</code></ul>
</p><p>

As an example of using Winelib I advise you to look
into Wine programs (see programs subdirectory of the
Wine source tree). These programs are compiled as
Winelib programs, you probably will want to do
something similiar.
</p></quote>

<p>Francois Gouget also suggested,
<quote who="Francois Gouget">
You should look into winemaker. winemaker has been updated recently and
I believe it should work though I did not have time to test it recently.
</quote></p>
</section>








</kc>
