ReactOS  0.4.13-dev-698-g77671f0
cinfo.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS TCP/IP protocol driver
4  * FILE: tcpip/cinfo.c
5  * PURPOSE: Per-socket connection information.
6  * PROGRAMMER: Jérôme Gardou
7  */
8 
9 #include "precomp.h"
10 
12  PCONNECTION_ENDPOINT Connection,
13  PVOID Buffer,
15 {
16  ASSERT(ID->toi_type == INFO_TYPE_CONNECTION);
17  switch (ID->toi_id)
18  {
19  case TCP_SOCKET_NODELAY:
20  {
21  BOOLEAN Set;
22  if (BufferSize < sizeof(BOOLEAN))
23  return TDI_INVALID_PARAMETER;
24  Set = *(BOOLEAN*)Buffer;
25  return TCPSetNoDelay(Connection, Set);
26  }
27  default:
28  DbgPrint("TCPIP: Unknown connection info ID: %u.\n", ID->toi_id);
29  }
30 
31  return TDI_INVALID_PARAMETER;
32 }
#define DbgPrint
Definition: loader.c:25
LONG TDI_STATUS
Definition: tdi.h:36
#define INFO_TYPE_CONNECTION
Definition: tdiinfo.h:71
static BOOL Set
Definition: pageheap.c:10
TDI_STATUS SetConnectionInfo(TDIObjectID *ID, PCONNECTION_ENDPOINT Connection, PVOID Buffer, UINT BufferSize)
Definition: cinfo.c:11
unsigned char BOOLEAN
Definition: bufpool.h:45
#define TCP_SOCKET_NODELAY
Definition: tcpioctl.h:101
#define BufferSize
Definition: classpnp.h:419
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define TDI_INVALID_PARAMETER
Definition: tdistat.h:52
#define ID
Definition: ruserpass.c:36
NTSTATUS TCPSetNoDelay(PCONNECTION_ENDPOINT Connection, BOOLEAN Set)
Definition: tcp.c:680
unsigned int UINT
Definition: ndis.h:50