ReactOS  0.4.14-dev-342-gdc047f9
qos.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS WinSock 2 API
4  * FILE: dll/win32/ws2_32_new/src/qos.c
5  * PURPOSE: QoS Support
6  * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 #include <ws2_32.h>
12 
13 #define NDEBUG
14 #include <debug.h>
15 
16 /* FUNCTIONS *****************************************************************/
17 
18 /*
19  * @implemented
20  */
21 BOOL
22 WSAAPI
24  IN OUT LPWSABUF lpQOSName,
25  OUT LPQOS lpQOS)
26 {
27  PWSSOCKET Socket;
28  INT Status;
29  INT ErrorCode;
30  DPRINT("WSAGetQOSByName: %lx, %p\n", s, lpQOSName);
31 
32  /* Check for WSAStartup */
34  {
35  /* Get the Socket Context */
36  if ((Socket = WsSockGetSocket(s)))
37  {
38  /* Make the call */
40  lpQOSName,
41  lpQOS,
42  &ErrorCode);
43 
44  /* Deference the Socket Context */
45  WsSockDereference(Socket);
46 
47  /* Return Provider Value */
48  if (Status == ERROR_SUCCESS) return Status;
49 
50  /* If everything seemed fine, then the WSP call failed itself */
52  }
53  else
54  {
55  /* No Socket Context Found */
57  }
58  }
59 
60  /* Return with an Error */
62  return FALSE;
63 }
#define WSAENOTSOCK
Definition: winerror.h:1951
#define IN
Definition: typedefs.h:38
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
#define ERROR_SUCCESS
Definition: deptool.c:10
PWSSOCKET WSAAPI WsSockGetSocket(IN SOCKET Handle)
Definition: dsocket.c:140
#define NO_ERROR
Definition: dderror.h:5
int32_t INT
Definition: typedefs.h:56
WSPPROC_TABLE Service
Definition: ws2_32p.h:80
VOID WSAAPI WsSockDereference(IN PWSSOCKET Socket)
Definition: dsocket.c:205
unsigned int BOOL
Definition: ntddk_ex.h:94
void DPRINT(...)
Definition: polytest.cpp:61
PTPROVIDER Provider
Definition: ws2_32p.h:199
#define SetLastError(x)
Definition: compat.h:417
GLdouble s
Definition: gl.h:2039
Status
Definition: gdiplustypes.h:24
#define WSASYSCALLFAILURE
Definition: winerror.h:1994
#define WSAAPI
Definition: winsock2.h:584
#define OUT
Definition: typedefs.h:39
LPWSPGETQOSBYNAME lpWSPGetQOSByName
Definition: ws2spi.h:476
UINT_PTR SOCKET
Definition: winsock.h:47
FORCEINLINE DWORD WsQuickProlog(VOID)
Definition: ws2_32p.h:892
BOOL WSAAPI WSAGetQOSByName(IN SOCKET s, IN OUT LPWSABUF lpQOSName, OUT LPQOS lpQOS)
Definition: qos.c:23