qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC] Do not set SO_REUSEADDR on Windows


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH RFC] Do not set SO_REUSEADDR on Windows
Date: Wed, 04 Sep 2013 19:40:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

Il 04/09/2013 19:31, Stefan Weil ha scritto:
> May I suggest a slightly different approach? Instead of a new function
> qemu_set_reuseaddr I'd prefer extending the existing qemu_setsockopt.
> These steps / patches are required:
> 
> 1. Move *sock* lines from include/qemu-common.h to include/qemu/sockets.h
>    and addqemu/sockets.h to the include statements in bt-host.c and
>    linux-user/syscall.c (I hope this list is complete).
> 
>    This step is needed because we don't want to add socket includes to
>    qemu-common.h (which would be needed when we add a function prototype
>    for qemu_setsockopt).
> 
> 2. Replace the Win32 defines for qemu_getsockopt, qemu_setsockopt by
> function
>    prototypes (see Linux getsockopt, setsockopt for reference) and
>    implement both functions in util/oslib-win32.c. Ignore SO_REUSEADDR in
>    qemu_setsockopt.
> 
>    Using these two functions allows easy implementation of OS specific hacks
>    (we might need more in the future).
> 
> 3. Revert commit efcb7e45290ecc8633f7c5bdf02ac86f6289fa7d. It is no longer
>    needed after patch 2.

Yeah, that's also an interesting way to do it!

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]