ReactOS 0.4.15-dev-7942-gd23573b
kdvbox.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: GPL, see COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: drivers/base/kdvm/kdvbox.c
5 * PURPOSE: VBOX data exchange function for kdvbox
6 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
7 */
8
9#include "kdvm.h"
10
11typedef struct
12{
16
17typedef struct
18{
21
22VOID
25{
27}
28
29VOID
33 _Out_ PULONG ReceiveDataSize)
34{
35 PKDVBOX_SEND_HEADER SendHeader;
36 PKDVBOX_RECEIVE_HEADER ReceiveHeader;
37
38 /* Setup the send-header */
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 */
55 *ReceiveDataSize = ReceiveHeader->ReceivedDataSize;
56
57 //KdpDbgPrint("got data:\n");
58 //KdVmDbgDumpBuffer(KdVmDataBuffer, *ReceiveDataSize + sizeof(*ReceiveHeader));
59
60}
VOID NTAPI KdVmKdVmExchangeData(_Out_ PVOID *ReceiveData, _Out_ PULONG ReceiveDataSize)
Definition: kdvbox.c:31
VOID NTAPI KdVmPrepareBuffer(VOID)
Definition: kdvbox.c:24
struct KDVBOX_RECEIVE_HEADER * PKDVBOX_RECEIVE_HEADER
struct KDVBOX_SEND_HEADER * PKDVBOX_SEND_HEADER
ULONG KdVmBufferPos
Definition: kdvm.c:20
UCHAR KdVmDataBuffer[KDVM_BUFFER_SIZE]
Definition: kdvm.c:18
PHYSICAL_ADDRESS KdVmBufferPhysicalAddress
Definition: kdvm.c:19
#define KDVM_BUFFER_SIZE
Definition: kdvm.h:33
VOID FASTCALL KdVmExchange(_In_ ULONG_PTR PhysicalAddress, _In_ SIZE_T BufferSize)
#define _Out_
Definition: ms_sal.h:345
static ULONG ReceiveData(PINFO pInfo)
Definition: ntpclient.c:102
ULONG ReceivedDataSize
Definition: kdvbox.c:19
ULONG SendSize
Definition: kdvbox.c:13
ULONG BufferSize
Definition: kdvbox.c:14
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
LONGLONG QuadPart
Definition: typedefs.h:114