>
> You are right probably either use WaitForMultipleObjects or add wrapper 
> functionality for it.

We use events and wait for it in lib/daemon-windows.c and
lib/fatal-signal.c with a combination of poll_wevent_wait(),
SetEvent() and ResetEvent(). What is the workflow that you are
interested in? We also use events indirectly through sockets (through
poll_fd_wait() ) in lib/stream-fd-windows.c and lib/stream-ssl.c.



>
> Alin.
>
> -----Mesaj original-----
> De la: Gurucharan Shetty [mailto:shet...@nicira.com]
> Trimis: Tuesday, September 9, 2014 11:28 PM
> Către: Alin Serdean
> Cc: dev@openvswitch.org
> Subiect: Re: [ovs-dev] [PATCH v2 4/5] Changes needed to netlink-socket for 
> MSVC
>
> On Tue, Jul 29, 2014 at 8:23 AM, Alin Serdean 
> <aserd...@cloudbasesolutions.com> wrote:
>> Add two functions set_sock_pid_in_kernel and portid_next. This will
>> allow the channel identification for the kernel extension to send back 
>> messages.
>>
>> Replace send with WriteFile equivalent and ignore nl_sock_drain for
>> the moment under MSVC.
>>
>> Replace sendmsg and recvmsg with ReadFile and WriteFile equivalents.
>>
>> On MSVC put in handle instead of fd(sock->fd becomes sock->handle).
>>
>> Creation of the netlink socket will be replaced by CreateFile equivalent.
>>
>> Add MAX_STACK_LENGTH for MSVC this will be our maximmum for on-stack copy 
>> buffer.
>>
>> Signed-off-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com>
>
>
>
>>  int
>>  nl_sock_leave_mcgroup(struct nl_sock *sock, unsigned int
>> multicast_group)  {
>> +#ifdef _WIN32
>> +    struct ofpbuf msg_buf;
>> +    struct message_multicast
>> +    {
>> +        struct nlmsghdr;
>> +        /* if true, join; if else, leave*/
>> +        unsigned char join;
>> +    };
>> +
>> +    struct message_multicast msg = { 0 };
>> +    nl_msg_put_nlmsghdr(&msg, sizeof(struct message_multicast),
>> +                        multicast_group, 0);
> The above gives a warning:
> "incompatible types - from "message_multicast *" to "ofpbuf *".
> Is it intentional (I haven't followed the work closely, so I am not sure)? If 
> so, can we cast it?
>
>>  /* Starts a Netlink "dump" operation, by sending 'request' to the
>> kernel on a @@ -877,7 +1045,11 @@ nl_dump_done(struct nl_dump *dump)
>> void  nl_sock_wait(const struct nl_sock *sock, short int events)  {
>> +#ifdef _WIN32
>> +    poll_fd_wait(sock->handle, events);
>
> poll_fd_wait() can only be used for sockets. So this will not give you the 
> desired behavior. Did you mean to use poll_wevent_wait() instead?
> (In which case 'events' will be ignored. )
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to