ReactOS  0.4.15-dev-2961-gecb0c09
ainfo.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/ainfo.c
5  * PURPOSE: Per-socket information.
6  * PROGRAMMER: Cameron Gutman
7  */
8 
9 #include "precomp.h"
10 
12  PADDRESS_FILE AddrFile,
13  PVOID Buffer,
15 {
16  switch (ID->toi_id)
17  {
18  case AO_OPTION_TTL:
19  if (BufferSize < sizeof(UINT))
20  return TDI_INVALID_PARAMETER;
21 
22  LockObject(AddrFile);
23  AddrFile->TTL = *((PUCHAR)Buffer);
24  UnlockObject(AddrFile);
25 
26  return TDI_SUCCESS;
27 
29  if (BufferSize < sizeof(UINT))
30  return TDI_INVALID_PARAMETER;
31 
32  LockObject(AddrFile);
33  AddrFile->DF = *((PUINT)Buffer);
34  UnlockObject(AddrFile);
35 
36  return TDI_SUCCESS;
37 
39  if (BufferSize < sizeof(UINT))
40  return TDI_INVALID_PARAMETER;
41 
42  LockObject(AddrFile);
43  AddrFile->BCast = *((PUINT)Buffer);
44  UnlockObject(AddrFile);
45 
46  return TDI_SUCCESS;
47 
49  if (BufferSize < sizeof(UINT))
50  return TDI_INVALID_PARAMETER;
51 
52  LockObject(AddrFile);
53  AddrFile->HeaderIncl = *((PUINT)Buffer);
54  UnlockObject(AddrFile);
55 
56  return TDI_SUCCESS;
57 
58  default:
59  DbgPrint("Unimplemented option %x\n", ID->toi_id);
60 
61  return TDI_INVALID_REQUEST;
62  }
63 }
64 
66  PADDRESS_FILE AddrFile,
67  PVOID Buffer,
69 {
71 
72  return TDI_INVALID_REQUEST;
73 }
TDI_STATUS SetAddressFileInfo(TDIObjectID *ID, PADDRESS_FILE AddrFile, PVOID Buffer, UINT BufferSize)
Definition: ainfo.c:11
#define TDI_SUCCESS
Definition: tdistat.h:30
#define DbgPrint
Definition: loader.c:25
UCHAR TTL
Definition: titypes.h:122
unsigned char * PUCHAR
Definition: retypes.h:3
#define AO_OPTION_TTL
Definition: tcpioctl.h:64
LONG TDI_STATUS
Definition: tdi.h:36
#define AO_OPTION_BROADCAST
Definition: tcpioctl.h:74
Definition: bufpool.h:45
#define AO_OPTION_IP_HDRINCL
Definition: tcpioctl.h:75
TDI_STATUS GetAddressFileInfo(TDIObjectID *ID, PADDRESS_FILE AddrFile, PVOID Buffer, PUINT BufferSize)
Definition: ainfo.c:65
#define TDI_INVALID_PARAMETER
Definition: tdistat.h:52
UINT HeaderIncl
Definition: titypes.h:125
#define AO_OPTION_IP_DONTFRAGMENT
Definition: tcpioctl.h:72
#define ID
Definition: ruserpass.c:36
#define UnlockObject(Object)
Definition: titypes.h:44
UINT BCast
Definition: titypes.h:124
unsigned int UINT
Definition: ndis.h:50
#define UNIMPLEMENTED
Definition: debug.h:115
#define TDI_INVALID_REQUEST
Definition: tdistat.h:63
unsigned int * PUINT
Definition: ndis.h:50
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251
#define LockObject(Object)
Definition: titypes.h:34