ReactOS  0.4.13-dev-698-g77671f0
cinfo.c File Reference
#include "precomp.h"
Include dependency graph for cinfo.c:

Go to the source code of this file.

Functions

TDI_STATUS SetConnectionInfo (TDIObjectID *ID, PCONNECTION_ENDPOINT Connection, PVOID Buffer, UINT BufferSize)
 

Function Documentation

◆ SetConnectionInfo()

TDI_STATUS SetConnectionInfo ( TDIObjectID ID,
PCONNECTION_ENDPOINT  Connection,
PVOID  Buffer,
UINT  BufferSize 
)

Definition at line 11 of file cinfo.c.

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
#define INFO_TYPE_CONNECTION
Definition: tdiinfo.h:71
static BOOL Set
Definition: pageheap.c:10
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

Referenced by InfoTdiSetInformationEx().