ReactOS  0.4.13-dev-563-g0561610
kdvbox.c File Reference
#include "kdvm.h"
Include dependency graph for kdvbox.c:

Go to the source code of this file.

Classes

struct  KDVBOX_SEND_HEADER
 
struct  KDVBOX_RECEIVE_HEADER
 

Typedefs

typedef struct KDVBOX_SEND_HEADERPKDVBOX_SEND_HEADER
 
typedef struct KDVBOX_RECEIVE_HEADERPKDVBOX_RECEIVE_HEADER
 

Functions

VOID NTAPI KdVmPrepareBuffer (VOID)
 
VOID NTAPI KdVmKdVmExchangeData (_Out_ PVOID *ReceiveData, _Out_ PULONG ReceiveDataSize)
 

Typedef Documentation

◆ PKDVBOX_RECEIVE_HEADER

◆ PKDVBOX_SEND_HEADER

Function Documentation

◆ KdVmKdVmExchangeData()

VOID NTAPI KdVmKdVmExchangeData ( _Out_ PVOID ReceiveData,
_Out_ PULONG  ReceiveDataSize 
)

Definition at line 31 of file kdvbox.c.

34 {
35  PKDVBOX_SEND_HEADER SendHeader;
36  PKDVBOX_RECEIVE_HEADER ReceiveHeader;
37 
38  /* Setup the send-header */
39  SendHeader = (PKDVBOX_SEND_HEADER)KdVmDataBuffer;
40  SendHeader->SendSize = KdVmBufferPos - sizeof(KDVBOX_SEND_HEADER);
41  SendHeader->BufferSize = KDVM_BUFFER_SIZE;
42 
43  //KdpDbgPrint("Sending buffer:\n");
44  //KdVmDbgDumpBuffer(KdVmDataBuffer, KdVmBufferPos);
45 
46  /* Do the data exchange */
48 
49  /* Reset the buffer position */
51 
52  /* Get the receive-header and return information about the received data */
53  ReceiveHeader = (PKDVBOX_RECEIVE_HEADER)KdVmDataBuffer;
55  *ReceiveDataSize = ReceiveHeader->ReceivedDataSize;
56 
57  //KdpDbgPrint("got data:\n");
58  //KdVmDbgDumpBuffer(KdVmDataBuffer, *ReceiveDataSize + sizeof(*ReceiveHeader));
59 
60 }
#define KDVM_BUFFER_SIZE
Definition: kdvm.h:33
ULONG BufferSize
Definition: kdvbox.c:14
VOID FASTCALL KdVmExchange(_In_ ULONG_PTR PhysicalAddress, _In_ SIZE_T BufferSize)
ULONG KdVmBufferPos
Definition: kdvm.c:20
uint32_t ULONG_PTR
Definition: typedefs.h:63
static ULONG ReceiveData(PINFO pInfo)
Definition: ntpclient.c:104
ULONG SendSize
Definition: kdvbox.c:13
UCHAR KdVmDataBuffer[KDVM_BUFFER_SIZE]
Definition: kdvm.c:18
struct KDVBOX_RECEIVE_HEADER * PKDVBOX_RECEIVE_HEADER
struct KDVBOX_SEND_HEADER * PKDVBOX_SEND_HEADER
PHYSICAL_ADDRESS KdVmBufferPhysicalAddress
Definition: kdvm.c:19
ULONG ReceivedDataSize
Definition: kdvbox.c:19
LONGLONG QuadPart
Definition: typedefs.h:112

Referenced by KdVmSendReceive().

◆ KdVmPrepareBuffer()

VOID NTAPI KdVmPrepareBuffer ( VOID  )

Definition at line 24 of file kdvbox.c.

25 {
27 }
ULONG KdVmBufferPos
Definition: kdvm.c:20

Referenced by KdReceivePacket(), KdSendPacket(), KdVmNegotiateProtocolVersions(), and TestConnectionOnChannel().