1
/*********************************************************
2
* Copyright (C) 2010 VMware, Inc. All rights reserved.
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the
6
* Free Software Foundation version 2 and no later version.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13
* You should have received a copy of the GNU General Public License along
14
* with this program; if not, write to the Free Software Foundation, Inc.,
15
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
*********************************************************/
22
* Kernel API (v2) exported from the VMCI host and guest drivers.
25
#ifndef __VMCI_KERNELAPI_2_H__
26
#define __VMCI_KERNELAPI_2_H__
28
#define INCLUDE_ALLOW_MODULE
29
#define INCLUDE_ALLOW_VMK_MODULE
30
#define INCLUDE_ALLOW_VMKERNEL
31
#include "includeCheck.h"
34
#include "vmciKernelAPI1.h"
37
/* Define version 2. */
39
#undef VMCI_KERNEL_API_VERSION
40
#define VMCI_KERNEL_API_VERSION_2 2
41
#define VMCI_KERNEL_API_VERSION VMCI_KERNEL_API_VERSION_2
44
/* VMCI Doorbell API. */
46
#define VMCI_FLAG_DELAYED_CB 0x01
48
typedef void (*VMCICallback)(void *clientData);
50
int VMCIDoorbell_Create(VMCIHandle *handle, uint32 flags,
51
VMCIPrivilegeFlags privFlags,
52
VMCICallback notifyCB, void *clientData);
53
int VMCIDoorbell_Destroy(VMCIHandle handle);
54
int VMCIDoorbell_Notify(VMCIHandle handle,
55
VMCIPrivilegeFlags privFlags);
58
/* Typedefs for all of the above, used by the IOCTLs and the kernel library. */
60
typedef int (VMCIDoorbell_CreateFct)(VMCIHandle *, uint32, VMCIPrivilegeFlags,
61
VMCICallback, void *);
62
typedef int (VMCIDoorbell_DestroyFct)(VMCIHandle);
63
typedef int (VMCIDoorbell_NotifyFct)(VMCIHandle, VMCIPrivilegeFlags);
66
#endif /* !__VMCI_KERNELAPI_2_H__ */