Blocking code for Windows Pipes.

Bryan Kadzban bryan at kadzban.is-a-geek.net
Sat Aug 26 23:30:36 EDT 2006


Jouni Malinen wrote:
> If you want to use WaitForSingleObject to wait for events, you would
> at least need to change wpa_ctrl_get_fd() to return the file handle.
> Though, I'm not sure whether that would work without issues with
> named pipes.

I am fairly sure it will not work properly -- or if it does, I am fairly
sure it's not *documented* to work properly (which means n future
versions of Windows, the behavior could change).  I certainly wouldn't
use it myself.

I believe overlapped I/O is the only documented way to do that kind of
thing.  On the other hand, if the code is just going to wait until input
is available *anyway*, then why not do the ReadFile synchronously?  (Not
in ctrl_iface_named_pipe.c -- in the program being written here.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20060826/a50ffc71/attachment.pgp 


More information about the HostAP mailing list