ReactOS 0.4.17-dev-573-g8315b8c
cinfo.c File Reference
#include "ntdef.h"
#include "precomp.h"
Include dependency graph for cinfo.c:

Go to the source code of this file.

Classes

struct  tcp_keepalive
 

Typedefs

typedef struct tcp_keepalive TCP_KEEPALIVE
 

Functions

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

Typedef Documentation

◆ TCP_KEEPALIVE

Function Documentation

◆ SetConnectionInfo()

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

Definition at line 18 of file cinfo.c.

22{
24 ASSERT(ID->toi_type == INFO_TYPE_CONNECTION);
25 switch (ID->toi_id)
26 {
28 {
30 if (BufferSize < sizeof(BOOLEAN))
32 Set = *(BOOLEAN*)Buffer;
33 return TCPSetNoDelay(Connection, Set);
34 }
36 {
37 DWORD Set;
38 if (BufferSize < sizeof(DWORD))
40 Set = *(DWORD*)Buffer;
41 return TCPSetKeepAlive(Connection, Set);
42 }
44 {
46 if (BufferSize < sizeof(TCP_KEEPALIVE))
49 Status = TCPSetKeepAlive(Connection, Set.onoff);
50 if (!NT_SUCCESS(Status))
51 return Status;
52
53 return TCPSetKeepAliveValues(Connection, Set.keepalivetime, Set.keepaliveinterval);
54 }
55 default:
56 DbgPrint("TCPIP: Unknown connection info ID: %u.\n", ID->toi_id);
57 }
58
60}
unsigned char BOOLEAN
Definition: actypes.h:127
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
unsigned long DWORD
Definition: ntddk_ex.h:95
Status
Definition: gdiplustypes.h:24
#define DbgPrint
Definition: hal.h:12
NTSTATUS TCPSetKeepAliveValues(PCONNECTION_ENDPOINT Connection, DWORD KeepAliveTime, DWORD KeepAliveInterval)
Definition: tcp.c:764
NTSTATUS TCPSetKeepAlive(PCONNECTION_ENDPOINT Connection, BOOLEAN Set)
Definition: tcp.c:749
NTSTATUS TCPSetNoDelay(PCONNECTION_ENDPOINT Connection, BOOLEAN Set)
Definition: tcp.c:734
#define ASSERT(a)
Definition: mode.c:44
static BOOL Set
Definition: pageheap.c:10
#define ID
Definition: ruserpass.c:36
#define TCP_SOCKET_KEEPALIVEVALS
Definition: tcpioctl.h:111
#define TCP_SOCKET_NODELAY
Definition: tcpioctl.h:107
#define TCP_SOCKET_KEEPALIVE
Definition: tcpioctl.h:110
#define INFO_TYPE_CONNECTION
Definition: tdiinfo.h:71
#define TDI_INVALID_PARAMETER
Definition: tdistat.h:52
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254

Referenced by InfoTdiSetInformationEx().