--- a/shared/vmciKernelAPI1.h
+++ b/shared/vmciKernelAPI1.h
@@ -56,87 +56,89 @@

 /* VMCI Device Usage API. */

+#if defined(linux) && !defined(VMKERNEL)
+#define vmci_device_get(_a, _b, _c, _d) 1
+#define vmci_device_release(_x)
+#else // !linux
 typedef void (VMCI_DeviceShutdownFn)(void *deviceRegistration,
                                      void *userData);
-
-Bool VMCI_DeviceGet(uint32 *apiVersion, VMCI_DeviceShutdownFn *deviceShutdownCB,
-                    void *userData, void **deviceRegistration);
-void VMCI_DeviceRelease(void *deviceRegistration);
+Bool vmci_device_get(uint32 *apiVersion,
+                     VMCI_DeviceShutdownFn *deviceShutdownCB,
+                     void *userData, void **deviceRegistration);
+void vmci_device_release(void *deviceRegistration);
+#endif // !linux

 #if defined(_WIN32)
 /* Called when the client is unloading, for Windows only. */
-void VMCI_Exit(void);
+void vmci_exit(void);
 #endif // _WIN32

 /* VMCI Datagram API. */

-int VMCIDatagram_CreateHnd(VMCIId resourceID, uint32 flags,
-                           VMCIDatagramRecvCB recvCB, void *clientData,
-                           VMCIHandle *outHandle);
-int VMCIDatagram_CreateHndPriv(VMCIId resourceID, uint32 flags,
-                               VMCIPrivilegeFlags privFlags,
-                               VMCIDatagramRecvCB recvCB, void *clientData,
-                               VMCIHandle *outHandle);
-int VMCIDatagram_DestroyHnd(VMCIHandle handle);
-int VMCIDatagram_Send(VMCIDatagram *msg);
+int vmci_datagram_create_handle(uint32 resourceId, uint32 flags,
+                                VMCIDatagramRecvCB recvCB, void *clientData,
+                                VMCIHandle *outHandle);
+int vmci_datagram_create_handle_priv(uint32 resourceID, uint32 flags,
+                                     VMCIPrivilegeFlags privFlags,
+                                     VMCIDatagramRecvCB recvCB,
+                                     void *clientData, VMCIHandle *outHandle);
+int vmci_datagram_destroy_handle(VMCIHandle handle);
+int vmci_datagram_send(VMCIDatagram *msg);

 /* VMCI Utility API. */

-VMCIId VMCI_GetContextID(void);
-uint32 VMCI_Version(void);
-int VMCI_ContextID2HostVmID(VMCIId contextID, void *hostVmID,
-                            size_t hostVmIDLen);
-int VMCI_IsContextOwner(VMCIId contextID, void *hostUser);
+VMCIId vmci_get_context_id(void);
+
+#if defined(linux) && !defined(VMKERNEL)
+/* Returned value is a bool, 0 for false, 1 for true. */
+int vmci_is_context_owner(VMCIId contextID, uid_t uid);
+#else // !linux || VMKERNEL
+/* Returned value is a VMCI error code. */
+int vmci_is_context_owner(VMCIId contextID, void *hostUser);
+#endif // !linux || VMKERNEL
+
+uint32 vmci_version(void);
+int vmci_cid_2_host_vm_id(VMCIId contextID, void *hostVmID,
+                          size_t hostVmIDLen);

 /* VMCI Event API. */

 typedef void (*VMCI_EventCB)(VMCIId subID, VMCI_EventData *ed,
                              void *clientData);

-int VMCIEvent_Subscribe(VMCI_Event event, uint32 flags, VMCI_EventCB callback,
-                        void *callbackData, VMCIId *subID);
-int VMCIEvent_Unsubscribe(VMCIId subID);
+int vmci_event_subscribe(VMCI_Event event,
+#if !defined(linux) || defined(VMKERNEL)
+                         uint32 flags,
+#endif // !linux || VMKERNEL
+                         VMCI_EventCB callback,
+                         void *callbackData, VMCIId *subID);
+int vmci_event_unsubscribe(VMCIId subID);

 /* VMCI Context API */

-VMCIPrivilegeFlags VMCIContext_GetPrivFlags(VMCIId contextID);
+VMCIPrivilegeFlags vmci_context_get_priv_flags(VMCIId contextID);

 /* VMCI Queue Pair API. */

 typedef struct VMCIQPair VMCIQPair;

-int VMCIQPair_Alloc(VMCIQPair **qpair,
-                    VMCIHandle *handle,
-                    uint64 produceQSize,
-                    uint64 consumeQSize,
-                    VMCIId peer,
-                    uint32 flags,
-                    VMCIPrivilegeFlags privFlags);
-
-int VMCIQPair_Detach(VMCIQPair **qpair);
-
-int VMCIQPair_GetProduceIndexes(const VMCIQPair *qpair,
-                                uint64 *producerTail,
-                                uint64 *consumerHead);
-int VMCIQPair_GetConsumeIndexes(const VMCIQPair *qpair,
-                                uint64 *consumerTail,
-                                uint64 *producerHead);
-int64 VMCIQPair_ProduceFreeSpace(const VMCIQPair *qpair);
-int64 VMCIQPair_ProduceBufReady(const VMCIQPair *qpair);
-int64 VMCIQPair_ConsumeFreeSpace(const VMCIQPair *qpair);
-int64 VMCIQPair_ConsumeBufReady(const VMCIQPair *qpair);
-ssize_t VMCIQPair_Enqueue(VMCIQPair *qpair,
-                          const void *buf,
-                          size_t bufSize,
-                          int mode);
-ssize_t VMCIQPair_Dequeue(VMCIQPair *qpair,
-                          void *buf,
-                          size_t bufSize,
-                          int mode);
-ssize_t VMCIQPair_Peek(VMCIQPair *qpair,
-                       void *buf,
-                       size_t bufSize,
-                       int mode);
+int vmci_qpair_alloc(VMCIQPair **qpair, VMCIHandle *handle,
+                     uint64 produceQSize, uint64 consumeQSize, VMCIId peer,
+                     uint32 flags, VMCIPrivilegeFlags privFlags);
+int vmci_qpair_detach(VMCIQPair **qpair);
+int vmci_qpair_get_produce_indexes(const VMCIQPair *qpair,
+                                   uint64 *producerTail, uint64 *consumerHead);
+int vmci_qpair_get_consume_indexes(const VMCIQPair *qpair,
+                                   uint64 *consumerTail, uint64 *producerHead);
+int64 vmci_qpair_produce_free_space(const VMCIQPair *qpair);
+int64 vmci_qpair_produce_buf_ready(const VMCIQPair *qpair);
+int64 vmci_qpair_consume_free_space(const VMCIQPair *qpair);
+int64 vmci_qpair_consume_buf_ready(const VMCIQPair *qpair);
+ssize_t vmci_qpair_enqueue(VMCIQPair *qpair, const void *buf, size_t bufSize,
+                           int mode);
+ssize_t vmci_qpair_dequeue(VMCIQPair *qpair, void *buf, size_t bufSize,
+                           int mode);
+ssize_t vmci_qpair_peek(VMCIQPair *qpair, void *buf, size_t bufSize, int mode);

 #if defined (SOLARIS) || (defined(__APPLE__) && !defined (VMX86_TOOLS)) || \
     (defined(__linux__) && defined(__KERNEL__)) || \
@@ -145,18 +147,12 @@ ssize_t VMCIQPair_Peek(VMCIQPair *qpair,
  * Environments that support struct iovec
  */

-ssize_t VMCIQPair_EnqueueV(VMCIQPair *qpair,
-                           void *iov,
-                           size_t iovSize,
-                           int mode);
-ssize_t VMCIQPair_DequeueV(VMCIQPair *qpair,
-                           void *iov,
-                           size_t iovSize,
-                           int mode);
-ssize_t VMCIQPair_PeekV(VMCIQPair *qpair,
-                        void *iov,
-                        size_t iovSize,
-                        int mode);
+ssize_t vmci_qpair_enquev(VMCIQPair *qpair, void *iov, size_t iovSize,
+                          int mode);
+ssize_t vmci_qpair_dequev(VMCIQPair *qpair, void *iov, size_t iovSize,
+                          int mode);
+ssize_t vmci_qpair_peekv(VMCIQPair *qpair, void *iov, size_t iovSize,
+                         int mode);
 #endif /* Systems that support struct iovec */


--- a/shared/vmciKernelAPI2.h
+++ b/shared/vmciKernelAPI2.h
@@ -47,13 +47,11 @@

 typedef void (*VMCICallback)(void *clientData);

-int VMCIDoorbell_Create(VMCIHandle *handle, uint32 flags,
-                        VMCIPrivilegeFlags privFlags,
-                        VMCICallback notifyCB, void *clientData);
-int VMCIDoorbell_Destroy(VMCIHandle handle);
-int VMCIDoorbell_Notify(VMCIHandle handle,
-                        VMCIPrivilegeFlags privFlags);
-
+int vmci_doorbell_create(VMCIHandle *handle, uint32 flags,
+                         VMCIPrivilegeFlags privFlags, VMCICallback notifyCB,
+                         void *clientData);
+int vmci_doorbell_destroy(VMCIHandle handle);
+int vmci_doorbell_notify(VMCIHandle handle, VMCIPrivilegeFlags privFlags);

 /* Typedefs for all of the above, used by the IOCTLs and the kernel library. */

@@ -64,4 +62,3 @@ typedef int (VMCIDoorbell_NotifyFct)(VMCIHandle, VMCIPrivilegeFlags);


 #endif /* !__VMCI_KERNELAPI_2_H__ */
-
--- a/vmci.c
+++ b/vmci.c
@@ -223,7 +223,7 @@ HgfsRequestAsyncShmemDispatch(HgfsAsyncIov *iov, // IN: request vectors
  *      Passes down free pages to the hgfs Server. HgfsServer will use this pages
  *      for sending change notification, oplock breaks etc.
  *
- *      XXX It seems safe to call VMCIDatagram_Send in atomic context.
+ *      XXX It seems safe to call vmci_datagram_send in atomic context.
  *
  * Results:
  *      None
@@ -281,7 +281,7 @@ HgfsVmciChannelPassGuestPages(HgfsTransportChannel *channel) // IN:
    transportHeader->pktType = HGFS_TH_REP_GET_PAGES;

    LOG(10, (KERN_WARNING "Sending %d Guest pages \n", i));
-   if ((ret = VMCIDatagram_Send(dg)) < VMCI_SUCCESS) {
+   if ((ret = vmci_datagram_send(dg)) < VMCI_SUCCESS) {
       if (ret == HGFS_VMCI_TRANSPORT_ERROR) {
          LOG(0, (KERN_WARNING "HGFS Transport error occured. Don't blame VMCI\n"));
       }
@@ -447,11 +447,12 @@ HgfsVmciChannelOpen(HgfsTransportChannel *channel) // IN: Channel
       goto error;
    }

-   ret = VMCIDatagram_CreateHnd(VMCI_INVALID_ID,        /* Resource ID */
-                                VMCI_FLAG_DG_NONE,      /* Flags */
-                                HgfsVmciChannelCallback,/* Datagram Recv Callback */
-                                NULL,                   /* Callback data */
-                                channel->priv);         /* VMCI outhandle */
+   ret = vmci_datagram_create_handle(
+                          VMCI_INVALID_ID,        /* Resource ID */
+                          VMCI_FLAG_DG_NONE,      /* Flags */
+                          HgfsVmciChannelCallback,/* Datagram Recv Callback */
+                          NULL,                   /* Callback data */
+                          channel->priv);         /* VMCI outhandle */
    if (ret != VMCI_SUCCESS) {
       LOG(1, (KERN_WARNING "Failed to create VMCI handle %d\n", ret));
       goto error;
@@ -542,7 +543,7 @@ HgfsVmciChannelTerminateSession(HgfsTransportChannel *channel) {
    transportHeader->pktType = HGFS_TH_TERMINATE_SESSION;

    LOG(1, (KERN_WARNING "Terminating session with host \n"));
-   if ((ret = VMCIDatagram_Send(dg)) < VMCI_SUCCESS) {
+   if ((ret = vmci_datagram_send(dg)) < VMCI_SUCCESS) {
       if (ret == HGFS_VMCI_TRANSPORT_ERROR) {
          LOG(0, (KERN_WARNING "HGFS Transport error occured. Don't blame VMCI\n"));
       }
@@ -580,7 +581,7 @@ HgfsVmciChannelClose(HgfsTransportChannel *channel) // IN: Channel
 {
    ASSERT(channel->priv != NULL);
    HgfsVmciChannelTerminateSession(channel);
-   VMCIDatagram_DestroyHnd(*(VMCIHandle *)channel->priv);
+   vmci_datagram_destroy_handle(*(VMCIHandle *)channel->priv);
    kfree(channel->priv);
    kfree(gHgfsShmemPages.list);
    channel->priv = NULL;
@@ -754,14 +755,14 @@ HgfsVmciChannelSend(HgfsTransportChannel *channel, // IN: Channel
    transportStatus->size = req->bufferSize + sizeof (HgfsVmciTransportStatus);

    /*
-    * Don't try to set req->state after VMCIDatagram_Send().
+    * Don't try to set req->state after vmci_datagram_send().
     * It may be too late then. We could have received a datagram by then and
     * datagram handler expects request's state to be submitted.
     */
    req->state = HGFS_REQ_STATE_SUBMITTED;
    id = req->id;

-   if ((ret = VMCIDatagram_Send(dg)) < VMCI_SUCCESS) {
+   if ((ret = vmci_datagram_send(dg)) < VMCI_SUCCESS) {
       if (ret == HGFS_VMCI_TRANSPORT_ERROR) {
          LOG(0, (KERN_WARNING "HGFS Transport error occured. Don't blame VMCI\n"));
       } else if (ret == HGFS_VMCI_VERSION_MISMATCH) {
