VirtualBox

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

Last change on this file since 77807 was 76576, checked in by vboxsync, 6 years ago

NetworkServices: scm header guard alignment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.5 KB
Line 
1/* $Id: winpoll.h 76576 2019-01-01 06:05:25Z vboxsync $ */
2/** @file
3 * NAT Network - poll(2) for winsock, definitions and declarations.
4 */
5
6/*
7 * Copyright (C) 2013-2019 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 VBOX_INCLUDED_SRC_NAT_winpoll_h
19#define VBOX_INCLUDED_SRC_NAT_winpoll_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23# include <iprt/cdefs.h>
24/**
25 * WinSock2 has definition for POLL* and pollfd, but it defined for _WIN32_WINNT > 0x0600
26 * and used in WSAPoll, which has very unclear history.
27 */
28# if(_WIN32_WINNT < 0x0600)
29# define POLLRDNORM 0x0100
30# define POLLRDBAND 0x0200
31# define POLLIN (POLLRDNORM | POLLRDBAND)
32# define POLLPRI 0x0400
33
34# define POLLWRNORM 0x0010
35# define POLLOUT (POLLWRNORM)
36# define POLLWRBAND 0x0020
37
38# define POLLERR 0x0001
39# define POLLHUP 0x0002
40# define POLLNVAL 0x0004
41
42struct pollfd {
43
44 SOCKET fd;
45 SHORT events;
46 SHORT revents;
47
48};
49#endif
50RT_C_DECLS_BEGIN
51int RTWinPoll(struct pollfd *pFds, unsigned int nfds, int timeout, int *pNready);
52RT_C_DECLS_END
53#endif /* !VBOX_INCLUDED_SRC_NAT_winpoll_h */
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