~n-muench/ubuntu/quantal/open-vm-tools/open-vm-tools.may2.sid-sync

« back to all changes in this revision

Viewing changes to modules/solaris/vmhgfs/guest_msg_def.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-05-30 09:48:43 UTC
  • mfrom: (1.1.5 upstream) (2.4.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090530094843-gdpza57r5iqsf124
Tags: 2009.05.22-167859-1
MergingĀ upstreamĀ versionĀ 2009.05.22-167859.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*********************************************************
2
 
 * Copyright (C) 1998 VMware, Inc. All rights reserved.
3
 
 *
4
 
 * The contents of this file are subject to the terms of the Common
5
 
 * Development and Distribution License (the "License") version 1.0
6
 
 * and no later version.  You may not use this file except in
7
 
 * compliance with the License.
8
 
 *
9
 
 * You can obtain a copy of the License at
10
 
 *         http://www.opensource.org/licenses/cddl1.php
11
 
 *
12
 
 * See the License for the specific language governing permissions
13
 
 * and limitations under the License.
14
 
 *
15
 
 *********************************************************/
16
 
 
17
 
/*
18
 
 * guest_msg_def.h --
19
 
 *
20
 
 *    Second layer of the internal communication channel between guest
21
 
 *    applications and vmware
22
 
 *
23
 
 */
24
 
 
25
 
#ifndef _GUEST_MSG_DEF_H_
26
 
#define _GUEST_MSG_DEF_H_
27
 
 
28
 
#define INCLUDE_ALLOW_MODULE
29
 
#define INCLUDE_ALLOW_USERLEVEL
30
 
#define INCLUDE_ALLOW_VMMEXT
31
 
#include "includeCheck.h"
32
 
 
33
 
 
34
 
/* Basic request types */
35
 
typedef enum {
36
 
   MESSAGE_TYPE_OPEN,
37
 
   MESSAGE_TYPE_SENDSIZE,
38
 
   MESSAGE_TYPE_SENDPAYLOAD,
39
 
   MESSAGE_TYPE_RECVSIZE,
40
 
   MESSAGE_TYPE_RECVPAYLOAD,
41
 
   MESSAGE_TYPE_RECVSTATUS,
42
 
   MESSAGE_TYPE_CLOSE,
43
 
} MessageType;
44
 
 
45
 
 
46
 
/* Reply statuses */
47
 
/*  The basic request succeeded */
48
 
#define MESSAGE_STATUS_SUCCESS  0x0001
49
 
/*  vmware has a message available for its party */
50
 
#define MESSAGE_STATUS_DORECV   0x0002
51
 
/*  The channel has been closed */
52
 
#define MESSAGE_STATUS_CLOSED   0x0004
53
 
/*  vmware removed the message before the party fetched it */
54
 
#define MESSAGE_STATUS_UNSENT   0x0008
55
 
/*  A checkpoint occurred */
56
 
#define MESSAGE_STATUS_CPT      0x0010
57
 
/*  An underlying device is powering off */
58
 
#define MESSAGE_STATUS_POWEROFF 0x0020
59
 
/*  vmware has detected a timeout on the channel */
60
 
#define MESSAGE_STATUS_TIMEOUT  0x0040
61
 
/*  vmware supports high-bandwidth for sending and receiving the payload */
62
 
#define MESSAGE_STATUS_HB       0x0080
63
 
 
64
 
/*
65
 
 * This mask defines the status bits that the guest is allowed to set;
66
 
 * we use this to mask out all other bits when receiving the status
67
 
 * from the guest. Otherwise, the guest can manipulate VMX state by
68
 
 * setting status bits that are only supposed to be changed by the
69
 
 * VMX. See bug 45385.
70
 
 */
71
 
#define MESSAGE_STATUS_GUEST_MASK    MESSAGE_STATUS_SUCCESS
72
 
 
73
 
/*
74
 
 * Max number of channels.
75
 
 * Unfortunately this has to be public because the monitor part
76
 
 * of the backdoor needs it for its trivial-case optimization. [greg]
77
 
 */
78
 
#define GUESTMSG_MAX_CHANNEL 8
79
 
 
80
 
/* Flags to open a channel. --hpreg */
81
 
#define GUESTMSG_FLAG_COOKIE 0x80000000
82
 
#define GUESTMSG_FLAG_ALL GUESTMSG_FLAG_COOKIE
83
 
 
84
 
/*
85
 
 * Maximum size of incoming message. This is to prevent denial of host service
86
 
 * attacks from guest applications.
87
 
 */
88
 
#define GUESTMSG_MAX_IN_SIZE (64 * 1024)
89
 
 
90
 
#endif /* _GUEST_MSG_DEF_H_ */