VirtualBox

source: vbox/trunk/src/VBox/NetworkServices/NAT/winpoll.h@ 69474

Last change on this file since 69474 was 62481, checked in by vboxsync, 8 years ago

(C) 2016

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.4 KB
Line 
1/* $Id: winpoll.h 62481 2016-07-22 18:30:21Z vboxsync $ */
2/** @file
3 * NAT Network - poll(2) for winsock, definitions and declarations.
4 */
5
6/*
7 * Copyright (C) 2013-2016 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef _WINPOLL_H_
19#define _WINPOLL_H_
20# include <iprt/cdefs.h>
21/**
22 * WinSock2 has definition for POLL* and pollfd, but it defined for _WIN32_WINNT > 0x0600
23 * and used in WSAPoll, which has very unclear history.
24 */
25# if(_WIN32_WINNT < 0x0600)
26# define POLLRDNORM 0x0100
27# define POLLRDBAND 0x0200
28# define POLLIN (POLLRDNORM | POLLRDBAND)
29# define POLLPRI 0x0400
30
31# define POLLWRNORM 0x0010
32# define POLLOUT (POLLWRNORM)
33# define POLLWRBAND 0x0020
34
35# define POLLERR 0x0001
36# define POLLHUP 0x0002
37# define POLLNVAL 0x0004
38
39struct pollfd {
40
41 SOCKET fd;
42 SHORT events;
43 SHORT revents;
44
45};
46#endif
47RT_C_DECLS_BEGIN
48int RTWinPoll(struct pollfd *pFds, unsigned int nfds, int timeout, int *pNready);
49RT_C_DECLS_END
50#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette