~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to modules/linux/shared/vmciKernelAPI.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
/*
20
20
 * vmciKernelAPI.h --
21
21
 *
22
 
 *    Kernel API exported from the VMCI host and guest drivers.
 
22
 *    Kernel API (current) exported from the VMCI host and guest drivers.
23
23
 */
24
24
 
25
25
#ifndef __VMCI_KERNELAPI_H__
31
31
#include "includeCheck.h"
32
32
 
33
33
 
34
 
/* Macros to operate on the driver version number. */
35
 
#define VMCI_MAJOR_VERSION(v)       (((v) >> 16) & 0xffff)
36
 
#define VMCI_MINOR_VERSION(v)       ((v) & 0xffff)
37
 
 
38
 
#include "vmci_defs.h"
39
 
#include "vmci_call_defs.h"
40
 
 
41
 
 
42
 
/* PUBLIC: VMCI Device Usage API. */
43
 
 
44
 
Bool VMCI_DeviceGet(void);
45
 
void VMCI_DeviceRelease(void);
46
 
 
47
 
/* PUBLIC: VMCI Datagram API. */
48
 
 
49
 
int VMCIDatagram_CreateHnd(VMCIId resourceID, uint32 flags,
50
 
                           VMCIDatagramRecvCB recvCB, void *clientData,
51
 
                           VMCIHandle *outHandle);
52
 
int VMCIDatagram_CreateHndPriv(VMCIId resourceID, uint32 flags,
53
 
                               VMCIPrivilegeFlags privFlags,
54
 
                               VMCIDatagramRecvCB recvCB, void *clientData,
55
 
                               VMCIHandle *outHandle);
56
 
int VMCIDatagram_DestroyHnd(VMCIHandle handle);
57
 
int VMCIDatagram_Send(VMCIDatagram *msg);
58
 
 
59
 
/* VMCI Utility API. */
60
 
 
61
 
VMCIId VMCI_GetContextID(void);
62
 
uint32 VMCI_Version(void);
63
 
int VMCI_ContextID2HostVmID(VMCIId contextID, void *hostVmID,
64
 
                            size_t hostVmIDLen);
65
 
 
66
 
/* VMCI Event API. */
67
 
 
68
 
typedef void (*VMCI_EventCB)(VMCIId subID, VMCI_EventData *ed,
69
 
                             void *clientData);
70
 
 
71
 
int VMCIEvent_Subscribe(VMCI_Event event, uint32 flags, VMCI_EventCB callback,
72
 
                        void *callbackData, VMCIId *subID);
73
 
int VMCIEvent_Unsubscribe(VMCIId subID);
74
 
 
75
 
/* VMCI Context API */
76
 
 
77
 
VMCIPrivilegeFlags VMCIContext_GetPrivFlags(VMCIId contextID);
78
 
 
79
 
/* VMCI Discovery Service API. */
80
 
 
81
 
int VMCIDs_Lookup(const char *name, VMCIHandle *out);
82
 
 
83
 
/* VMCI Doorbell API. */
84
 
 
85
 
#define VMCI_FLAG_DELAYED_CB    0x01
86
 
 
87
 
typedef void (*VMCICallback)(void *clientData);
88
 
 
89
 
int VMCIDoorbell_Create(VMCIHandle *handle, uint32 flags,
90
 
                        VMCIPrivilegeFlags privFlags,
91
 
                        VMCICallback notifyCB, void *clientData);
92
 
int VMCIDoorbell_Destroy(VMCIHandle handle);
93
 
int VMCIDoorbell_Notify(VMCIHandle handle,
94
 
                        VMCIPrivilegeFlags privFlags);
95
 
 
96
 
/* VMCI Queue Pair API. */
97
 
 
98
 
typedef struct VMCIQPair VMCIQPair;
99
 
 
100
 
int VMCIQPair_Alloc(VMCIQPair **qpair,
101
 
                    VMCIHandle *handle,
102
 
                    uint64 produceQSize,
103
 
                    uint64 consumeQSize,
104
 
                    VMCIId peer,
105
 
                    uint32 flags,
106
 
                    VMCIPrivilegeFlags privFlags);
107
 
 
108
 
void VMCIQPair_Detach(VMCIQPair **qpair);
109
 
 
110
 
void VMCIQPair_Init(VMCIQPair *qpair);
111
 
void VMCIQPair_GetProduceIndexes(const VMCIQPair *qpair,
112
 
                                 uint64 *producerTail,
113
 
                                 uint64 *consumerHead);
114
 
void VMCIQPair_GetConsumeIndexes(const VMCIQPair *qpair,
115
 
                                 uint64 *consumerTail,
116
 
                                 uint64 *producerHead);
117
 
int64 VMCIQPair_ProduceFreeSpace(const VMCIQPair *qpair);
118
 
int64 VMCIQPair_ProduceBufReady(const VMCIQPair *qpair);
119
 
int64 VMCIQPair_ConsumeFreeSpace(const VMCIQPair *qpair);
120
 
int64 VMCIQPair_ConsumeBufReady(const VMCIQPair *qpair);
121
 
ssize_t VMCIQPair_Enqueue(VMCIQPair *qpair,
122
 
                          const void *buf,
123
 
                          size_t bufSize,
124
 
                          int mode);
125
 
ssize_t VMCIQPair_Dequeue(VMCIQPair *qpair,
126
 
                          void *buf,
127
 
                          size_t bufSize,
128
 
                          int mode);
129
 
ssize_t VMCIQPair_Peek(VMCIQPair *qpair,
130
 
                       void *buf,
131
 
                       size_t bufSize,
132
 
                       int mode);
133
 
 
134
 
#if defined (SOLARIS) || (defined(__APPLE__) && !defined (VMX86_TOOLS)) || \
135
 
    (defined(__linux__) && defined(__KERNEL__))
136
 
/*
137
 
 * Environments that support struct iovec
138
 
 */
139
 
 
140
 
ssize_t VMCIQPair_EnqueueV(VMCIQPair *qpair,
141
 
                           void *iov,
142
 
                           size_t iovSize,
143
 
                           int mode);
144
 
ssize_t VMCIQPair_DequeueV(VMCIQPair *qpair,
145
 
                           void *iov,
146
 
                           size_t iovSize,
147
 
                           int mode);
148
 
ssize_t VMCIQPair_PeekV(VMCIQPair *qpair,
149
 
                        void *iov,
150
 
                        size_t iovSize,
151
 
                        int mode);
152
 
#endif /* Systems that support struct iovec */
 
34
/* With this file you always get the latest version. */
 
35
#include "vmciKernelAPI1.h"
 
36
#include "vmciKernelAPI2.h"
 
37
 
153
38
 
154
39
#endif /* !__VMCI_KERNELAPI_H__ */
 
40